Changeset 884448
- Timestamp:
- 03/30/2014 02:28:32 AM (12 years ago)
- Location:
- requird/trunk
- Files:
-
- 4 edited
-
readme.txt (modified) (2 diffs)
-
requird-settings.php (modified) (1 diff)
-
requird.js (modified) (4 diffs)
-
requird.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
requird/trunk/readme.txt
r824854 r884448 6 6 Requires at least: 3.x 7 7 Tested up to: 3.8 8 Stable tag: 1.2. 18 Stable tag: 1.2.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 55 55 = 1.2.1 = 56 56 * Added a link to requird settings on Plug-ins page 57 58 = 1.2.2 = 59 * Better tinyMCE integration -
requird/trunk/requird-settings.php
r824854 r884448 32 32 add_action('admin_init', array(&$this, 'initialize_options')); 33 33 // Settings page actions 34 $this->version = '1.2. 1';34 $this->version = '1.2.2'; 35 35 } 36 36 -
requird/trunk/requird.js
r824854 r884448 4 4 Description: Require fields for WP-Admin 5 5 Writer: Gil Barbara 6 Version: 1.2. 16 Version: 1.2.2 7 7 Writer URI: http://kollectiv.org 8 8 */ … … 17 17 }, 18 18 requird = { 19 post_type: $('#post_type').val(),20 fields: requirdOptions[$('#post_type').val()],21 message: '<div class="requird-fields" style="color:red; font-weight: bold; font-size: 18px; margin:10px 0;">' + requirdOptions.error_message + '</div>',22 errors: 023 };19 post_type: $('#post_type').val(), 20 fields: requirdOptions[$('#post_type').val()], 21 message: '<div class="requird-fields" style="color:red; font-weight: bold; font-size: 18px; margin:10px 0;">' + requirdOptions.error_message + '</div>', 22 errors: 0 23 }; 24 24 25 25 if (typeof(requird.fields) !== 'undefined' && requird.fields.length) { 26 tinyMCE.triggerSave(); 26 27 for(var key in requird.fields) { 27 28 if (requird.fields.hasOwnProperty(key)) { … … 31 32 if (requird.$parent.size()) { 32 33 if (requird.fields[key] === 'editor') { 33 if ( (tinyMCE.activeEditor && !tinyMCE.activeEditor.getContent().length) ||!$('#content').val().length) {34 if (!$('#content').val().length) { 34 35 if (!requird.$parent.find('.requird-fields').size()) { 35 requird.$parent.append(requird.message); 36 if (requird.$parent.find('.inside').size()) { 37 requird.$parent.find('.inside').append(requird.message); 38 } else { 39 requird.$parent.append(requird.message); 40 } 36 41 } 37 42 requird.errors++; … … 90 95 } 91 96 if (typeof(requirdOptions[requird.post_type+'-custom']) !== 'undefined' && requirdOptions[requird.post_type+'-custom'].length) { 92 requird.custom = requirdOptions[requird.post_type+'-custom']. split(',');97 requird.custom = requirdOptions[requird.post_type+'-custom'].replace(' ', '').split(','); 93 98 if (requird.custom.length) { 99 tinyMCE.triggerSave(); 94 100 for (var key2 in requird.custom) { 95 101 if (requird.custom.hasOwnProperty(key2)) { 96 requird.$parent = $('#' +requird.custom[key2]+'div');97 requird.$custom = $('#' +requird.custom[key2]);102 requird.$parent = $('#' + requird.custom[key2] + 'div'); 103 requird.$custom = $('#' + requird.custom[key2]); 98 104 if (requird.$custom.size() && requird.$custom.is(':input')) { 99 105 requird.$parent = $('#'+requird.custom[key2]+'div'); -
requird/trunk/requird.php
r824854 r884448 5 5 Description: Require fields for WP-Admin 6 6 Writer: Gil Barbara 7 Version: 1.2. 17 Version: 1.2.2 8 8 Writer URI: http://kollectiv.org 9 9 */
Note: See TracChangeset
for help on using the changeset viewer.