Changeset 1646035
- Timestamp:
- 04/26/2017 08:04:24 PM (7 years ago)
- Location:
- shortcode-ui
- Files:
-
- 24 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
shortcode-ui/tags/0.7.2/inc/fields/class-shortcode-ui-field-attachment.php
r1615940 r1646035 136 136 137 137 <div class="thumbnail-details-container has-attachment"> 138 <strong> Thumbnail Details</strong>138 <strong></strong> 139 139 <div class="filename">{{ data.filename }}</div> 140 140 <div class="date-formatted">{{ data.dateFormatted }}</div> … … 143 143 <div class="dimensions">{{ data.width }} × {{ data.height }}</div> 144 144 <# } #> 145 <div class="edit-link"><a href="{{ data.editLink }}"> Edit Attachment</a></div>145 <div class="edit-link"><a href="{{ data.editLink }}"></a></div> 146 146 </div> 147 147 </div> -
shortcode-ui/tags/0.7.2/inc/templates/edit-form.tpl.php
r1536575 r1646035 55 55 <optgroup label="{{ option.label }}"> 56 56 <# _.each( option.options, function( optgroupOption ) { #> 57 <option value="{{ optgroupOption.value }}" <# if ( optgroupOption.value === data.value ){ print('selected'); } #>>{{ optgroupOption.label }}</option>57 <option value="{{ optgroupOption.value }}" <# if ( { print('selected'); } #>>{{ optgroupOption.label }}</option> 58 58 <# }); #> 59 59 </optgroup> 60 60 <# } else { #> 61 <option value="{{ option.value }}" <# if ( option.value === data.value ){ print('selected'); } #>>{{ option.label }}</option>61 <option value="{{ option.value }}" <# if ( { print('selected'); } #>>{{ option.label }}</option> 62 62 <# } #> 63 63 -
shortcode-ui/tags/0.7.2/js/build/shortcode-ui.js
r1615940 r1646035 48 48 currentShortcode: null, 49 49 action: 'select', 50 search: null 50 search: null, 51 insertCallback: this.insertCallback, 51 52 }); 52 53 … … 71 72 72 73 insert: function() { 73 var shortcode = this.props.get('currentShortcode'); 74 if ( shortcode ) { 75 send_to_editor( shortcode.formatShortcode() ); 76 this.reset(); 77 this.frame.close(); 78 } 74 var shortcode = this.props.get( 'currentShortcode' ); 75 var insertCallback = this.props.get( 'insertCallback' ); 76 77 if ( shortcode && insertCallback ) { 78 insertCallback( shortcode ); 79 } 80 81 this.reset(); 82 this.resetState(); 83 this.frame.close(); 84 }, 85 86 insertCallback: function( shortcode ) { 87 window.send_to_editor( shortcode.formatShortcode() ); 79 88 }, 80 89 … … 83 92 this.props.set( 'currentShortcode', null ); 84 93 this.props.set( 'search', null ); 94 95 96 97 98 99 100 101 85 102 }, 86 103 … … 255 272 // Encode textareas incase HTML 256 273 if ( attr.get( 'encode' ) ) { 257 attr.set( 'value', encodeURIComponent( decodeURIComponent( attr.get( 'value' ).replace( "%", "%" ) ) ), { silent: true } );274 attr.set( 'value', encodeURIComponent( decodeURIComponent( attr.get( 'value' ).replace( , "%" ) ) ), { silent: true } ); 258 275 } 259 276 … … 640 657 * @param {string} shortcodeString String representation of the shortcode 641 658 */ 642 edit: function( shortcodeString ) {659 edit: function( shortcodeString ) { 643 660 644 661 var currentShortcode = this.parseShortcodeString( shortcodeString ); … … 659 676 } 660 677 661 // Make sure to reset state when closed. 662 frame.once( 'close submit', function() { 663 frame.state().props.set('currentShortcode', false); 664 var menuItem = frame.menu.get().get('shortcode-ui'); 665 menuItem.options.text = shortcodeUIData.strings.media_frame_title; 666 menuItem.render(); 667 frame.setState( 'insert' ); 678 frame.mediaController.props.set( 'insertCallback', function( shortcode ) { 679 update( shortcode.formatShortcode() ); 668 680 } ); 669 681 … … 1822 1834 this.preselect( $field ); 1823 1835 1824 1836 var $fieldSelect2 = $field[ shortcodeUIData.select2_handle ]({ 1825 1837 placeholder: "Search", 1826 1838 multiple: this.model.get( 'multiple' ), … … 1853 1865 cache: true 1854 1866 }, 1867 1855 1868 escapeMarkup: function( markup ) { return markup; }, 1856 1869 minimumInputLength: 1, … … 1888 1901 1889 1902 destroySelect2UI: function() { 1890 1903 $fieldSelect2[ shortcodeUIData.select2_handle ]( 'close' ); 1891 1904 } 1892 1905 1893 1906 }); 1894 1895 1907 1896 1908 }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -
shortcode-ui/tags/0.7.2/js/src/controllers/media-controller.js
r1615931 r1646035 11 11 currentShortcode: null, 12 12 action: 'select', 13 search: null 13 search: null, 14 insertCallback: this.insertCallback, 14 15 }); 15 16 … … 34 35 35 36 insert: function() { 36 var shortcode = this.props.get('currentShortcode');37 if ( shortcode ) {38 send_to_editor( shortcode.formatShortcode() ); 39 this.reset();40 this.frame.close();37 var shortcode ); 38 39 40 41 ); 41 42 } 43 44 45 46 47 48 49 50 42 51 }, 43 52 … … 46 55 this.props.set( 'currentShortcode', null ); 47 56 this.props.set( 'search', null ); 57 58 59 60 61 62 63 64 48 65 }, 49 66 -
shortcode-ui/tags/0.7.2/js/src/models/shortcode.js
r1615931 r1646035 76 76 // Encode textareas incase HTML 77 77 if ( attr.get( 'encode' ) ) { 78 attr.set( 'value', encodeURIComponent( decodeURIComponent( attr.get( 'value' ).replace( "%", "%" ) ) ), { silent: true } );78 attr.set( 'value', encodeURIComponent( decodeURIComponent( attr.get( 'value' ).replace( , "%" ) ) ), { silent: true } ); 79 79 } 80 80 -
shortcode-ui/tags/0.7.2/js/src/utils/shortcode-view-constructor.js
r1615931 r1646035 161 161 * @param {string} shortcodeString String representation of the shortcode 162 162 */ 163 edit: function( shortcodeString ) {163 edit: function( shortcodeString ) { 164 164 165 165 var currentShortcode = this.parseShortcodeString( shortcodeString ); … … 180 180 } 181 181 182 // Make sure to reset state when closed. 183 frame.once( 'close submit', function() { 184 frame.state().props.set('currentShortcode', false); 185 var menuItem = frame.menu.get().get('shortcode-ui'); 186 menuItem.options.text = shortcodeUIData.strings.media_frame_title; 187 menuItem.render(); 188 frame.setState( 'insert' ); 182 frame.mediaController.props.set( 'insertCallback', function( shortcode ) { 183 update( shortcode.formatShortcode() ); 189 184 } ); 190 185 -
shortcode-ui/tags/0.7.2/languages/shortcode-ui-fi.po
r1536575 r1646035 4 4 "Project-Id-Version: Shortcake (Shortcode UI) 0.6.0-alpha\n" 5 5 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/shortcode-ui\n" 6 "POT-Creation-Date: 2016-03-23 17:25+0200\n" 6 "POT-Creation-Date: 2017-03-29 13:09+0300\n" 7 "PO-Revision-Date: 2017-03-29 13:11+0300\n" 8 "Last-Translator: Teemu Suoranta <teemu@aucor.fi>\n" 9 "Language-Team: \n" 10 "Language: fi\n" 7 11 "MIME-Version: 1.0\n" 8 12 "Content-Type: text/plain; charset=UTF-8\n" 9 13 "Content-Transfer-Encoding: 8bit\n" 10 " PO-Revision-Date: 2016-03-23 18:03+0200\n"11 " Language-Team: \n"12 " X-Generator: Poedit 1.8.7\n"13 " X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c\n"14 "0\n" 15 "" 16 "" 17 "esc_html_x:1,2c\n" 14 18 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 15 19 "X-Poedit-SourceCharset: UTF-8\n" 16 20 "X-Poedit-Basepath: ..\n" 17 21 "X-Textdomain-Support: yes\n" 18 "Last-Translator: Teemu Suoranta <teemu@aucor.fi>\n"19 "Language: fi\n"20 22 "X-Poedit-SearchPath-0: .\n" 21 23 22 #: dev.php:75 24 #: dev.php:68 25 msgid "" 26 "Shortcode UI plugin must be active for Shortcode UI Example plugin to " 27 "function." 28 msgstr "" 29 30 #: dev.php:119 31 msgid "Shortcake With No Attributes" 32 msgstr "" 33 34 #: dev.php:159 23 35 msgid "Attachment" 24 36 msgstr "Liitetiedosto" 25 37 26 #: dev.php: 79 dev.php:8038 #: dev.php:0 27 39 msgid "Select Image" 28 40 msgstr "Valitse kuva" 29 41 30 #: dev.php:83 42 #: dev.php:175 43 msgid "You can select multiple images." 44 msgstr "" 45 46 #: dev.php:183 31 47 msgid "Citation Source" 32 48 msgstr "Lainauksen lähde" 33 49 34 #: inc/class-shortcode-ui.php:109 50 #: dev.php:188 51 msgid "Test placeholder" 52 msgstr "" 53 54 #: dev.php:193 55 #, fuzzy 56 #| msgid "Select Image" 57 msgid "Select Page" 58 msgstr "Valitse kuva" 59 60 #: dev.php:200 61 #, fuzzy 62 #| msgid "Select Image" 63 msgid "Select Term" 64 msgstr "Valitse kuva" 65 66 #: dev.php:207 67 msgid "User Select" 68 msgstr "" 69 70 #: dev.php:213 71 msgid "Color" 72 msgstr "" 73 74 #: dev.php:218 75 msgid "Hex color code" 76 msgstr "" 77 78 #: dev.php:222 79 msgid "Alignment" 80 msgstr "" 81 82 #: dev.php:223 83 msgid "" 84 "Whether the quotation should be displayed as pull-left, pull-right, or " 85 "neither." 86 msgstr "" 87 88 #: dev.php:227 89 msgid "None" 90 msgstr "" 91 92 #: dev.php:228 dev.php:233 93 msgid "Pull Left" 94 msgstr "" 95 96 #: dev.php:229 dev.php:234 97 msgid "Pull Right" 98 msgstr "" 99 100 #: dev.php:240 101 msgid "Year" 102 msgstr "" 103 104 #: dev.php:241 105 msgid "Optional. The year the quotation is from." 106 msgstr "" 107 108 #: dev.php:260 109 msgid "Shortcake Dev" 110 msgstr "" 111 112 #: dev.php:279 113 msgid "Quote" 114 msgstr "" 115 116 #: dev.php:280 117 msgid "Include a statement from someone famous." 118 msgstr "" 119 120 #: dev.php:352 121 #, fuzzy 122 #| msgid "Inner Content" 123 msgid "Content:" 124 msgstr "Sisempi sisältö" 125 126 #: dev.php:356 127 msgid "Source:" 128 msgstr "" 129 130 #: dev.php:360 131 msgid "Image:" 132 msgstr "" 133 134 #: dev.php:364 135 msgid "Gallery:" 136 msgstr "" 137 138 #: dev.php:372 139 msgid "Pages:" 140 msgstr "" 141 142 #: dev.php:376 143 msgid "Terms:" 144 msgstr "" 145 146 #: dev.php:380 147 msgid "Users:" 148 msgstr "" 149 150 #: dev.php:384 151 msgid "Color:" 152 msgstr "" 153 154 #: dev.php:388 155 msgid "Alignment:" 156 msgstr "" 157 158 #: dev.php:392 159 msgid "Year:" 160 msgstr "" 161 162 #: inc/class-shortcode-ui.php:110 35 163 msgid "Inner Content" 36 164 msgstr "Sisempi sisältö" 37 165 38 #: inc/class-shortcode-ui.php:2 20 inc/class-shortcode-ui.php:221166 #: inc/class-shortcode-ui.php:2 39 167 msgid "Insert Post Element" 40 168 msgstr "Lisää sisältöelementti" 41 169 42 #: inc/class-shortcode-ui.php:2 22170 #: inc/class-shortcode-ui.php:2 43 171 msgid "%s Details" 44 172 msgstr "%s tiedot" 45 173 46 #: inc/class-shortcode-ui.php:2 23174 #: inc/class-shortcode-ui.php:2 47 175 msgid "Insert Element" 48 176 msgstr "Lisää elementti" 49 177 50 #: inc/class-shortcode-ui.php:2 24178 #: inc/class-shortcode-ui.php:2 51 179 msgid "Update" 52 180 msgstr "Päivitä" 53 181 54 #: inc/class-shortcode-ui.php:2 25182 #: inc/class-shortcode-ui.php:2 55 183 msgid "There are no attributes to configure for this Post Element." 56 184 msgstr "Tässä sisältöelementissä ei ole muokattavia asetuksia." 57 185 58 #: inc/class-shortcode-ui.php:2 26186 #: inc/class-shortcode-ui.php:2 59 187 msgid "Failed to load preview" 60 188 msgstr "Esikatselun lataus epäonnistui" 61 189 62 #: inc/class-shortcode-ui.php:2 27190 #: inc/class-shortcode-ui.php:2 63 191 msgid "Search" 64 192 msgstr "Etsi" 65 193 66 #: inc/class-shortcode-ui.php:2 28194 #: inc/class-shortcode-ui.php:2 67 195 msgid "Insert Content" 68 196 msgstr "Lisää sisältö" 69 197 70 #: inc/class-shortcode-ui.php:323 198 #: inc/class-shortcode-ui.php:297 199 msgid "Add Post Element" 200 msgstr "Lisää sisältöelementti" 201 202 #: inc/class-shortcode-ui.php:365 71 203 msgid "Something's rotten in the state of Denmark" 72 204 msgstr "Jotain mätää Tanskanmaalla" … … 77 209 msgstr "Valitse liitetiedosto" 78 210 79 #: inc/fields/class-field-attachment.php:10480 msgid "Thumbnail Details"81 msgstr "Liitteen tiedot"82 83 #: inc/fields/class-field-attachment.php:10984 msgid "Edit Attachment"85 msgstr "Muokkaa liitetiedostoa"86 87 211 #: inc/templates/edit-form.tpl.php:3 88 212 msgid "Back to list" … … 104 228 msgid "http://next.fusion.net/tag/shortcode-ui/" 105 229 msgstr "http://next.fusion.net/tag/shortcode-ui/" 230 231 232 233 234 235 -
shortcode-ui/tags/0.7.2/languages/shortcode-ui.pot
r1615940 r1646035 1 # Copyright (C) 201 6Fusion Engineering and community1 # Copyright (C) 201 Fusion Engineering and community 2 2 # This file is distributed under the GPL v2 or later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Shortcake (Shortcode UI) 0.7. 1\n"5 "Project-Id-Version: Shortcake (Shortcode UI) 0.7.\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/shortcode-ui\n" 7 "POT-Creation-Date: 201 6-12-16 22:19:41+00:00\n"7 "POT-Creation-Date: 201+00:00\n" 8 8 "MIME-Version: 1.0\n" 9 9 "Content-Type: text/plain; charset=utf-8\n" 10 10 "Content-Transfer-Encoding: 8bit\n" 11 "PO-Revision-Date: 201 6-MO-DA HO:MI+ZONE\n"11 "PO-Revision-Date: 201-MO-DA HO:MI+ZONE\n" 12 12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 13 13 "Language-Team: LANGUAGE <LL@li.org>\n" … … 157 157 msgstr "" 158 158 159 #: inc/class-shortcode-ui.php:11 0159 #: inc/class-shortcode-ui.php:11 160 160 msgid "Inner Content" 161 161 msgstr "" 162 162 163 #: inc/class-shortcode-ui.php:2 49 inc/class-shortcode-ui.php:250163 #: inc/class-shortcode-ui.php:2 164 164 msgid "Insert Post Element" 165 165 msgstr "" 166 166 167 #: inc/class-shortcode-ui.php:251 167 #: inc/class-shortcode-ui.php:265 168 #. Translators: Ignore placeholder. This is replaced with the Shortcode name 169 #. string in JS 168 170 msgid "%s Details" 169 171 msgstr "" 170 172 171 #: inc/class-shortcode-ui.php:2 52173 #: inc/class-shortcode-ui.php:2 172 174 msgid "Insert Element" 173 175 msgstr "" 174 176 175 #: inc/class-shortcode-ui.php:2 53177 #: inc/class-shortcode-ui.php:2 176 178 msgid "Update" 177 179 msgstr "" 178 180 179 #: inc/class-shortcode-ui.php:2 54181 #: inc/class-shortcode-ui.php:2 180 182 msgid "There are no attributes to configure for this Post Element." 181 183 msgstr "" 182 184 183 #: inc/class-shortcode-ui.php:2 55185 #: inc/class-shortcode-ui.php:2 184 186 msgid "Failed to load preview" 185 187 msgstr "" 186 188 187 #: inc/class-shortcode-ui.php:2 56189 #: inc/class-shortcode-ui.php:2 188 190 msgid "Search" 189 191 msgstr "" 190 192 191 #: inc/class-shortcode-ui.php:2 57193 #: inc/class-shortcode-ui.php:2 192 194 msgid "Insert Content" 193 195 msgstr "" 194 196 195 #: inc/class-shortcode-ui.php: 297197 #: inc/class-shortcode-ui.php: 196 198 msgid "Add Post Element" 197 199 msgstr "" 198 200 199 #: inc/class-shortcode-ui.php:3 65201 #: inc/class-shortcode-ui.php:3 200 202 msgid "Something's rotten in the state of Denmark" 201 203 msgstr "" 202 204 203 #: inc/fields/class- field-attachment.php:79204 #: inc/fields/class- field-attachment.php:80205 #: inc/fields/class-field-attachment.php:79 206 #: inc/fields/class-field-attachment.php:80 205 207 msgid "Select Attachment" 208 209 210 211 212 213 214 215 206 216 msgstr "" 207 217 -
shortcode-ui/tags/0.7.2/package.json
r1536575 r1646035 19 19 "grunt-wp-i18n": "^0.5.0", 20 20 "grunt-wp-readme-to-markdown": "~1.0.0", 21 21 22 "remapify": "1.4.3" 22 23 }, -
shortcode-ui/tags/0.7.2/readme.txt
r1615947 r1646035 3 3 Tags: shortcodes 4 4 Requires at least: 4.5 5 Tested up to: 4.7. 36 Stable tag: 0.7. 15 Tested up to: 4.7. 6 Stable tag: 0.7. 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 69 69 == Changelog == 70 70 71 = 0.7.1 (December 16, 2016) = 71 = 0.7.2 (April 24, 2017) = 72 * Bug fix: Fix behavior in WordPress 4.7.4 where editing a shortcode would insert a new shortcode into the editor rather than updating the shortcode being edited. 73 * Bug fix: The replacement used to escape percent (%) characters in attributes only replaced the first appearance 74 * Bug fix: For select fields with multiple=true, allow multiple options to be selected by default 75 * Added i18n for all strings in attachment field template 76 * Added Finnish translation 77 78 = 0.7.1 (March 16, 2017) = 72 79 * Change shortcode formatting to add a space before the self-closing trailing slash. 73 80 * Fix alignment of attachment previews with long filenames. -
shortcode-ui/tags/0.7.2/shortcode-ui.php
r1615940 r1646035 2 2 /** 3 3 * Plugin Name: Shortcake (Shortcode UI) 4 * Version: 0.7. 14 * Version: 0.7. 5 5 * Description: User Interface for adding shortcodes. 6 6 * Author: Fusion Engineering and community -
shortcode-ui/trunk/inc/fields/class-shortcode-ui-field-attachment.php
r1615940 r1646035 136 136 137 137 <div class="thumbnail-details-container has-attachment"> 138 <strong> Thumbnail Details</strong>138 <strong></strong> 139 139 <div class="filename">{{ data.filename }}</div> 140 140 <div class="date-formatted">{{ data.dateFormatted }}</div> … … 143 143 <div class="dimensions">{{ data.width }} × {{ data.height }}</div> 144 144 <# } #> 145 <div class="edit-link"><a href="{{ data.editLink }}"> Edit Attachment</a></div>145 <div class="edit-link"><a href="{{ data.editLink }}"></a></div> 146 146 </div> 147 147 </div> -
shortcode-ui/trunk/inc/templates/edit-form.tpl.php
r1536575 r1646035 55 55 <optgroup label="{{ option.label }}"> 56 56 <# _.each( option.options, function( optgroupOption ) { #> 57 <option value="{{ optgroupOption.value }}" <# if ( optgroupOption.value === data.value ){ print('selected'); } #>>{{ optgroupOption.label }}</option>57 <option value="{{ optgroupOption.value }}" <# if ( { print('selected'); } #>>{{ optgroupOption.label }}</option> 58 58 <# }); #> 59 59 </optgroup> 60 60 <# } else { #> 61 <option value="{{ option.value }}" <# if ( option.value === data.value ){ print('selected'); } #>>{{ option.label }}</option>61 <option value="{{ option.value }}" <# if ( { print('selected'); } #>>{{ option.label }}</option> 62 62 <# } #> 63 63 -
shortcode-ui/trunk/js/build/shortcode-ui.js
r1615940 r1646035 48 48 currentShortcode: null, 49 49 action: 'select', 50 search: null 50 search: null, 51 insertCallback: this.insertCallback, 51 52 }); 52 53 … … 71 72 72 73 insert: function() { 73 var shortcode = this.props.get('currentShortcode'); 74 if ( shortcode ) { 75 send_to_editor( shortcode.formatShortcode() ); 76 this.reset(); 77 this.frame.close(); 78 } 74 var shortcode = this.props.get( 'currentShortcode' ); 75 var insertCallback = this.props.get( 'insertCallback' ); 76 77 if ( shortcode && insertCallback ) { 78 insertCallback( shortcode ); 79 } 80 81 this.reset(); 82 this.resetState(); 83 this.frame.close(); 84 }, 85 86 insertCallback: function( shortcode ) { 87 window.send_to_editor( shortcode.formatShortcode() ); 79 88 }, 80 89 … … 83 92 this.props.set( 'currentShortcode', null ); 84 93 this.props.set( 'search', null ); 94 95 96 97 98 99 100 101 85 102 }, 86 103 … … 255 272 // Encode textareas incase HTML 256 273 if ( attr.get( 'encode' ) ) { 257 attr.set( 'value', encodeURIComponent( decodeURIComponent( attr.get( 'value' ).replace( "%", "%" ) ) ), { silent: true } );274 attr.set( 'value', encodeURIComponent( decodeURIComponent( attr.get( 'value' ).replace( , "%" ) ) ), { silent: true } ); 258 275 } 259 276 … … 640 657 * @param {string} shortcodeString String representation of the shortcode 641 658 */ 642 edit: function( shortcodeString ) {659 edit: function( shortcodeString ) { 643 660 644 661 var currentShortcode = this.parseShortcodeString( shortcodeString ); … … 659 676 } 660 677 661 // Make sure to reset state when closed. 662 frame.once( 'close submit', function() { 663 frame.state().props.set('currentShortcode', false); 664 var menuItem = frame.menu.get().get('shortcode-ui'); 665 menuItem.options.text = shortcodeUIData.strings.media_frame_title; 666 menuItem.render(); 667 frame.setState( 'insert' ); 678 frame.mediaController.props.set( 'insertCallback', function( shortcode ) { 679 update( shortcode.formatShortcode() ); 668 680 } ); 669 681 … … 1822 1834 this.preselect( $field ); 1823 1835 1824 1836 var $fieldSelect2 = $field[ shortcodeUIData.select2_handle ]({ 1825 1837 placeholder: "Search", 1826 1838 multiple: this.model.get( 'multiple' ), … … 1853 1865 cache: true 1854 1866 }, 1867 1855 1868 escapeMarkup: function( markup ) { return markup; }, 1856 1869 minimumInputLength: 1, … … 1888 1901 1889 1902 destroySelect2UI: function() { 1890 1903 $fieldSelect2[ shortcodeUIData.select2_handle ]( 'close' ); 1891 1904 } 1892 1905 1893 1906 }); 1894 1895 1907 1896 1908 }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -
shortcode-ui/trunk/js/src/controllers/media-controller.js
r1615931 r1646035 11 11 currentShortcode: null, 12 12 action: 'select', 13 search: null 13 search: null, 14 insertCallback: this.insertCallback, 14 15 }); 15 16 … … 34 35 35 36 insert: function() { 36 var shortcode = this.props.get('currentShortcode');37 if ( shortcode ) {38 send_to_editor( shortcode.formatShortcode() ); 39 this.reset();40 this.frame.close();37 var shortcode ); 38 39 40 41 ); 41 42 } 43 44 45 46 47 48 49 50 42 51 }, 43 52 … … 46 55 this.props.set( 'currentShortcode', null ); 47 56 this.props.set( 'search', null ); 57 58 59 60 61 62 63 64 48 65 }, 49 66 -
shortcode-ui/trunk/js/src/models/shortcode.js
r1615931 r1646035 76 76 // Encode textareas incase HTML 77 77 if ( attr.get( 'encode' ) ) { 78 attr.set( 'value', encodeURIComponent( decodeURIComponent( attr.get( 'value' ).replace( "%", "%" ) ) ), { silent: true } );78 attr.set( 'value', encodeURIComponent( decodeURIComponent( attr.get( 'value' ).replace( , "%" ) ) ), { silent: true } ); 79 79 } 80 80 -
shortcode-ui/trunk/js/src/utils/shortcode-view-constructor.js
r1615931 r1646035 161 161 * @param {string} shortcodeString String representation of the shortcode 162 162 */ 163 edit: function( shortcodeString ) {163 edit: function( shortcodeString ) { 164 164 165 165 var currentShortcode = this.parseShortcodeString( shortcodeString ); … … 180 180 } 181 181 182 // Make sure to reset state when closed. 183 frame.once( 'close submit', function() { 184 frame.state().props.set('currentShortcode', false); 185 var menuItem = frame.menu.get().get('shortcode-ui'); 186 menuItem.options.text = shortcodeUIData.strings.media_frame_title; 187 menuItem.render(); 188 frame.setState( 'insert' ); 182 frame.mediaController.props.set( 'insertCallback', function( shortcode ) { 183 update( shortcode.formatShortcode() ); 189 184 } ); 190 185 -
shortcode-ui/trunk/languages/shortcode-ui-fi.po
r1536575 r1646035 4 4 "Project-Id-Version: Shortcake (Shortcode UI) 0.6.0-alpha\n" 5 5 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/shortcode-ui\n" 6 "POT-Creation-Date: 2016-03-23 17:25+0200\n" 6 "POT-Creation-Date: 2017-03-29 13:09+0300\n" 7 "PO-Revision-Date: 2017-03-29 13:11+0300\n" 8 "Last-Translator: Teemu Suoranta <teemu@aucor.fi>\n" 9 "Language-Team: \n" 10 "Language: fi\n" 7 11 "MIME-Version: 1.0\n" 8 12 "Content-Type: text/plain; charset=UTF-8\n" 9 13 "Content-Transfer-Encoding: 8bit\n" 10 " PO-Revision-Date: 2016-03-23 18:03+0200\n"11 " Language-Team: \n"12 " X-Generator: Poedit 1.8.7\n"13 " X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c\n"14 "0\n" 15 "" 16 "" 17 "esc_html_x:1,2c\n" 14 18 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 15 19 "X-Poedit-SourceCharset: UTF-8\n" 16 20 "X-Poedit-Basepath: ..\n" 17 21 "X-Textdomain-Support: yes\n" 18 "Last-Translator: Teemu Suoranta <teemu@aucor.fi>\n"19 "Language: fi\n"20 22 "X-Poedit-SearchPath-0: .\n" 21 23 22 #: dev.php:75 24 #: dev.php:68 25 msgid "" 26 "Shortcode UI plugin must be active for Shortcode UI Example plugin to " 27 "function." 28 msgstr "" 29 30 #: dev.php:119 31 msgid "Shortcake With No Attributes" 32 msgstr "" 33 34 #: dev.php:159 23 35 msgid "Attachment" 24 36 msgstr "Liitetiedosto" 25 37 26 #: dev.php: 79 dev.php:8038 #: dev.php:0 27 39 msgid "Select Image" 28 40 msgstr "Valitse kuva" 29 41 30 #: dev.php:83 42 #: dev.php:175 43 msgid "You can select multiple images." 44 msgstr "" 45 46 #: dev.php:183 31 47 msgid "Citation Source" 32 48 msgstr "Lainauksen lähde" 33 49 34 #: inc/class-shortcode-ui.php:109 50 #: dev.php:188 51 msgid "Test placeholder" 52 msgstr "" 53 54 #: dev.php:193 55 #, fuzzy 56 #| msgid "Select Image" 57 msgid "Select Page" 58 msgstr "Valitse kuva" 59 60 #: dev.php:200 61 #, fuzzy 62 #| msgid "Select Image" 63 msgid "Select Term" 64 msgstr "Valitse kuva" 65 66 #: dev.php:207 67 msgid "User Select" 68 msgstr "" 69 70 #: dev.php:213 71 msgid "Color" 72 msgstr "" 73 74 #: dev.php:218 75 msgid "Hex color code" 76 msgstr "" 77 78 #: dev.php:222 79 msgid "Alignment" 80 msgstr "" 81 82 #: dev.php:223 83 msgid "" 84 "Whether the quotation should be displayed as pull-left, pull-right, or " 85 "neither." 86 msgstr "" 87 88 #: dev.php:227 89 msgid "None" 90 msgstr "" 91 92 #: dev.php:228 dev.php:233 93 msgid "Pull Left" 94 msgstr "" 95 96 #: dev.php:229 dev.php:234 97 msgid "Pull Right" 98 msgstr "" 99 100 #: dev.php:240 101 msgid "Year" 102 msgstr "" 103 104 #: dev.php:241 105 msgid "Optional. The year the quotation is from." 106 msgstr "" 107 108 #: dev.php:260 109 msgid "Shortcake Dev" 110 msgstr "" 111 112 #: dev.php:279 113 msgid "Quote" 114 msgstr "" 115 116 #: dev.php:280 117 msgid "Include a statement from someone famous." 118 msgstr "" 119 120 #: dev.php:352 121 #, fuzzy 122 #| msgid "Inner Content" 123 msgid "Content:" 124 msgstr "Sisempi sisältö" 125 126 #: dev.php:356 127 msgid "Source:" 128 msgstr "" 129 130 #: dev.php:360 131 msgid "Image:" 132 msgstr "" 133 134 #: dev.php:364 135 msgid "Gallery:" 136 msgstr "" 137 138 #: dev.php:372 139 msgid "Pages:" 140 msgstr "" 141 142 #: dev.php:376 143 msgid "Terms:" 144 msgstr "" 145 146 #: dev.php:380 147 msgid "Users:" 148 msgstr "" 149 150 #: dev.php:384 151 msgid "Color:" 152 msgstr "" 153 154 #: dev.php:388 155 msgid "Alignment:" 156 msgstr "" 157 158 #: dev.php:392 159 msgid "Year:" 160 msgstr "" 161 162 #: inc/class-shortcode-ui.php:110 35 163 msgid "Inner Content" 36 164 msgstr "Sisempi sisältö" 37 165 38 #: inc/class-shortcode-ui.php:2 20 inc/class-shortcode-ui.php:221166 #: inc/class-shortcode-ui.php:2 39 167 msgid "Insert Post Element" 40 168 msgstr "Lisää sisältöelementti" 41 169 42 #: inc/class-shortcode-ui.php:2 22170 #: inc/class-shortcode-ui.php:2 43 171 msgid "%s Details" 44 172 msgstr "%s tiedot" 45 173 46 #: inc/class-shortcode-ui.php:2 23174 #: inc/class-shortcode-ui.php:2 47 175 msgid "Insert Element" 48 176 msgstr "Lisää elementti" 49 177 50 #: inc/class-shortcode-ui.php:2 24178 #: inc/class-shortcode-ui.php:2 51 179 msgid "Update" 52 180 msgstr "Päivitä" 53 181 54 #: inc/class-shortcode-ui.php:2 25182 #: inc/class-shortcode-ui.php:2 55 183 msgid "There are no attributes to configure for this Post Element." 56 184 msgstr "Tässä sisältöelementissä ei ole muokattavia asetuksia." 57 185 58 #: inc/class-shortcode-ui.php:2 26186 #: inc/class-shortcode-ui.php:2 59 187 msgid "Failed to load preview" 60 188 msgstr "Esikatselun lataus epäonnistui" 61 189 62 #: inc/class-shortcode-ui.php:2 27190 #: inc/class-shortcode-ui.php:2 63 191 msgid "Search" 64 192 msgstr "Etsi" 65 193 66 #: inc/class-shortcode-ui.php:2 28194 #: inc/class-shortcode-ui.php:2 67 195 msgid "Insert Content" 68 196 msgstr "Lisää sisältö" 69 197 70 #: inc/class-shortcode-ui.php:323 198 #: inc/class-shortcode-ui.php:297 199 msgid "Add Post Element" 200 msgstr "Lisää sisältöelementti" 201 202 #: inc/class-shortcode-ui.php:365 71 203 msgid "Something's rotten in the state of Denmark" 72 204 msgstr "Jotain mätää Tanskanmaalla" … … 77 209 msgstr "Valitse liitetiedosto" 78 210 79 #: inc/fields/class-field-attachment.php:10480 msgid "Thumbnail Details"81 msgstr "Liitteen tiedot"82 83 #: inc/fields/class-field-attachment.php:10984 msgid "Edit Attachment"85 msgstr "Muokkaa liitetiedostoa"86 87 211 #: inc/templates/edit-form.tpl.php:3 88 212 msgid "Back to list" … … 104 228 msgid "http://next.fusion.net/tag/shortcode-ui/" 105 229 msgstr "http://next.fusion.net/tag/shortcode-ui/" 230 231 232 233 234 235 -
shortcode-ui/trunk/languages/shortcode-ui.pot
r1615940 r1646035 1 # Copyright (C) 201 6Fusion Engineering and community1 # Copyright (C) 201 Fusion Engineering and community 2 2 # This file is distributed under the GPL v2 or later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Shortcake (Shortcode UI) 0.7. 1\n"5 "Project-Id-Version: Shortcake (Shortcode UI) 0.7.\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/shortcode-ui\n" 7 "POT-Creation-Date: 201 6-12-16 22:19:41+00:00\n"7 "POT-Creation-Date: 201+00:00\n" 8 8 "MIME-Version: 1.0\n" 9 9 "Content-Type: text/plain; charset=utf-8\n" 10 10 "Content-Transfer-Encoding: 8bit\n" 11 "PO-Revision-Date: 201 6-MO-DA HO:MI+ZONE\n"11 "PO-Revision-Date: 201-MO-DA HO:MI+ZONE\n" 12 12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 13 13 "Language-Team: LANGUAGE <LL@li.org>\n" … … 157 157 msgstr "" 158 158 159 #: inc/class-shortcode-ui.php:11 0159 #: inc/class-shortcode-ui.php:11 160 160 msgid "Inner Content" 161 161 msgstr "" 162 162 163 #: inc/class-shortcode-ui.php:2 49 inc/class-shortcode-ui.php:250163 #: inc/class-shortcode-ui.php:2 164 164 msgid "Insert Post Element" 165 165 msgstr "" 166 166 167 #: inc/class-shortcode-ui.php:251 167 #: inc/class-shortcode-ui.php:265 168 #. Translators: Ignore placeholder. This is replaced with the Shortcode name 169 #. string in JS 168 170 msgid "%s Details" 169 171 msgstr "" 170 172 171 #: inc/class-shortcode-ui.php:2 52173 #: inc/class-shortcode-ui.php:2 172 174 msgid "Insert Element" 173 175 msgstr "" 174 176 175 #: inc/class-shortcode-ui.php:2 53177 #: inc/class-shortcode-ui.php:2 176 178 msgid "Update" 177 179 msgstr "" 178 180 179 #: inc/class-shortcode-ui.php:2 54181 #: inc/class-shortcode-ui.php:2 180 182 msgid "There are no attributes to configure for this Post Element." 181 183 msgstr "" 182 184 183 #: inc/class-shortcode-ui.php:2 55185 #: inc/class-shortcode-ui.php:2 184 186 msgid "Failed to load preview" 185 187 msgstr "" 186 188 187 #: inc/class-shortcode-ui.php:2 56189 #: inc/class-shortcode-ui.php:2 188 190 msgid "Search" 189 191 msgstr "" 190 192 191 #: inc/class-shortcode-ui.php:2 57193 #: inc/class-shortcode-ui.php:2 192 194 msgid "Insert Content" 193 195 msgstr "" 194 196 195 #: inc/class-shortcode-ui.php: 297197 #: inc/class-shortcode-ui.php: 196 198 msgid "Add Post Element" 197 199 msgstr "" 198 200 199 #: inc/class-shortcode-ui.php:3 65201 #: inc/class-shortcode-ui.php:3 200 202 msgid "Something's rotten in the state of Denmark" 201 203 msgstr "" 202 204 203 #: inc/fields/class- field-attachment.php:79204 #: inc/fields/class- field-attachment.php:80205 #: inc/fields/class-field-attachment.php:79 206 #: inc/fields/class-field-attachment.php:80 205 207 msgid "Select Attachment" 208 209 210 211 212 213 214 215 206 216 msgstr "" 207 217 -
shortcode-ui/trunk/package.json
r1536575 r1646035 19 19 "grunt-wp-i18n": "^0.5.0", 20 20 "grunt-wp-readme-to-markdown": "~1.0.0", 21 21 22 "remapify": "1.4.3" 22 23 }, -
shortcode-ui/trunk/readme.txt
r1615947 r1646035 3 3 Tags: shortcodes 4 4 Requires at least: 4.5 5 Tested up to: 4.7. 36 Stable tag: 0.7. 15 Tested up to: 4.7. 6 Stable tag: 0.7. 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 69 69 == Changelog == 70 70 71 = 0.7.1 (December 16, 2016) = 71 = 0.7.2 (April 24, 2017) = 72 * Bug fix: Fix behavior in WordPress 4.7.4 where editing a shortcode would insert a new shortcode into the editor rather than updating the shortcode being edited. 73 * Bug fix: The replacement used to escape percent (%) characters in attributes only replaced the first appearance 74 * Bug fix: For select fields with multiple=true, allow multiple options to be selected by default 75 * Added i18n for all strings in attachment field template 76 * Added Finnish translation 77 78 = 0.7.1 (March 16, 2017) = 72 79 * Change shortcode formatting to add a space before the self-closing trailing slash. 73 80 * Fix alignment of attachment previews with long filenames. -
shortcode-ui/trunk/shortcode-ui.php
r1615940 r1646035 2 2 /** 3 3 * Plugin Name: Shortcake (Shortcode UI) 4 * Version: 0.7. 14 * Version: 0.7. 5 5 * Description: User Interface for adding shortcodes. 6 6 * Author: Fusion Engineering and community
Note: See TracChangeset
for help on using the changeset viewer.