Changeset 701410
- Timestamp:
- 04/22/2013 07:51:17 AM (13 years ago)
- Location:
- cbach-wp-gridster
- Files:
-
- 93 added
- 9 edited
-
tags/1.4 (added)
-
tags/1.4/cbach-wp-gridster.php (added)
-
tags/1.4/css (added)
-
tags/1.4/css/chosen (added)
-
tags/1.4/css/chosen/chosen.css (added)
-
tags/1.4/css/chosen/chosen.min.css (added)
-
tags/1.4/css/gridster (added)
-
tags/1.4/css/gridster/jquery.gridster.css (added)
-
tags/1.4/css/gridster/jquery.gridster.min.css (added)
-
tags/1.4/css/gridster_admin.css (added)
-
tags/1.4/css/gridster_admin.min.css (added)
-
tags/1.4/css/gridster_frontend.css (added)
-
tags/1.4/css/gridster_frontend.min.css (added)
-
tags/1.4/css/gridster_shortcode_editor-style.css (added)
-
tags/1.4/css/gridster_shortcode_editor-style.min.css (added)
-
tags/1.4/css/jquery-ui (added)
-
tags/1.4/css/jquery-ui/jquery-ui-base.css (added)
-
tags/1.4/css/jquery-ui/jquery-ui-base.min.css (added)
-
tags/1.4/images (added)
-
tags/1.4/images/chosen (added)
-
tags/1.4/images/chosen/chosen-sprite.png (added)
-
tags/1.4/images/chosen/chosen-sprite@2x.png (added)
-
tags/1.4/images/gridster_sprite.png (added)
-
tags/1.4/images/jquery-ui-base (added)
-
tags/1.4/images/jquery-ui-base/ui-bg_diagonals-thick_18_b81900_40x40.png (added)
-
tags/1.4/images/jquery-ui-base/ui-bg_diagonals-thick_20_666666_40x40.png (added)
-
tags/1.4/images/jquery-ui-base/ui-bg_flat_10_000000_40x100.png (added)
-
tags/1.4/images/jquery-ui-base/ui-bg_glass_100_f6f6f6_1x400.png (added)
-
tags/1.4/images/jquery-ui-base/ui-bg_glass_100_fdf5ce_1x400.png (added)
-
tags/1.4/images/jquery-ui-base/ui-bg_glass_65_ffffff_1x400.png (added)
-
tags/1.4/images/jquery-ui-base/ui-bg_gloss-wave_35_f6a828_500x100.png (added)
-
tags/1.4/images/jquery-ui-base/ui-bg_highlight-soft_100_eeeeee_1x100.png (added)
-
tags/1.4/images/jquery-ui-base/ui-bg_highlight-soft_75_ffe45c_1x100.png (added)
-
tags/1.4/images/jquery-ui-base/ui-icons_222222_256x240.png (added)
-
tags/1.4/images/jquery-ui-base/ui-icons_228ef1_256x240.png (added)
-
tags/1.4/images/jquery-ui-base/ui-icons_ef8c08_256x240.png (added)
-
tags/1.4/images/jquery-ui-base/ui-icons_ffd27a_256x240.png (added)
-
tags/1.4/images/jquery-ui-base/ui-icons_ffffff_256x240.png (added)
-
tags/1.4/js (added)
-
tags/1.4/js/chosen (added)
-
tags/1.4/js/chosen/chosen.jquery.js (added)
-
tags/1.4/js/chosen/chosen.jquery.min.js (added)
-
tags/1.4/js/gridster (added)
-
tags/1.4/js/gridster/dustmo.jquery.gridster.js (added)
-
tags/1.4/js/gridster/jquery.gridster.js (added)
-
tags/1.4/js/gridster/jquery.gridster.min.js (added)
-
tags/1.4/js/gridster/jquery.gridster.with-extras.js (added)
-
tags/1.4/js/gridster/jquery.gridster.with-extras.min.js (added)
-
tags/1.4/js/gridster/maxgalbu.jquery.gridster.js (added)
-
tags/1.4/js/gridster_admin.js (added)
-
tags/1.4/js/gridster_admin.min.js (added)
-
tags/1.4/js/gridster_feature-pointer.js (added)
-
tags/1.4/js/gridster_feature-pointer.min.js (added)
-
tags/1.4/js/gridster_frontend.js (added)
-
tags/1.4/js/gridster_frontend.min.js (added)
-
tags/1.4/js/jeditable (added)
-
tags/1.4/js/jeditable/jquery.autogrow.js (added)
-
tags/1.4/js/jeditable/jquery.autogrow.min.js (added)
-
tags/1.4/js/jeditable/jquery.jeditable.autogrow.js (added)
-
tags/1.4/js/jeditable/jquery.jeditable.autogrow.min.js (added)
-
tags/1.4/js/jeditable/jquery.jeditable.js (added)
-
tags/1.4/js/jeditable/jquery.jeditable.min.js (added)
-
tags/1.4/js/jquery (added)
-
tags/1.4/js/jquery/jquery-1.7.2.js (added)
-
tags/1.4/js/jquery/jquery-1.7.2.min.js (added)
-
tags/1.4/languages (added)
-
tags/1.4/languages/cbach-wp-gridster-de_DE.mo (added)
-
tags/1.4/languages/cbach-wp-gridster-de_DE.po (added)
-
tags/1.4/languages/cbach-wp-gridster.pot (added)
-
tags/1.4/libs (added)
-
tags/1.4/libs/Textile.php (added)
-
tags/1.4/readme.txt (added)
-
tags/1.4/tinymce (added)
-
tags/1.4/tinymce/i18n (added)
-
tags/1.4/tinymce/i18n/mce_locale.php (added)
-
tags/1.4/tinymce/img (added)
-
tags/1.4/tinymce/img/change-2x.png (added)
-
tags/1.4/tinymce/img/change.png (added)
-
tags/1.4/tinymce/img/delete-2x.png (added)
-
tags/1.4/tinymce/img/delete.png (added)
-
tags/1.4/tinymce/img/edit-2x.png (added)
-
tags/1.4/tinymce/img/edit.png (added)
-
tags/1.4/tinymce/img/t.gif (added)
-
tags/1.4/tinymce/tinymce_gridster_shortcode_modal.js (added)
-
tags/1.4/tinymce/tinymce_gridster_shortcode_modal.min.js (added)
-
tags/1.4/tinymce/tinymce_gridster_shortcode_plugin.js (added)
-
tags/1.4/tinymce/tinymce_gridster_shortcode_plugin.min.js (added)
-
tags/1.4/views (added)
-
tags/1.4/views/gridster-default.php (added)
-
trunk/cbach-wp-gridster.php (modified) (67 diffs)
-
trunk/css/gridster_admin.css (modified) (2 diffs)
-
trunk/css/gridster_admin.min.css (modified) (1 diff)
-
trunk/js/gridster_feature-pointer.js (added)
-
trunk/js/gridster_feature-pointer.min.js (added)
-
trunk/languages/cbach-wp-gridster-de_DE.mo (modified) (previous)
-
trunk/languages/cbach-wp-gridster-de_DE.po (modified) (10 diffs)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/tinymce/i18n/mce_locale.php (modified) (1 diff)
-
trunk/tinymce/tinymce_gridster_shortcode_modal.js (added)
-
trunk/tinymce/tinymce_gridster_shortcode_modal.min.js (added)
-
trunk/tinymce/tinymce_gridster_shortcode_plugin.js (modified) (6 diffs)
-
trunk/tinymce/tinymce_gridster_shortcode_plugin.min.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cbach-wp-gridster/trunk/cbach-wp-gridster.php
r698498 r701410 1 1 <?php 2 /* 3 Plugin Name: Gridster 4 Plugin URI: https://github.com/carstingaxion/cbach-wp-gridster 5 Description: Gridster is a WordPress plugin that makes building intuitive draggable layouts from elements spanning multiple columns. You can even dynamically resize, add and remove elements from the grid, as edit the elements content inline. 6 Author: Carsten Bach 7 Version: 1.3.2 8 Author URI: http://carsten-bach.de 9 */ 2 /** 3 * Plugin Name: Gridster 4 * Plugin URI: https://github.com/carstingaxion/cbach-wp-gridster 5 * Description: Gridster is a WordPress plugin that makes building intuitive draggable layouts from elements spanning multiple columns. You can even dynamically resize, add and remove elements from the grid, as edit the elements content inline. 6 * Author: Carsten Bach 7 * Version: 1.4 8 * Author URI: http://carsten-bach.de 9 * Text Domain: cbach-wp-gridster 10 * License: GPLv2 11 * 12 * Copyright 2013 13 * 14 * This program is free software; you can redistribute it and/or modify 15 * it under the terms of the GNU General Public License, version 2, as 16 * published by the Free Software Foundation. 17 * 18 * This program is distributed in the hope that it will be useful, 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 * GNU General Public License for more details. 22 * 23 * You should have received a copy of the GNU General Public License 24 * along with this program; if not, write to the Free Software 25 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 26 */ 10 27 11 28 … … 44 61 * @type string 45 62 */ 46 protected $version = '1. 3.2';63 protected $version = '1.4'; 47 64 48 65 … … 88 105 * @type string 89 106 */ 90 private $cpt_gridster = 'gridster';107 private static $cpt_gridster = 'gridster'; 91 108 92 109 … … 116 133 * @type string 117 134 */ 118 private $default_settings_name = 'gridster_default_options';135 private static $default_settings_name = 'gridster_default_options'; 119 136 120 137 … … 168 185 protected $error_msg = array(); 169 186 187 188 /** 189 * Feature pointer holder 190 * 191 * @type mixed 192 */ 193 protected $show_feature_pointers = false; 194 170 195 171 196 /** 172 197 * Construct the CLASS 173 *174 * @todo remove script debug175 198 * 176 199 */ … … 194 217 195 218 // check requirements 196 if ( $this->check_dependencies() === true) {219 if ( $this->check_dependencies() ) { 197 220 198 221 //Hook up to the init action … … 220 243 * 221 244 */ 222 public function activate() { 223 224 // init our new post_types and taxonomies to whitelist new permalink structures 225 $this->gridster_register_as_posttype(); 245 public static function activate() { 226 246 227 247 // init first plugin options 228 # update_option( $this->default_settings_name, $this->get_default_settings() );248 # update_option( self::$default_settings_name, $this->get_default_settings() ); 229 249 } 230 250 … … 237 257 * 238 258 */ 239 public function deactivate() {259 public static function deactivate() { 240 260 } 241 261 … … 250 270 * 251 271 */ 252 public function uninstall() {272 public static function uninstall() { 253 273 254 274 // important: check if the file is the one that was registered with the uninstall hook (function) … … 259 279 $all_gridsters = get_posts( array( 260 280 'posts_per_page'=> -1, 261 'post_type' => $this->cpt_gridster,281 'post_type' => self::$cpt_gridster, 262 282 'post_status' => 'any' 263 283 ) ); … … 273 293 274 294 // delete plugin options 275 delete_option( $this->default_settings_name );295 delete_option( self::$default_settings_name ); 276 296 } 277 297 … … 370 390 // AJAX callback for textile rendering of Jeditable "textile" field 371 391 # add_action('wp_ajax_ajax_get_textile_markup_for_jeditable', array( &$this, 'ajax_get_textile_markup_for_jeditable' ) ); 392 393 #add_action( 'admin_enqueue_scripts', array( &$this, 'feature_pointer' ), 1000 ); 394 #add_filter( 'gridster_admin_pointers-post', array( &$this, 'feature_pointers_post' ) ); 395 #add_filter( 'gridster_admin_pointers-post', array( &$this, 'sec_feature_pointers_post' ) ); 396 372 397 } else { 373 398 … … 407 432 // only in 'wp-admin/post-new.php?post_type=gridster' 408 433 // or '/wp-admin/post.php' 409 # if ( is_admin() && isset( $_GET['post_type'] ) && $_GET['post_type'] == $this->cpt_gridster ) {434 # if ( is_admin() && isset( $_GET['post_type'] ) && $_GET['post_type'] == self::$cpt_gridster ) { 410 435 411 436 // in WP < 3.4 the has_post_thumbnail function is only … … 441 466 442 467 // get styles for our workbench 443 if ( $this->current_screen->base == 'post' && $this->current_screen->post_type == $this->cpt_gridster ) {468 if ( $this->current_screen->base == 'post' && $this->current_screen->post_type == self::$cpt_gridster ) { 444 469 // Jquery UI 445 470 wp_register_style( 'jquery-ui-base-css', plugins_url( '/css/jquery-ui/jquery-ui-base.'.$this->minified_css_files.'css', __FILE__ ), $deps, '1.0' ); … … 455 480 wp_register_style( $this->prefix.'lib_css', plugins_url( '/css/gridster/jquery.gridster.'.$this->minified_css_files.'css', __FILE__ ), $deps, $this->gridster_version ); 456 481 wp_enqueue_style( $this->prefix.'lib_css' ); 457 } 482 } 483 /* 484 // get styles for feature pointers 485 if ( $this->show_feature_pointers ) { 486 487 // Add pointers style to queue. 488 wp_enqueue_style( 'wp-pointer' ); 489 } 490 */ 458 491 } 459 492 … … 501 534 502 535 // Register our workbench Scripts 503 if ( $this->current_screen->base == 'post' && $this->current_screen->post_type == $this->cpt_gridster ) {536 if ( $this->current_screen->base == 'post' && $this->current_screen->post_type == self::$cpt_gridster ) { 504 537 505 538 // load depending scripts first … … 545 578 wp_localize_script( $this->prefix.'admin_js', $this->prefix.'admin', $localize ); 546 579 } 580 /* 581 // load scripts for feature-pointers 582 if ( $this->show_feature_pointers ) { 583 584 // Add pointers script to queue. 585 wp_register_script( $this->prefix.'feature-pointer', plugins_url( 'js/gridster_feature-pointer.'.$this->minified_js_files.'js', __FILE__ ), array( 'wp-pointer' ), $this->version ); 586 wp_enqueue_script( $this->prefix.'feature-pointer' ); 587 588 // Add pointer options to script. 589 wp_localize_script( $this->prefix.'feature-pointer', $this->prefix.'Pointers', $this->show_feature_pointers ); 590 } 591 */ 592 547 593 548 594 } … … 677 723 'can_export' => true, 678 724 ); 679 register_post_type( $this->cpt_gridster, $gridster_args );725 register_post_type( self::$cpt_gridster, $gridster_args ); 680 726 } 681 727 … … 701 747 global $post, $post_ID; 702 748 703 $messages[ $this->cpt_gridster] = array(749 $messages[self::$cpt_gridster] = array( 704 750 0 => '', // Unused. Messages start at index 1. 705 751 1 => _x( 'Gridster updated.', 'post_updated message', 'cbach-wp-gridster' ), … … 734 780 735 781 // Check current admin page 736 if( $pagenow == 'edit.php' && isset( $_GET['post_type'] ) && $_GET['post_type'] == $this->cpt_gridster ){737 wp_redirect( admin_url('/post-new.php?post_type=' . $this->cpt_gridster, 'http'), 302 );782 if( $pagenow == 'edit.php' && isset( $_GET['post_type'] ) && $_GET['post_type'] == self::$cpt_gridster ){ 783 wp_redirect( admin_url('/post-new.php?post_type=' . self::$cpt_gridster, 'http'), 302 ); 738 784 exit; 739 785 } … … 818 864 public function gridster_post_row_actions( $actions, $post ) { 819 865 820 if ( $post->post_type == $this->cpt_gridster ) {866 if ( $post->post_type == self::$cpt_gridster ) { 821 867 unset( $actions['inline hide-if-no-js'] ); 822 868 unset( $actions['view'] ); … … 833 879 * 834 880 */ 835 function add_shortcode_to_publish_metabox() {881 public function add_shortcode_to_publish_metabox() { 836 882 837 883 global $post; 838 884 839 if ( $this->cpt_gridster != get_post_type( $post->ID ) )885 if ( self::$cpt_gridster != get_post_type( $post->ID ) ) 840 886 return; 841 887 … … 860 906 __( 'Gridster', 'cbach-wp-gridster' ), 861 907 array( &$this, 'gridster_workbench_meta_box' ), 862 $this->cpt_gridster,908 self::$cpt_gridster, 863 909 'normal', 864 910 'high' … … 872 918 __( 'Gridster - Layout options', 'cbach-wp-gridster' ), 873 919 array( &$this, 'gridster_options_meta_box' ), 874 $this->cpt_gridster,920 self::$cpt_gridster, 875 921 'side', 876 922 'default' … … 879 925 880 926 // remove "Slug" metabox 'cause we really don't need it 881 remove_meta_box( 'slugdiv', $this->cpt_gridster, 'normal' );927 remove_meta_box( 'slugdiv', self::$cpt_gridster, 'normal' ); 882 928 883 929 … … 1057 1103 } 1058 1104 1059 1060 1105 1106 1107 1108 1109 1110 public function feature_pointer( ) { 1111 1112 $screen_id = $this->current_screen->base; 1113 #fb($screen_id); 1114 // Get pointers for this screen 1115 $pointers = apply_filters( 'gridster_admin_pointers-' . $screen_id, array() ); 1116 1117 if ( ! $pointers || ! is_array( $pointers ) ) 1118 return; 1119 1120 // Get dismissed pointers 1121 $dismissed = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) ); 1122 $valid_pointers = array(); 1123 1124 // Check pointers and remove dismissed ones. 1125 foreach ( $pointers as $pointer_id => $pointer ) { 1126 1127 // Sanity check 1128 if ( in_array( $pointer_id, $dismissed ) || empty( $pointer ) || empty( $pointer_id ) || empty( $pointer['target'] ) || empty( $pointer['options'] ) ) 1129 continue; 1130 1131 $pointer['pointer_id'] = $pointer_id; 1132 1133 // Add the pointer to $valid_pointers array 1134 $valid_pointers[] = $pointer; 1135 } 1136 1137 // No valid pointers? Stop here. 1138 if ( ! empty( $valid_pointers ) ) 1139 $this->show_feature_pointers = $valid_pointers; 1140 1141 // Add pointers script to queue. 1142 wp_register_script( $this->prefix.'feature-pointer', plugins_url( 'js/gridster_feature-pointer.'.$this->minified_js_files.'js', __FILE__ ), array( 'wp-pointer' ), $this->version ); 1143 wp_enqueue_script( $this->prefix.'feature-pointer' ); 1144 1145 // Add pointer options to script. 1146 wp_localize_script( $this->prefix.'feature-pointer', $this->prefix.'Pointers', $this->show_feature_pointers ); 1147 1148 } 1061 1149 /*************************************************************************************************************************************************************************************************** 1062 1150 * … … 1113 1201 1114 1202 // look for existing posts 1115 $have_posts = get_posts( array( 'post_type' => $this->cpt_gridster, 'posts_per_page' => -1, 'post_status' => 'any' ) );1203 $have_posts = get_posts( array( 'post_type' => self::$cpt_gridster, 'posts_per_page' => -1, 'post_status' => 'any' ) ); 1116 1204 1117 1205 // update plugin options, if we've posts 1118 1206 $this->default_settings['have_gridster_posts'] = ( empty( $have_posts ) ) ? false : true; 1119 update_option( $this->default_settings_name, $this->default_settings );1207 update_option( self::$default_settings_name, $this->default_settings ); 1120 1208 } 1121 1209 … … 1136 1224 1137 1225 // get settings from DB 1138 $default_settings = (array) get_option( $this->default_settings_name );1226 $default_settings = (array) get_option( self::$default_settings_name ); 1139 1227 $this->default_settings = $default_settings; 1140 1228 … … 1209 1297 1210 1298 // remove "All Gridster" Page from "Gridster" post_type menu, if nothing can be shown there 1211 remove_submenu_page( 'edit.php?post_type=' . $this->cpt_gridster, 'edit.php?post_type=' . $this->cpt_gridster );1299 remove_submenu_page( 'edit.php?post_type=' . self::$cpt_gridster, 'edit.php?post_type=' . self::$cpt_gridster ); 1212 1300 } 1213 1301 … … 1222 1310 public function settings_page () { 1223 1311 1224 $tab = isset( $_GET['tab'] ) ? $_GET['tab'] : $this->default_settings_name;1312 $tab = isset( $_GET['tab'] ) ? $_GET['tab'] : self::$default_settings_name; 1225 1313 ?> 1226 1314 <div class="wrap"> … … 1249 1337 public function plugin_options_tabs() { 1250 1338 1251 $current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : $this->default_settings_name;1339 $current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : self::$default_settings_name; 1252 1340 screen_icon(); 1253 1341 echo '<h2 class="nav-tab-wrapper">'; … … 1273 1361 1274 1362 // Title of general Settings Tab 1275 $this->plugin_settings_tabs[ $this->default_settings_name] = __( 'Default Options for all gridsters','cbach-wp-gridster' );1363 $this->plugin_settings_tabs[self::$default_settings_name] = __( 'Default Options for all gridsters','cbach-wp-gridster' ); 1276 1364 1277 1365 // register settings and validate callback 1278 1366 register_setting( 1279 $this->default_settings_name,1280 $this->default_settings_name,1367 self::$default_settings_name, 1368 self::$default_settings_name, 1281 1369 array( &$this, 'settings_validate' ) 1282 1370 ); … … 1287 1375 __( 'Default Options for all Gridsters', 'cbach-wp-gridster' ), 1288 1376 array( &$this, 'settings_default_section_helptext' ), 1289 $this->default_settings_name1377 self::$default_settings_name 1290 1378 ); 1291 1379 … … 1295 1383 __( 'Minimum number columns to create', 'cbach-wp-gridster' ), 1296 1384 array( &$this, 'settings_text_input' ), 1297 $this->default_settings_name,1385 self::$default_settings_name, 1298 1386 'section_general', 1299 1387 array( 1300 1388 'name' => 'min_cols', 1301 'label_for' => $this->default_settings_name.'-min_cols',1389 'label_for' => self::$default_settings_name.'-min_cols', 1302 1390 ) 1303 1391 ); … … 1308 1396 __( 'horizontal margin', 'cbach-wp-gridster' ), 1309 1397 array( &$this, 'settings_text_input' ), 1310 $this->default_settings_name,1398 self::$default_settings_name, 1311 1399 'section_general', 1312 1400 array( 1313 1401 'name' => 'widget_margin_x', 1314 'label_for' => $this->default_settings_name.'-widget_margin_x',1402 'label_for' => self::$default_settings_name.'-widget_margin_x', 1315 1403 ) 1316 1404 ); … … 1321 1409 __( 'vertical margin', 'cbach-wp-gridster' ), 1322 1410 array( &$this, 'settings_text_input' ), 1323 $this->default_settings_name,1411 self::$default_settings_name, 1324 1412 'section_general', 1325 1413 array( 1326 1414 'name' => 'widget_margin_y', 1327 'label_for' => $this->default_settings_name.'-widget_margin_y',1415 'label_for' => self::$default_settings_name.'-widget_margin_y', 1328 1416 ) 1329 1417 ); … … 1334 1422 __( 'widgets base width', 'cbach-wp-gridster' ), 1335 1423 array( &$this, 'settings_text_input' ), 1336 $this->default_settings_name,1424 self::$default_settings_name, 1337 1425 'section_general', 1338 1426 array( 1339 1427 'name' => 'widget_base_width', 1340 'label_for' => $this->default_settings_name.'-widget_base_width',1428 'label_for' => self::$default_settings_name.'-widget_base_width', 1341 1429 ) 1342 1430 ); … … 1347 1435 __( 'widgets base height', 'cbach-wp-gridster' ), 1348 1436 array( &$this, 'settings_text_input' ), 1349 $this->default_settings_name,1437 self::$default_settings_name, 1350 1438 'section_general', 1351 1439 array( 1352 1440 'name' => 'widget_base_height', 1353 'label_for' => $this->default_settings_name.'-widget_base_height',1441 'label_for' => self::$default_settings_name.'-widget_base_height', 1354 1442 ) 1355 1443 ); … … 1392 1480 } else { 1393 1481 add_settings_error( 1394 $this->default_settings_name,1482 self::$default_settings_name, 1395 1483 'invalid-min_cols-integer', 1396 1484 '<strong>'.__( 'Minimum number columns to create', 'cbach-wp-gridster' ).'</strong>: '. __( 'You have entered an invalid value. Value must be of type: integer.', 'cbach-wp-gridster' ) … … 1403 1491 } else { 1404 1492 add_settings_error( 1405 $this->default_settings_name,1493 self::$default_settings_name, 1406 1494 'invalid-widget_margin_x-integer', 1407 1495 '<strong>'.__( 'horizontal margin', 'cbach-wp-gridster' ).'</strong>: '. __( 'You have entered an invalid value. Value must be of type: integer.', 'cbach-wp-gridster' ) … … 1414 1502 } else { 1415 1503 add_settings_error( 1416 $this->default_settings_name,1504 self::$default_settings_name, 1417 1505 'invalid-widget_margin_y-integer', 1418 1506 '<strong>'.__( 'vertical margin', 'cbach-wp-gridster' ).'</strong>: '. __( 'You have entered an invalid value. Value must be of type: integer.', 'cbach-wp-gridster' ) … … 1425 1513 } else { 1426 1514 add_settings_error( 1427 $this->default_settings_name,1515 self::$default_settings_name, 1428 1516 'invalid-widget_base_width-integer', 1429 1517 '<strong>'.__( 'widgets base width', 'cbach-wp-gridster' ).'</strong>: '. __( 'You have entered an invalid value. Value must be of type: integer.', 'cbach-wp-gridster' ) … … 1436 1524 } else { 1437 1525 add_settings_error( 1438 $this->default_settings_name,1526 self::$default_settings_name, 1439 1527 'invalid-widget_base_height-integer', 1440 1528 '<strong>'.__( 'widgets base height', 'cbach-wp-gridster' ).'</strong>: '. __( 'You have entered an invalid value. Value must be of type: integer.', 'cbach-wp-gridster' ) … … 1457 1545 public function settings_text_input( $args ) { 1458 1546 1459 $id = esc_attr( $this->default_settings_name.'-'.$args['name'] );1460 $name = esc_attr( $this->default_settings_name.'['.$args['name'].']' );1547 $id = esc_attr( self::$default_settings_name.'-'.$args['name'] ); 1548 $name = esc_attr( self::$default_settings_name.'['.$args['name'].']' ); 1461 1549 $value = esc_attr( $this->default_settings[$args['name']] ); 1462 1550 echo '<input type="text" id="'.$id.'" name="'.$name.'" value="'.$value.'" />'; … … 1480 1568 1481 1569 // check if we're on the right post_type 1482 if ( $this->cpt_gridster != $_POST['post_type'] )1570 if ( self::$cpt_gridster != $_POST['post_type'] ) 1483 1571 return; 1484 1572 … … 1531 1619 1532 1620 // only go on for gridster posts 1533 if ( $post->post_type != $this->cpt_gridster )1621 if ( $post->post_type != self::$cpt_gridster ) 1534 1622 return; 1535 1623 1536 1624 // check if the current user is authorised to do this action. 1537 $pt = get_post_type_object( $this->cpt_gridster );1625 $pt = get_post_type_object( self::$cpt_gridster ); 1538 1626 if ( ! current_user_can( $pt->cap->delete_post , $post_id ) ) 1539 1627 return; … … 1580 1668 1581 1669 // check if we're on the right post_type 1582 if ( $this->cpt_gridster != $post->post_type )1670 if ( self::$cpt_gridster != $post->post_type ) 1583 1671 return; 1584 1672 … … 1716 1804 // verifies the AJAX request to prevent external processing requests 1717 1805 check_ajax_referer( $this->nonce, 'nonce' ); 1806 1807 // on updating an existing shortcode, we need the ID 1808 $selected = ( isset( $_GET['selected'] ) && !empty( $_GET['selected'] ) && $_GET['selected'] != 'undefined' ) ? absint( $_GET['selected'] ) : false ; 1718 1809 1719 1810 // setup query arguments 1720 1811 $args = array( 1721 'post_type' => $this->cpt_gridster,1812 'post_type' => self::$cpt_gridster, 1722 1813 'orderby'=> 'title', 1723 1814 'order' => 'ASC', … … 1736 1827 echo '<link rel="stylesheet" media="screen" type="text/css" href="' . includes_url( '/js/tinymce/themes/advanced/skins/wp_theme/dialog.css', __FILE__ ) . '">'; 1737 1828 echo '<link rel="stylesheet" media="screen" type="text/css" href="' . plugins_url( '/css/gridster_admin.'.$this->minified_css_files.'css', __FILE__ ) . '">'; 1738 # echo '<script language="javascript" type="text/javascript" src="' . plugins_url( '/tinymce/tinymce_gridster_shortcode_modal.js', __FILE__ ) . '" /></script>'; 1739 // for debug only 1740 # $date = new DateTime(); 1741 # echo '<link rel="stylesheet" media="screen" type="text/css" href="' . plugins_url( '/css/gridster_admin.css?cache=' . $date->getTimestamp(), __FILE__ ) . '">'; 1742 # echo '<script language="javascript" type="text/javascript" src="' . plugins_url( '/tinymce/tinymce_gridster_shortcode_modal.js?cache=' . $date->getTimestamp(), __FILE__ ) . '" /></script>'; 1829 echo '<script language="javascript" type="text/javascript" src="' . includes_url( 'js/tinymce/tiny_mce_popup.js' ) . '"></script>'; 1830 echo '<script language="javascript" type="text/javascript" src="' . plugins_url( '/tinymce/tinymce_gridster_shortcode_modal.'.$this->minified_css_files.'js', __FILE__ ) . '" /></script>'; 1743 1831 1744 1832 echo '</head><body>'; … … 1752 1840 echo '<p>'; 1753 1841 echo '<label for="'.$this->prefix.'choose_shortcode_list_el-' . get_the_ID() . '">'; 1754 echo '<input type="radio" name="' . $this->prefix . 'choose_shortcode_list" id="' . $this->prefix . 'choose_shortcode_list_el-' . get_the_ID() . '" value="' . esc_attr( '[' . $this->gridster_shortcode . ' id="' . get_the_ID() . '" title="' . get_the_title() . '"]' ) . '">';1842 echo '<input type="radio" ' . checked( $selected, get_the_ID(), false ) . ' name="' . $this->prefix . 'choose_shortcode_list" id="' . $this->prefix . 'choose_shortcode_list_el-' . get_the_ID() . '" value="' . esc_attr( '[' . $this->gridster_shortcode . ' id="' . get_the_ID() . '" title="' . get_the_title() . '"]' ) . '">'; 1755 1843 echo get_the_title() . ' '; 1756 1844 echo '</label>'; … … 1768 1856 1769 1857 endwhile; 1770 1858 1859 $submit_value = ( $selected ) ? __( 'Replace', 'cbach-wp-gridster' ) : __( 'Insert', 'cbach-wp-gridster' ); 1860 echo '<div class="mceActionPanel">'. 1861 '<input type="submit" onclick="GridsterModalDialog.insert(GridsterModalDialog.local_ed)" value="' . $submit_value . '" id="insert">'. 1862 '<input type="button" onclick="tinyMCEPopup.close();" value="' . __( 'Cancel', 'cbach-wp-gridster' ) . '" id="cancel">'. 1863 '</div>'; 1864 1771 1865 // no?, then give a hint 1772 1866 else: … … 1777 1871 echo '<p>' . sprintf( 1778 1872 __( 'Go on and <a onclick="javascript:window.top.location.href=\'%1$s\'; return false; " href="%1$s" title="Go to the Gridster Edit Screen (will load a new page)">publish at least one</a>.', 'cbach-wp-gridster' ), 1779 admin_url( 'edit.php?post_type=' . $this->cpt_gridster )1873 admin_url( 'edit.php?post_type=' . self::$cpt_gridster ) 1780 1874 ) . '</p>'; 1781 1875 echo '</div>'; 1782 1876 1877 echo '<div class="mceActionPanel">'. 1878 '<input type="button" onclick="tinyMCEPopup.close();" value="' . __( 'Cancel', 'cbach-wp-gridster' ) . '" id="cancel">'. 1879 '</div>'; 1783 1880 endif; 1784 1881 … … 1846 1943 if( $gridster_last->have_posts() ) : 1847 1944 1848 while ( $gridster_last->have_posts() ) : $gridster_last->the_post();1945 while ( $gridster_last->have_posts() ) : $gridster_last->the_post(); 1849 1946 1850 1947 $post_links .= '<li rel="' . get_the_ID() . '">' . … … 2027 2124 2028 2125 $plugin_array['gridster_shortcode'] = plugins_url( '/tinymce/tinymce_gridster_shortcode_plugin.'.$this->minified_js_files.'js', __FILE__ ); 2029 // for debug only2030 # $date = new DateTime();2031 # $plugin_array['gridster_shortcode'] = plugins_url( '/tinymce/tinymce_gridster_shortcode_plugin.js?cache=' . $date->getTimestamp(), __FILE__ );2032 2126 return $plugin_array; 2033 2127 } … … 2049 2143 2050 2144 $editor_styles['content_css'] .= ',' . plugins_url( '/css/gridster_shortcode_editor-style.'.$this->minified_css_files.'css' , __FILE__ ); 2051 // for debug only2052 # $date = new DateTime();2053 # $editor_styles['content_css'] .= ',' . plugins_url( '/css/gridster_shortcode_editor-style.css?cache=' . $date->getTimestamp() , __FILE__ );2054 2145 return $editor_styles; 2055 2146 } … … 2064 2155 * @param array tinymce buttons 2065 2156 * 2066 * @return array updated tinymce buttons including a seperator and the "Insert Gridster" Button2157 * @return array updated tinymce buttons including a seperator and the "Insert Gridster" Button 2067 2158 * 2068 2159 */ … … 2106 2197 * 2107 2198 */ 2108 function body_class( $classes ) {2199 public function body_class( $classes ) { 2109 2200 2110 2201 global $post; … … 2118 2209 2119 2210 2120 2211 2212 public function feature_pointers_post( $p ) { 2213 $p['gridster_tinymce_button'] = array( 2214 'target' => '#content_gridster_shortcode', 2215 'options' => array( 2216 'content' => sprintf( '<h3> %s </h3> <p> %s </p>', 2217 __( 'Title', 'cbach-wp-gridster' ), 2218 __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'cbach-wp-gridster' ) 2219 ), 2220 'position' => array( 'edge' => 'bottom', 'align' => 'middle' ) 2221 ) 2222 ); 2223 return $p; 2224 } 2225 2226 public function sec_feature_pointers_post( $p ) { 2227 $p['gridster_menu'] = array( 2228 'target' => '#menu-posts-gridster', 2229 'options' => array( 2230 'content' => sprintf( '<h3> %s </h3> <p> %s </p>', 2231 __( 'Ceate your first Gridster','cbach-wp-gridster' ), 2232 __( 'Start with your first Gridster here. Drag & drop your existing content into a customizable grid, resize its elements and re-use it from everywhere by using shortcodes.', 'cbach-wp-gridster' ) 2233 ), 2234 'position' => array( 'edge' => 'left', 'align' => 'middle' ) 2235 ) 2236 ); 2237 return $p; 2238 } 2121 2239 /*************************************************************************************************************************************************************************************************** 2122 2240 * … … 2145 2263 'id' => '', 2146 2264 'title' => '' 2147 ), $atts ) );2265 ), $atts, $this->gridster_shortcode ) ); 2148 2266 2149 2267 // abort if ID is not present … … 2161 2279 if ( ! $layout = $this->post_settings['layout'] ) 2162 2280 return; 2163 2281 2282 // unescape Widgets from JSON string 2283 $widgets = json_decode( $layout ); 2284 2164 2285 // define this, to load scripts & styles accordingly 2165 2286 $this->shortcode_used = true; 2166 2287 2167 $output = '<div class="gridster-wrap">'. 2288 // executes a hook created by add_action 2289 do_action( 'gridster_before_shortcode_render', $id, $title, $widgets ); 2290 2291 $output = '<div id="' . sanitize_title_with_dashes( strtolower( $title ) ) . '" class="gridster-wrap">'. 2168 2292 '<ul class="gridster">'; 2169 2293 2170 $widgets = json_decode( $layout );2171 2294 foreach ( $widgets as $widget ) { 2172 $output .= '<li data-sizex="'.$widget->size_x.'" data-sizey="'.$widget->size_y.'" data-col="'.$widget->col.'" data-row="'.$widget->row.'" class="' . implode( ' ', get_post_class( $widget->classes, $widget->id ) ) . '">'; 2295 2296 $classes = ( isset( $widget->classes ) && !empty( $widget->classes ) ) ? $widget->classes : array(); 2297 $output .= '<li data-sizex="'.$widget->size_x.'" data-sizey="'.$widget->size_y.'" data-col="'.$widget->col.'" data-row="'.$widget->row.'" class="' . implode( ' ', get_post_class( $classes, $widget->id ) ) . '">'; 2173 2298 $output .= html_entity_decode( $widget->html ); 2174 2299 $output .= '</li>'; … … 2176 2301 2177 2302 $output .= '</ul></div>'; 2303 2304 // 2305 $output = apply_filters( 'gridster_shortcode_output', $output ); 2306 2307 // executes a hook created by add_action 2308 do_action( 'gridster_after_shortcode_render', $id, $title, $widgets ); 2178 2309 2179 2310 return $output; … … 2227 2358 2228 2359 /** 2229 * set current_screen object2360 * get current_screen object 2230 2361 * 2231 2362 * @since 1.0 … … 2302 2433 $no_missing_requirement = false; 2303 2434 $this->error_msg[] = sprintf( 2304 __( 'You need to run at least PHP %1$s.' ,'cbach-wp-gridster' ) 2435 __( 'Your server is running PHP version %1$s but this plugin requires at least PHP %2$s. Please run an upgrade.' ,'cbach-wp-gridster' ) 2436 ,phpversion() 2305 2437 ,self::PHPNEED 2306 2438 ); … … 2321 2453 settings_errors( ); 2322 2454 2323 if ( isset( $this->error_msg ) && current_user_can('manage_options') ) { 2455 if ( !empty( $this->error_msg ) && current_user_can('manage_options') ) { 2456 2457 // Suppress "Plugin activated" notice. 2458 unset( $_GET['activate'] ); 2459 2324 2460 $error_code = sanitize_title_with_dashes( strtolower( self::NAME ) ); 2325 2461 $errors = new WP_Error( $error_code, $this->error_msg ); … … 2332 2468 '<strong>'.self::NAME.'</strong>: '. 2333 2469 $error_element. 2334 '</p>< /div>';2470 '</p><p>' . sprintf( __( '%s has been deactivated.', 'cbach-wp-gridster' ), '<i>' . self::NAME . '</i> ' ) . '</p></div>'; 2335 2471 $i++; 2336 2472 } … … 2338 2474 echo $output; 2339 2475 } 2476 2477 // do not activate plugin, because of missing requirements 2478 deactivate_plugins( plugin_basename( __FILE__ ) ); 2340 2479 } 2341 2480 } … … 2352 2491 2353 2492 // On first activation 2354 register_activation_hook( __FILE__, array( &$cbach_wpGridster, 'activate' ) );2493 register_activation_hook( __FILE__, array( 'cbach_wpGridster', 'activate' ) ); 2355 2494 // On deactivation 2356 register_ activation_hook( __FILE__, array( &$cbach_wpGridster, 'deactivate' ) );2357 // On delet e2358 register_ activation_hook( __FILE__, array( &$cbach_wpGridster, 'uninstall' ) );2495 register_deactivation_hook( __FILE__, array( 'cbach_wpGridster', 'deactivate' ) ); 2496 // On deletion 2497 register_uninstall_hook( __FILE__, array( 'cbach_wpGridster', 'uninstall' ) ); 2359 2498 } -
cbach-wp-gridster/trunk/css/gridster_admin.css
r691719 r701410 523 523 color: #333333; 524 524 background-color: #F1F1F1; 525 height: 100%; 525 526 } 526 527 html#gridster_modal-content, 527 528 html#gridster_modal-content body { 529 min-height: 95%; 530 position: relative; 528 531 } 529 532 #gridster_modal-content h2 { … … 565 568 margin: 3.5em 10%; 566 569 } 567 570 #gridster_modal-content div.mceActionPanel { 571 bottom: 0; 572 margin-top: 5px; 573 position: absolute; 574 width: 100%; 575 } 568 576 569 577 -
cbach-wp-gridster/trunk/css/gridster_admin.min.css
r691719 r701410 1 .gridster li .meta-label span.delete-post,.gridster li .meta-label span.move-handle,#adminmenu #menu-posts-gridster div.wp-menu-image,#icon-edit.icon32-posts-gridster,body.settings_page_gridster_default_options #icon-options-general,.gridster_edit:before,.gridster_edit-area:before,.wp_themeSkin .mceIcon.mce_gridster_shortcode{background-image:url('../images/gridster_sprite.png');background-repeat:no-repeat}#adminmenu #menu-posts-gridster div.wp-menu-image{background-position:7px -42px}#adminmenu #menu-posts-gridster:hover div.wp-menu-image,#adminmenu #menu-posts-gridster.wp-has-current-submenu div.wp-menu-image{background-position:7px -71px}#icon-edit.icon32-posts-gridster,body.settings_page_gridster_default_options #icon-options-general{background-position:0 -114px}.wp_themeSkin .mceIcon.mce_gridster_shortcode{background-position:2px -46px}.wp_themeSkin .mceIcon.mce_gridster_shortcode:hover,.wp_themeSkin .mceIcon.mce_gridster_shortcode:active,.wp_themeSkin .mceIcon.mce_gridster_shortcode:focus{background-position:2px -75px}#gridster_sr_btns{padding:2px;position:absolute;display:none;z-index:155000}#gridster_changeShortcode,#gridster_editShortcode,#gridster_delShortcode{border-color:#999;background-color:#eee;margin:2px;padding:2px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px}#gridster_changeShortcode:hover,#gridster_editShortcode:hover,#gridster_delShortcode:hover{border-color:#555;background-color:#ccc}.gridster_shortcode-in-list-table{min-width:75%;font-family:Consolas,monaco,monospace;border:0}#gridster_workbench_metabox{background:0;border:0}#gridster_workbench_metabox:after{content:'';clear:both;display:block}#gridster_workbench_metabox.one-column #gridster_content_blocks{width:100%}#gridster_workbench_metabox.one-column #gridster_content_blocks>div{width:48.5%;float:left}#gridster_workbench_metabox.one-column #gridster_content_blocks>div:nth-child(even){margin-left:3%}#gridster_workbench_metabox.one-column .gridster_widget-block .inside li span{max-width:74%}#gridster_workbench_metabox.one-column #gridster_workbench_wrap{margin-left:-280px;margin-bottom:20px}#gridster_workbench_metabox.two-columns #gridster_content_blocks{width:280px}#gridster_workbench_metabox.two-columns #gridster_workbench_wrap{margin-left:-280px}#gridster_workbench_metabox.two-columns #gridster_workbench,#gridster_workbench_metabox.two-columns #gridster_workbench_wrap noscript div,#gridster_workbench_metabox.two-columns #gridster_loader{margin-left:300px}#gridster_workbench_metabox>.handlediv,#gridster_workbench_metabox>h3{display:none}#gridster_workbench_metabox>.inside{padding:0;margin:0}#gridster_content_blocks{float:left;position:relative;z-index:1}.gridster_widget-block{margin-bottom:1em;position:relative;border:1px solid #dfdfdf;background-color:whitesmoke;-webkit-border-radius:3px;border-radius:3px;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-box-shadow:inset 0 1px 0 0 #fff;box-shadow:inset 0 1px 0 0 #fff}.js .gridster_widget-block h3{cursor:pointer}#gridster_workbench_metabox:hover .gridster_widget-block .handlediv{background:0}.js #gridster_workbench_metabox .gridster_widget-block:hover .handlediv{background:url('/wp-admin/images/arrows.png') no-repeat scroll 6px 7px transparent}.js #gridster_workbench_metabox .gridster_widget-block.trigger_active .handlediv{background:url('/wp-admin/images/arrows.png') no-repeat scroll 6px -29px transparent}#gridster_workbench_metabox .gridster_widget-block .inside{margin:0;display:none;padding:0}.gridster_widget-block .inside div.error{margin:10px}.gridster_widget-block .inside li{clear:both;margin:0;padding:3px 10px}.gridster_widget-block .inside li:hover{cursor:move;background-color:#fff}.gridster_widget-block .inside li span{display:inline-block;max-width:82%;color:#21759b}.gridster_widget-block .inside li:hover span{color:#d54e21}.gridster_widget-block .inside li abbr{border:0}.gridster_widget-block .inside li.ui-draggable-dragging{z-index:999!important;display:list-item;padding:3px 6px;width:70%;background-color:#ffffe0!important;border:1px dotted #e6db55;-webkit-transform:scale(1.5);-moz-transform:scale(1.5);-ms-transform:scale(1.5);-o-transform:scale(1.5);transform:scale(1.5)}.gridster_widget-block .inside li.ui-draggable-dragging>span{max-width:100%}.gridster_widget-block .inside li.ui-draggable-dragging small.howto{display:none}.gridster_widget-block .inside .widget-block-paginav{height:30px;padding:0 10px;position:relative}.gridster_widget-block .inside .widget-block-paginav .gridster_search-posts-by-type{display:block;left:20%;position:absolute;top:0;width:60%}.gridster_widget-block .spinner{background-position:50%;left:0;position:absolute;top:0;width:100%;height:100%;margin:0;background-color:rgba(255,255,255,.5)}#gridster_workbench_wrap{width:100%;float:right;position:relative}.js #gridster_workbench{overflow-x:hidden;min-height:400px;border:1px dashed #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-background-clip:padding-box;background-clip:padding-box;background:#f8f8f8;-webkit-box-shadow:inset 1px 1px 5px #ccc;-moz-box-shadow:inset 1px 1px 5px #ccc;box-shadow:inset 1px 1px 5px #ccc}#gridster_workbench_wrap noscript div{text-align:center;min-height:200px;padding:100px 0;margin:0;font-size:1.5em;line-height:1.25em}#gridster_load-wrap{height:100%;left:0;position:absolute;top:0;width:100%;display:none;z-index:1000}#gridster_loader{background-color:rgba(228,228,228,0.85);-webkit-border-radius:3px;border-radius:3px;-webkit-background-clip:padding-box;background-clip:padding-box;cursor:not-allowed;padding:0 30px;font-size:1.5em;height:100%;text-align:center;text-shadow:1px 1px 0 #FFF,0 0 35px #000;border:1px dashed #ccc}#gridster_loader.error{background-color:rgba(255,0,0,0.85);text-shadow:1px 1px 0 #000,0 0 35px #f00;border-color:#f00;margin-top:0}#gridster_loader p{padding:180px 0;margin:0}#gridster_loader.error p{color:#fff}#gridster_load-wrap p img{vertical-align:middle;margin-right:5px}.gridster .content_width-border{border-left:2px dotted #ffcfc9;height:100%;position:absolute;top:0;padding-left:2px;cursor:help}.gridster>ul>li.gs_w{margin:0;background-color:#ececec;outline:1px dotted grey;overflow:hidden;z-index:1}.gridster>ul>li.preview-holder{background-color:#fff;border:1px dotted #CCC;opacity:.75}.gridster>ul>li .admin-html-holder{padding:30px 0}#gridster_workbench>ul>li h1,#gridster_workbench>ul>li h2,#gridster_workbench>ul>li h3,#gridster_workbench>ul>li h4,#gridster_workbench>ul>li h5,#gridster_workbench>ul>li h6{margin:0 0 .25em}.gridster li img{border:0 none;left:0;opacity:.25;position:absolute;top:0;height:100%;width:auto}.gridster li.ui-resizable-resizing{z-index:9999999!important}.gridster li.isUpdated{background:#ececec url('/wp-admin/images/wpspin_light.gif') 50% no-repeat}.gridster li.isUpdated>*{opacity:.3}.gridster li .admin-html-holder a{text-decoration:none!important;outline:none!important}.gridster li .meta-label{padding:5px 5px 5px 10px;position:absolute;top:0;right:0;z-index:10;background:whitesmoke;border-bottom-left-radius:6px;-moz-box-shadow:-1px 1px 3px #333;-webkit-box-shadow:-1px 1px 3px #333;box-shadow:-1px 1px 3px #333;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;display:none}.gridster li:hover .meta-label{display:block}.gridster li .meta-label label,.gridster li .meta-label span.ir{width:18px;display:inline-block;height:18px;margin-right:4px;cursor:pointer;vertical-align:top;opacity:.5;margin-top:2px}.gridster li .meta-label label:hover,.gridster li .meta-label span:hover{opacity:1}.gridster li .meta-label span.move-handle{background-position:0 -1px}.gridster li .meta-label span.delete-post{background-position:0 -22px}.gridster .meta-label select.dynamic-classes-chosen.chzn-done,.gridster .meta-label div.chzn-container{margin-right:5px;font-size:11px;width:auto!important;max-width:85%}.gridster .meta-label .chzn-container-multi .chzn-choices .search-field input{font-size:11px;height:14px;padding:0 5px;xwidth:1px!important}.gridster .meta-label .chzn-container-multi .chzn-choices .search-choice{padding:0 20px 0 5px}.gridster .meta-label .chzn-container-multi .chzn-choices .search-choice .search-choice-close{top:1px}.gridster_edit,.gridster_edit-area{position:relative;padding:2px 20px!important;min-height:1em}.gridster_edit:hover,.gridster_edit-area:hover{background-color:rgba(255,255,224,.7);cursor:text}.gridster_edit.isEdited,.gridster_edit-area.isEdited{background-color:transparent;display:block}.gridster_edit:before,.gridster_edit-area:before{position:absolute;top:2px;left:2px;background-position:0 -164px;content:'';width:16px;height:16px;display:block;visibility:hidden;cursor:pointer}.gridster li:hover .gridster_edit:before,.gridster li:hover .gridster_edit-area:before{visibility:visible}.gridster_edit form input,.gridster_edit-area form textarea{line-height:1em;margin:0;width:100%;padding:2px 1px;min-height:1em;resize:vertical}.gridster .gridster_edit-area form button{margin:5px 5px 0 0}.gridster_edit-area form button.button-primary{height:22px;line-height:21px}#gridster_options_metabox label.short-text-integer{display:block;position:relative;padding-right:23px}#gridster_options_metabox label.short-text-integer:after{position:absolute;top:0;right:0;width:20px;color:#666;content:'px'}#gridster_options_metabox input.short-text-integer{width:50px;text-align:right;position:relative;margin-top:-3px}html#gridster_modal-content{font-family:sans-serif;font-size:12px;line-height:1.4em;color:#333;background-color:#f1f1f1 }#gridster_modal-content h2{margin-bottom:.75em}#gridster_modal-content p{margin:.25em 0 .75em;clear:both}#gridster_modal-content label{display:inline-block;font-size:14px;padding-left:30px;padding-right:5%;width:65%;cursor:pointer;float:left;margin-bottom:.5em}#gridster_modal-content label input{margin:2px 0 0 -30px;width:30px}#gridster_modal-content label .alignright{float:right;display:inline-block}#gridster_modal-content a:link,#gridster_modal-content a:visited{color:#21759b}#gridster_modal-content a:hover,#gridster_modal-content a:focus,#gridster_modal-content a:active{color:#d54e21}#gridster_modal-content div.error{margin:3.5em 10%}.ir{display:block;text-indent:-999em;overflow:hidden;background-repeat:no-repeat;text-align:left;direction:ltr}1 .gridster li .meta-label span.delete-post,.gridster li .meta-label span.move-handle,#adminmenu #menu-posts-gridster div.wp-menu-image,#icon-edit.icon32-posts-gridster,body.settings_page_gridster_default_options #icon-options-general,.gridster_edit:before,.gridster_edit-area:before,.wp_themeSkin .mceIcon.mce_gridster_shortcode{background-image:url('../images/gridster_sprite.png');background-repeat:no-repeat}#adminmenu #menu-posts-gridster div.wp-menu-image{background-position:7px -42px}#adminmenu #menu-posts-gridster:hover div.wp-menu-image,#adminmenu #menu-posts-gridster.wp-has-current-submenu div.wp-menu-image{background-position:7px -71px}#icon-edit.icon32-posts-gridster,body.settings_page_gridster_default_options #icon-options-general{background-position:0 -114px}.wp_themeSkin .mceIcon.mce_gridster_shortcode{background-position:2px -46px}.wp_themeSkin .mceIcon.mce_gridster_shortcode:hover,.wp_themeSkin .mceIcon.mce_gridster_shortcode:active,.wp_themeSkin .mceIcon.mce_gridster_shortcode:focus{background-position:2px -75px}#gridster_sr_btns{padding:2px;position:absolute;display:none;z-index:155000}#gridster_changeShortcode,#gridster_editShortcode,#gridster_delShortcode{border-color:#999;background-color:#eee;margin:2px;padding:2px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px}#gridster_changeShortcode:hover,#gridster_editShortcode:hover,#gridster_delShortcode:hover{border-color:#555;background-color:#ccc}.gridster_shortcode-in-list-table{min-width:75%;font-family:Consolas,monaco,monospace;border:0}#gridster_workbench_metabox{background:0;border:0}#gridster_workbench_metabox:after{content:'';clear:both;display:block}#gridster_workbench_metabox.one-column #gridster_content_blocks{width:100%}#gridster_workbench_metabox.one-column #gridster_content_blocks>div{width:48.5%;float:left}#gridster_workbench_metabox.one-column #gridster_content_blocks>div:nth-child(even){margin-left:3%}#gridster_workbench_metabox.one-column .gridster_widget-block .inside li span{max-width:74%}#gridster_workbench_metabox.one-column #gridster_workbench_wrap{margin-left:-280px;margin-bottom:20px}#gridster_workbench_metabox.two-columns #gridster_content_blocks{width:280px}#gridster_workbench_metabox.two-columns #gridster_workbench_wrap{margin-left:-280px}#gridster_workbench_metabox.two-columns #gridster_workbench,#gridster_workbench_metabox.two-columns #gridster_workbench_wrap noscript div,#gridster_workbench_metabox.two-columns #gridster_loader{margin-left:300px}#gridster_workbench_metabox>.handlediv,#gridster_workbench_metabox>h3{display:none}#gridster_workbench_metabox>.inside{padding:0;margin:0}#gridster_content_blocks{float:left;position:relative;z-index:1}.gridster_widget-block{margin-bottom:1em;position:relative;border:1px solid #dfdfdf;background-color:whitesmoke;-webkit-border-radius:3px;border-radius:3px;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-box-shadow:inset 0 1px 0 0 #fff;box-shadow:inset 0 1px 0 0 #fff}.js .gridster_widget-block h3{cursor:pointer}#gridster_workbench_metabox:hover .gridster_widget-block .handlediv{background:0}.js #gridster_workbench_metabox .gridster_widget-block:hover .handlediv{background:url('/wp-admin/images/arrows.png') no-repeat scroll 6px 7px transparent}.js #gridster_workbench_metabox .gridster_widget-block.trigger_active .handlediv{background:url('/wp-admin/images/arrows.png') no-repeat scroll 6px -29px transparent}#gridster_workbench_metabox .gridster_widget-block .inside{margin:0;display:none;padding:0}.gridster_widget-block .inside div.error{margin:10px}.gridster_widget-block .inside li{clear:both;margin:0;padding:3px 10px}.gridster_widget-block .inside li:hover{cursor:move;background-color:#fff}.gridster_widget-block .inside li span{display:inline-block;max-width:82%;color:#21759b}.gridster_widget-block .inside li:hover span{color:#d54e21}.gridster_widget-block .inside li abbr{border:0}.gridster_widget-block .inside li.ui-draggable-dragging{z-index:999!important;display:list-item;padding:3px 6px;width:70%;background-color:#ffffe0!important;border:1px dotted #e6db55;-webkit-transform:scale(1.5);-moz-transform:scale(1.5);-ms-transform:scale(1.5);-o-transform:scale(1.5);transform:scale(1.5)}.gridster_widget-block .inside li.ui-draggable-dragging>span{max-width:100%}.gridster_widget-block .inside li.ui-draggable-dragging small.howto{display:none}.gridster_widget-block .inside .widget-block-paginav{height:30px;padding:0 10px;position:relative}.gridster_widget-block .inside .widget-block-paginav .gridster_search-posts-by-type{display:block;left:20%;position:absolute;top:0;width:60%}.gridster_widget-block .spinner{background-position:50%;left:0;position:absolute;top:0;width:100%;height:100%;margin:0;background-color:rgba(255,255,255,.5)}#gridster_workbench_wrap{width:100%;float:right;position:relative}.js #gridster_workbench{overflow-x:hidden;min-height:400px;border:1px dashed #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-background-clip:padding-box;background-clip:padding-box;background:#f8f8f8;-webkit-box-shadow:inset 1px 1px 5px #ccc;-moz-box-shadow:inset 1px 1px 5px #ccc;box-shadow:inset 1px 1px 5px #ccc}#gridster_workbench_wrap noscript div{text-align:center;min-height:200px;padding:100px 0;margin:0;font-size:1.5em;line-height:1.25em}#gridster_load-wrap{height:100%;left:0;position:absolute;top:0;width:100%;display:none;z-index:1000}#gridster_loader{background-color:rgba(228,228,228,0.85);-webkit-border-radius:3px;border-radius:3px;-webkit-background-clip:padding-box;background-clip:padding-box;cursor:not-allowed;padding:0 30px;font-size:1.5em;height:100%;text-align:center;text-shadow:1px 1px 0 #FFF,0 0 35px #000;border:1px dashed #ccc}#gridster_loader.error{background-color:rgba(255,0,0,0.85);text-shadow:1px 1px 0 #000,0 0 35px #f00;border-color:#f00;margin-top:0}#gridster_loader p{padding:180px 0;margin:0}#gridster_loader.error p{color:#fff}#gridster_load-wrap p img{vertical-align:middle;margin-right:5px}.gridster .content_width-border{border-left:2px dotted #ffcfc9;height:100%;position:absolute;top:0;padding-left:2px;cursor:help}.gridster>ul>li.gs_w{margin:0;background-color:#ececec;outline:1px dotted grey;overflow:hidden;z-index:1}.gridster>ul>li.preview-holder{background-color:#fff;border:1px dotted #CCC;opacity:.75}.gridster>ul>li .admin-html-holder{padding:30px 0}#gridster_workbench>ul>li h1,#gridster_workbench>ul>li h2,#gridster_workbench>ul>li h3,#gridster_workbench>ul>li h4,#gridster_workbench>ul>li h5,#gridster_workbench>ul>li h6{margin:0 0 .25em}.gridster li img{border:0 none;left:0;opacity:.25;position:absolute;top:0;height:100%;width:auto}.gridster li.ui-resizable-resizing{z-index:9999999!important}.gridster li.isUpdated{background:#ececec url('/wp-admin/images/wpspin_light.gif') 50% no-repeat}.gridster li.isUpdated>*{opacity:.3}.gridster li .admin-html-holder a{text-decoration:none!important;outline:none!important}.gridster li .meta-label{padding:5px 5px 5px 10px;position:absolute;top:0;right:0;z-index:10;background:whitesmoke;border-bottom-left-radius:6px;-moz-box-shadow:-1px 1px 3px #333;-webkit-box-shadow:-1px 1px 3px #333;box-shadow:-1px 1px 3px #333;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;display:none}.gridster li:hover .meta-label{display:block}.gridster li .meta-label label,.gridster li .meta-label span.ir{width:18px;display:inline-block;height:18px;margin-right:4px;cursor:pointer;vertical-align:top;opacity:.5;margin-top:2px}.gridster li .meta-label label:hover,.gridster li .meta-label span:hover{opacity:1}.gridster li .meta-label span.move-handle{background-position:0 -1px}.gridster li .meta-label span.delete-post{background-position:0 -22px}.gridster .meta-label select.dynamic-classes-chosen.chzn-done,.gridster .meta-label div.chzn-container{margin-right:5px;font-size:11px;width:auto!important;max-width:85%}.gridster .meta-label .chzn-container-multi .chzn-choices .search-field input{font-size:11px;height:14px;padding:0 5px;xwidth:1px!important}.gridster .meta-label .chzn-container-multi .chzn-choices .search-choice{padding:0 20px 0 5px}.gridster .meta-label .chzn-container-multi .chzn-choices .search-choice .search-choice-close{top:1px}.gridster_edit,.gridster_edit-area{position:relative;padding:2px 20px!important;min-height:1em}.gridster_edit:hover,.gridster_edit-area:hover{background-color:rgba(255,255,224,.7);cursor:text}.gridster_edit.isEdited,.gridster_edit-area.isEdited{background-color:transparent;display:block}.gridster_edit:before,.gridster_edit-area:before{position:absolute;top:2px;left:2px;background-position:0 -164px;content:'';width:16px;height:16px;display:block;visibility:hidden;cursor:pointer}.gridster li:hover .gridster_edit:before,.gridster li:hover .gridster_edit-area:before{visibility:visible}.gridster_edit form input,.gridster_edit-area form textarea{line-height:1em;margin:0;width:100%;padding:2px 1px;min-height:1em;resize:vertical}.gridster .gridster_edit-area form button{margin:5px 5px 0 0}.gridster_edit-area form button.button-primary{height:22px;line-height:21px}#gridster_options_metabox label.short-text-integer{display:block;position:relative;padding-right:23px}#gridster_options_metabox label.short-text-integer:after{position:absolute;top:0;right:0;width:20px;color:#666;content:'px'}#gridster_options_metabox input.short-text-integer{width:50px;text-align:right;position:relative;margin-top:-3px}html#gridster_modal-content{font-family:sans-serif;font-size:12px;line-height:1.4em;color:#333;background-color:#f1f1f1;height:100%}html#gridster_modal-content,html#gridster_modal-content body{min-height:95%;position:relative}#gridster_modal-content h2{margin-bottom:.75em}#gridster_modal-content p{margin:.25em 0 .75em;clear:both}#gridster_modal-content label{display:inline-block;font-size:14px;padding-left:30px;padding-right:5%;width:65%;cursor:pointer;float:left;margin-bottom:.5em}#gridster_modal-content label input{margin:2px 0 0 -30px;width:30px}#gridster_modal-content label .alignright{float:right;display:inline-block}#gridster_modal-content a:link,#gridster_modal-content a:visited{color:#21759b}#gridster_modal-content a:hover,#gridster_modal-content a:focus,#gridster_modal-content a:active{color:#d54e21}#gridster_modal-content div.error{margin:3.5em 10%}#gridster_modal-content div.mceActionPanel{bottom:0;margin-top:5px;position:absolute;width:100%}.ir{display:block;text-indent:-999em;overflow:hidden;background-repeat:no-repeat;text-align:left;direction:ltr} -
cbach-wp-gridster/trunk/languages/cbach-wp-gridster-de_DE.po
r698498 r701410 2 2 msgstr "" 3 3 "Project-Id-Version: WP Gridster\n" 4 "POT-Creation-Date: 2013-04-1 6 13:53+0100\n"5 "PO-Revision-Date: 2013-04-1 6 13:53+0100\n"4 "POT-Creation-Date: 2013-04-19 13:17+0100\n" 5 "PO-Revision-Date: 2013-04-19 13:20+0100\n" 6 6 "Last-Translator: Carsten Bach <mail@carsten-bach.de>\n" 7 7 "Language-Team: Carsten Bach <mail@carsten-bach.de>\n" … … 19 19 "X-Poedit-SearchPath-1: ./..\n" 20 20 21 #: ../cbach-wp-gridster.php:4 7521 #: ../cbach-wp-gridster.php:489 22 22 msgid "Move" 23 23 msgstr "Verschieben" 24 24 25 #: ../cbach-wp-gridster.php:4 7625 #: ../cbach-wp-gridster.php:490 26 26 msgid "Delete" 27 27 msgstr "Löschen" 28 28 29 #: ../cbach-wp-gridster.php:4 7729 #: ../cbach-wp-gridster.php:491 30 30 msgid "There was a problem loading your content, please try again." 31 31 msgstr "Es gab ein Problem beim Laden des Inhalts, bitte versuch's nochmal." 32 32 33 #: ../cbach-wp-gridster.php:4 78 ../cbach-wp-gridster.php:187033 #: ../cbach-wp-gridster.php:492 ../cbach-wp-gridster.php:1893 34 34 msgid "Nothing found." 35 35 msgstr "Nichts gefunden." 36 36 37 #: ../cbach-wp-gridster.php:4 7937 #: ../cbach-wp-gridster.php:493 38 38 msgid "" 39 39 "Maximum content width defined in your current theme by the variable " … … 43 43 "Deinem Theme definiert wurde" 44 44 45 #: ../cbach-wp-gridster.php:4 8145 #: ../cbach-wp-gridster.php:495 46 46 msgid "Click to edit" 47 47 msgstr "zum Bearbeiten klicken" 48 48 49 #: ../cbach-wp-gridster.php:482 49 #: ../cbach-wp-gridster.php:496 ../cbach-wp-gridster.php:1788 50 #: ../cbach-wp-gridster.php:1804 50 51 msgid "Cancel" 51 52 msgstr "Abbrechen" 52 53 53 #: ../cbach-wp-gridster.php:4 8354 #: ../cbach-wp-gridster.php:497 54 55 msgid "OK" 55 56 msgstr "OK" 56 57 57 #: ../cbach-wp-gridster.php: 48658 #: ../cbach-wp-gridster.php:500 58 59 msgid "Choose styles" 59 60 msgstr "Stil auswählen" 60 61 61 #: ../cbach-wp-gridster.php: 48762 #: ../cbach-wp-gridster.php:501 62 63 msgid "No results matched" 63 64 msgstr "Keine Übereinstimmung" 64 65 65 #: ../cbach-wp-gridster.php:6 37 ../cbach-wp-gridster.php:63866 #: ../cbach-wp-gridster.php:8 6066 #: ../cbach-wp-gridster.php:651 ../cbach-wp-gridster.php:652 67 #: ../cbach-wp-gridster.php:874 67 68 msgid "Gridster" 68 69 msgstr "Gridster" 69 70 70 #: ../cbach-wp-gridster.php:6 3971 #: ../cbach-wp-gridster.php:653 71 72 msgctxt "menu name" 72 73 msgid "Gridster" 73 74 msgstr "Gridster" 74 75 75 #: ../cbach-wp-gridster.php:6 4076 #: ../cbach-wp-gridster.php:654 76 77 msgid "All Gridster" 77 78 msgstr "Alle Gridster" 78 79 79 #: ../cbach-wp-gridster.php:6 4180 #: ../cbach-wp-gridster.php:655 80 81 msgctxt "add new gridster" 81 82 msgid "Add New" 82 83 msgstr "Hinzufügen" 83 84 84 #: ../cbach-wp-gridster.php:6 4285 #: ../cbach-wp-gridster.php:656 85 86 msgid "Add New Gridster" 86 87 msgstr "Neuen Gridster anlegen" 87 88 88 #: ../cbach-wp-gridster.php:6 4389 #: ../cbach-wp-gridster.php:657 89 90 msgid "Edit Gridster" 90 91 msgstr "Gridster bearbeiten" 91 92 92 #: ../cbach-wp-gridster.php:6 4493 #: ../cbach-wp-gridster.php:658 93 94 msgid "New Gridster" 94 95 msgstr "Neuer Gridster" 95 96 96 #: ../cbach-wp-gridster.php:6 4597 #: ../cbach-wp-gridster.php:659 97 98 msgid "View Gridster" 98 99 msgstr "Gridster anzeigen" 99 100 100 #: ../cbach-wp-gridster.php:6 46101 #: ../cbach-wp-gridster.php:660 101 102 msgid "Search Gridster" 102 103 msgstr "Gridster durchsuchen" 103 104 104 #: ../cbach-wp-gridster.php:6 47105 #: ../cbach-wp-gridster.php:661 105 106 msgid "No Gridster found" 106 107 msgstr "Keine Gridster gefunden" 107 108 108 #: ../cbach-wp-gridster.php:6 48109 #: ../cbach-wp-gridster.php:662 109 110 msgid "No Gridster found in Trash" 110 111 msgstr "Keine Gridster im Papierkorb" 111 112 112 #: ../cbach-wp-gridster.php:6 49113 #: ../cbach-wp-gridster.php:663 113 114 msgid "Parent Gridster:" 114 115 msgstr "Übergeordnete Gridster:" 115 116 116 #: ../cbach-wp-gridster.php:6 55117 #: ../cbach-wp-gridster.php:669 117 118 msgid "Content arranged within a grid, powered by gridster.js" 118 119 msgstr "Inhalte ausgerichtet in einem Raster, angetrieben von gridster.js" 119 120 120 #: ../cbach-wp-gridster.php:7 05 ../cbach-wp-gridster.php:708121 #: ../cbach-wp-gridster.php:719 ../cbach-wp-gridster.php:722 121 122 msgctxt "post_updated message" 122 123 msgid "Gridster updated." 123 124 msgstr "Gridster aktualisiert." 124 125 125 #: ../cbach-wp-gridster.php:7 06126 #: ../cbach-wp-gridster.php:720 126 127 msgid "Custom field updated." 127 128 msgstr "Benutzerdefiniertes Feld aktualisiert." 128 129 129 #: ../cbach-wp-gridster.php:7 07130 #: ../cbach-wp-gridster.php:721 130 131 msgid "Custom field deleted." 131 132 msgstr "Benutzerdefiniertes Feld gelöscht." 132 133 133 #: ../cbach-wp-gridster.php:7 09134 #: ../cbach-wp-gridster.php:723 134 135 #, php-format 135 136 msgid "Gridster restored to revision from %s" 136 137 msgstr "Gridster aus Überarbeitung vom %s wiederhergestellt" 137 138 138 #: ../cbach-wp-gridster.php:7 10139 #: ../cbach-wp-gridster.php:724 139 140 msgctxt "post_updated message" 140 141 msgid "Gridster published." 141 142 msgstr "Gridster veröffentlicht." 142 143 143 #: ../cbach-wp-gridster.php:7 11144 #: ../cbach-wp-gridster.php:725 144 145 msgid "Gridster saved." 145 146 msgstr "Gridster gespeichert." 146 147 147 #: ../cbach-wp-gridster.php:7 12148 #: ../cbach-wp-gridster.php:726 148 149 msgctxt "post_updated message" 149 150 msgid "Gridster submitted." 150 151 msgstr "Gridster übertragen." 151 152 152 #: ../cbach-wp-gridster.php:7 13153 #: ../cbach-wp-gridster.php:727 153 154 #, php-format 154 155 msgctxt "post_updated message" … … 156 157 msgstr "Gridster Veröffentlichung geplant für: <strong>%1$s</strong>." 157 158 158 #: ../cbach-wp-gridster.php:7 13159 #: ../cbach-wp-gridster.php:727 159 160 msgid "M j, Y @ G:i" 160 161 msgstr "d. F Y H:i" 161 162 162 #: ../cbach-wp-gridster.php:7 14163 #: ../cbach-wp-gridster.php:728 163 164 msgctxt "post_updated message" 164 165 msgid "Gridster draft updated." 165 166 msgstr "Gridster Entwurf aktualisiert." 166 167 167 #: ../cbach-wp-gridster.php:7 63 ../cbach-wp-gridster.php:842168 #: ../cbach-wp-gridster.php:777 ../cbach-wp-gridster.php:856 168 169 msgid "Shortcode" 169 170 msgstr "Shortcode" 170 171 171 #: ../cbach-wp-gridster.php:8 72172 #: ../cbach-wp-gridster.php:886 172 173 msgid "Gridster - Layout options" 173 174 msgstr "Gridster - Layout-Einstellungen" 174 175 175 #: ../cbach-wp-gridster.php:9 49176 #: ../cbach-wp-gridster.php:963 176 177 msgid "Your content is being prepared as a gridster widget." 177 178 msgstr "Dein Inhalt wird als Gridster Widget vorbereitet." 178 179 179 #: ../cbach-wp-gridster.php:9 56180 #: ../cbach-wp-gridster.php:970 180 181 #, php-format 181 182 msgid "" … … 189 190 "a>!" 190 191 191 #: ../cbach-wp-gridster.php:9 71192 #: ../cbach-wp-gridster.php:985 192 193 msgid "Click to toggle" 193 194 msgstr "zum Umschalten klicken" 194 195 195 #: ../cbach-wp-gridster.php: 999196 #: ../cbach-wp-gridster.php:1013 196 197 msgid "Override the default options for this gridster." 197 198 msgstr "Überschreibe die Standardeinstellungen für diesen Gridster." 198 199 199 #: ../cbach-wp-gridster.php:10 13 ../cbach-wp-gridster.php:1308200 #: ../cbach-wp-gridster.php:14 07200 #: ../cbach-wp-gridster.php:1027 ../cbach-wp-gridster.php:1322 201 #: ../cbach-wp-gridster.php:1421 201 202 msgid "horizontal margin" 202 203 msgstr "horizontaler Außenabstand" 203 204 204 #: ../cbach-wp-gridster.php:10 16 ../cbach-wp-gridster.php:1321205 #: ../cbach-wp-gridster.php:14 18205 #: ../cbach-wp-gridster.php:1030 ../cbach-wp-gridster.php:1335 206 #: ../cbach-wp-gridster.php:1432 206 207 msgid "vertical margin" 207 208 msgstr "vertikaler Außenabstand" 208 209 209 #: ../cbach-wp-gridster.php:10 19 ../cbach-wp-gridster.php:1334210 #: ../cbach-wp-gridster.php:14 29210 #: ../cbach-wp-gridster.php:1033 ../cbach-wp-gridster.php:1348 211 #: ../cbach-wp-gridster.php:1443 211 212 msgid "widgets base width" 212 213 msgstr "Widget-Basis-Breite" 213 214 214 #: ../cbach-wp-gridster.php:10 22 ../cbach-wp-gridster.php:1347215 #: ../cbach-wp-gridster.php:14 40215 #: ../cbach-wp-gridster.php:1036 ../cbach-wp-gridster.php:1361 216 #: ../cbach-wp-gridster.php:1454 216 217 msgid "widgets base height" 217 218 msgstr "Widget-Basis-Höhe" 218 219 219 #: ../cbach-wp-gridster.php:1 199220 #: ../cbach-wp-gridster.php:1213 220 221 msgid "Gridster Default Options" 221 222 msgstr "Gridster Standard-Einstellungen" 222 223 223 #: ../cbach-wp-gridster.php:12 00224 #: ../cbach-wp-gridster.php:1214 224 225 msgctxt "title of options page" 225 226 msgid "Gridster" 226 227 msgstr "Gridster" 227 228 228 #: ../cbach-wp-gridster.php:12 75229 #: ../cbach-wp-gridster.php:1289 229 230 msgid "Default Options for all gridsters" 230 231 msgstr "Standard-Einstellungen für alle Gridster" 231 232 232 #: ../cbach-wp-gridster.php:1 287233 #: ../cbach-wp-gridster.php:1301 233 234 msgid "Default Options for all Gridsters" 234 235 msgstr "Standard-Einstellungen für alle Gridster" 235 236 236 #: ../cbach-wp-gridster.php:1 295 ../cbach-wp-gridster.php:1396237 #: ../cbach-wp-gridster.php:1309 ../cbach-wp-gridster.php:1410 237 238 msgid "Minimum number columns to create" 238 239 msgstr "Minimal-Anzahl der zu erzeugenden Spalten" 239 240 240 #: ../cbach-wp-gridster.php:13 68241 #: ../cbach-wp-gridster.php:1382 241 242 msgid "Enter the default layout-settings, used by every gridster." 242 243 msgstr "" … … 244 245 "werden." 245 246 246 #: ../cbach-wp-gridster.php:13 69247 #: ../cbach-wp-gridster.php:1383 247 248 msgid "You can alter theese settings for every gridster on its edit-page." 248 249 msgstr "Du kannst diese Einstellungen für jeden Gridster einzeln abändern." 249 250 250 #: ../cbach-wp-gridster.php:1 396 ../cbach-wp-gridster.php:1407251 #: ../cbach-wp-gridster.php:14 18 ../cbach-wp-gridster.php:1429252 #: ../cbach-wp-gridster.php:14 40251 #: ../cbach-wp-gridster.php:1410 ../cbach-wp-gridster.php:1421 252 #: ../cbach-wp-gridster.php:1432 ../cbach-wp-gridster.php:1443 253 #: ../cbach-wp-gridster.php:1454 253 254 msgid "You have entered an invalid value. Value must be of type: integer." 254 255 msgstr "" … … 256 257 "Ganzzahlen sein." 257 258 258 #: ../cbach-wp-gridster.php:17 49259 #: ../cbach-wp-gridster.php:1763 259 260 msgid "Choose your Gridster to embed here." 260 261 msgstr "Wähle den Gridster der hier angezeigt wird." 261 262 262 #: ../cbach-wp-gridster.php:17 59 ../cbach-wp-gridster.php:1854263 #: ../cbach-wp-gridster.php:1773 ../cbach-wp-gridster.php:1877 263 264 #, php-format 264 265 msgid "Last edited by %1$s on %2$s at %3$s" 265 266 msgstr "Zuletzt bearbeitet von %1$s am %2$s um %3$s Uhr" 266 267 267 #: ../cbach-wp-gridster.php:1775 268 #: ../cbach-wp-gridster.php:1785 269 msgid "Replace" 270 msgstr "Ersetzen" 271 272 #: ../cbach-wp-gridster.php:1785 273 msgid "Insert" 274 msgstr "Einfügen" 275 276 #: ../cbach-wp-gridster.php:1795 268 277 msgid "No Gridster here, yet." 269 278 msgstr "Keine Gridster gefunden." 270 279 271 #: ../cbach-wp-gridster.php:17 76280 #: ../cbach-wp-gridster.php:1796 272 281 msgid "You do not have published any gridster." 273 282 msgstr "Du hast bisher noch keine Gridster veröffentlicht." 274 283 275 #: ../cbach-wp-gridster.php:17 78284 #: ../cbach-wp-gridster.php:1798 276 285 #, php-format 277 286 msgid "" … … 284 293 "(wird eine neue Seite laden)\">wenigstens einen veröffentlichen</a>." 285 294 286 #: ../cbach-wp-gridster.php:18 75295 #: ../cbach-wp-gridster.php:1898 287 296 #, php-format 288 297 msgid "Get previous %s" 289 298 msgstr "Vorherige %s" 290 299 291 #: ../cbach-wp-gridster.php:18 76300 #: ../cbach-wp-gridster.php:1899 292 301 msgid "Search" 293 302 msgstr "Suche" 294 303 295 #: ../cbach-wp-gridster.php:18 76304 #: ../cbach-wp-gridster.php:1899 296 305 msgid "Type searchterm & wait 2 seconds" 297 306 msgstr "Suchbegriff eingeben & 2 Sekunden warten" 298 307 299 #: ../cbach-wp-gridster.php:1 877308 #: ../cbach-wp-gridster.php:1900 300 309 #, php-format 301 310 msgid "Get next %s" 302 311 msgstr "Nächste %s" 303 312 304 #: ../cbach-wp-gridster.php:19 55313 #: ../cbach-wp-gridster.php:1978 305 314 msgid "Settings" 306 315 msgstr "Einstellungen" 307 316 308 #: ../cbach-wp-gridster.php: 1979317 #: ../cbach-wp-gridster.php:2002 309 318 msgid "Report issues" 310 319 msgstr "Fehler melden" 311 320 312 #: ../cbach-wp-gridster.php: 1980321 #: ../cbach-wp-gridster.php:2003 313 322 msgid "Support" 314 323 msgstr "Support" 315 324 316 #: ../cbach-wp-gridster.php:2 295325 #: ../cbach-wp-gridster.php:2325 317 326 #, php-format 318 327 msgid "Please %1$s your wordpress to at least version %2$s." 319 msgstr "Bitte %1$s WordPress auf mindestensVersion %2$s."320 321 #: ../cbach-wp-gridster.php:2 296328 msgstr "Bitte %1$s WordPress mindestens auf Version %2$s." 329 330 #: ../cbach-wp-gridster.php:2326 322 331 msgid "upgrade" 323 332 msgstr "aktualisiere" 324 333 325 #: ../cbach-wp-gridster.php:2304 326 #, php-format 327 msgid "You need to run at least PHP %1$s." 328 msgstr "Du benötigste mindestens PHP %1$s." 334 #: ../cbach-wp-gridster.php:2334 335 #, php-format 336 msgid "" 337 "Your server is running PHP version %1$s but this plugin requires at least " 338 "PHP %2$s. Please run an upgrade." 339 msgstr "" 340 "Auf Deinem Server läuft PHP Version %1$s, aber dieses Plugin benötigt " 341 "mindestens PHP %2$s. Bitte aktualisiere es." 342 343 #: ../cbach-wp-gridster.php:2369 344 #, php-format 345 msgid "%s has been deactivated." 346 msgstr "%s wurde deaktiviert." 329 347 330 348 #: ../tinymce/i18n/mce_locale.php:12 … … 333 351 334 352 #: ../tinymce/i18n/mce_locale.php:13 335 msgid "Choose from your avaiable Gridsters"336 msgstr "Wähle aus deinen verfügbaren Gridster"353 msgid "Choose your Gridster" 354 msgstr "Wähle den Gridster" 337 355 338 356 #: ../tinymce/i18n/mce_locale.php:14 339 msgid "Change which Gridsterto show here."357 msgid "Change the Gridster, to show here." 340 358 msgstr "Ändere welcher Gridster hier angezeigt wird." 341 359 … … 348 366 msgstr "Gridster-Shortcode löschen" 349 367 368 #~ msgid "Choose from your avaiable Gridsters" 369 #~ msgstr "Wähle aus deinen verfügbaren Gridster" 370 350 371 #~ msgid "Layout your content here" 351 372 #~ msgstr "Gestalte Deinen Inhalt hier" -
cbach-wp-gridster/trunk/readme.txt
r698498 r701410 6 6 Author: Carsten Bach 7 7 Requires at least: 3.3 8 Tested up to: 3. 5.19 Stable tag: 1. 3.28 Tested up to: 3.6 9 Stable tag: 1.4 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 146 146 == Changelog == 147 147 148 = 1.4 = 149 * Tested compatibility with WP 3.6 - everything fine ;) 150 * Added support for new [`shortcode_atts_{shortcode}`-filter](http://markjaquith.wordpress.com/2013/04/04/wordpress-36-shortcode-attribute-filter/), introduced in WP 3.6; use it like this `add_filter( 'shortcode_atts_gridster', 'YOUR-FILTER-FUNCTION-NAME' );` 151 * Introduced a new filter to modify the HTML generated by the shortcode, use `add_filter( 'gridster_shortcode_output', 'YOUR-FILTER-FUNCTION-NAME' )` 152 * Added two actionhooks, one before and one after the rendering of the shortcode output 153 * Fix for Activation-, Deactivation and Uninstall-Hooks 154 * Added a CSS id of the gridster-title to the shortcode output 155 * Fixed the "Edit this Gridster"-Link located upon the shortcode replacement, to work on post-new.php 156 * Removed PHP Notice `Undefined Property $widget->classes on line 2191` 157 * "Insert Gridster" modal now recognizes to insert a new shortcode or to replace an existing one 158 * updated german translation 159 148 160 = 1.3.2 = 149 161 * Fix pagination of posts (of all types) inside widget-blocks … … 203 215 = Filters and Hooks = 204 216 205 You can adjust the behavior of this plugin by using following filters:217 You can adjust the behavior of this plugin by using following **filters**: 206 218 207 219 * Change the `get_post_types()` call for usable post_types by filtering `gridster_get_post_types_as_widget_blocks_args` … … 213 225 * Change the capability, which allows users to overwrite the default settings for each gridster individually by filtering `gridster_overwrite_post_options_with_cap`. By default "edit_theme_options" is used. 214 226 227 Or you can hook in your own functionality by using the following **action hooks**: 228 229 * Do something before and/or after the shortcode ouput by using `gridster_before_shortcode_render` or `gridster_after_shortcode_render`. Both action hooks come with three additional arguments you are able to work with, the `$post_id`, the `$title` and the `$widgets_html` of the current gridster-post. 215 230 216 231 Have a look inside the plugin file to see, what variables you are able to use within your filter hooks. -
cbach-wp-gridster/trunk/tinymce/i18n/mce_locale.php
r690718 r701410 11 11 { 12 12 buttonTitle : "' . esc_js( __( 'Insert Gridster', 'cbach-wp-gridster' ) ) . '", 13 popupTitle : "' . esc_js( __( 'Choose from your avaiable Gridsters', 'cbach-wp-gridster' ) ) . '",14 changeButton: "' . esc_js( __( 'Change which Gridsterto show here.', 'cbach-wp-gridster' ) ) . '",13 popupTitle : "' . esc_js( __( 'Choose your Gridster', 'cbach-wp-gridster' ) ) . '", 14 changeButton: "' . esc_js( __( 'Change the Gridster, to show here.', 'cbach-wp-gridster' ) ) . '", 15 15 editButton : "' . esc_js( __( 'Edit this Gridster (will load a new page)', 'cbach-wp-gridster' ) ) . '", 16 16 dellButton : "' . esc_js( __( 'Delete Gridster-Shortcode', 'cbach-wp-gridster' ) ) . '", -
cbach-wp-gridster/trunk/tinymce/tinymce_gridster_shortcode_plugin.js
r690718 r701410 29 29 30 30 // Register commands for shortcode change modal 31 ed.addCommand('ajax_gridster_shortcode_update_modal', function( ) {31 ed.addCommand('ajax_gridster_shortcode_update_modal', function( u, v ) { 32 32 ed.windowManager.open({ 33 file: ajaxurl + '?action=ajax_gridster_shortcode_update_modal&nonce=' + ed.getLang('gridster_shortcode.AjaxNonce') ,33 file: ajaxurl + '?action=ajax_gridster_shortcode_update_modal&nonce=' + ed.getLang('gridster_shortcode.AjaxNonce') + '&selected=' + v, 34 34 width : 300, 35 35 height : 240, … … 44 44 ed.addCommand('gridster_edit_current_gridster', function() { 45 45 var ed = tinymce.activeEditor, el = ed.selection.getNode(); 46 // find attr inside encoded shortcode of title-Attribute47 function getAttr(s, n) {48 n = new RegExp(n + '=\"\;([0-9]+)\"\;').exec(s);49 return n ? tinymce.DOM.decode(n[1]) : '';50 };51 46 // is this a gridster shortcode ? 52 47 if ( el.nodeName == 'IMG' && ed.dom.hasClass(el, 'gridsterShortcodeGUI') ) { 53 // clone image element 54 var clone = el.cloneNode(true); 55 // create temporary parent element 56 var tmp = document.createElement("div"); 57 // append clone to parent 58 tmp.appendChild(clone); 59 // get string representation of element 60 var stringed_el = tmp.innerHTML; 61 // get ID of gridster post from shortcode Attribute 62 var gridster_id = getAttr(stringed_el, 'id'); 48 // extract gridster post_ID from shortcode attribute 49 var gridster_id = ed.plugins.gridster_shortcode._get_gridster_id( el ); 63 50 // get base URL 64 var path_array = window.location.href.split( 'post.php' );51 var path_array = ajaxurl.split( 'admin-ajax.php' ); 65 52 var admin_url = path_array[0]; 66 53 // create edit url with our gridster id as parameter … … 142 129 }); 143 130 }, 131 132 // 133 _get_gridster_id : function( el ) { 134 135 // find attr inside encoded shortcode of title-Attribute 136 function getAttr(s, n) { 137 n = new RegExp(n + '=\"\;([0-9]+)\"\;').exec(s); 138 return n ? tinymce.DOM.decode(n[1]) : ''; 139 }; 140 141 // clone image element 142 var clone = el.cloneNode(true); 143 // create temporary parent element 144 var tmp = document.createElement("div"); 145 // append clone to parent 146 tmp.appendChild(clone); 147 // get string representation of element 148 var stringed_el = tmp.innerHTML; 149 // get ID of gridster post from shortcode Attribute 150 var gridster_id = getAttr(stringed_el, 'id'); 151 152 return gridster_id; 153 }, 144 154 145 155 // Add Edit-Handler Buttons to DOM and add event-handlers … … 166 176 title : ed.getLang('gridster_shortcode.changeButton') 167 177 }); 168 tinymce.dom.Event.add(changeButton, 'mousedown', function(e) { 169 var ed = tinymce.activeEditor; 170 ed.execCommand("ajax_gridster_shortcode_update_modal"); 171 ed.plugins.gridster_shortcode._hideButtons(); 178 tinymce.dom.Event.add( changeButton, 'mousedown', function(e) { 179 var ed = tinymce.activeEditor, el = ed.selection.getNode(); 180 // is this a gridster shortcode ? 181 if ( el.nodeName == 'IMG' && ed.dom.hasClass(el, 'gridsterShortcodeGUI') ) { 182 // extract gridster post_ID from shortcode attribute 183 var gridster_id = ed.plugins.gridster_shortcode._get_gridster_id( el ); 184 // open Modal to pick gridster shortcode from list 185 ed.execCommand("ajax_gridster_shortcode_update_modal", false, gridster_id ); 186 // hide Edit-handler-Buttons 187 ed.plugins.gridster_shortcode._hideButtons(); 188 } 172 189 }); 173 190 … … 180 197 title : ed.getLang('gridster_shortcode.editButton') 181 198 }); 182 tinymce.dom.Event.add( editButton, 'mousedown', function(e) {199 tinymce.dom.Event.add( editButton, 'mousedown', function(e) { 183 200 var ed = tinymce.activeEditor; 184 201 ed.execCommand("gridster_edit_current_gridster"); … … 195 212 title : ed.getLang('gridster_shortcode.dellButton') 196 213 }); 197 tinymce.dom.Event.add( dellButton, 'mousedown', function(e) {214 tinymce.dom.Event.add( dellButton, 'mousedown', function(e) { 198 215 var ed = tinymce.activeEditor, el = ed.selection.getNode(); 199 216 // is this a gridster shortcode ? -
cbach-wp-gridster/trunk/tinymce/tinymce_gridster_shortcode_plugin.min.js
r691010 r701410 1 (function(){tinymce.create("tinymce.plugins.gridster_shortcode",{init:function(a,b){var c=this;c.url=b;c._createButtons();a.onBeforeSetContent.add(function(d,e){e.content=c._do_gridster_shortcode(e.content)});a.onExecCommand.add(function(d,e){if(e==="mceInsertContent"){tinyMCE.activeEditor.setContent(c._do_gridster_shortcode(tinyMCE.activeEditor.getContent()))}});a.onPostProcess.add(function(d,e){if(e.get){e.content=c._get_gridster_shortcode(e.content)}});a.addCommand("ajax_gridster_shortcode_update_modal",function( ){a.windowManager.open({file:ajaxurl+"?action=ajax_gridster_shortcode_update_modal&nonce="+a.getLang("gridster_shortcode.AjaxNonce"),width:300,height:240,title:a.getLang("gridster_shortcode.popupTitle"),inline:1},{plugin_url:b})});a.addCommand("gridster_edit_current_gridster",function(){var j=tinymce.activeEditor,d=j.selection.getNode();function k(o,p){p=new RegExp(p+"="([0-9]+)"").exec(o);return p?tinymce.DOM.decode(p[1]):""}if(d.nodeName=="IMG"&&j.dom.hasClass(d,"gridsterShortcodeGUI")){var m=d.cloneNode(true);var h=document.createElement("div");h.appendChild(m);var f=h.innerHTML;var l=k(f,"id");var g=window.location.href.split("post.php");var e=g[0];var i="post.php?post="+l+"&action=edit";window.top.location.href=e+i}});a.addButton("gridster_shortcode",{title:a.getLang("gridster_shortcode.buttonTitle"),cmd:"ajax_gridster_shortcode_update_modal"});a.onMouseDown.add(function(d,f){if(f.target.nodeName=="IMG"&&d.dom.hasClass(f.target,"gridsterShortcodeGUI")){d.plugins.gridster_shortcode._hideButtons();d.plugins.wordpress._showButtons(f.target,"gridster_sr_btns")}});a.onInit.add(function(d){tinymce.dom.Event.add(d.getWin(),"scroll",function(f){d.plugins.gridster_shortcode._hideButtons()});tinymce.dom.Event.add(d.getBody(),"dragstart",function(f){d.plugins.gridster_shortcode._hideButtons()})});a.onBeforeExecCommand.add(function(d,f,e,g){d.plugins.gridster_shortcode._hideButtons()});a.onSaveContent.add(function(d,e){d.plugins.gridster_shortcode._hideButtons()});a.onMouseDown.add(function(d,f){if(f.target.nodeName!="IMG"){d.plugins.gridster_shortcode._hideButtons()}});a.onKeyDown.add(function(d,f){if(f.which==tinymce.VK.DELETE||f.which==tinymce.VK.BACKSPACE){d.plugins.gridster_shortcode._hideButtons()}})},_do_gridster_shortcode:function(b){var a=this;return b.replace(/\[gridster([^\]]*)\]/g,function(d,c){return'<img src="'+a.url+'/img/t.gif" class="gridsterShortcodeGUI mceItem" title="gridster'+tinymce.DOM.encode(c)+'" />'})},_get_gridster_shortcode:function(b){function a(c,d){d=new RegExp(d+'="([^"]+)"',"g").exec(c);return d?tinymce.DOM.decode(d[1]):""}return b.replace(/(?:<p[^>]*>)*(<img[^>]+>)(?:<\/p>)*/g,function(e,d){var c=a(d,"class");if(c.indexOf("gridsterShortcodeGUI")!=-1){return"<p>["+tinymce.trim(a(d,"title"))+"]</p>"}return e})},_createButtons:function(){var b=this,a=tinymce.activeEditor,d=tinymce.DOM,e,c,f;if(d.get("gridster_sr_btns")){return}f=(window.devicePixelRatio&&window.devicePixelRatio>1)||(window.matchMedia&&window.matchMedia("(min-resolution:130dpi)").matches);d.add(document.body,"div",{id:"gridster_sr_btns",style:"display:none;"});changeButton=d.add("gridster_sr_btns","img",{src:f?b.url+"/img/change-2x.png":b.url+"/img/change.png",id:"gridster_changeShortcode",width:"24",height:"24",title:a.getLang("gridster_shortcode.changeButton")});tinymce.dom.Event.add(changeButton,"mousedown",function(h){var g=tinymce.activeEditor;g.execCommand("ajax_gridster_shortcode_update_modal");g.plugins.gridster_shortcode._hideButtons()});e=d.add("gridster_sr_btns","img",{src:f?b.url+"/img/edit-2x.png":b.url+"/img/edit.png",id:"gridster_editShortcode",width:"24",height:"24",title:a.getLang("gridster_shortcode.editButton")});tinymce.dom.Event.add(e,"mousedown",function(h){var g=tinymce.activeEditor;g.execCommand("gridster_edit_current_gridster");g.plugins.gridster_shortcode._hideButtons()});c=d.add("gridster_sr_btns","img",{src:f?b.url+"/img/delete-2x.png":b.url+"/img/delete.png",id:"gridster_delShortcode",width:"24",height:"24",title:a.getLang("gridster_shortcode.dellButton")});tinymce.dom.Event.add(c,"mousedown",function(i){var g=tinymce.activeEditor,h=g.selection.getNode();if(h.nodeName=="IMG"&&g.dom.hasClass(h,"gridsterShortcodeGUI")){g.dom.remove(h);g.execCommand("mceRepaint");g.dom.events.cancel(i)}g.plugins.gridster_shortcode._hideButtons()})},_hideButtons:function(){var a=tinymce.DOM;a.hide(a.select("#gridster_sr_btns"))},getInfo:function(){return{longname:"Gridster shortcode replace with user-friendly GUI",author:"Carsten Bach",authorurl:"http://carsten-bach.de",infourl:"https://github.com/carstingaxion/cbach-wp-gridster",version:"1.0"}}});tinymce.PluginManager.add("gridster_shortcode",tinymce.plugins.gridster_shortcode)})();1 (function(){tinymce.create("tinymce.plugins.gridster_shortcode",{init:function(a,b){var c=this;c.url=b;c._createButtons();a.onBeforeSetContent.add(function(d,e){e.content=c._do_gridster_shortcode(e.content)});a.onExecCommand.add(function(d,e){if(e==="mceInsertContent"){tinyMCE.activeEditor.setContent(c._do_gridster_shortcode(tinyMCE.activeEditor.getContent()))}});a.onPostProcess.add(function(d,e){if(e.get){e.content=c._get_gridster_shortcode(e.content)}});a.addCommand("ajax_gridster_shortcode_update_modal",function(e,d){a.windowManager.open({file:ajaxurl+"?action=ajax_gridster_shortcode_update_modal&nonce="+a.getLang("gridster_shortcode.AjaxNonce")+"&selected="+d,width:300,height:240,title:a.getLang("gridster_shortcode.popupTitle"),inline:1},{plugin_url:b})});a.addCommand("gridster_edit_current_gridster",function(){var d=tinymce.activeEditor,h=d.selection.getNode();if(h.nodeName=="IMG"&&d.dom.hasClass(h,"gridsterShortcodeGUI")){var e=d.plugins.gridster_shortcode._get_gridster_id(h);var g=ajaxurl.split("admin-ajax.php");var i=g[0];var f="post.php?post="+e+"&action=edit";window.top.location.href=i+f}});a.addButton("gridster_shortcode",{title:a.getLang("gridster_shortcode.buttonTitle"),cmd:"ajax_gridster_shortcode_update_modal"});a.onMouseDown.add(function(d,f){if(f.target.nodeName=="IMG"&&d.dom.hasClass(f.target,"gridsterShortcodeGUI")){d.plugins.gridster_shortcode._hideButtons();d.plugins.wordpress._showButtons(f.target,"gridster_sr_btns")}});a.onInit.add(function(d){tinymce.dom.Event.add(d.getWin(),"scroll",function(f){d.plugins.gridster_shortcode._hideButtons()});tinymce.dom.Event.add(d.getBody(),"dragstart",function(f){d.plugins.gridster_shortcode._hideButtons()})});a.onBeforeExecCommand.add(function(d,f,e,g){d.plugins.gridster_shortcode._hideButtons()});a.onSaveContent.add(function(d,e){d.plugins.gridster_shortcode._hideButtons()});a.onMouseDown.add(function(d,f){if(f.target.nodeName!="IMG"){d.plugins.gridster_shortcode._hideButtons()}});a.onKeyDown.add(function(d,f){if(f.which==tinymce.VK.DELETE||f.which==tinymce.VK.BACKSPACE){d.plugins.gridster_shortcode._hideButtons()}})},_do_gridster_shortcode:function(b){var a=this;return b.replace(/\[gridster([^\]]*)\]/g,function(d,c){return'<img src="'+a.url+'/img/t.gif" class="gridsterShortcodeGUI mceItem" title="gridster'+tinymce.DOM.encode(c)+'" />'})},_get_gridster_shortcode:function(b){function a(c,d){d=new RegExp(d+'="([^"]+)"',"g").exec(c);return d?tinymce.DOM.decode(d[1]):""}return b.replace(/(?:<p[^>]*>)*(<img[^>]+>)(?:<\/p>)*/g,function(e,d){var c=a(d,"class");if(c.indexOf("gridsterShortcodeGUI")!=-1){return"<p>["+tinymce.trim(a(d,"title"))+"]</p>"}return e})},_get_gridster_id:function(d){function c(g,h){h=new RegExp(h+"="([0-9]+)"").exec(g);return h?tinymce.DOM.decode(h[1]):""}var f=d.cloneNode(true);var b=document.createElement("div");b.appendChild(f);var e=b.innerHTML;var a=c(e,"id");return a},_createButtons:function(){var b=this,a=tinymce.activeEditor,d=tinymce.DOM,e,c,f;if(d.get("gridster_sr_btns")){return}f=(window.devicePixelRatio&&window.devicePixelRatio>1)||(window.matchMedia&&window.matchMedia("(min-resolution:130dpi)").matches);d.add(document.body,"div",{id:"gridster_sr_btns",style:"display:none;"});changeButton=d.add("gridster_sr_btns","img",{src:f?b.url+"/img/change-2x.png":b.url+"/img/change.png",id:"gridster_changeShortcode",width:"24",height:"24",title:a.getLang("gridster_shortcode.changeButton")});tinymce.dom.Event.add(changeButton,"mousedown",function(j){var g=tinymce.activeEditor,i=g.selection.getNode();if(i.nodeName=="IMG"&&g.dom.hasClass(i,"gridsterShortcodeGUI")){var h=g.plugins.gridster_shortcode._get_gridster_id(i);g.execCommand("ajax_gridster_shortcode_update_modal",false,h);g.plugins.gridster_shortcode._hideButtons()}});e=d.add("gridster_sr_btns","img",{src:f?b.url+"/img/edit-2x.png":b.url+"/img/edit.png",id:"gridster_editShortcode",width:"24",height:"24",title:a.getLang("gridster_shortcode.editButton")});tinymce.dom.Event.add(e,"mousedown",function(h){var g=tinymce.activeEditor;g.execCommand("gridster_edit_current_gridster");g.plugins.gridster_shortcode._hideButtons()});c=d.add("gridster_sr_btns","img",{src:f?b.url+"/img/delete-2x.png":b.url+"/img/delete.png",id:"gridster_delShortcode",width:"24",height:"24",title:a.getLang("gridster_shortcode.dellButton")});tinymce.dom.Event.add(c,"mousedown",function(i){var g=tinymce.activeEditor,h=g.selection.getNode();if(h.nodeName=="IMG"&&g.dom.hasClass(h,"gridsterShortcodeGUI")){g.dom.remove(h);g.execCommand("mceRepaint");g.dom.events.cancel(i)}g.plugins.gridster_shortcode._hideButtons()})},_hideButtons:function(){var a=tinymce.DOM;a.hide(a.select("#gridster_sr_btns"))},getInfo:function(){return{longname:"Gridster shortcode replace with user-friendly GUI",author:"Carsten Bach",authorurl:"http://carsten-bach.de",infourl:"https://github.com/carstingaxion/cbach-wp-gridster",version:"1.0"}}});tinymce.PluginManager.add("gridster_shortcode",tinymce.plugins.gridster_shortcode)})();
Note: See TracChangeset
for help on using the changeset viewer.