Skip to content

Commit

Permalink
dropbox touch each file with a permission update
Browse files Browse the repository at this point in the history
  • Loading branch information
valendesigns committed Oct 14, 2011
1 parent 040ac09 commit 501e5d9
Show file tree
Hide file tree
Showing 54 changed files with 128 additions and 113 deletions.
5 changes: 3 additions & 2 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ a:hover strong {
}
#save_theme_layout {
margin: 5px 10px 0 0;
padding: 3px 3px 4px 3px;
padding: 5px 3px 4px 3px;
width: 140px;
float: left;
}
#active_theme_layout {
float: right;
Expand Down Expand Up @@ -649,7 +650,7 @@ a:hover strong {
padding-top: 15px;
}
#framework_wrap .select-layout,
#framework_wrap .save-layout {
#framework_wrap .save-layout-wrap {
height: 34px;
float: right;
}
Expand Down
Empty file modified assets/images/black_px.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/header.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/header_classic.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/icon_add.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/icon_classic.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/icon_dark.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/icon_delete.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/icon_edit.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/icon_error.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/icon_header.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/icon_off.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/icon_on.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/icon_up.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/icon_up_down.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/logo_classic.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/logo_dark.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/pre_bg.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/pre_classic_bg.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/select.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/toggle_tabs.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/js/jquery.color.picker.js
100644 → 100755
Empty file.
44 changes: 29 additions & 15 deletions assets/js/jquery.option.tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
init: function () {
var formfield,
formID,
btnContent = true,
btnContent = '',
tbframe_interval;
// On Click
$('.upload_button').live("click", function () {
Expand All @@ -160,13 +160,17 @@
var document = /(^.*\.pdf|doc|docx|ppt|pptx|odt*)/gi;
var audio = /(^.*\.mp3|m4a|ogg|wav*)/gi;
var video = /(^.*\.mp4|m4v|mov|wmv|avi|mpg|ogv|3gp|3g2*)/gi;
if (itemurl.match(image)) {
btnContent = '<img src="'+itemurl+'" alt="" /><a href="" class="remove">Remove Image</a>';
} else {
btnContent = '<div class="no_image">'+html+'<a href="" class="remove">Remove</a></div>';
if ( UrlExists(itemurl) ) {
if (itemurl.match(image)) {
btnContent = '<img src="'+itemurl+'" alt="" /><a href="" class="remove">Remove Image</a>';
} else {
btnContent = '<div class="no_image">'+html+'<a href="" class="remove">Remove</a></div>';
}
}
$('#' + formfield).val(itemurl);
$('#' + formfield).next().next('div').slideDown().html(btnContent);
$('#' + formfield + '_image').remove();
$('#' + formfield).parent('div').append('<div class="screenshot" id="'+formfield+'_image" />');
$('#' + formfield + '_image').append(btnContent).slideDown();
tb_remove();
} else {
window.original_send_to_editor(html);
Expand All @@ -179,6 +183,13 @@
})
})(jQuery);

function UrlExists(url) {
var http = new XMLHttpRequest();
http.open('HEAD', url, false);
http.send();
return http.status!=404;
}

/**
*
* Inline Edit Options
Expand Down Expand Up @@ -369,21 +380,24 @@
img.attr('src', val);
}
// no image to change add it
if ( val !== '' && ( typeof src == 'undefined' || src == false ) ) {
if ( val !== '' && ( typeof src == 'undefined' || src == false ) && UrlExists(val) ) {
btnContent = '<img src="'+val+'" alt="" /><a href="" class="remove">Remove Image</a>';
$(this).parent().find('.screenshot').append(btnContent);
} else if ( val == '' ) {
$(this).parent('div').append('<div class="screenshot" id="'+id+'_image" />');
$('#' + id + '_image').append(btnContent).slideDown();
} else if ( val == '' || ! UrlExists(val) ) {
img.remove();
btn.remove();
}
});
// add a # to color
// add # to hex if missing
$('.cp_input').live('blur', function() {
var val = $(this).val();
var reg = /^[A-Fa-f0-9]{6}$/;
if( reg.test( val) && val != '' ) {
$(this).attr('value', '#'+val )
}
$('.cp_input').each( function(index, domEle) {
var val = $(domEle).val();
var reg = /^[A-Fa-f0-9]{6}$/;
if( reg.test(val) && val != '' ) {
$(domEle).attr('value', '#'+val )
}
});
});
},
save_options: function (e) {
Expand Down
Empty file modified classes/class.admin.php
100644 → 100755
Empty file.
76 changes: 38 additions & 38 deletions front-end/docs.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,7 @@

<pre><code>add_filter( 'measurement_unit_types', 'custom_unit_types' );

function custom_unit_types()
{
function custom_unit_types() {
$array = array(
'in' => 'inches',
'ft' => 'feet'
Expand All @@ -322,8 +321,7 @@ function custom_unit_types()

<pre><code>add_filter( 'measurement_unit_types', 'custom_unit_types' );

function custom_unit_types($array)
{
function custom_unit_types($array) {
$array['in'] = 'inches';
$array['ft'] = 'feet';
return $array;
Expand All @@ -337,48 +335,50 @@ function custom_unit_types($array)
<strong>Filter to completely change the input fields in the Slider option type</strong><br />
Added to functions.php
</p>
<pre><code>add_filter( 'image_slider_fields', 'new_slider_fields' );
<pre><code>add_filter( 'image_slider_fields', 'new_slider_fields', 10, 2 );

function new_slider_fields()
{
$array = array(
array(
'name' => 'image',
'type' => 'text',
'label' => 'Post Image URL',
'class' => ''
),
array(
'name' => 'link',
'type' => 'text',
'label' => 'Post URL',
'class' => ''
),
array(
'name' => 'description',
'type' => 'textarea',
'label' => 'Post Description',
'class' => ''
)
);
return $array;
function new_slider_fields( $image_slider_fields, $id ) {
if ( $id == 'my_slider_id' ) {
$image_slider_fields = array(
array(
'name' => 'image',
'type' => 'text',
'label' => 'Post Image URL',
'class' => ''
),
array(
'name' => 'link',
'type' => 'text',
'label' => 'Post URL',
'class' => ''
),
array(
'name' => 'description',
'type' => 'textarea',
'label' => 'Post Description',
'class' => ''
)
);
}
return $image_slider_fields;
}</code></pre>

<p>
<strong>Filter to add a new field to the Slider option type</strong><br />
Added to functions.php
</p>
<pre><code>add_filter( 'image_slider_fields', 'new_slider_fields' );
<pre><code>add_filter( 'image_slider_fields', 'new_slider_fields', 10, 2 );

function new_slider_fields($array)
{
$array[] =
array(
'name' => 'awesome_field',
'type' => 'text',
'label' => 'Write Something Awesome',
'class' => ''
);
function new_slider_fields( $image_slider_fields, $id ) {
if ( $id == 'my_slider_id' ) {
$image_slider_fields[] =
array(
'name' => 'awesome_field',
'type' => 'text',
'label' => 'Write Something Awesome',
'class' => ''
);
}
return $array;
}</code></pre>

Expand Down
2 changes: 1 addition & 1 deletion front-end/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<div class="top-layout-bar">

<div class="save-layout">
<div class="save-layout-wrap">
<input type="text" name="options_name" value="" id="save_theme_layout" />
<input type="submit" value="<?php _e('New Layout') ?>" class="button-framework user-save-layout" name="user-save-layout" />
</div>
Expand Down
4 changes: 3 additions & 1 deletion functions/admin/background.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ function option_tree_background( $value, $settings, $int ) { ?>
</div>
<input type="text" name="<?php echo $value->item_id; ?>[background-image]" id="<?php echo $value->item_id; ?>" value="<?php if ( isset( $settings[$value->item_id]['background-image'] ) ) { echo $settings[$value->item_id]['background-image']; } ?>" class="upload<?php if ( isset( $settings[$value->item_id]['background-image'] ) ) { echo ' has-file'; } ?>" />
<input id="upload_<?php echo $value->item_id; ?>" class="upload_button" type="button" value="Upload" rel="<?php echo $int; ?>" />
<?php if ( is_array( @getimagesize( $settings[$value->item_id]['background-image'] ) ) ) { ?>
<div class="screenshot" id="<?php echo $value->item_id; ?>_image">
<?php
if ( isset( $settings[$value->item_id]['background-image'] ) && $settings[$value->item_id]['background-image'] != '' ) {
if ( isset( $settings[$value->item_id]['background-image'] ) && $settings[$value->item_id]['background-image'] != '' ) {
$remove = '<a href="javascript:(void);" class="remove">Remove</a>';
$image = preg_match( '/(^.*\.jpg|jpeg|png|gif|ico*)/i', $settings[$value->item_id]['background-image'] );
if ( $image ) {
Expand All @@ -84,6 +85,7 @@ function option_tree_background( $value, $settings, $int ) { ?>
}
?>
</div>
<?php } ?>
</div>
<div class="description">
<?php echo htmlspecialchars_decode( $value->item_desc ); ?>
Expand Down
Empty file modified functions/admin/category.php
100644 → 100755
Empty file.
Empty file modified functions/admin/checkbox.php
100644 → 100755
Empty file.
Empty file modified functions/admin/colorpicker.php
100644 → 100755
Empty file.
3 changes: 1 addition & 2 deletions functions/admin/css.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
*
* @return string
*/
function option_tree_css( $value, $settings, $int )
{
function option_tree_css( $value, $settings, $int ) {
?>
<div class="option option-css">
<h3><?php echo htmlspecialchars_decode( $value->item_title ); ?></h3>
Expand Down
Empty file modified functions/admin/custom-post.php
100644 → 100755
Empty file.
Empty file modified functions/admin/export.php
100644 → 100755
Empty file.
Empty file modified functions/admin/heading.php
100644 → 100755
Empty file.
Empty file modified functions/admin/input.php
100644 → 100755
Empty file.
Empty file modified functions/admin/measurement.php
100644 → 100755
Empty file.
Empty file modified functions/admin/page.php
100644 → 100755
Empty file.
Empty file modified functions/admin/post.php
100644 → 100755
Empty file.
Empty file modified functions/admin/radio.php
100644 → 100755
Empty file.
Empty file modified functions/admin/select.php
100644 → 100755
Empty file.
7 changes: 3 additions & 4 deletions functions/admin/slider.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ function option_tree_slider( $value, $settings, $int )
*
* @return string
*/
function option_tree_slider_view( $id, $image, $int, $count )
{
function option_tree_slider_view( $id, $image, $int, $count ) {
// required fileds
$requred_fields = array(
array(
Expand Down Expand Up @@ -92,9 +91,9 @@ function option_tree_slider_view( $id, $image, $int, $count )
);

// filter the optional fields
$image_slider_fields = apply_filters( 'image_slider_fields', $image_slider_fields );
$image_slider_fields = apply_filters( 'image_slider_fields', $image_slider_fields, $id );

// merge required & optional arrays
// merge required & optional arrays
$image_slider_fields = array_merge( $requred_fields, $image_slider_fields );
?>
<div id="option-tree-slider-editor_<?php echo $count; ?>" class="option-tree-slider">
Expand Down
Empty file modified functions/admin/tag.php
100644 → 100755
Empty file.
Empty file modified functions/admin/textarea.php
100644 → 100755
Empty file.
Empty file modified functions/admin/textblock.php
100644 → 100755
Empty file.
Empty file modified functions/admin/typography.php
100644 → 100755
Empty file.
15 changes: 6 additions & 9 deletions functions/admin/upload.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,25 @@ function option_tree_upload( $value, $settings, $int ) { ?>
<div class="element">
<input type="text" name="<?php echo $value->item_id; ?>" id="<?php echo $value->item_id; ?>" value="<?php if ( isset( $settings[$value->item_id] ) ) { echo $settings[$value->item_id]; } ?>" class="upload<?php if ( isset( $settings[$value->item_id] ) ) { echo ' has-file'; } ?>" />
<input id="upload_<?php echo $value->item_id; ?>" class="upload_button" type="button" value="Upload" rel="<?php echo $int; ?>" />
<?php if ( is_array( @getimagesize( $settings[$value->item_id] ) ) ) { ?>
<div class="screenshot" id="<?php echo $value->item_id; ?>_image">
<?php
if ( isset( $settings[$value->item_id] ) && $settings[$value->item_id] != '' )
{
if ( isset( $settings[$value->item_id] ) && $settings[$value->item_id] != '' ) {
$remove = '<a href="javascript:(void);" class="remove">Remove</a>';
$image = preg_match( '/(^.*\.jpg|jpeg|png|gif|ico*)/i', $settings[$value->item_id] );
if ( $image )
{
if ( $image ) {
echo '<img src="'.$settings[$value->item_id].'" alt="" />'.$remove.'';
}
else
{
} else {
$parts = explode( "/", $settings[$value->item_id] );
for( $i = 0; $i < sizeof($parts); ++$i )
{
for( $i = 0; $i < sizeof($parts); ++$i ) {
$title = $parts[$i];
}
echo '<div class="no_image"><a href="'.$settings[$value->item_id].'">'.$title.'</a>'.$remove.'</div>';
}
}
?>
</div>
<?php } ?>
</div>
<div class="description">
<?php echo htmlspecialchars_decode( $value->item_desc ); ?>
Expand Down
4 changes: 2 additions & 2 deletions functions/functions.load.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
include( OT_PLUGIN_DIR . '/functions/functions.php' );

if ( is_admin() && isset( $_GET['page'] ) && strpos('_'.$_GET['page'], 'option_tree') ) {
if ( is_admin() && isset( $_GET['page'] ) && strpos( '_' . $_GET['page'], 'option_tree' ) ) {
include( OT_PLUGIN_DIR . '/functions/admin/export.php' );
include( OT_PLUGIN_DIR . '/functions/admin/heading.php' );
include( OT_PLUGIN_DIR . '/functions/admin/input.php' );
Expand All @@ -30,7 +30,7 @@
include( OT_PLUGIN_DIR . '/functions/admin/background.php' );
include( OT_PLUGIN_DIR . '/functions/admin/typography.php' );
include( OT_PLUGIN_DIR . '/functions/admin/css.php' );
} else if ( !is_admin() ) {
} else if ( ! is_admin() ) {
include( OT_PLUGIN_DIR . '/functions/get-option-tree.php' );
}

Loading

0 comments on commit 501e5d9

Please sign in to comment.