Changeset 632663
- Timestamp:
- 12/01/2012 12:06:27 PM (13 years ago)
- Location:
- edge-suite/trunk
- Files:
-
- 7 edited
-
admin/manage.php (modified) (1 diff)
-
admin/options.php (modified) (1 diff)
-
edge-suite.php (modified) (7 diffs)
-
includes/edge-suite-comp-builder.inc (modified) (1 diff)
-
includes/edge-suite-comp.inc (modified) (1 diff)
-
includes/edge-suite-general.php (modified) (1 diff)
-
includes/edge-wordpress.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
edge-suite/trunk/admin/manage.php
r622682 r632663 9 9 } 10 10 11 if ($_POST['action'] == 'upload' && $_POST['upit'] == 'yes') { 12 edge_suite_process_upload(); 13 } 14 elseif ($_POST['action'] == 'delete') { 15 edge_suite_process_delete(); 11 if(isset($_POST['action'])){ 12 if ($_POST['action'] == 'upload' && isset($_POST['upit']) && $_POST['upit'] == 'yes') { 13 edge_suite_process_upload(); 14 } 15 elseif ($_POST['action'] == 'delete') { 16 edge_suite_process_delete(); 17 } 16 18 } 17 19 -
edge-suite/trunk/admin/options.php
r628838 r632663 69 69 70 70 <tr valign="top"> 71 <th scope="row">jQuery NoConflict mode (experimental)</th> 72 <td> 73 <?php 74 $selected = intval(get_option('edge_suite_jquery_noconflict')) == 1 ? 'checked="checked"' : ''; 75 ?> 76 <p><input type="checkbox" name="edge_suite_jquery_noconflict" value="1" <?php echo $selected; ?>"/> 77 Run a separate instance of jQuery for Edge Animate.</p> 78 <span class="setting-description"> 79 Activate this option if you experience problems with other jQuery-based JavaScript plugins. 80 Edge Suite will initialize separate different jQuery versions. 81 </span> 82 </td> 83 </tr> 84 85 <tr valign="top"> 86 <th scope="row">Edge Suite debug mode</th> 87 <td> 88 <?php 89 $selected = intval(get_option('edge_suite_debug')) == 1 ? 'checked="checked"' : ''; 90 ?> 91 <p><input type="checkbox" name="edge_suite_debug" value="1" <?php echo $selected; ?>"/> 92 Run Edge Suite in debug mode</p> 93 </td> 94 </tr> 95 96 <tr valign="top"> 71 97 <th scope="row">Deactivation deletion</th> 72 98 <td> -
edge-suite/trunk/edge-suite.php
r622682 r632663 90 90 add_option('edge_suite_deactivation_delete', 0); 91 91 add_option('edge_suite_widget_shortcode', 0); 92 add_option('edge_suite_jquery_noconflict', 0); 93 add_option('edge_suite_debug', 0); 92 94 93 95 // Create main edge suite directory. … … 117 119 delete_option('edge_suite_deactivation_delete'); 118 120 delete_option('edge_suite_widget_shortcode'); 121 delete_option('edge_suite_jquery_noconflict'); 122 delete_option('edge_suite_debug'); 119 123 } 120 124 } … … 133 137 register_setting('edge_suite_options', 'edge_suite_deactivation_delete'); 134 138 register_setting('edge_suite_options', 'edge_suite_widget_shortcode'); 139 register_setting('edge_suite_options', 'edge_suite_jquery_noconflict'); 140 register_setting('edge_suite_options', 'edge_suite_debug'); 135 141 } 136 142 … … 197 203 function edge_suite_header() { 198 204 global $edge_suite; 205 //TODO: use wp_enqueue_script() 199 206 if(isset($edge_suite->scripts) && is_array($edge_suite->scripts)){ 200 207 print "\n" . implode("\n", $edge_suite->scripts) . "\n"; … … 284 291 */ 285 292 function edge_suite_save_post_reference($id) { 286 if (current_user_can('edge_suite_select_composition') ) {293 if (current_user_can('edge_suite_select_composition') && isset($_POST['edge_suite_composition'])) { 287 294 $definition_id = intval($_POST['edge_suite_composition']); 288 295 if ($definition_id != 0) { … … 367 374 } 368 375 376 function edge_suite_comp_view_iframe($definition_id, $css_style = ''){ 377 return edge_suite_comp_iframe($definition_id, $css_style); 378 } 379 380 function edge_suite_comp_view_inline($definition_id, $css_style = ''){ 381 382 $definition_res = edge_suite_comp_render($definition_id, $css_style); 383 384 $stage = $scripts = ''; 385 386 if($definition_res != NULL){ 387 $scripts = implode("\n", $definition_res['scripts']); 388 $stage = $definition_res['stage']; 389 } 390 391 return "\n" . $scripts . "\n" . $stage ."\n"; 392 } 393 394 369 395 /** 370 396 * Shortcode implementation for 'edge_animation' … … 405 431 // Inline rendering 406 432 else{ 407 $definition_res = edge_suite_comp_render($definition_id, $styles); 408 409 $stage = $scripts = ''; 410 411 if($definition_res != NULL){ 412 // Todo: Placing scripts inline in the content really isn't pretty, but so far there 413 // doesn't seem to be an easy way around this, otherwise we need to handle shortcode 414 // before header fuctions get called. 415 $scripts = implode("\n", $definition_res['scripts']); 416 417 $stage = $definition_res['stage']; 418 } 419 420 return "\n" . $scripts . "\n" . $stage ."\n"; 433 return edge_suite_comp_view_inline($definition_id, $styles); 421 434 } 422 435 -
edge-suite/trunk/includes/edge-suite-comp-builder.inc
r613609 r632663 553 553 $content = preg_replace($load_pattern, $load_replace, $content); 554 554 555 // Search for the okToLaunchComposition function call. 556 $launch_pattern = '/AdobeEdge\.okToLaunchComposition\(compId\)/'; 557 558 // Replace original call with call to custom function, alters jQuery. 559 $launch_replace = 'AdobeEdge.alterOkToLaunchComposition(compId)'; 560 $content = preg_replace($launch_pattern, $launch_replace, $content); 561 555 562 // Find the end of the main JS function and inject to function calls to 556 563 // alter preContent and dlContent DOM, see JS function doc. -
edge-suite/trunk/includes/edge-suite-comp.inc
r612343 r632663 239 239 $js_inline .= "AdobeEdge.pathPrefix.comps = AdobeEdge.pathPrefix.comps || {};"; 240 240 $js_inline .= "AdobeEdge.pathPrefix.comps['" . $definition->composition_id . "'] = '" . $project_path . "';"; 241 242 if(get_option('edge_suite_debug') == 1){ 243 $js_inline .= "AdobeEdge.edgesuiteDebug = 1;"; 244 } 245 246 if(get_option('edge_suite_jquery_noconflict') == 1){ 247 $js_inline .= "AdobeEdge.edgesuiteNoConflict = 1;"; 248 } 241 249 242 250 $scripts = array(); -
edge-suite/trunk/includes/edge-suite-general.php
r622682 r632663 37 37 //Check if dir is writable and create directory structure. 38 38 if (!mkdir_recursive(EDGE_SUITE_COMP_PROJECT_DIR)) { 39 $msg['create_folder'] = 'Edge Suite: Unable to create directoryproject directory (' . EDGE_SUITE_COMP_PROJECT_DIR . '). Is its parent directory writable by the server?';39 $msg['create_folder'] = 'Edge Suite: Unable to create project directory (' . EDGE_SUITE_COMP_PROJECT_DIR . '). Is its parent directory writable by the server?'; 40 40 } 41 41 -
edge-suite/trunk/includes/edge-wordpress.js
r608321 r632663 159 159 } 160 160 161 // for(var i in AdobeEdge.thirdPartyLibs) { 162 // aLoader.push({load: AdobeEdge.thirdPartyLibs[i]}); 163 // } 161 // Check if other jQuery version exist prior to the preloader run 162 if(typeof jQuery != 'undefined'){ 163 if(!AdobeEdge.otherjQuery){ 164 AdobeEdge.edgesuiteLogger('Other jQuery include exists: Version ' + jQuery().jquery); 165 if(AdobeEdge.edgesuiteNoConflict){ 166 AdobeEdge.otherjQuery = jQuery; 167 } 168 } 169 } 170 else{ 171 AdobeEdge.edgesuiteLogger('No other jQuery exists yet.'); 172 } 164 173 165 174 // Call the original loader with the modified aLoader object. … … 167 176 } 168 177 178 window.jQueryEdge = window.jQueryEdge || null; 179 AdobeEdge.alterOkToLaunchComposition = function(comp){ 180 if(AdobeEdge.edgesuiteNoConflict && typeof jQueryEdge != 'undefined'){ 181 AdobeEdge.edgesuiteLogger("Init 'edgejQuery' with: Version " + jQuery().jquery); 182 jQueryEdge = jQuery; 183 // AdobeEdge.edgesuiteLogger('jQuery NoConflict'); 184 // jQuery.noConflict(true); 185 if(AdobeEdge.otherjQuery){ 186 jQuery = AdobeEdge.otherjQuery; 187 AdobeEdge.edgesuiteLogger("Reset 'jQuery' to: Version " + jQuery().jquery); 188 } 189 } 190 191 // Fire composition launch 192 AdobeEdge.okToLaunchComposition(comp); 193 } 194 195 AdobeEdge.edgesuiteLogger = function(msg, level){ 196 if(!level){ 197 level = 'Info'; 198 } 199 if(AdobeEdge.edgesuiteDebug){ 200 console.log('[ DEBUG | EdgeSuite | ' + level + ']: ' + msg); 201 } 202 }
Note: See TracChangeset
for help on using the changeset viewer.