Skip to content

Commit

Permalink
Added author profile and PRO upgrade poll.
Browse files Browse the repository at this point in the history
  • Loading branch information
bradt committed Aug 16, 2012
1 parent a5dd367 commit 1cc5933
Show file tree
Hide file tree
Showing 6 changed files with 506 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.sass-cache
24 changes: 24 additions & 0 deletions asset/config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Require any additional compass plugins here.

# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "img"
javascripts_dir = "js"

# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed

# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true

# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false


# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
168 changes: 149 additions & 19 deletions asset/css/styles.css
Original file line number Diff line number Diff line change
@@ -1,38 +1,168 @@
/* line 1, ../sass/styles.scss */
#migrate-form {
padding-top: 10px;
padding-top: 10px;
}

.form-table .row-new-url th,
.form-table .row-new-url td,
/* line 9, ../sass/styles.scss */
.form-table .row-new-url th, .form-table .row-new-url td,
.form-table .row-new-path th,
.form-table .row-new-path td,
.form-table .row-revisions th,
.form-table .row-revisions td {
padding-bottom: 20px;
border-bottom: 1px solid #ccc;
padding-bottom: 20px;
border-bottom: 1px solid #ccc;
}

.form-table .row-old-path th,
.form-table .row-old-path td,
/* line 18, ../sass/styles.scss */
.form-table .row-old-path th, .form-table .row-old-path td,
.form-table .row-save-file th,
.form-table .row-save-file td,
.form-table .row-guids th,
.form-table .row-guids td {
padding-top: 20px;
padding-top: 20px;
}

/* line 24, ../sass/styles.scss */
p.submit {
overflow: hidden;
padding-top: 20px;
border-top: 1px solid #ccc;
margin-top: 20px;
overflow: hidden;
padding-top: 20px;
border-top: 1px solid #ccc;
margin-top: 20px;
}

/* line 30, ../sass/styles.scss */
p.submit input {
float: left;
float: left;
}

/* line 34, ../sass/styles.scss */
p.submit img {
float: left;
margin: 3px 0 0 5px;
}
float: left;
margin: 3px 0 0 5px;
}

/* line 40, ../sass/styles.scss */
#wpmdb-container {
position: relative;
}

/* line 44, ../sass/styles.scss */
#wpmdb-main {
margin-right: 320px;
min-height: 1000px;
}

/* line 49, ../sass/styles.scss */
#wpmdb-sidebar {
position: absolute;
top: 0;
right: 0;
width: 250px;
border: 1px solid #ccc;
padding: 20px;
}
/* line 57, ../sass/styles.scss */
#wpmdb-sidebar .author {
padding-bottom: 20px;
margin-bottom: 20px;
border-bottom: 1px solid #ccc;
overflow: hidden;
}
/* line 63, ../sass/styles.scss */
#wpmdb-sidebar .author img {
float: left;
margin-right: 20px;
}
/* line 68, ../sass/styles.scss */
#wpmdb-sidebar .author .desc {
float: left;
}
/* line 72, ../sass/styles.scss */
#wpmdb-sidebar .author h3 {
font-size: 12px;
margin: 0;
}
/* line 77, ../sass/styles.scss */
#wpmdb-sidebar .author h2 {
font-size: 18px;
margin: 0;
padding: 0;
}
/* line 82, ../sass/styles.scss */
#wpmdb-sidebar .author h2 a {
color: #464646;
text-decoration: none;
}
/* line 86, ../sass/styles.scss */
#wpmdb-sidebar .author h2 a:hover {
color: #000;
}
/* line 92, ../sass/styles.scss */
#wpmdb-sidebar .author p {
margin: 0;
}
/* line 98, ../sass/styles.scss */
#wpmdb-sidebar .poll h2 {
padding: 0;
margin: 0;
margin-bottom: 0.5em;
color: #666;
font-size: 20px;
}
/* line 106, ../sass/styles.scss */
#wpmdb-sidebar .poll ul {
list-style-type: disc;
}
/* line 110, ../sass/styles.scss */
#wpmdb-sidebar .poll li {
margin-left: 1.5em;
color: #666;
}
/* line 115, ../sass/styles.scss */
#wpmdb-sidebar .poll p {
margin: 0;
}
/* line 119, ../sass/styles.scss */
#wpmdb-sidebar .poll .error {
color: red;
font-weight: bold;
margin-bottom: 1em;
}
/* line 125, ../sass/styles.scss */
#wpmdb-sidebar .poll .thanks {
color: #333;
}
/* line 129, ../sass/styles.scss */
#wpmdb-sidebar .poll .field {
margin-bottom: 1em;
}
/* line 132, ../sass/styles.scss */
#wpmdb-sidebar .poll .field p {
margin-bottom: 0.3em;
}
/* line 136, ../sass/styles.scss */
#wpmdb-sidebar .poll .field .willing-copy {
font-weight: bold;
font-size: 14px;
line-height: 1.4em;
margin-bottom: 1em;
}
/* line 144, ../sass/styles.scss */
#wpmdb-sidebar .poll .field.how-much input {
width: 50px;
}
/* line 150, ../sass/styles.scss */
#wpmdb-sidebar .poll .field.notify-me input {
position: absolute;
}
/* line 154, ../sass/styles.scss */
#wpmdb-sidebar .poll .field.notify-me label {
display: block;
padding-left: 20px;
}
/* line 162, ../sass/styles.scss */
#wpmdb-sidebar .poll .field.comments textarea {
width: 230px;
height: 3em;
}
/* line 167, ../sass/styles.scss */
#wpmdb-sidebar .poll .field.comments textarea.has-content, #wpmdb-sidebar .poll .field.comments textarea:focus {
height: 5em;
}
58 changes: 58 additions & 0 deletions asset/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,64 @@
return false;
}
});

$('#wpmdb-sidebar').each(function() {
var $sidebar = $(this);

$('form', $sidebar).submit(function() {
if (!$('input[name=notify-me]', $sidebar).attr('checked')) {
$('input[name=notify-email]', $sidebar).val('');
}

var $form = $(this),
data = $(this).serializeArray();

data.push({name: 'action', value: 'poll_submission'});

$.post( ajaxurl, data, function(result) {
if (result) {
$('.error', $sidebar).remove();
$('.field.submit-button', $sidebar).before('<p class="error" style="display: none;">' + result + '</p>');
$('.error', $sidebar).fadeIn();
}
else {
$form.html('<p class="thanks">Thanks for your input.</p>').fadeIn();
}
});
return false;
});

$('input[name=willing-pay]', $sidebar).change(function() {
var $yes_questions = $('.yes-questions', $sidebar);
if ('Yes' == $(this).val()) {
$yes_questions.show();
}
else {
$yes_questions.hide();
}

$('.field.comments', $sidebar).show();
});

$('input[name=notify-me]', $sidebar).click(function() {
var $notify_email = $('.notify-email', $sidebar);
if ($(this).attr('checked')) {
$notify_email.show();
}
else {
$notify_email.hide();
}
});

$('.field.comments textarea', $sidebar).blur(function() {
if ($(this).val()) {
$(this).addClass('has-content');
}
else {
$(this).removeClass('has-content');
}
})
});
});

var admin_url = ajaxurl.replace( '/admin-ajax.php', '' ),
Expand Down
Loading

0 comments on commit 1cc5933

Please sign in to comment.