PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 3.5.3
MainWP Dashboard: Self-hosted WordPress Management for Agencies v3.5.3
6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 5.2.2 5.3 All 153 releases
mainwp / js / mainwp-admin.js

mainwp-admin.js in MainWP Dashboard: Self-hosted WordPress Management for Agencies 3.5.3, at js/mainwp-admin.js

49 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /** Manage tips **/
2 jQuery(document).ready(function()
3 {
4 jQuery('#mainwp_managetips_add').live('click', function(event)
5 {
6 mainwp_managetips_addTip(event);
7 });
8 jQuery('.mainwp_managetips_remove').each(function() {
9 jQuery(this).bind('click', function(event)
10 {
11 mainwp_managetips_removeTip(this);
12 return false;
13 });
14 });
15 });
16 mainwp_managetips_currId = 90000;
17 mainwp_managetips_addTip = function(event)
18 {
19 var currId = ++mainwp_managetips_currId;
20 jQuery('#mainwp_managetips_tbody').append('<tr><td valign="top"><input type="text" name="tip_'+currId+'_seq" size="1" value="" class="mainwp_managetips_tip_seq"/></td><td><textarea rows="4" cols="150" name="tip_'+currId+'_content" class="mainwp_managetips_tip_content"></textarea></td><td valign="top"><a href="#" class="mainwp_managetips_remove" onclick="mainwp_managetips_removeTip(this); return false;">'+__('Remove')+'</a></td></tr>');
21 };
22 mainwp_managetips_removeTip = function(_this)
23 {
24 var container = jQuery(_this).parent().parent();
25 container.hide();
26 container.find('.mainwp_managetips_tip_seq').val('');
27 container.find('.mainwp_managetips_tip_content').val('');
28 };
29 jQuery(document).on('change', '#mainwp_archiveFormat', function()
30 {
31 var zipMethod = jQuery(this).val();
32 zipMethod = zipMethod.replace(/\./g,'\\.');
33 jQuery('span.archive_info').hide();
34 jQuery('span#info_'+zipMethod).show();
35
36 jQuery('tr.archive_method').hide();
37 jQuery('tr.archive_'+zipMethod).show();
38 });
39
40 jQuery(document).ready(function () {
41 jQuery('select.mainwp-select2').select2({minimumResultsForSearch: 10, width: '170px', allowClear: false});
42 jQuery('select.mainwp-select2.allowclear').select2({minimumResultsForSearch: 10, width: '170px', allowClear: true});
43 jQuery('select.mainwp-select2-super').select2({minimumResultsForSearch: 10, width: '250px', allowClear: false});
44 jQuery('select.mainwp-select2-super.allowclear').select2({minimumResultsForSearch: 10, width: '250px', allowClear: true});
45 jQuery('select.mainwp-select2-wpurl-protocol').select2({minimumResultsForSearch: 10, width: '85px', allowClear: false});
46 jQuery('select.mainwp-select2-mini').select2({minimumResultsForSearch: 10, width: '120px', allowClear: false});
47 jQuery('select.mainwp-select2-full.allowclear').select2({minimumResultsForSearch: 10, width: '100%', allowClear: true});
48 });
49