-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
606 additions
and
1,910 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
mirror | ||
.sass-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 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 | ||
output_style = :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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.as3cf-settings select.bucket{margin-bottom:5px;width:380px} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
(function($) { | ||
|
||
$(document).ready(function() { | ||
|
||
$('.as3cf-settings').each(function() { | ||
var $container = $(this); | ||
|
||
$('select.bucket', $container).change(function() { | ||
var $select = $(this); | ||
|
||
if ($select.val() !== 'new') { | ||
return; | ||
} | ||
|
||
var error_func = function(jqXHR, textStatus, errorThrown) { | ||
alert(as3cf_i18n.create_bucket_error + errorThrown); | ||
$select[0].selectedIndex = 0; | ||
console.log( jqXHR ); | ||
console.log( textStatus ); | ||
console.log( errorThrown ); | ||
}; | ||
|
||
var success_func = function(data, textStatus, jqXHR) { | ||
if (typeof data['success'] !== 'undefined') { | ||
var opt = document.createElement('option'); | ||
opt.value = opt.innerHTML = bucket_name; | ||
var inserted_at_position = 0; | ||
$('option', $select).each(function() { | ||
// For some reason, no error occurs when | ||
// adding a bucket you've already added | ||
if ($(this).val() == bucket_name) { | ||
return false; | ||
} | ||
if ($(this).val() > bucket_name) { | ||
$(opt).insertBefore($(this)); | ||
return false; | ||
} | ||
inserted_at_position = inserted_at_position + 1; | ||
}); | ||
$select[0].selectedIndex = inserted_at_position; | ||
|
||
// If they decided to create a new bucket before refreshing | ||
// the page, we need another nonce | ||
as3cf_i18n.create_bucket_nonce = data['_nonce']; | ||
} | ||
else { | ||
alert(as3cf_i18n.create_bucket_error + data['error']); | ||
$select[0].selectedIndex = 0; | ||
} | ||
}; | ||
|
||
var bucket_name = window.prompt(as3cf_i18n.create_bucket_prompt); | ||
if (!bucket_name) { | ||
$select[0].selectedIndex = 0; | ||
return; | ||
} | ||
|
||
var data = { | ||
action: 'as3cf-create-bucket', | ||
bucket_name: bucket_name, | ||
_nonce: as3cf_i18n.create_bucket_nonce | ||
}; | ||
|
||
$.ajax({ | ||
url: ajaxurl, | ||
type: 'POST', | ||
dataType: 'JSON', | ||
success: success_func, | ||
error: error_func, | ||
data: data | ||
}); | ||
}); | ||
|
||
}); | ||
|
||
}); | ||
|
||
})(jQuery); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.as3cf-settings { | ||
select.bucket { | ||
margin-bottom: 5px; | ||
width: 380px; | ||
} | ||
} |
Oops, something went wrong.