Absolutely Glamorous Custom Admin - Version 1.2.6.1

Version Description

  • Bug fixes
  • Added +/- indicators to admin menu editor
  • Custom top bar logo can be of any width. Height is expanded to 28px
  • Saving custom scripts to database instead of saving to files
  • Fixed error message on wordpress thickbox window
  • Removed About WordPress message on top bar logo(on mouseover)
  • Using %BLOG% variable as hyperlink on login page image
  • Few other fixes on WordPress top bar
  • Fixed color bug on admin menu hover()
Download this release

Release Info

Developer argonius
Plugin Icon 128x128 Absolutely Glamorous Custom Admin
Version 1.2.6.1
Comparing to
See all releases

Code changes from version 1.2.5.4 to 1.2.6.1

Files changed (4) hide show
  1. ajax.php +59 -0
  2. plugin.php +754 -256
  3. script/ag_script.js +816 -559
  4. style/ag_style.css +44 -1
ajax.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
3
+
4
+
5
+ function saveScript($data,$type){
6
+ $customScriptName =dirname(__FILE__)."/script/mine.js";
7
+ if($type == 'css'){
8
+ $customScriptName =dirname(__FILE__)."/style/mine.css";
9
+ }
10
+ $customScript = fopen($customScriptName, 'w');
11
+ fwrite($customScript, $data);
12
+ fclose($customScript);
13
+ }
14
+
15
+ ?>
16
+ <?php
17
+ require_once('../../../wp-load.php');
18
+ require_once('../../../wp-admin/includes/admin.php');
19
+
20
+ //$current_user = wp_get_current_user();
21
+ global $user_level;
22
+
23
+ //print_r($user_level);
24
+
25
+
26
+ define('DOING_AJAX', true);
27
+ define('WP_ADMIN', true);
28
+
29
+ if ( ! isset( $_POST['action'] ) )
30
+ die('-15');
31
+
32
+
33
+ @header('Content-Type: text/html; charset=' . get_option('blog_charset'));
34
+ send_nosniff_header();
35
+
36
+ do_action('admin_init');
37
+
38
+ if ( ! is_user_logged_in() ) {
39
+ die('-14');
40
+ }else{
41
+ //if user admin
42
+ if($user_level > 9){
43
+ if ( isset( $_POST['action'] ) ) {
44
+ if($_POST['action'] == 'savecss' ){
45
+ if(isset($_POST['data'])){
46
+ saveScript($_POST['data'], "css");
47
+ }
48
+ }else if($_POST['action'] == 'savejs'){
49
+ if(isset($_POST['data'])){
50
+ saveScript(stripslashes($_POST['data']), "js");
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }else{
57
+ echo 'Please do not try this any more. Thanks.';
58
+ }
59
+ ?>
plugin.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: AG Custom Admin
4
  Plugin URI: http://wordpress.org/extend/plugins/ag-custom-admin
5
  Description: Hide or change items in admin panel. Customize buttons from admin menu. Colorize admin and login page with custom colors.
6
  Author: Argonius
7
- Version: 1.2.5.4
8
  Author URI: http://wordpress.argonius.com/ag-custom-admin
9
 
10
  Copyright 2011. Argonius (email : info@argonius.com)
@@ -23,12 +23,15 @@ Author URI: http://wordpress.argonius.com/ag-custom-admin
23
  along with this program. If not, see <http://www.gnu.org/licenses/>.
24
  */
25
 
 
 
 
26
  $agca = new AGCA();
27
 
28
  class AGCA{
29
  private $colorizer="";
30
  private $active_plugin;
31
- private $agca_version;
32
  public function __construct()
33
  {
34
 
@@ -38,15 +41,14 @@ class AGCA{
38
  add_action('wp_head', array(&$this,'print_page'));
39
  add_action('login_head', array(&$this,'print_login_head'));
40
  add_action('admin_menu', array(&$this,'agca_create_menu'));
41
- register_deactivation_hook(__FILE__, array(&$this,'agca_deactivate'));
42
 
43
- /*Styles*/
44
- // add_action('admin_menu', array(&$this,'agca_get_styles'));
45
- // add_action('login_head', array(&$this,'agca_get_styles'));
46
 
47
  /*Initialize properties*/
48
  $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
49
- $this->agca_version = "1.2.5.4";
 
50
  }
51
  // Add donate and support information
52
  function jk_filter_plugin_links($links, $file)
@@ -72,10 +74,33 @@ class AGCA{
72
  );
73
  }
74
  function agca_get_includes() {
75
- ?>
76
- <link rel="stylesheet" type="text/css" href="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>style/ag_style.css" />
77
- <script type="text/javascript" src="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>script/ag_script.js"></script>
78
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  <?php
80
  }
81
 
@@ -116,11 +141,13 @@ class AGCA{
116
  register_setting( 'agca-options-group', 'agca_login_photo_remove' );
117
  register_setting( 'agca-options-group', 'agca_login_photo_url' );
118
  register_setting( 'agca-options-group', 'agca_login_photo_href' );
 
 
119
 
120
- //register_setting( 'agca-options-group', 'agca_menu_dashboard' ); DEPRECATED 1.2
121
  register_setting( 'agca-options-group', 'agca_dashboard_icon' );
122
  register_setting( 'agca-options-group', 'agca_dashboard_text' );
123
- register_setting( 'agca-options-group', 'agca_dashboard_text_paragraph' );
 
124
  register_setting( 'agca-options-group', 'agca_dashboard_widget_rc' );
125
  register_setting( 'agca-options-group', 'agca_dashboard_widget_il' );
126
  register_setting( 'agca-options-group', 'agca_dashboard_widget_plugins' );
@@ -147,12 +174,46 @@ class AGCA{
147
  register_setting( 'agca-options-group', 'agca_admin_menu_agca_button_only' );
148
  register_setting( 'agca-options-group', 'agca_admin_menu_separator_first' );
149
  register_setting( 'agca-options-group', 'agca_admin_menu_separator_second' );
150
- register_setting( 'agca-options-group', 'agca_admin_menu_icons' );
 
 
 
 
151
  register_setting( 'agca-options-group', 'ag_edit_adminmenu_json' );
152
  register_setting( 'agca-options-group', 'ag_add_adminmenu_json' );
153
  register_setting( 'agca-options-group', 'ag_colorizer_json' );
154
- register_setting( 'agca-options-group', 'agca_colorizer_turnonoff' );
155
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  }
157
 
158
  function agca_deactivate() {
@@ -184,12 +245,14 @@ class AGCA{
184
  delete_option( 'agca_login_banner_text' );
185
  delete_option( 'agca_login_photo_remove' );
186
  delete_option( 'agca_login_photo_url' );
187
- delete_option( 'agca_login_photo_href' );
188
-
189
- //delete_option( 'agca_menu_dashboard' ); DEPRECATED 1.2
 
190
  delete_option( 'agca_dashboard_icon' );
191
  delete_option( 'agca_dashboard_text' );
192
- delete_option( 'agca_dashboard_text_paragraph' );
 
193
  delete_option( 'agca_dashboard_widget_rc' );
194
  delete_option( 'agca_dashboard_widget_il' );
195
  delete_option( 'agca_dashboard_widget_plugins' );
@@ -216,11 +279,174 @@ class AGCA{
216
  delete_option( 'agca_admin_menu_separator_first' );
217
  delete_option( 'agca_admin_menu_separator_second' );
218
  delete_option( 'agca_admin_menu_icons' );
 
 
 
 
219
  delete_option( 'ag_edit_adminmenu_json' );
220
  delete_option( 'ag_add_adminmenu_json' );
221
  delete_option( 'ag_colorizer_json' );
222
  delete_option( 'agca_colorizer_turnonoff' );
223
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
224
  function agca_create_menu() {
225
  //create new top-level menu
226
  add_management_page( 'AG Custom Admin', 'AG Custom Admin', 'administrator', __FILE__, array(&$this,'agca_admin_page') );
@@ -236,12 +462,9 @@ class AGCA{
236
  $href = $arr;
237
  }
238
  $button ="";
239
- $button .= '<li id="menu-'.$name.'" class="ag-custom-button menu-top menu-top-first '.$class.' menu-top-last">';
240
- /*<div class="wp-menu-image">
241
- <a href="edit-comments.php"><br></a>
242
- </div>*/
243
  $button .= '<div class="wp-menu-toggle" style="display: none;"><br></div>';
244
- $button .= '<a tabindex="1" target="'.$target.'" class="menu-top menu-top-last" href="'.$href.'">'.$name.'<a>';
245
  $button .= '</li>';
246
 
247
  return $button;
@@ -313,12 +536,248 @@ class AGCA{
313
 
314
  function print_page()
315
  {
 
316
  ?><style type="text/css">
317
- #wpadminbar{
318
- display:none;
319
- }
320
- </style><?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
 
323
  function print_admin_css()
324
  {
@@ -344,7 +803,13 @@ document.write('<style type="text/css">html{visibility:hidden;}</style>');
344
  var wpversion = "<?php echo $wpversion; ?>";
345
  var agca_version = "<?php echo $this->agca_version; ?>";
346
  var errors = false;
 
347
 
 
 
 
 
 
348
  /* <![CDATA[ */
349
  jQuery(document).ready(function() {
350
 
@@ -395,22 +860,20 @@ try
395
  if((get_option('agca_role_allbutadmin')==true) and ($user_level > 9)){
396
  ?>
397
  <?php } else{ ?>
398
-
399
- if(isWPHigherOrEqualThan("3.3")){
400
- <?php if(get_option('agca_remove_top_bar_dropdowns')==true){ ?>
401
-
402
- jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-wp-logo").hover("visibility","hidden");
403
- jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-wp-logo a").attr("href","");
404
- jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-wp-logo a").attr("title","");
405
-
406
- jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-site-name").hover("visibility","hidden");
407
-
408
- <?php if(get_option('agca_admin_bar_new_content')!=""){ ?>
409
- jQuery(".new_content_header_submenu").hide();
410
- <?php } ?>
411
 
412
- <?php } ?>
413
- }
414
 
415
  <?php if(get_option('agca_screen_options_menu')==true){ ?>
416
  jQuery("#screen-options-link-wrap").css("display","none");
@@ -425,173 +888,27 @@ try
425
  <?php if(get_option('agca_privacy_options')==true){ ?>
426
  jQuery("#privacy-on-link").css("display","none");
427
  <?php } ?>
428
- <?php if(get_option('agca_header_logo')==true){ ?>
429
- jQuery("#wphead #header-logo").css("display","none");
430
- jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-wp-logo").css("display","none");
431
-
432
- <?php } ?>
433
- <?php if(get_option('agca_header_logo_custom')!=""){ ?>
434
 
435
-
436
- if(isWPHigherOrEqualThan("3.3")){
437
- var img_url = '<?php echo get_option('agca_header_logo_custom'); ?>';
438
-
439
- advanced_url = img_url;
440
- image = jQuery("<img />").attr("src",advanced_url);
441
- jQuery(image).load(function() {
442
- jQuery("#wpbody-content").prepend(image);
443
- });
444
- }else{
445
- jQuery("#wphead img#header-logo").attr('src','');
446
- jQuery("#wphead img#header-logo").hide();
447
- var img_url = '<?php echo get_option('agca_header_logo_custom'); ?>';
448
- advanced_url = img_url+ "?" + new Date().getTime();
449
- image = jQuery("<img />").attr("src",advanced_url);
450
- jQuery(image).load(function() {
451
- jQuery("#wphead img#header-logo").attr('src', advanced_url);
452
- jQuery("#wphead img#header-logo").attr('width',this.width);
453
- jQuery("#wphead img#header-logo").attr('height',this.height);
454
- jQuery("#wphead").css('height', (14 + this.height)+'px');
455
- jQuery("#wphead img#header-logo").show();
456
- });
457
- }
458
-
459
- <?php } ?>
460
- <?php if(get_option('agca_wp_logo_custom')!=""){ ?>
461
- if(isWPHigherOrEqualThan("3.3")){
462
- jQuery("li#wp-admin-bar-wp-logo a.ab-item span.ab-icon").css("background-image","url('<?php echo get_option('agca_wp_logo_custom'); ?>')");
463
- jQuery("li#wp-admin-bar-wp-logo a.ab-item span.ab-icon").css("background-position","0");
464
- }
465
- <?php }?>
466
- <?php if(get_option('agca_site_heading')==true){ ?>
467
- jQuery("#wphead #site-heading").css("display","none");
468
- <?php } ?>
469
- <?php if(get_option('agca_custom_site_heading')!=""){ ?>
470
- jQuery("#wphead #site-heading").after('<h1><?php echo get_option('agca_custom_site_heading'); ?></h1>');
471
- //3.3FIX
472
- if(isWPHigherOrEqualThan("3.3")){
473
- jQuery("#wp-admin-bar-site-name a:first").html('<?php echo get_option('agca_custom_site_heading'); ?>');
474
- }
475
- <?php } ?>
476
 
477
- if(isWPHigherOrEqualThan("3.3")){
478
- <?php if(get_option('agca_admin_bar_comments')!=""){ ?>
479
- jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-comments").css("display","none");
480
- <?php } ?>
481
- <?php if(get_option('agca_admin_bar_new_content')!=""){ ?>
482
- jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-new-content").css("display","none");
483
- <?php } ?>
484
- <?php if(get_option('agca_admin_bar_new_content_post')!=""){ ?>
485
- jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-new-content li#wp-admin-bar-new-post").css("display","none");
486
- <?php } ?>
487
- <?php if(get_option('agca_admin_bar_new_content_link')!=""){ ?>
488
- jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-new-content li#wp-admin-bar-new-link").css("display","none");
489
- <?php } ?>
490
- <?php if(get_option('agca_admin_bar_new_content_page')!=""){ ?>
491
- jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-new-content li#wp-admin-bar-new-page").css("display","none");
492
- <?php } ?>
493
- <?php if(get_option('agca_admin_bar_new_content_user')!=""){ ?>
494
- jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-new-content li#wp-admin-bar-new-user").css("display","none");
495
- <?php } ?>
496
- <?php if(get_option('agca_admin_bar_new_content_media')!=""){ ?>
497
- jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-new-content li#wp-admin-bar-new-media").css("display","none");
498
- <?php } ?>
499
- <?php if(get_option('agca_admin_bar_update_notifications')!=""){ ?>
500
- jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-updates").css("display","none");
501
- <?php } ?>
502
- }
503
 
504
- <?php if(get_option('agca_update_bar')==true){ ?>
505
- jQuery("#update-nag").css("display","none");
506
- jQuery(".update-nag").css("display","none");
 
 
 
 
 
 
 
 
507
  <?php } ?>
508
- <?php if(get_option('agca_header')==true){ ?>
509
-
510
- //3.3FIX
511
- if(isWPHigherOrEqualThan("3.3")){
512
- jQuery("#wpadminbar").css("display","none");
513
- }else{
514
- jQuery("#wphead").css("display","none");
515
- }
516
-
517
- <?php } ?>
518
- <?php if((get_option('agca_header')==true)&&(get_option('agca_header_show_logout')==true)){ ?>
519
-
520
- if(isWPHigherOrEqualThan("3.3")){
521
- jQuery("#wpbody-content").prepend('<a href="../wp-login.php?action=logout" tabindex="10" style="float:right;margin-right:20px" class="ab-item">Log Out</a>');
522
- }else{
523
- var clon ="";
524
- jQuery("div#user_info a").each(function(){
525
- if(jQuery(this).text() =="Log Out"){
526
- clon = jQuery(this).clone();
527
- }
528
- });
529
- if(clon !=""){
530
- jQuery(clon).attr('style','float:right;padding:15px');
531
- jQuery(clon).html('<?php echo ((get_option('agca_logout')=="")?"Log Out":get_option('agca_logout')); ?>');
532
- }
533
- jQuery("#wphead").after(clon);
534
- }
535
-
536
- <?php } ?>
537
  <?php if(get_option('agca_footer')==true){ ?>
538
  jQuery("#footer").css("display","none");
539
- <?php } ?>
540
- <?php if(get_option('agca_howdy')!=""){ ?>
541
- if(isWPHigherOrEqualThan("3.3")){
542
- var alltext="";
543
- alltext="";
544
- alltext = jQuery('li#wp-admin-bar-my-account').html();
545
- alltext = alltext.replace('Howdy',"<?php echo get_option('agca_howdy'); ?>");
546
- jQuery("li#wp-admin-bar-my-account").html(alltext);
547
- }else if(isWPHigherOrEqualThan("3.2")){
548
- var alltext="";
549
- alltext="";
550
- alltext = jQuery('#user_info div.hide-if-no-js').html();
551
- alltext = alltext.replace('Howdy',"<?php echo get_option('agca_howdy'); ?>");
552
- jQuery("#user_info div.hide-if-no-js").html(alltext);
553
- }else{
554
- var howdyText = jQuery("#user_info").html();
555
- if(howdyText !=null){
556
- jQuery("#user_info").html("<p>"+"<?php echo get_option('agca_howdy'); ?>"+howdyText.substr(9));
557
- }
558
- }
559
- <?php } ?>
560
- <?php if(get_option('agca_logout')!=""){ ?>
561
- if(isWPHigherOrEqualThan("3.3")){
562
- jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-logout a").text("<?php echo get_option('agca_logout'); ?>");
563
- }else if(isWPHigherOrEqualThan("3.2")){
564
- jQuery("#user_info #user_info_links a:eq(1)").text("<?php echo get_option('agca_logout'); ?>");
565
- }else{
566
- jQuery("#user_info a:eq(1)").text("<?php echo get_option('agca_logout'); ?>");
567
- }
568
 
569
- <?php } ?>
570
- <?php if(get_option('agca_remove_your_profile')==true){ ?>
571
- if(isWPHigherOrEqualThan("3.3")){
572
- jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-edit-profile").css("visibility","hidden");
573
- jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-edit-profile").css("height","10px");
574
- }else if(isWPHigherOrEqualThan("3.2")){
575
- jQuery("#user_info #user_info_links li:eq(0)").remove();
576
- }
577
- <?php } ?>
578
- <?php if(get_option('agca_logout_only')==true){ ?>
579
- if(isWPHigherOrEqualThan("3.3")){
580
- var logout_content = jQuery("li#wp-admin-bar-logout").html();
581
- jQuery("ul#wp-admin-bar-top-secondary").html('<li id="wp-admin-bar-logout">'+ logout_content +'</li>');
582
- }else if(isWPHigherOrEqualThan("3.2")){
583
- var logoutText = jQuery("#user_info a:nth-child(2)").text();
584
- <?php if(get_option('agca_logout')!=""){ ?>
585
- logoutText = "<?php echo get_option('agca_logout'); ?>";
586
- <?php } ?>
587
- var logoutLink = jQuery("#user_info a:nth-child(2)").attr("href");
588
- jQuery("#user_info").html("<a href=\""+logoutLink+"\" title=\"Log Out\">"+logoutText+"</a>");
589
- }else{
590
- var logoutText = jQuery("#user_info a:nth-child(2)").text();
591
- var logoutLink = jQuery("#user_info a:nth-child(2)").attr("href");
592
- jQuery("#user_info").html("<a href=\""+logoutLink+"\" title=\"Log Out\">"+logoutText+"</a>");
593
- }
594
- <?php } ?>
595
 
596
 
597
  <?php if(get_option('agca_footer_left')!=""){ ?>
@@ -624,13 +941,19 @@ try
624
  jQuery("#dashboard-widgets-wrap").parent().find("h2").text("<?php echo get_option('agca_dashboard_text'); ?>");
625
  <?php } ?>
626
  <?php if(get_option('agca_dashboard_text_paragraph')!=""){ ?>
627
- jQuery("#wpbody-content #dashboard-widgets-wrap").before('<br /><p style=\"text-indent:45px;\"><?php echo get_option('agca_dashboard_text_paragraph'); ?></p>');
 
 
628
  <?php } ?>
629
 
630
  <?php /*Remove Dashboard widgets*/ ?>
631
  <?php
632
 
633
-
 
 
 
 
634
  if(get_option('agca_dashboard_widget_rc')==true){
635
  $this->remove_dashboard_widget('dashboard_recent_comments','normal');
636
  }else{
@@ -689,7 +1012,11 @@ try
689
  jQuery(".wp-menu-image").each(function(){
690
  jQuery(this).css("display","none");
691
  });
692
- <?php } ?>
 
 
 
 
693
  <?php if(get_option('agca_admin_menu_turnonoff') == 'on'){ ?>
694
 
695
  <?php /*If Turned on*/ ?>
@@ -792,12 +1119,15 @@ try
792
  updateColor(jQuery(this).attr('id'),jQuery(this).val())
793
  });
794
  jQuery('label,h1,h2,h3,h4,h5,h6,a,p,.form-table th,.form-wrap label').css('text-shadow','none');
 
 
795
 
796
  <?php } ?>
797
  <?php //COLORIZER END ?>
798
  <?php } //end of apply for any user except admin ?>
799
  /*Add user buttons*/
800
- jQuery('#ag_add_adminmenu').append(buttonsJq);
 
801
  }catch(err){
802
  errors = "AGCA - ADMIN ERROR: " + err.name + " / " + err.message;
803
  alert(errors);
@@ -837,10 +1167,17 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
837
  <script type="text/javascript">
838
  document.write('<style type="text/css">html{display:none;}</style>');
839
  var agca_version = "<?php echo $this->agca_version; ?>";
840
- var wpversion = "<?php echo $wpversion; ?>";
 
841
  /* <![CDATA[ */
842
  jQuery(document).ready(function() {
843
  try{
 
 
 
 
 
 
844
  <?php if(get_option('agca_login_banner')==true){ ?>
845
  jQuery("#backtoblog").css("display","none");
846
  <?php } ?>
@@ -848,9 +1185,9 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
848
  jQuery("#backtoblog").html('<?php echo get_option('agca_login_banner_text'); ?>');
849
  <?php } ?>
850
  <?php if(get_option('agca_login_photo_url')==true){ ?>
851
- advanced_url = "<?php echo get_option('agca_login_photo_url'); ?>" + "?" + new Date().getTime();
852
  var $url = "url(" + advanced_url + ")";
853
- jQuery("#login h1 a").css("background-image",$url);
854
  jQuery("#login h1 a").hide();
855
  image = jQuery("<img />").attr("src",advanced_url);
856
  jQuery(image).load(function() {
@@ -864,6 +1201,9 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
864
  <?php } ?>
865
  <?php if(get_option('agca_login_photo_href')==true){ ?>
866
  var $href = "<?php echo get_option('agca_login_photo_href'); ?>";
 
 
 
867
  jQuery("#login h1 a").attr("href",$href);
868
  <?php } ?>
869
  <?php if(get_option('agca_login_photo_remove')==true){ ?>
@@ -914,11 +1254,11 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
914
  <?php //COLORIZER END ?>
915
  }catch(err){
916
  alert("AGCA - LOGIN ERROR: " + err.name + " / " + err.message);
917
- }finally{
918
- jQuery(document).ready(function() {
919
- jQuery('html').show();
920
- jQuery('html').css("display","block");
921
- });
922
  }
923
  });
924
  /* ]]> */
@@ -935,7 +1275,10 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
935
  <script type="text/javascript" src="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>script/farbtastic.js"></script>
936
 
937
  <link rel="stylesheet" type="text/css" href="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>style/agca_farbtastic.css" />
938
- <script type="text/javascript" src="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>script/agca_farbtastic.js"></script>
 
 
 
939
  <?php //includes ?>
940
  <div class="wrap">
941
  <h1 style="color:green">AG Custom Admin Settings <span style="font-size:15px;">(v<?php echo $this->agca_version; ?>)</span></h1>
@@ -959,10 +1302,17 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
959
  <li class="normal"><a href="#login-page-settings" title="Settings for Login page">Login Page</a></li>
960
  <li class="normal" ><a href="#admin-menu-settings" title="Settings for main admin menu">Admin Menu</a></li>
961
  <li class="normal"><a href="#ag-colorizer-setttings" title="AG colorizer settings">Colorizer</a></li>
962
- <li style="background:none;border:none;padding:0;"><a id="agca_donate_button" style="margin-left:8px" title="Do You like this plugin? You can support its future development by providing small donation" href="http://wordpress.argonius.com/donate"><img alt="Donate" src="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>images/btn_donate_LG.gif" /></a>
 
963
  </li>
964
  <li style="background:none;border:none;padding:0;padding-left:10px;margin-top:-7px"></li>
965
- </ul>
 
 
 
 
 
 
966
  <div id="section_admin_bar" class="ag_section">
967
  <h2 class="section_title" tabindex="-1">Admin Bar Settings Page</h2>
968
  <br />
@@ -1006,8 +1356,8 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1006
  <label title="Change default WordPress logo with custom image." for="agca_wp_logo_custom">Change WordPress logo</label>
1007
  </th>
1008
  <td>
1009
- <input title="If this field is not empty, image from provided url will be visible in top bar" type="text" size="47" name="agca_wp_logo_custom" value="<?php echo get_option('agca_wp_logo_custom'); ?>" />
1010
- &nbsp;<p><i>Put here an URL of the new top bar image (20 x 20px)</i>.</p>
1011
  </td>
1012
  </tr>
1013
  <tr valign="center">
@@ -1015,7 +1365,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1015
  <label title="Add custom image on the top of admin content." for="agca_header_logo_custom">Custom header image</label>
1016
  </th>
1017
  <td>
1018
- <input title="If this field is not empty, image from provided url will be visible in header" type="text" size="47" name="agca_header_logo_custom" value="<?php echo get_option('agca_header_logo_custom'); ?>" />
1019
  &nbsp;<p><i>Add custom header image</i>.</p>
1020
  </td>
1021
  </tr>
@@ -1030,10 +1380,10 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1030
  <?php if($wpversion>=3.3){?>
1031
  <tr valign="center">
1032
  <th >
1033
- <label title="Hides default WordPress top bar dropdown menus" for="agca_remove_top_bar_dropdowns">Hide WordPress top bar dropdown menus</label>
1034
  </th>
1035
  <td>
1036
- <input title="Hides default WordPress top bar dropdown menus" type="checkbox" name="agca_remove_top_bar_dropdowns" value="true" <?php if (get_option('agca_remove_top_bar_dropdowns')==true) echo 'checked="checked" '; ?> />
1037
  </td>
1038
  </tr>
1039
  <tr valign="center">
@@ -1107,7 +1457,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1107
  <label title="Adds custom text in admin top bar. Default Wordpress heading stays intact." for="agca_custom_site_heading">Custom blog heading</label>
1108
  </th>
1109
  <td>
1110
- <textarea title="Adds custom text in admin top bar. Default Wordpress heading stays intact." rows="5" name="agca_custom_site_heading" cols="40"><?php echo htmlspecialchars(get_option('agca_custom_site_heading')); ?></textarea><p><em><strong>Info: </strong>You can use HTML tags like 'h1' and/or 'a' tag</em></p>
1111
  </td>
1112
  </tr>
1113
  <tr valign="center">
@@ -1303,6 +1653,14 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1303
  <p tabindex="0"><i><strong>Info:</strong> These settings override settings in Screen options on Dashboard page.</i></p>
1304
  </td>
1305
  </tr>
 
 
 
 
 
 
 
 
1306
  <tr valign="center">
1307
  <th scope="row">
1308
  <label for="agca_dashboard_widget_rc">Hide "Recent Comments"</label>
@@ -1401,8 +1759,8 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1401
  <label title="If this field is not empty, image from provided url will be visible on Login page" for="agca_login_photo_url">Change Login header image</label>
1402
  </th>
1403
  <td>
1404
- <input title="If this field is not empty, image from provided url will be visible on Login page" type="text" size="47" name="agca_login_photo_url" value="<?php echo get_option('agca_login_photo_url'); ?>" />
1405
- &nbsp;<p><i>Put here link of new login photo. Photo could be of any size and type</i>.</p>
1406
  </td>
1407
  </tr>
1408
  <tr valign="center">
@@ -1410,7 +1768,8 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1410
  <label title="Put here custom link to a web location, that will be triggered on image click" for="agca_login_photo_href">Change hyperlink on Login image</label>
1411
  </th>
1412
  <td>
1413
- <input title="Put here custom link to a web location, that will be triggered on image click" type="text" size="47" name="agca_login_photo_href" value="<?php echo get_option('agca_login_photo_href'); ?>" />
 
1414
  </td>
1415
  </tr>
1416
  <tr valign="center">
@@ -1421,6 +1780,26 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1421
  <input title="Remove login image completely" type="checkbox" name="agca_login_photo_remove" value="true" <?php if (get_option('agca_login_photo_remove')==true) echo 'checked="checked" '; ?> />
1422
  </td>
1423
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1424
  </table>
1425
  </div>
1426
  <?php
@@ -1429,7 +1808,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1429
  <div id="section_admin_menu" style="display:none" class="ag_section">
1430
  <h2 class="section_title" tabindex="-1">Admin Menu Settings Page</h2>
1431
  <br />
1432
- <p style="font-style:italic" tabindex="0"><strong>Important: </strong>Please Turn off menu configuration before activating or disabling other plugins (or making any other changes to main menu). Use "Reset Settings" button to restore default values if anything went wrong.</p>
1433
  <br />
1434
  <table class="form-table" width="500px">
1435
  <tr valign="center" class="ag_table_major_options">
@@ -1464,18 +1843,18 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1464
  </tr>
1465
  <tr valign="center">
1466
  <th scope="row">
1467
- <label title="This is arrow like separator between Dashboard and Posts button (by default)" for="agca_admin_menu_separator_first">Remove first items separator</label>
1468
  </th>
1469
  <td>
1470
- <input title="This is arrow like separator between Dashboard and Posts button (by default)" type="checkbox" name="agca_admin_menu_separator_first" value="true" <?php if (get_option('agca_admin_menu_separator_first')==true) echo 'checked="checked" '; ?> />
1471
  </td>
1472
  </tr>
1473
  <tr valign="center">
1474
  <th scope="row">
1475
- <label title="This is arrow like separator between Comments and Appearance button (by default)" for="agca_admin_menu_separator_second">Remove second items separator</label>
1476
  </th>
1477
  <td>
1478
- <input title="This is arrow like separator between Comments and Appearance button (by default)" type="checkbox" name="agca_admin_menu_separator_second" value="true" <?php if (get_option('agca_admin_menu_separator_second')==true) echo 'checked="checked" '; ?> />
1479
  </td>
1480
  </tr>
1481
  <tr valign="center">
@@ -1486,6 +1865,43 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1486
  <input title="Removes small icons on admin menu buttons" type="checkbox" name="agca_admin_menu_icons" value="true" <?php if (get_option('agca_admin_menu_icons')==true) echo 'checked="checked" '; ?> />
1487
  </td>
1488
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1489
  <tr valign="center">
1490
  <td colspan="2">
1491
  <div class="ag_table_heading"><h3 tabindex="0">Add New Menu Items</h3></div>
@@ -1520,9 +1936,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1520
  </div>
1521
  <div id="section_ag_colorizer_settings" style="display:none" class="ag_section">
1522
  <h2 class="section_title">Colorizer Page</h2>
1523
- <br />
1524
- <p><i><strong>Info: </strong>Change Admin panel colors (This is Colorizer demo with only few color options. More color options will be available in future realeases).</i></p>
1525
- <br />
1526
  <table class="form-table" width="500px">
1527
  <tr valign="center" class="ag_table_major_options">
1528
  <td><label for="agca_colorizer_turnonoff"><strong>Turn on/off Colorizer configuration</strong></label></td>
@@ -1536,7 +1950,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1536
  </td>
1537
  </tr>
1538
  <tr valign="center">
1539
- <th><label title="Change admin background color" for="color_background">Background color:</label></th>
1540
  <td><input type="text" id="color_background" name="color_background" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_background']); ?>" />
1541
  <input type="button" alt="color_background" class="pick_color_button" value="Pick color" />
1542
  <input type="button" alt="color_background" class="pick_color_button_clear" value="Clear" />
@@ -1550,7 +1964,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1550
  </td>
1551
  </tr>
1552
  <tr valign="center">
1553
- <th><label title="Change header color in admin panel" for="color_header">Header color:</label></th>
1554
  <td><input type="text" id="color_header" name="color_header" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_header']); ?>" />
1555
  <input type="button" alt="color_header" class="pick_color_button" value="Pick color" />
1556
  <input type="button" alt="color_header" class="pick_color_button_clear" value="Clear" />
@@ -1564,26 +1978,68 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1564
  </td>
1565
  </tr>
1566
  <tr valign="center">
1567
- <th><label title="Change background color in admin menu" for="color_admin_menu_top_button_background">Top button background color:</label></th>
1568
  <td><input type="text" id="color_admin_menu_top_button_background" name="color_admin_menu_top_button_background" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_admin_menu_top_button_background']); ?>" />
1569
  <input type="button" alt="color_admin_menu_top_button_background" class="pick_color_button" value="Pick color" />
1570
  <input type="button" alt="color_admin_menu_top_button_background" class="pick_color_button_clear" value="Clear" />
1571
  </td>
1572
  </tr>
1573
- <tr valign="center">
1574
- <th><label title="Change background submenu color in admin menu" for="color_admin_menu_submenu_background">Submenu button background color:</label></th>
1575
- <td><input type="text" id="color_admin_menu_submenu_background" name="color_admin_menu_submenu_background" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_admin_menu_submenu_background']); ?>" />
1576
- <input type="button" alt="color_admin_menu_submenu_background" class="pick_color_button" value="Pick color" />
1577
- <input type="button" alt="color_admin_menu_submenu_background" class="pick_color_button_clear" value="Clear" />
1578
- </td>
1579
- </tr>
1580
- <tr valign="center">
1581
- <th><label title="Change text color in admin menu" for="color_admin_menu_font">Text color:</label></th>
1582
  <td><input type="text" id="color_admin_menu_font" name="color_admin_menu_font" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_admin_menu_font']); ?>" />
1583
  <input type="button" alt="color_admin_menu_font" class="pick_color_button" value="Pick color" />
1584
  <input type="button" alt="color_admin_menu_font" class="pick_color_button_clear" value="Clear" />
1585
  </td>
1586
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1587
  <?php if($wpversion >= 3.2) { ?>
1588
  <tr valign="center">
1589
  <th><label title="Change background color of element behind admin menu" for="color_admin_menu_behind_background">Wrapper background color:</label></th>
@@ -1621,7 +2077,7 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1621
  </td>
1622
  </tr>
1623
  <tr valign="center">
1624
- <th><label title="Change color in header text" for="color_font_header">Header text color:</label></th>
1625
  <td><input type="text" id="color_font_header" name="color_font_header" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_font_header']); ?>" />
1626
  <input type="button" alt="color_font_header" class="pick_color_button" value="Pick color" />
1627
  <input type="button" alt="color_font_header" class="pick_color_button_clear" value="Clear" />
@@ -1658,17 +2114,59 @@ jQuery('#ag_add_adminmenu').append(buttonsJq);
1658
  </table>
1659
  <input type="hidden" size="47" id="ag_colorizer_json" name="ag_colorizer_json" value="<?php echo htmlspecialchars(get_option('ag_colorizer_json')); ?>" />
1660
  <div id="picker"></div>
1661
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1662
  <br /><br /><br />
1663
  <p class="submit">
1664
- <input type="submit" title="Save changes button" class="button-primary" value="<?php _e('Save Changes') ?>" />
1665
- </p>
1666
-
1667
  </form>
1668
  </div>
1669
- <p tabindex="0"><i><strong>Info:</strong> You can use HTML tags in text areas, e.g. &lt;a href=&quot;http://www.mywebsite.com&quot;&gt;Visit Us&lt;/a&gt;</i></p>
1670
  <br />
1671
- <br /><br /><br /><p id="agca_footer_support_info">WordPress 'AG Custom Admin' plugin by Argonius. If you have any questions, ideas for future development or if you found a bug or having any issues regarding this plugin, please visit plugin's <a href="http://wordpress.argonius.com/ag-custom-admin">SUPPORT</a> page. <br />You can also participate in development of this plugin if you <a href="http://wordpress.argonius.com/donate">BUY ME A DRINK</a> to refresh my energy for programming. Thanks!<br /><br />Have a nice blogging!</p><br />
1672
  <?php
1673
  }
1674
  }
4
  Plugin URI: http://wordpress.org/extend/plugins/ag-custom-admin
5
  Description: Hide or change items in admin panel. Customize buttons from admin menu. Colorize admin and login page with custom colors.
6
  Author: Argonius
7
+ Version: 1.2.6.1
8
  Author URI: http://wordpress.argonius.com/ag-custom-admin
9
 
10
  Copyright 2011. Argonius (email : info@argonius.com)
23
  along with this program. If not, see <http://www.gnu.org/licenses/>.
24
  */
25
 
26
+ //require_once('/../../../../../FirePHPCore/lib/FirePHPCore/fb.php');
27
+ //fb($_POST);
28
+
29
  $agca = new AGCA();
30
 
31
  class AGCA{
32
  private $colorizer="";
33
  private $active_plugin;
34
+ private $agca_version;
35
  public function __construct()
36
  {
37
 
41
  add_action('wp_head', array(&$this,'print_page'));
42
  add_action('login_head', array(&$this,'print_login_head'));
43
  add_action('admin_menu', array(&$this,'agca_create_menu'));
44
+ register_deactivation_hook(__FILE__, array(&$this,'agca_deactivate'));
45
 
46
+
 
 
47
 
48
  /*Initialize properties*/
49
  $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
50
+ //fb($this->colorizer);
51
+ $this->agca_version = "1.2.6.1";
52
  }
53
  // Add donate and support information
54
  function jk_filter_plugin_links($links, $file)
74
  );
75
  }
76
  function agca_get_includes() {
77
+ global $user_level;
78
+ ?>
79
+ <script type="text/javascript">
80
+ <?php
81
+ //AGCA GLOBALS
82
+ echo "var agca_global_plugin_url = '".trailingslashit(plugins_url(basename(dirname(__FILE__))))."';";
83
+ ?>
84
+ </script>
85
+ <link rel="stylesheet" type="text/css" href="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>style/ag_style.css?ver=<?php echo $this->agca_version; ?>" />
86
+ <script type="text/javascript" src="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>script/ag_script.js?ver=<?php echo $this->agca_version; ?>"></script>
87
+
88
+ <?php
89
+ if(!((get_option('agca_role_allbutadmin')==true) and ($user_level > 9))){
90
+ ?>
91
+ <style type="text/css">
92
+ <?php
93
+ echo get_option('agca_custom_css');
94
+ ?>
95
+ </style>
96
+ <script type="text/javascript">
97
+ <?php
98
+ echo get_option('agca_custom_js');
99
+ ?>
100
+ </script>
101
+ <?php
102
+ }
103
+ ?>
104
  <?php
105
  }
106
 
141
  register_setting( 'agca-options-group', 'agca_login_photo_remove' );
142
  register_setting( 'agca-options-group', 'agca_login_photo_url' );
143
  register_setting( 'agca-options-group', 'agca_login_photo_href' );
144
+ register_setting( 'agca-options-group', 'agca_login_round_box' );
145
+ register_setting( 'agca-options-group', 'agca_login_round_box_size' );
146
 
 
147
  register_setting( 'agca-options-group', 'agca_dashboard_icon' );
148
  register_setting( 'agca-options-group', 'agca_dashboard_text' );
149
+ register_setting( 'agca-options-group', 'agca_dashboard_text_paragraph' );
150
+ register_setting( 'agca-options-group', 'agca_dashboard_widget_welcome' );
151
  register_setting( 'agca-options-group', 'agca_dashboard_widget_rc' );
152
  register_setting( 'agca-options-group', 'agca_dashboard_widget_il' );
153
  register_setting( 'agca-options-group', 'agca_dashboard_widget_plugins' );
174
  register_setting( 'agca-options-group', 'agca_admin_menu_agca_button_only' );
175
  register_setting( 'agca-options-group', 'agca_admin_menu_separator_first' );
176
  register_setting( 'agca-options-group', 'agca_admin_menu_separator_second' );
177
+ register_setting( 'agca-options-group', 'agca_admin_menu_icons' );
178
+ register_setting( 'agca-options-group', 'agca_admin_menu_arrow' );
179
+ register_setting( 'agca-options-group', 'agca_admin_menu_submenu_round' );
180
+ register_setting( 'agca-options-group', 'agca_admin_menu_submenu_round_size' );
181
+ register_setting( 'agca-options-group', 'agca_admin_menu_brand' );
182
  register_setting( 'agca-options-group', 'ag_edit_adminmenu_json' );
183
  register_setting( 'agca-options-group', 'ag_add_adminmenu_json' );
184
  register_setting( 'agca-options-group', 'ag_colorizer_json' );
185
+ register_setting( 'agca-options-group', 'agca_colorizer_turnonoff' );
186
+
187
+ register_setting( 'agca-options-group', 'agca_custom_js' );
188
+ register_setting( 'agca-options-group', 'agca_custom_css' );
189
+
190
+
191
+ if(!empty($_POST)){
192
+ // fb($_POST);
193
+ if(isset($_POST['_agca_import_settings']) && $_POST['_agca_import_settings']=="true"){
194
+ if(isset($_FILES) && isset($_FILES['settings_import_file']) ){
195
+ if($_FILES["settings_import_file"]["error"] > 0){
196
+ }else{
197
+ $file = $_FILES['settings_import_file'];
198
+ if($this->startsWith($file['name'],'AGCA_Settings')){
199
+ if (file_exists($file['tmp_name'])) {
200
+ $fh = fopen($file['tmp_name'], 'r');
201
+ $theData = "";
202
+ if(filesize($file['tmp_name']) > 0){
203
+ $theData = fread($fh,filesize($file['tmp_name']));
204
+ }
205
+ fclose($fh);
206
+ $this->importSettings($theData);
207
+ }
208
+ }
209
+ }
210
+ }
211
+ }else if(isset($_POST['_agca_export_settings']) && $_POST['_agca_export_settings']=="true"){
212
+ $this->exportSettings();
213
+ }else{
214
+
215
+ }
216
+ }
217
  }
218
 
219
  function agca_deactivate() {
245
  delete_option( 'agca_login_banner_text' );
246
  delete_option( 'agca_login_photo_remove' );
247
  delete_option( 'agca_login_photo_url' );
248
+ delete_option( 'agca_login_photo_href' );
249
+ delete_option( 'agca_login_round_box' );
250
+ delete_option( 'agca_login_round_box_size' );
251
+
252
  delete_option( 'agca_dashboard_icon' );
253
  delete_option( 'agca_dashboard_text' );
254
+ delete_option( 'agca_dashboard_text_paragraph' );
255
+ delete_option( 'agca_dashboard_widget_welcome' );
256
  delete_option( 'agca_dashboard_widget_rc' );
257
  delete_option( 'agca_dashboard_widget_il' );
258
  delete_option( 'agca_dashboard_widget_plugins' );
279
  delete_option( 'agca_admin_menu_separator_first' );
280
  delete_option( 'agca_admin_menu_separator_second' );
281
  delete_option( 'agca_admin_menu_icons' );
282
+ delete_option( 'agca_admin_menu_arrow' );
283
+ delete_option( 'agca_admin_menu_submenu_round' );
284
+ delete_option( 'agca_admin_menu_submenu_round_size' );
285
+ delete_option( 'agca_admin_menu_brand' );
286
  delete_option( 'ag_edit_adminmenu_json' );
287
  delete_option( 'ag_add_adminmenu_json' );
288
  delete_option( 'ag_colorizer_json' );
289
  delete_option( 'agca_colorizer_turnonoff' );
290
+
291
+ delete_option( 'agca_custom_js' );
292
+ delete_option( 'agca_custom_css' );
293
+ }
294
+
295
+ function getOptions(){
296
+ return Array(
297
+ 'agca_role_allbutadmin',
298
+ 'agca_screen_options_menu',
299
+ 'agca_help_menu',
300
+ 'agca_logout',
301
+ 'agca_remove_your_profile',
302
+ 'agca_logout_only',
303
+ 'agca_options_menu',
304
+ 'agca_howdy',
305
+ 'agca_header',
306
+ 'agca_header_show_logout',
307
+ 'agca_footer',
308
+ 'agca_privacy_options',
309
+ 'agca_header_logo',
310
+ 'agca_header_logo_custom',
311
+ 'agca_wp_logo_custom',
312
+ 'agca_site_heading',
313
+ 'agca_custom_site_heading',
314
+ 'agca_update_bar',
315
+ 'agca_footer_left',
316
+ 'agca_footer_left_hide',
317
+ 'agca_footer_right',
318
+ 'agca_footer_right_hide',
319
+ 'agca_login_banner',
320
+ 'agca_login_banner_text',
321
+ 'agca_login_photo_remove',
322
+ 'agca_login_photo_url',
323
+ 'agca_login_photo_href',
324
+ 'agca_login_round_box',
325
+ 'agca_login_round_box_size',
326
+ 'agca_dashboard_icon',
327
+ 'agca_dashboard_text',
328
+ 'agca_dashboard_text_paragraph',
329
+ 'agca_dashboard_widget_welcome',
330
+ 'agca_dashboard_widget_rc',
331
+ 'agca_dashboard_widget_il',
332
+ 'agca_dashboard_widget_plugins',
333
+ 'agca_dashboard_widget_qp',
334
+ 'agca_dashboard_widget_rn',
335
+ 'agca_dashboard_widget_rd',
336
+ 'agca_dashboard_widget_primary',
337
+ 'agca_dashboard_widget_secondary',
338
+ 'agca_admin_bar_comments',
339
+ 'agca_admin_bar_new_content',
340
+ 'agca_admin_bar_new_content_post',
341
+ 'agca_admin_bar_new_content_link',
342
+ 'agca_admin_bar_new_content_page',
343
+ 'agca_admin_bar_new_content_user',
344
+ 'agca_admin_bar_new_content_media',
345
+ 'agca_admin_bar_update_notifications',
346
+ 'agca_remove_top_bar_dropdowns',
347
+ 'agca_admin_menu_turnonoff',
348
+ 'agca_admin_menu_agca_button_only',
349
+ 'agca_admin_menu_separator_first',
350
+ 'agca_admin_menu_separator_second',
351
+ 'agca_admin_menu_icons',
352
+ 'agca_admin_menu_arrow',
353
+ 'agca_admin_menu_submenu_round',
354
+ 'agca_admin_menu_submenu_round_size',
355
+ 'agca_admin_menu_brand',
356
+ 'ag_edit_adminmenu_json',
357
+ 'ag_add_adminmenu_json',
358
+ 'ag_colorizer_json',
359
+ 'agca_colorizer_turnonof',
360
+ 'agca_custom_js',
361
+ 'agca_custom_css',
362
+ );
363
+ }
364
+
365
+ function importSettings($settings){
366
+ $exploaded = explode("|^|^|", $settings);
367
+ // $str = "EEE: ";
368
+
369
+ $savedOptions = array();
370
+
371
+ foreach ($exploaded as $setting){
372
+
373
+ $key = current(explode(':', $setting));
374
+ $value = substr($setting, strlen($key)+1);
375
+ $cleanedValue = str_replace('|^|^|','',$value);
376
+ $savedOptions[$key] = $cleanedValue;
377
+ }
378
+
379
+ // print_r($savedOptions);
380
+
381
+ $optionNames = $this->getOptions();
382
+
383
+ foreach ($optionNames as $optionName){
384
+ $optionValue = "";
385
+ $optionValue = $savedOptions[$optionName];
386
+
387
+ if($optionName == "ag_edit_adminmenu_json" || $optionName == "ag_add_adminmenu_json" ||$optionName == "ag_colorizer_json"){
388
+ $optionValue = str_replace("\\\"", "\"", $optionValue);
389
+ $optionValue = str_replace("\\\'", "\'", $optionValue);
390
+ }else if($optionName == "agca_custom_js" || $optionName == "agca_custom_css"){
391
+ //fb($optionValue);
392
+ $optionValue = htmlspecialchars_decode($optionValue);
393
+ $optionValue = str_replace("\'", '"', $optionValue);
394
+ $optionValue = str_replace('\"', "'", $optionValue);
395
+ //fb($optionValue);
396
+ }else{
397
+
398
+ }
399
+ update_option($optionName, $optionValue);
400
+ $str.="/".$optionName."/".$optionValue."\n";
401
+ }
402
+
403
+ //Migration from 1.2.6. to 1.2.5.1 - remove in later versions
404
+ //agca_script_css
405
+ //
406
+ // fb($savedOptions);
407
+ if($savedOptions['agca_script_css'] != null){
408
+ $optionValue = "";
409
+ $optionValue = str_replace("\'", '"', $savedOptions['agca_script_css']);
410
+ $optionValue = str_replace('\"', "'", $optionValue);
411
+ update_option('agca_custom_css', $optionValue);
412
+ }
413
+ if($savedOptions['agca_script_js'] != null){
414
+ $optionValue = "";
415
+ $optionValue = str_replace("\'", '"', $savedOptions['agca_script_js']);
416
+ $optionValue = str_replace('\"', "'", $optionValue);
417
+ update_option('agca_custom_js', $optionValue);
418
+ }
419
+
420
+ //echo $str;
421
+ }
422
+
423
+ function exportSettings(){
424
+ $str = "";
425
+
426
+ foreach ($_POST as $key => $value) {
427
+ if ($this->startsWith($key,'ag')||$this->startsWith($key,'color')) {
428
+ $str .=$key. ":".$value."|^|^|";
429
+ }
430
+ }
431
+
432
+ $filename = 'AGCA_Settings_'.date("Y-M-d_H-i-s").'.agca';
433
+ header("Cache-Control: public");
434
+ header("Content-Description: File Transfer");
435
+ header("Content-Disposition: attachment; filename=$filename");
436
+ header("Content-Type: text/plain; ");
437
+ header("Content-Transfer-Encoding: binary");
438
+ echo $str;
439
+ die();
440
+ }
441
+
442
+ function startsWith($haystack, $needle)
443
+ {
444
+ $length = strlen($needle);
445
+ return (substr($haystack, 0, $length) === $needle);
446
+ }
447
+
448
+
449
+
450
  function agca_create_menu() {
451
  //create new top-level menu
452
  add_management_page( 'AG Custom Admin', 'AG Custom Admin', 'administrator', __FILE__, array(&$this,'agca_admin_page') );
462
  $href = $arr;
463
  }
464
  $button ="";
465
+ $button .= '<li id="menu-'.$name.'" class="ag-custom-button menu-top menu-top-first '.$class.' menu-top-last">';
 
 
 
466
  $button .= '<div class="wp-menu-toggle" style="display: none;"><br></div>';
467
+ $button .= '<a tabindex="1" target="'.$target.'" class="menu-top menu-top-last" href="'.$href.'">'.$name.'</a>';
468
  $button .= '</li>';
469
 
470
  return $button;
536
 
537
  function print_page()
538
  {
539
+ $wpversion = $this->get_wp_version();
540
  ?><style type="text/css">
541
+
542
+ </style>
543
+ <script type="text/javascript">
544
+ var wpversion = "<?php echo $wpversion; ?>";
545
+ var agca_version = "<?php echo $this->agca_version; ?>";
546
+ var jQueryScriptOutputted = false;
547
+ function initJQuery() {
548
+ //if the jQuery object isn't available
549
+ if (typeof(jQuery) == 'undefined') {
550
+ if (! jQueryScriptOutputted) {
551
+ //only output the script once..
552
+ jQueryScriptOutputted = true;
553
+ //output the script (load it from google api)
554
+ document.write("<scr" + "ipt type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js\"></scr" + "ipt>");
555
+ }
556
+ setTimeout("initJQuery()", 50);
557
+ } else {
558
+ $(function() {
559
+ try
560
+ {
561
+ <?php $this->print_admin_bar_scripts(); ?>
562
+ }catch(ex){}
563
+ });
564
+ }
565
+ }
566
+ initJQuery();
567
+ </script>
568
+ <script type="text/javascript">
569
+ <?php echo "var agca_global_plugin_url = '".trailingslashit(plugins_url(basename(dirname(__FILE__))))."';"; ?>
570
+ </script>
571
+ <script type="text/javascript" src="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>script/ag_script.js?ver=<?php echo $this->agca_version; ?>"></script>
572
+
573
+
574
+ <?php
575
+
576
  }
577
+
578
+ function print_admin_bar_scripts(){
579
+ ?>
580
+ if(isWPHigherOrEqualThan("3.3")){
581
+ <?php if(get_option('agca_remove_top_bar_dropdowns')==true){ ?>
582
+
583
+
584
+ //remove on site page
585
+ jQuery("#wpadminbar #wp-admin-bar-root-default > #wp-admin-bar-wp-logo .ab-sub-wrapper").hide();
586
+ jQuery("#wpadminbar #wp-admin-bar-root-default > #wp-admin-bar-site-name .ab-sub-wrapper").hide();
587
+
588
+ jQuery("#wpadminbar #wp-admin-bar-root-default > #wp-admin-bar-wp-logo .ab-item").attr('title','');
589
+
590
+
591
+ var abitemSelector = "#wpadminbar .ab-top-menu > li.menupop > .ab-item";
592
+ var originalBkg = jQuery(abitemSelector).css('background');
593
+ var originalColor = jQuery(abitemSelector).css('color');
594
+ jQuery(abitemSelector).mouseover(function(){
595
+ jQuery(this).css({'background':'#222222','color':'#fafafa'});
596
+ }).mouseout(function(){
597
+ jQuery(this).css({'background':originalBkg,'color':originalColor});
598
+ });
599
+
600
+ <?php if(get_option('agca_admin_bar_new_content')!=""){ ?>
601
+ jQuery(".new_content_header_submenu").hide();
602
+ <?php } ?>
603
+
604
+ <?php } ?>
605
+ }
606
+
607
+ if(isWPHigherOrEqualThan("3.3")){
608
+ <?php if(get_option('agca_admin_bar_comments')!=""){ ?>
609
+ jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-comments").css("display","none");
610
+ <?php } ?>
611
+ <?php if(get_option('agca_admin_bar_new_content')!=""){ ?>
612
+ jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-new-content").css("display","none");
613
+ <?php } ?>
614
+ <?php if(get_option('agca_admin_bar_new_content_post')!=""){ ?>
615
+ jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-new-content li#wp-admin-bar-new-post").css("display","none");
616
+ <?php } ?>
617
+ <?php if(get_option('agca_admin_bar_new_content_link')!=""){ ?>
618
+ jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-new-content li#wp-admin-bar-new-link").css("display","none");
619
+ <?php } ?>
620
+ <?php if(get_option('agca_admin_bar_new_content_page')!=""){ ?>
621
+ jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-new-content li#wp-admin-bar-new-page").css("display","none");
622
+ <?php } ?>
623
+ <?php if(get_option('agca_admin_bar_new_content_user')!=""){ ?>
624
+ jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-new-content li#wp-admin-bar-new-user").css("display","none");
625
+ <?php } ?>
626
+ <?php if(get_option('agca_admin_bar_new_content_media')!=""){ ?>
627
+ jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-new-content li#wp-admin-bar-new-media").css("display","none");
628
+ <?php } ?>
629
+ <?php if(get_option('agca_admin_bar_update_notifications')!=""){ ?>
630
+ jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-updates").css("display","none");
631
+ <?php } ?>
632
+ }
633
+
634
+
635
+ <?php if(get_option('agca_header_logo')==true){ ?>
636
+ jQuery("#wphead #header-logo").css("display","none");
637
+ jQuery("ul#wp-admin-bar-root-default li#wp-admin-bar-wp-logo").css("display","none");
638
+
639
+ <?php } ?>
640
+ <?php if(get_option('agca_header_logo_custom')!=""){ ?>
641
+
642
+
643
+ if(isWPHigherOrEqualThan("3.3")){
644
+ var img_url = '<?php echo get_option('agca_header_logo_custom'); ?>';
645
+
646
+ advanced_url = img_url;
647
+ image = jQuery("<img />").attr("src",advanced_url);
648
+ jQuery(image).load(function() {
649
+ jQuery("#wpbody-content").prepend(image);
650
+ });
651
+ }else{
652
+ jQuery("#wphead img#header-logo").attr('src','');
653
+ jQuery("#wphead img#header-logo").hide();
654
+ var img_url = '<?php echo get_option('agca_header_logo_custom'); ?>';
655
+ advanced_url = img_url+ "?" + new Date().getTime();
656
+ image = jQuery("<img />").attr("src",advanced_url);
657
+ jQuery(image).load(function() {
658
+ jQuery("#wphead img#header-logo").attr('src', advanced_url);
659
+ jQuery("#wphead img#header-logo").attr('width',this.width);
660
+ jQuery("#wphead img#header-logo").attr('height',this.height);
661
+ jQuery("#wphead").css('height', (14 + this.height)+'px');
662
+ jQuery("#wphead img#header-logo").show();
663
+ });
664
+ }
665
+
666
+ <?php } ?>
667
+ <?php if(get_option('agca_wp_logo_custom')!=""){ ?>
668
+ if(isWPHigherOrEqualThan("3.3")){
669
+ jQuery("li#wp-admin-bar-wp-logo a.ab-item span.ab-icon").html("<img style=\"height:28px;margin-top:-4px\" src=\"<?php echo get_option('agca_wp_logo_custom'); ?>\" />");
670
+ jQuery("li#wp-admin-bar-wp-logo a.ab-item span.ab-icon").css('background-image','none');
671
+ jQuery("li#wp-admin-bar-wp-logo a.ab-item span.ab-icon").css('width','auto');
672
+ jQuery("li#wp-admin-bar-wp-logo a.ab-item").attr('href',"<?php echo get_bloginfo('wpurl'); ?>");
673
+
674
+ jQuery("#wpadminbar #wp-admin-bar-root-default > #wp-admin-bar-wp-logo .ab-item").attr('title','');
675
+ }
676
+ <?php }?>
677
+ <?php if(get_option('agca_site_heading')==true){ ?>
678
+ jQuery("#wphead #site-heading").css("display","none");
679
+ <?php } ?>
680
+ <?php if(get_option('agca_custom_site_heading')!=""){ ?>
681
+ jQuery("#wphead #site-heading").after('<h1><?php echo get_option('agca_custom_site_heading'); ?></h1>');
682
+ //3.3FIX
683
+ if(isWPHigherOrEqualThan("3.3")){
684
+ jQuery("#wp-admin-bar-site-name a:first").html('<?php echo get_option('agca_custom_site_heading'); ?>');
685
+ }
686
+ <?php } ?>
687
+ <?php if(get_option('agca_header')==true){ ?>
688
+ jQuery("#wpadminbar").css("display","none");
689
+ jQuery("body.admin-bar").css("padding-top","0");
690
+ jQuery("#wphead").css("display","none");
691
+
692
+ <?php } ?>
693
+ <?php if((get_option('agca_header')==true)&&(get_option('agca_header_show_logout')==true)){ ?>
694
+
695
+ if(isWPHigherOrEqualThan("3.3")){
696
+ jQuery("#wpbody-content").prepend('<a href="../wp-login.php?action=logout" tabindex="10" style="float:right;margin-right:20px" class="ab-item">Log Out</a>');
697
+ }else{
698
+ var clon ="";
699
+ jQuery("div#user_info a").each(function(){
700
+ if(jQuery(this).text() =="Log Out"){
701
+ clon = jQuery(this).clone();
702
+ }
703
+ });
704
+ if(clon !=""){
705
+ jQuery(clon).attr('style','float:right;padding:15px');
706
+ jQuery(clon).html('<?php echo ((get_option('agca_logout')=="")?"Log Out":get_option('agca_logout')); ?>');
707
+ }
708
+ jQuery("#wphead").after(clon);
709
+ }
710
+
711
+ <?php } ?>
712
+ <?php if(get_option('agca_howdy')!=""){ ?>
713
+ if(isWPHigherOrEqualThan("3.3")){
714
+ var alltext="";
715
+ alltext="";
716
+ alltext = jQuery('li#wp-admin-bar-my-account').html();
717
+ if(alltext!=null){
718
+ alltext = alltext.replace('Howdy',"<?php echo get_option('agca_howdy'); ?>");
719
+ }
720
+ jQuery("li#wp-admin-bar-my-account").html(alltext);
721
+ }else if(isWPHigherOrEqualThan("3.2")){
722
+ var alltext="";
723
+ alltext="";
724
+ alltext = jQuery('#user_info div.hide-if-no-js').html();
725
+ if(alltext!=null){
726
+ alltext = alltext.replace('Howdy',"<?php echo get_option('agca_howdy'); ?>");
727
+ }
728
+ jQuery("#user_info div.hide-if-no-js").html(alltext);
729
+
730
+ }else{
731
+ var howdyText = jQuery("#user_info").html();
732
+ if(howdyText !=null){
733
+ jQuery("#user_info").html("<p>"+"<?php echo get_option('agca_howdy'); ?>"+howdyText.substr(9));
734
+ }
735
+ }
736
+ <?php } ?>
737
+ <?php if(get_option('agca_logout')!=""){ ?>
738
+ if(isWPHigherOrEqualThan("3.3")){
739
+ jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-logout a").text("<?php echo get_option('agca_logout'); ?>");
740
+ }else if(isWPHigherOrEqualThan("3.2")){
741
+ jQuery("#user_info #user_info_links a:eq(1)").text("<?php echo get_option('agca_logout'); ?>");
742
+ }else{
743
+ jQuery("#user_info a:eq(1)").text("<?php echo get_option('agca_logout'); ?>");
744
+ }
745
+
746
+ <?php } ?>
747
+ <?php if(get_option('agca_remove_your_profile')==true){ ?>
748
+ if(isWPHigherOrEqualThan("3.3")){
749
+ jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-edit-profile").css("visibility","hidden");
750
+ jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-edit-profile").css("height","10px");
751
+ jQuery('#wpadminbar #wp-admin-bar-top-secondary > #wp-admin-bar-my-account > a').attr('href','#');
752
+ jQuery('#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-user-info > a').attr('href','#');
753
+ jQuery('#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-edit-profile > a').attr('href','#');
754
+
755
+ }else if(isWPHigherOrEqualThan("3.2")){
756
+ jQuery("#user_info #user_info_links li:eq(0)").remove();
757
+ }
758
+ <?php } ?>
759
+ <?php if(get_option('agca_logout_only')==true){ ?>
760
+ if(isWPHigherOrEqualThan("3.3")){
761
+ var logout_content = jQuery("li#wp-admin-bar-logout").html();
762
+ jQuery("ul#wp-admin-bar-top-secondary").html('<li id="wp-admin-bar-logout">'+ logout_content +'</li>');
763
+ }else if(isWPHigherOrEqualThan("3.2")){
764
+ var logoutText = jQuery("#user_info a:nth-child(2)").text();
765
+ <?php if(get_option('agca_logout')!=""){ ?>
766
+ logoutText = "<?php echo get_option('agca_logout'); ?>";
767
+ <?php } ?>
768
+ var logoutLink = jQuery("#user_info a:nth-child(2)").attr("href");
769
+ jQuery("#user_info").html("<a href=\""+logoutLink+"\" title=\"Log Out\">"+logoutText+"</a>");
770
+ }else{
771
+ var logoutText = jQuery("#user_info a:nth-child(2)").text();
772
+ var logoutLink = jQuery("#user_info a:nth-child(2)").attr("href");
773
+ jQuery("#user_info").html("<a href=\""+logoutLink+"\" title=\"Log Out\">"+logoutText+"</a>");
774
+ }
775
+ <?php } ?>
776
+
777
+ <?php
778
+
779
+
780
+ }
781
 
782
  function print_admin_css()
783
  {
803
  var wpversion = "<?php echo $wpversion; ?>";
804
  var agca_version = "<?php echo $this->agca_version; ?>";
805
  var errors = false;
806
+ var isSettingsImport = false;
807
 
808
+ <?php
809
+ if(isset($_POST['_agca_import_settings']) && $_POST['_agca_import_settings']=='true'){
810
+ echo 'isSettingsImport = true;';
811
+ }
812
+ ?>
813
  /* <![CDATA[ */
814
  jQuery(document).ready(function() {
815
 
860
  if((get_option('agca_role_allbutadmin')==true) and ($user_level > 9)){
861
  ?>
862
  <?php } else{ ?>
863
+ <?php if(get_option('agca_admin_menu_brand')!=""){ ?>
864
+ additionalStyles = "";
865
+ if(isWPHigherOrEqualThan("3.4")){
866
+ additionalStyles = ' style="margin-bottom:-4px" ';
867
+ }
868
+ jQuery("#adminmenu").before('<div '+additionalStyles+' id="sidebar_adminmenu_logo"><img width="145" src="<?php echo get_option('agca_admin_menu_brand'); ?>" /></div>');
869
+
870
+ <?php } ?>
871
+ <?php if(get_option('agca_admin_menu_submenu_round')==true){ ?>
872
+ jQuery("#adminmenu div.wp-submenu").css("border-radius","<?php echo get_option('agca_admin_menu_submenu_round_size'); ?>px");
873
+ <?php } ?>
874
+
875
+ <?php $this->print_admin_bar_scripts(); ?>
876
 
 
 
877
 
878
  <?php if(get_option('agca_screen_options_menu')==true){ ?>
879
  jQuery("#screen-options-link-wrap").css("display","none");
888
  <?php if(get_option('agca_privacy_options')==true){ ?>
889
  jQuery("#privacy-on-link").css("display","none");
890
  <?php } ?>
 
 
 
 
 
 
891
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
892
 
893
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
894
 
895
+ <?php if(get_option('agca_update_bar')==true){ ?>
896
+ <?php
897
+ if ( ! function_exists( 'c2c_no_update_nag' ) ) :
898
+ function c2c_no_update_nag() {
899
+ remove_action( 'admin_notices', 'update_nag', 3 );
900
+ }
901
+ endif;
902
+ add_action( 'admin_init', 'c2c_no_update_nag' );
903
+ ?>
904
+ jQuery("#update-nag").css("display","none");
905
+ jQuery(".update-nag").css("display","none");
906
  <?php } ?>
907
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
908
  <?php if(get_option('agca_footer')==true){ ?>
909
  jQuery("#footer").css("display","none");
910
+ <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
911
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
912
 
913
 
914
  <?php if(get_option('agca_footer_left')!=""){ ?>
941
  jQuery("#dashboard-widgets-wrap").parent().find("h2").text("<?php echo get_option('agca_dashboard_text'); ?>");
942
  <?php } ?>
943
  <?php if(get_option('agca_dashboard_text_paragraph')!=""){ ?>
944
+ jQuery("#wpbody-content #dashboard-widgets-wrap").before('<div id="agca_custom_dashboard_content"></div>');
945
+
946
+ jQuery("#agca_custom_dashboard_content").html('<br /><p ttt style=\"text-indent:45px;\"><?php echo preg_replace('/(\r\n|\r|\n)/', '\n', addslashes(get_option('agca_dashboard_text_paragraph'))); ?></p>');
947
  <?php } ?>
948
 
949
  <?php /*Remove Dashboard widgets*/ ?>
950
  <?php
951
 
952
+ if(get_option('agca_dashboard_widget_welcome')==true){
953
+ ?>jQuery("#welcome-panel").css("display","none");<?php
954
+ }else{
955
+ ?>jQuery("#welcome-panel").css("display","block");<?php
956
+ }
957
  if(get_option('agca_dashboard_widget_rc')==true){
958
  $this->remove_dashboard_widget('dashboard_recent_comments','normal');
959
  }else{
1012
  jQuery(".wp-menu-image").each(function(){
1013
  jQuery(this).css("display","none");
1014
  });
1015
+ <?php } ?>
1016
+ <?php if(get_option('agca_admin_menu_arrow') == true){ ?>
1017
+ jQuery("#adminmenu .wp-menu-arrow").css("visibility","hidden");
1018
+
1019
+ <?php } ?>
1020
  <?php if(get_option('agca_admin_menu_turnonoff') == 'on'){ ?>
1021
 
1022
  <?php /*If Turned on*/ ?>
1119
  updateColor(jQuery(this).attr('id'),jQuery(this).val())
1120
  });
1121
  jQuery('label,h1,h2,h3,h4,h5,h6,a,p,.form-table th,.form-wrap label').css('text-shadow','none');
1122
+ jQuery('#adminmenu li.wp-menu-open').css('border','none');
1123
+ jQuery('#adminmenu li.wp-menu-open .wp-submenu').css({'border':'none','margin':'0px','border-radius':'0px'});
1124
 
1125
  <?php } ?>
1126
  <?php //COLORIZER END ?>
1127
  <?php } //end of apply for any user except admin ?>
1128
  /*Add user buttons*/
1129
+ jQuery('#ag_add_adminmenu').append(buttonsJq);
1130
+
1131
  }catch(err){
1132
  errors = "AGCA - ADMIN ERROR: " + err.name + " / " + err.message;
1133
  alert(errors);
1167
  <script type="text/javascript">
1168
  document.write('<style type="text/css">html{display:none;}</style>');
1169
  var agca_version = "<?php echo $this->agca_version; ?>";
1170
+ var wpversion = "<?php echo $wpversion; ?>";
1171
+ var isSettingsImport = false;
1172
  /* <![CDATA[ */
1173
  jQuery(document).ready(function() {
1174
  try{
1175
+ <?php if(get_option('agca_login_round_box')==true){ ?>
1176
+ jQuery("form#loginform").css("border-radius","<?php echo get_option('agca_login_round_box_size'); ?>px");
1177
+ jQuery("#login h1 a").css("border-radius","<?php echo get_option('agca_login_round_box_size'); ?>px");
1178
+ jQuery("#login h1 a").css("margin-bottom",'10px');
1179
+ jQuery("#login h1 a").css("padding-bottom",'0');
1180
+ <?php } ?>
1181
  <?php if(get_option('agca_login_banner')==true){ ?>
1182
  jQuery("#backtoblog").css("display","none");
1183
  <?php } ?>
1185
  jQuery("#backtoblog").html('<?php echo get_option('agca_login_banner_text'); ?>');
1186
  <?php } ?>
1187
  <?php if(get_option('agca_login_photo_url')==true){ ?>
1188
+ advanced_url = "<?php echo get_option('agca_login_photo_url'); ?>";
1189
  var $url = "url(" + advanced_url + ")";
1190
+ jQuery("#login h1 a").css("background",$url);
1191
  jQuery("#login h1 a").hide();
1192
  image = jQuery("<img />").attr("src",advanced_url);
1193
  jQuery(image).load(function() {
1201
  <?php } ?>
1202
  <?php if(get_option('agca_login_photo_href')==true){ ?>
1203
  var $href = "<?php echo get_option('agca_login_photo_href'); ?>";
1204
+ if($href == "%BLOG%"){
1205
+ $href = "<?php echo get_bloginfo('wpurl'); ?>";
1206
+ }
1207
  jQuery("#login h1 a").attr("href",$href);
1208
  <?php } ?>
1209
  <?php if(get_option('agca_login_photo_remove')==true){ ?>
1254
  <?php //COLORIZER END ?>
1255
  }catch(err){
1256
  alert("AGCA - LOGIN ERROR: " + err.name + " / " + err.message);
1257
+ }finally{
1258
+
1259
+ jQuery('html').show();
1260
+ jQuery('html').css("display","block");
1261
+
1262
  }
1263
  });
1264
  /* ]]> */
1275
  <script type="text/javascript" src="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>script/farbtastic.js"></script>
1276
 
1277
  <link rel="stylesheet" type="text/css" href="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>style/agca_farbtastic.css" />
1278
+ <script type="text/javascript" src="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>script/agca_farbtastic.js"></script>
1279
+ <script type="text/javascript">
1280
+ var isAGCAPage = true;
1281
+ </script>
1282
  <?php //includes ?>
1283
  <div class="wrap">
1284
  <h1 style="color:green">AG Custom Admin Settings <span style="font-size:15px;">(v<?php echo $this->agca_version; ?>)</span></h1>
1302
  <li class="normal"><a href="#login-page-settings" title="Settings for Login page">Login Page</a></li>
1303
  <li class="normal" ><a href="#admin-menu-settings" title="Settings for main admin menu">Admin Menu</a></li>
1304
  <li class="normal"><a href="#ag-colorizer-setttings" title="AG colorizer settings">Colorizer</a></li>
1305
+ <li class="normal"><a href="#ag-advanced" title="My custom scripts">Advanced</a></li>
1306
+ <li style="background:none;border:none;padding:0;"><a id="agca_donate_button" style="margin-left:8px" title="Like this plugin? You can support its future development by giving a donation by your wish " href="http://wordpress.argonius.com/donate"><img alt="Donate" src="<?php echo trailingslashit(plugins_url(basename(dirname(__FILE__)))); ?>images/btn_donate_LG.gif" /></a>
1307
  </li>
1308
  <li style="background:none;border:none;padding:0;padding-left:10px;margin-top:-7px"></li>
1309
+ </ul>
1310
+ <div id="agca_advertising">
1311
+ <ul>
1312
+ <li style="min-height:105px;display: block"></li>
1313
+ </ul>
1314
+ </div>
1315
+ <div style="clear:both"></div>
1316
  <div id="section_admin_bar" class="ag_section">
1317
  <h2 class="section_title" tabindex="-1">Admin Bar Settings Page</h2>
1318
  <br />
1356
  <label title="Change default WordPress logo with custom image." for="agca_wp_logo_custom">Change WordPress logo</label>
1357
  </th>
1358
  <td>
1359
+ <input id="agca_wp_logo_custom" title="If this field is not empty, image from provided url will be visible in top bar" type="text" size="47" name="agca_wp_logo_custom" value="<?php echo get_option('agca_wp_logo_custom'); ?>" /><input type="button" onClick="jQuery('#agca_wp_logo_custom').val('');" value="Clear" />
1360
+ &nbsp;<p><i>Put here an URL of the new top bar image ( maximum height = 28px)</i>.</p>
1361
  </td>
1362
  </tr>
1363
  <tr valign="center">
1365
  <label title="Add custom image on the top of admin content." for="agca_header_logo_custom">Custom header image</label>
1366
  </th>
1367
  <td>
1368
+ <input title="If this field is not empty, image from provided url will be visible in header" type="text" size="47" id="agca_header_logo_custom" name="agca_header_logo_custom" value="<?php echo get_option('agca_header_logo_custom'); ?>" /><input type="button" onClick="jQuery('#agca_header_logo_custom').val('');" value="Clear" />
1369
  &nbsp;<p><i>Add custom header image</i>.</p>
1370
  </td>
1371
  </tr>
1380
  <?php if($wpversion>=3.3){?>
1381
  <tr valign="center">
1382
  <th >
1383
+ <label title="Hides default WordPress top bar dropdown menus on WordPress logo and Heading" for="agca_remove_top_bar_dropdowns">Hide WordPress top bar dropdown menus</label>
1384
  </th>
1385
  <td>
1386
+ <input title="Hides default WordPress top bar dropdown menus on WordPress logo and Heading" type="checkbox" name="agca_remove_top_bar_dropdowns" value="true" <?php if (get_option('agca_remove_top_bar_dropdowns')==true) echo 'checked="checked" '; ?> />
1387
  </td>
1388
  </tr>
1389
  <tr valign="center">
1457
  <label title="Adds custom text in admin top bar. Default Wordpress heading stays intact." for="agca_custom_site_heading">Custom blog heading</label>
1458
  </th>
1459
  <td>
1460
+ <textarea title="Adds custom text in admin top bar." rows="5" name="agca_custom_site_heading" cols="40"><?php echo htmlspecialchars(get_option('agca_custom_site_heading')); ?></textarea><p><em><strong>Info: </strong>You can use HTML tags like 'h1' and/or 'a' tag</em></p>
1461
  </td>
1462
  </tr>
1463
  <tr valign="center">
1653
  <p tabindex="0"><i><strong>Info:</strong> These settings override settings in Screen options on Dashboard page.</i></p>
1654
  </td>
1655
  </tr>
1656
+ <tr valign="center">
1657
+ <th scope="row">
1658
+ <label for="agca_dashboard_widget_welcome">Hide "Welcome" WordPress Message</label>
1659
+ </th>
1660
+ <td>
1661
+ <input type="checkbox" name="agca_dashboard_widget_welcome" value="true" <?php if (get_option('agca_dashboard_widget_welcome')==true) echo 'checked="checked" '; ?> />
1662
+ </td>
1663
+ </tr>
1664
  <tr valign="center">
1665
  <th scope="row">
1666
  <label for="agca_dashboard_widget_rc">Hide "Recent Comments"</label>
1759
  <label title="If this field is not empty, image from provided url will be visible on Login page" for="agca_login_photo_url">Change Login header image</label>
1760
  </th>
1761
  <td>
1762
+ <input title="If this field is not empty, image from provided url will be visible on Login page" type="text" size="47" id="agca_login_photo_url" name="agca_login_photo_url" value="<?php echo get_option('agca_login_photo_url'); ?>" /><input type="button" onClick="jQuery('#agca_login_photo_url').val('');" value="Clear" />
1763
+ &nbsp;<p><i>Put here link of new login image. Image can be of any size and type</i>.</p>
1764
  </td>
1765
  </tr>
1766
  <tr valign="center">
1768
  <label title="Put here custom link to a web location, that will be triggered on image click" for="agca_login_photo_href">Change hyperlink on Login image</label>
1769
  </th>
1770
  <td>
1771
+ <input title="Put here custom link to a web location, that will be triggered on image click" type="text" size="47" id="agca_login_photo_href" name="agca_login_photo_href" value="<?php echo get_option('agca_login_photo_href'); ?>" /><input type="button" onClick="jQuery('#agca_login_photo_href').val('');" value="Clear" />
1772
+ &nbsp;<p><i>For blog URL use %BLOG%</i></p>
1773
  </td>
1774
  </tr>
1775
  <tr valign="center">
1780
  <input title="Remove login image completely" type="checkbox" name="agca_login_photo_remove" value="true" <?php if (get_option('agca_login_photo_remove')==true) echo 'checked="checked" '; ?> />
1781
  </td>
1782
  </tr>
1783
+ <tr valign="center">
1784
+ <th scope="row">
1785
+ <label title="Rounds box on login page" for="agca_login_round_box">Round box corners</label>
1786
+ </th>
1787
+ <td>
1788
+ <input title="Rounds box on login page" type="checkbox" name="agca_login_round_box" value="true" <?php if (get_option('agca_login_round_box')==true) echo 'checked="checked" '; ?> />
1789
+ </td>
1790
+ </tr>
1791
+ <?php
1792
+ $roundboxzizestyle = "style='display:none'";
1793
+ if (get_option('agca_login_round_box')=='true') $roundboxzizestyle = '';
1794
+ ?>
1795
+ <tr valign="center" id="agca_login_round_box_size_block" <?php echo $roundboxzizestyle; ?> >
1796
+ <th scope="row">
1797
+ <label title="Size of rounded box curve" for="agca_login_round_box_size">Round box corners - size</label>
1798
+ </th>
1799
+ <td>
1800
+ <input class="validateNumber" limit="3" title="Size of rounded box curve" type="text" name="agca_login_round_box_size" type="text" size="3" value="<?php echo get_option('agca_login_round_box_size'); ?>" />&nbsp;(px)
1801
+ </td>
1802
+ </tr>
1803
  </table>
1804
  </div>
1805
  <?php
1808
  <div id="section_admin_menu" style="display:none" class="ag_section">
1809
  <h2 class="section_title" tabindex="-1">Admin Menu Settings Page</h2>
1810
  <br />
1811
+ <p style="font-style:italic" tabindex="0"><strong>Important: </strong>Please Turn off menu configuration before activating or disabling other plugins (or making any other changes to main menu). Use "Reset Settings" button to restore default values if anything goes wrong.</p>
1812
  <br />
1813
  <table class="form-table" width="500px">
1814
  <tr valign="center" class="ag_table_major_options">
1843
  </tr>
1844
  <tr valign="center">
1845
  <th scope="row">
1846
+ <label title="This is blank space between Dashboard and Posts button (by default)" for="agca_admin_menu_separator_first">Remove first items separator</label>
1847
  </th>
1848
  <td>
1849
+ <input title="This is blank space separator between Dashboard and Posts button (by default)" type="checkbox" name="agca_admin_menu_separator_first" value="true" <?php if (get_option('agca_admin_menu_separator_first')==true) echo 'checked="checked" '; ?> />
1850
  </td>
1851
  </tr>
1852
  <tr valign="center">
1853
  <th scope="row">
1854
+ <label title="This is blank space separator between Comments and Appearance button (by default)" for="agca_admin_menu_separator_second">Remove second items separator</label>
1855
  </th>
1856
  <td>
1857
+ <input title="This is blank space separator between Comments and Appearance button (by default)" type="checkbox" name="agca_admin_menu_separator_second" value="true" <?php if (get_option('agca_admin_menu_separator_second')==true) echo 'checked="checked" '; ?> />
1858
  </td>
1859
  </tr>
1860
  <tr valign="center">
1865
  <input title="Removes small icons on admin menu buttons" type="checkbox" name="agca_admin_menu_icons" value="true" <?php if (get_option('agca_admin_menu_icons')==true) echo 'checked="checked" '; ?> />
1866
  </td>
1867
  </tr>
1868
+ <tr valign="center">
1869
+ <th scope="row">
1870
+ <label title="Removes small arrow that appears on button hover" for="agca_admin_menu_arrow">Remove submenu arrow</label>
1871
+ </th>
1872
+ <td>
1873
+ <input title="Removes small arrow that appears on button hover" type="checkbox" name="agca_admin_menu_arrow" value="true" <?php if (get_option('agca_admin_menu_arrow')==true) echo 'checked="checked" '; ?> />
1874
+ </td>
1875
+ </tr>
1876
+ <tr valign="center">
1877
+ <th scope="row">
1878
+ <label title="Rounds submenu pop-up box" for="agca_admin_menu_submenu_round">Round submenu pop-up box</label><p><i>(Use it in combination with Colorizer)</i></p>
1879
+ </th>
1880
+ <td>
1881
+ <input title="Rounds submenu pop-up box" type="checkbox" name="agca_admin_menu_submenu_round" value="true" <?php if (get_option('agca_admin_menu_submenu_round')==true) echo 'checked="checked" '; ?> />
1882
+ </td>
1883
+ </tr>
1884
+ <?php
1885
+ $roundsubmenuzizestyle = "style='display:none'";
1886
+ if (get_option('agca_admin_menu_submenu_round')=='true') $roundsubmenuzizestyle = '';
1887
+ ?>
1888
+ <tr valign="center" id="agca_admin_menu_submenu_round_block" <?php echo $roundsubmenuzizestyle; ?> >
1889
+ <th scope="row">
1890
+ <label title="Size of rounded box curve" for="agca_admin_menu_submenu_round_size">Round submenu pop-up box - size</label>
1891
+ </th>
1892
+ <td>
1893
+ <input class="validateNumber" limit="3" title="Size of rounded box curve" type="text" name="agca_admin_menu_submenu_round_size" type="text" size="3" value="<?php echo get_option('agca_admin_menu_submenu_round_size'); ?>" />&nbsp;(px)
1894
+ </td>
1895
+ </tr>
1896
+ <tr valign="center">
1897
+ <th scope="row">
1898
+ <label title="Adds custom logo above the admin menu" for="agca_admin_menu_brand">Add custom branding logo above the admin menu</label>
1899
+ </th>
1900
+ <td>
1901
+ <input title="Adds custom logo above the admin menu" type="text" size="47" name="agca_admin_menu_brand" value="<?php echo get_option('agca_admin_menu_brand'); ?>" />
1902
+ &nbsp;<p><i>Put here URL of custom branding logo image. Image can be of any size and type</i>.</p>
1903
+ </td>
1904
+ </tr>
1905
  <tr valign="center">
1906
  <td colspan="2">
1907
  <div class="ag_table_heading"><h3 tabindex="0">Add New Menu Items</h3></div>
1936
  </div>
1937
  <div id="section_ag_colorizer_settings" style="display:none" class="ag_section">
1938
  <h2 class="section_title">Colorizer Page</h2>
1939
+ <br />
 
 
1940
  <table class="form-table" width="500px">
1941
  <tr valign="center" class="ag_table_major_options">
1942
  <td><label for="agca_colorizer_turnonoff"><strong>Turn on/off Colorizer configuration</strong></label></td>
1950
  </td>
1951
  </tr>
1952
  <tr valign="center">
1953
+ <th><label title="Change admin page background color" for="color_background">Background color:</label></th>
1954
  <td><input type="text" id="color_background" name="color_background" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_background']); ?>" />
1955
  <input type="button" alt="color_background" class="pick_color_button" value="Pick color" />
1956
  <input type="button" alt="color_background" class="pick_color_button_clear" value="Clear" />
1964
  </td>
1965
  </tr>
1966
  <tr valign="center">
1967
+ <th><label title="Change admin bar (on top) color in admin panel" for="color_header">Admin bar color:</label></th>
1968
  <td><input type="text" id="color_header" name="color_header" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_header']); ?>" />
1969
  <input type="button" alt="color_header" class="pick_color_button" value="Pick color" />
1970
  <input type="button" alt="color_header" class="pick_color_button_clear" value="Clear" />
1978
  </td>
1979
  </tr>
1980
  <tr valign="center">
1981
+ <th><label title="Change button background color" for="color_admin_menu_top_button_background">Button background color:</label></th>
1982
  <td><input type="text" id="color_admin_menu_top_button_background" name="color_admin_menu_top_button_background" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_admin_menu_top_button_background']); ?>" />
1983
  <input type="button" alt="color_admin_menu_top_button_background" class="pick_color_button" value="Pick color" />
1984
  <input type="button" alt="color_admin_menu_top_button_background" class="pick_color_button_clear" value="Clear" />
1985
  </td>
1986
  </tr>
1987
+ <tr valign="center">
1988
+ <th><label title="Change button text color" for="color_admin_menu_font">Button text color:</label></th>
 
 
 
 
 
 
 
1989
  <td><input type="text" id="color_admin_menu_font" name="color_admin_menu_font" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_admin_menu_font']); ?>" />
1990
  <input type="button" alt="color_admin_menu_font" class="pick_color_button" value="Pick color" />
1991
  <input type="button" alt="color_admin_menu_font" class="pick_color_button_clear" value="Clear" />
1992
  </td>
1993
  </tr>
1994
+ <tr valign="center">
1995
+ <th><label title="Change button background color for current button" for="color_admin_menu_top_button_current_background">Button current background color:</label></th>
1996
+ <td><input type="text" id="color_admin_menu_top_button_current_background" name="color_admin_menu_top_button_current_background" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_admin_menu_top_button_current_background']); ?>" />
1997
+ <input type="button" alt="color_admin_menu_top_button_current_background" class="pick_color_button" value="Pick color" />
1998
+ <input type="button" alt="color_admin_menu_top_button_current_background" class="pick_color_button_clear" value="Clear" />
1999
+ </td>
2000
+ </tr>
2001
+ <tr valign="center">
2002
+ <th><label title="Change button background color on mouseover" for="color_admin_menu_top_button_hover_background">Button hover background color:</label></th>
2003
+ <td><input type="text" id="color_admin_menu_top_button_hover_background" name="color_admin_menu_top_button_hover_background" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_admin_menu_top_button_hover_background']); ?>" />
2004
+ <input type="button" alt="color_admin_menu_top_button_hover_background" class="pick_color_button" value="Pick color" />
2005
+ <input type="button" alt="color_admin_menu_top_button_hover_background" class="pick_color_button_clear" value="Clear" />
2006
+ </td>
2007
+ </tr>
2008
+ <tr valign="center">
2009
+ <th><label title="Change button top border color" for="color_admin_menu_submenu_border_top">Button border top color:</label></th>
2010
+ <td><input type="text" id="color_admin_menu_submenu_border_top" name="color_admin_menu_submenu_border_top" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_admin_menu_submenu_border_top']); ?>" />
2011
+ <input type="button" alt="color_admin_menu_submenu_border_top" class="pick_color_button" value="Pick color" />
2012
+ <input type="button" alt="color_admin_menu_submenu_border_top" class="pick_color_button_clear" value="Clear" />
2013
+ </td>
2014
+ </tr>
2015
+ <tr valign="center">
2016
+ <th><label title="Change button bottom border color" for="color_admin_menu_submenu_border_bottom">Button border bottom color:</label></th>
2017
+ <td><input type="text" id="color_admin_menu_submenu_border_bottom" name="color_admin_menu_submenu_border_bottom" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_admin_menu_submenu_border_bottom']); ?>" />
2018
+ <input type="button" alt="color_admin_menu_submenu_border_bottom" class="pick_color_button" value="Pick color" />
2019
+ <input type="button" alt="color_admin_menu_submenu_border_bottom" class="pick_color_button_clear" value="Clear" />
2020
+ </td>
2021
+ </tr>
2022
+ <tr valign="center">
2023
+ <th><label title="Change submenu item background color" for="color_admin_menu_submenu_background">Submenu button background color:</label></th>
2024
+ <td><input type="text" id="color_admin_menu_submenu_background" name="color_admin_menu_submenu_background" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_admin_menu_submenu_background']); ?>" />
2025
+ <input type="button" alt="color_admin_menu_submenu_background" class="pick_color_button" value="Pick color" />
2026
+ <input type="button" alt="color_admin_menu_submenu_background" class="pick_color_button_clear" value="Clear" />
2027
+ </td>
2028
+ </tr>
2029
+ <tr valign="center">
2030
+ <th><label title="Change submenu item background color on mouseover" for="color_admin_menu_submenu_background_hover">Submenu button hover background color:</label></th>
2031
+ <td><input type="text" id="color_admin_menu_submenu_background_hover" name="color_admin_menu_submenu_background_hover" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_admin_menu_submenu_background_hover']); ?>" />
2032
+ <input type="button" alt="color_admin_menu_submenu_background_hover" class="pick_color_button" value="Pick color" />
2033
+ <input type="button" alt="color_admin_menu_submenu_background_hover" class="pick_color_button_clear" value="Clear" />
2034
+ </td>
2035
+ </tr>
2036
+ <tr valign="center">
2037
+ <th><label title="Change submenu item text color" for="color_admin_submenu_font">Submenu text color:</label></th>
2038
+ <td><input type="text" id="color_admin_submenu_font" name="color_admin_submenu_font" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_admin_submenu_font']); ?>" />
2039
+ <input type="button" alt="color_admin_submenu_font" class="pick_color_button" value="Pick color" />
2040
+ <input type="button" alt="color_admin_submenu_font" class="pick_color_button_clear" value="Clear" />
2041
+ </td>
2042
+ </tr>
2043
  <?php if($wpversion >= 3.2) { ?>
2044
  <tr valign="center">
2045
  <th><label title="Change background color of element behind admin menu" for="color_admin_menu_behind_background">Wrapper background color:</label></th>
2077
  </td>
2078
  </tr>
2079
  <tr valign="center">
2080
+ <th><label title="Change color of admin bar text" for="color_font_header">Admin bar text color:</label></th>
2081
  <td><input type="text" id="color_font_header" name="color_font_header" class="color_picker" value="<?php echo htmlspecialchars($this->colorizer['color_font_header']); ?>" />
2082
  <input type="button" alt="color_font_header" class="pick_color_button" value="Pick color" />
2083
  <input type="button" alt="color_font_header" class="pick_color_button_clear" value="Clear" />
2114
  </table>
2115
  <input type="hidden" size="47" id="ag_colorizer_json" name="ag_colorizer_json" value="<?php echo htmlspecialchars(get_option('ag_colorizer_json')); ?>" />
2116
  <div id="picker"></div>
2117
+ </div>
2118
+ <div id="section_advanced" style="display:none" class="ag_section">
2119
+ <h2 class="section_title" tabindex="-1">Advanced</h2>
2120
+ <br />
2121
+ <p><i><strong>Info: </strong>These options will override existing customizations.</i></p>
2122
+ <br />
2123
+ <br /><br />
2124
+ <table class="form-table" width="500px">
2125
+ <tr valign="center">
2126
+ <th scope="row">
2127
+ <label title="Add custom CSS script to override existing styles" for="agca_script_css">Custom CSS Script</em></label>
2128
+ </th>
2129
+ <td>
2130
+ <textarea style="width:100%;height:200px" title="Add custom CSS script to override existing styles" rows="5" id="agca_custom_css" name="agca_custom_css" cols="40"><?php echo htmlspecialchars(get_option('agca_custom_css')); ?></textarea>
2131
+ </td>
2132
+ </tr>
2133
+ <tr valign="center">
2134
+ <th scope="row">
2135
+ <label title="Add additional custom JavaScript" for="agca_custom_js">Custom JavaScript</label>
2136
+ </th>
2137
+ <td>
2138
+ <textarea style="width:100%;height:200px" title="Add additional custom JavaScript" rows="5" name="agca_custom_js" id="agca_custom_js" cols="40"><?php echo htmlspecialchars(get_option('agca_custom_js')); ?></textarea>
2139
+ </td>
2140
+ </tr>
2141
+ <tr valign="center">
2142
+ <th scope="row">
2143
+ <label title="Export/import settings" for="agca_export_import">Export / import settings</label>
2144
+ </th>
2145
+ <td id="import_file_area">
2146
+ <input type="button" name="agca_export_settings" value="Export Settings" onclick="exportSettings();"/></br>
2147
+ <input type="file" id="settings_import_file" name="settings_import_file" style="display: none"/>
2148
+ <input type="hidden" id="_agca_import_settings" name="_agca_import_settings" value="false" />
2149
+ <input type="hidden" id="_agca_export_settings" name="_agca_export_settings" value="false" />
2150
+ <input type="button" name="agca_import_settings" value="Import Settings" onclick="importSettings();"/>
2151
+ </td>
2152
+
2153
+
2154
+
2155
+
2156
+ </tr>
2157
+
2158
+ </table>
2159
+ </div>
2160
  <br /><br /><br />
2161
  <p class="submit">
2162
+ <input type="button" id="save_plugin_settings" title="Save changes button" class="button-primary" value="<?php _e('Save Changes') ?>" onClick="savePluginSettings()" />
2163
+ </p>
2164
+
2165
  </form>
2166
  </div>
2167
+
2168
  <br />
2169
+ <br /><br /><br /><p id="agca_footer_support_info">WordPress 'AG Custom Admin' plugin by Argonius. If you have any questions, ideas for future development or if you found a bug or having any issues regarding this plugin, please visit plugin's <a href="http://wordpress.argonius.com/ag-custom-admin">SUPPORT</a> page. <br />You can also support development of this plugin if you <a href="http://wordpress.argonius.com/donate">Make a donation</a>. Thanks!<br /><br />I want to thank specially mr. <a href="http://www.elan42.com/">Alvise Nicoletti</a> for his support in creating new features in 1.2.6.<br /><br />Have a nice blogging!</p><br />
2170
  <?php
2171
  }
2172
  }
script/ag_script.js CHANGED
@@ -1,503 +1,700 @@
1
  var afterFormClickCreateJson = true;
2
  var editingButtonNow = false;
3
-
4
  function booleanToChecked(bool){
5
- if(bool == 'true'){
6
- return 'checked="checked"';
7
- }else if(bool == 'checked'){
8
- return 'checked="checked"';
9
- }
10
  }
11
 
12
  function hideShowSubmenus(index){
13
 
14
- var finish = false;
15
- var found = false;
16
- jQuery('#ag_edit_adminmenu td').each(function(){
17
- if(jQuery('#ag_edit_adminmenu td').index(jQuery(this)) >= index && (finish == false)){
18
- if(jQuery(this).hasClass('ag_admin_menu_child')){
19
- jQuery(this).parent().toggleClass('noclass');
20
- found = true;
21
- }
22
- if((jQuery('#ag_edit_adminmenu td').index(jQuery(this)) > index) && jQuery(this).hasClass('ag_admin_menu_parent')){
23
- finish = true;
24
- }
25
- }
26
- });
27
- /*FOCUS*/
28
- if(!jQuery('#ag_edit_adminmenu td').eq((index+2)).parent().hasClass('noclass') && (found == true)){
29
- jQuery('#ag_edit_adminmenu td').eq((index+2)).find('a').trigger('focus');
30
- };
 
 
 
 
31
  }
32
 
33
  /*
34
  Makes admin edit page pretty grouping items and submenus, and adding fancy interactions
35
  */
36
  function prettyEditMenuPage(){
37
- jQuery('#ag_edit_adminmenu td').each(function(){
38
- if(jQuery(this).hasClass('ag_admin_menu_child')){
39
- jQuery(this).parent().addClass('noclass');
40
- };
41
- });
42
- jQuery('#ag_edit_adminmenu td').each(function(){
43
- if(jQuery(this).hasClass('ag_admin_menu_parent')){
44
- jQuery(this).parent().css('background-color','#d8eAd8');
45
- jQuery(this).bind('click',function(evt){
46
- if(evt.target.className == 'ag_admin_menu_parent'){
47
- hideShowSubmenus(jQuery('#ag_edit_adminmenu td').index(this));
48
- }
49
- });
50
- };
51
- });
52
- jQuery('#ag_edit_adminmenu td > a').bind('click',function(){
53
- jQuery(this).parent().click();
54
- //jQuery(this).parent().focus();
55
- });
56
  };
57
 
58
  function createEditMenuPage(checkboxes,textboxes){
59
- /*Create menu page in AGCA settings*/
60
 
61
- //console.log(textboxes);
62
- var counter = 0;
63
- var TBlength = textboxes.length;
64
- if(textboxes==""){
65
- TBlength = 9999999;
66
- }
67
 
68
- var topElement="";
69
- jQuery('ul#adminmenu li').each(function(){
70
- if(!jQuery(this).hasClass("wp-menu-separator") && !jQuery(this).hasClass("wp-menu-separator-last") && !jQuery(this).hasClass("ag-custom-button") && (counter < TBlength )){
71
 
72
- //if subelement
73
- if(jQuery(this).parent().parent().hasClass('wp-submenu')){
74
- subElement = jQuery(this).find('a').text();
75
- //console.log(jQuery(this));
76
- //console.log(subElement);
77
- var isHidden = "";
78
- var sub_item_text_value;
79
- if(textboxes ==""){
80
- sub_item_text_value = subElement;
81
- }else{
82
- sub_item_text_value = textboxes[counter][1];
83
- isHidden = checkboxes[counter][1];
84
- }
85
- jQuery('#ag_edit_adminmenu').append("<tr><td class='ag_admin_menu_child'><div style=\"float:left\"><a tabindex=\"-1\" href=\"javascript:void(0)\" style=\"font-weight:bold;\"title=\""+topElement+" submenu: "+subElement+"\"><span style=\"font-weight:normal\">submenu: </span>"+subElement+"</a></div><div style=\"float:right\"><input type=\"checkbox\" title=\"Remove "+topElement+" submenu: "+subElement+" from menu\" class=\""+subElement+"\" "+booleanToChecked(isHidden)+" name=\"ag_edit_adminmenu_item_sub_"+counter+"\" /></div></td><td class='ag_admin_menu_child2' ><input type=\"text\" title=\"Rename submenu item "+subElement+" with this value\" class=\""+subElement+"\" size=\"47\" value=\""+sub_item_text_value+"\" name=\"ag_edit_adminmenu_item_sub_"+counter+"\" /></td></tr>");
86
- }
87
- //if top element
88
- else{
89
- topElement = jQuery(this).children('a').clone().children().remove().end().text();
90
- topElement = jQuery.trim(topElement);
91
- var top_item_text_value;
92
- var isHidden = "";
93
- if(textboxes ==""){
94
- top_item_text_value = topElement;
95
- }else{
96
- top_item_text_value = textboxes[counter][1];
97
- isHidden = checkboxes[counter][1];
98
- }
99
- jQuery('#ag_edit_adminmenu').append("<tr><td class='ag_admin_menu_parent'><br /><a tabindex=\"0\" href=\"javascript:void(0)\" >" + topElement +"</a><div style=\"float:right\"><input title=\"Remove "+topElement+" from menu\" class=\""+jQuery(this).attr("id")+"\" type=\"checkbox\" "+booleanToChecked(isHidden)+" name=\"ag_edit_adminmenu_item_top_"+counter+"\" /></div></td><td class='ag_admin_menu_parent2' ><input title=\"Rename "+topElement+" with this value\" type=\"text\" class=\""+jQuery(this).attr("id")+"\" size=\"47\" value=\""+top_item_text_value+"\" name=\"ag_edit_adminmenu_item_top_"+counter+"\" /></td></tr>");
100
- }
101
- counter++;
102
- }
103
- });
104
 
105
- //console.log(checkboxes.replace('<-TOP->','')+"|"+textboxes.replace('<-TOP->',''));
106
- prettyEditMenuPage();
 
 
107
  }
108
 
109
  function createEditMenuPageV32(checkboxes,textboxes){
110
- /*Create menu page in AGCA settings*/
111
 
112
- var counter = 0;
113
- var TBlength = textboxes.length;
114
- if(textboxes==""){
115
- TBlength = 9999999;
116
- }
117
 
118
- var topElement="";
119
- jQuery('ul#adminmenu li').each(function(){
120
- if(!jQuery(this).hasClass("wp-menu-separator") && !jQuery(this).hasClass("wp-menu-separator-last") && !jQuery(this).hasClass("ag-custom-button") && (jQuery(this).attr('id') !="collapse-menu") && (counter < TBlength )){
121
 
122
- //if subelement
123
- if(jQuery(this).parent().parent().parent().hasClass('wp-submenu')){
124
- subElement = jQuery(this).find('a').text();
125
- //console.log(jQuery(this));
126
- //console.log(subElement);
127
- var isHidden = "";
128
- var sub_item_text_value;
129
- if(textboxes ==""){
130
- sub_item_text_value = subElement;
131
- }else{
132
- sub_item_text_value = textboxes[counter][1];
133
- isHidden = checkboxes[counter][1];
134
- }
135
- jQuery('#ag_edit_adminmenu').append("<tr><td class='ag_admin_menu_child'><div style=\"float:left\"><a tabindex=\"-1\" href=\"javascript:void(0)\" style=\"font-weight:bold;\"title=\""+topElement+" submenu: "+subElement+"\"><span style=\"font-weight:normal\">submenu: </span>"+subElement+"</a></div><div style=\"float:right\"><input type=\"checkbox\" title=\"Remove "+topElement+" submenu: "+subElement+" from menu\" class=\""+subElement+"\" "+booleanToChecked(isHidden)+" name=\"ag_edit_adminmenu_item_sub_"+counter+"\" /></div></td><td class='ag_admin_menu_child2' ><input type=\"text\" title=\"Rename submenu item "+subElement+" with this value\" class=\""+subElement+"\" size=\"47\" value=\""+sub_item_text_value+"\" name=\"ag_edit_adminmenu_item_sub_"+counter+"\" /></td></tr>");
136
- }
137
- //if top element
138
- else{
139
- topElement = jQuery(this).children('a').clone().children().remove().end().text();
140
- topElement = jQuery.trim(topElement);
141
- var top_item_text_value;
142
- var isHidden = "";
143
- if(textboxes ==""){
144
- top_item_text_value = topElement;
145
- }else{
146
- top_item_text_value = textboxes[counter][1];
147
- isHidden = checkboxes[counter][1];
148
- }
149
- jQuery('#ag_edit_adminmenu').append("<tr><td class='ag_admin_menu_parent'><br /><a tabindex=\"0\" href=\"javascript:void(0)\" >" + topElement +"</a><div style=\"float:right\"><input title=\"Remove "+topElement+" from menu\" class=\""+jQuery(this).attr("id")+"\" type=\"checkbox\" "+booleanToChecked(isHidden)+" name=\"ag_edit_adminmenu_item_top_"+counter+"\" /></div></td><td class='ag_admin_menu_parent2' ><input title=\"Rename "+topElement+" with this value\" type=\"text\" class=\""+jQuery(this).attr("id")+"\" size=\"47\" value=\""+top_item_text_value+"\" name=\"ag_edit_adminmenu_item_top_"+counter+"\" /></td></tr>");
150
- }
151
- counter++;
152
- }else if(jQuery(this).attr('id') =="collapse-menu"){
153
- jQuery(this).remove();
154
- }
155
- });
156
 
157
- //console.log(checkboxes.replace('<-TOP->','')+"|"+textboxes.replace('<-TOP->',''));
158
- prettyEditMenuPage();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  }
160
 
161
  function showHideSection(text) {
162
- switch(text)
163
- {
164
- case 'Admin Bar': jQuery('#section_admin_bar').show(); jQuery('#section_admin_bar .section_title').trigger('focus');
165
- break;
166
- case 'Admin Footer': jQuery('#section_admin_footer').show(); jQuery('#section_admin_footer .section_title').trigger('focus');
167
- break;
168
- case 'Dashboard Page': jQuery('#section_dashboard_page').show(); jQuery('#section_dashboard_page .section_title').trigger('focus');
169
- break;
170
- case 'Login Page': jQuery('#section_login_page').show(); jQuery('#section_login_page .section_title').trigger('focus');
171
- break;
172
- case 'Admin Menu': jQuery('#section_admin_menu').show(); jQuery('#section_admin_menu .section_title').trigger('focus');
173
- break;
174
- case 'Colorizer': jQuery('#section_ag_colorizer_settings').show(); jQuery('#section_ag_colorizer_settings .section_title').trigger('focus');
175
- break;
176
- default: jQuery('#section_admin_bar').show(); jQuery('#section_admin_bar .section_title').trigger('focus');
177
-
178
-
179
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  }
181
 
182
  function hideAllSections(){
183
- jQuery('#ag_main_menu li').each(function(){
184
- jQuery(this).attr("class","normal");
185
- });
186
- jQuery('.ag_section').each(function(){
187
- jQuery(this).hide();
188
- });
189
  }
190
  function reloadRemoveButtonEvents(){
191
  }
192
  function createTargetCombo(target,clas){
193
 
194
- var combo = ""
195
 
196
- combo+= "<select";
197
- if( clas != null){
198
- combo+=" class=\"editTarget\" ";
199
- }
200
- combo+= ">";
201
- combo+= "<option value=\"_blank\"";
202
- if(target == "_blank"){
203
- combo+= " selected ";
204
- }
205
- combo+= ">blank</option>";
206
- combo+= "<option value=\"_self\"";
207
- if(target == "_self"){
208
- combo+= " selected ";
209
- }
210
- combo+= ">self</option>";
211
- combo+= "<option value=\"_parent\"";
212
- if(target == "_parent"){
213
- combo+= " selected ";
214
- }
215
- combo+= ">parent</option>";
216
- combo+= "<option value=\"_top\"";
217
- if(target == "_top"){
218
- combo+= " selected ";
219
- }
220
- combo+= ">top</option>";
221
- combo+= "</select>";
222
- return combo;
223
  }
224
 
225
- jQuery(document).ready(function(){
226
- jQuery('a.button_remove').live("click", function(){
227
- jQuery(this).parent().parent().remove();
228
- });
229
- jQuery('a.button_edit').live("click", function(){
230
- if(editingButtonNow == false){
231
- var name = jQuery(this).parent().find('button').text();
232
- var url = jQuery(this).parent().find('button').attr('title');
233
- var target = jQuery(this).parent().find('button').attr('target');
234
- //console.log(target);
235
- editingButtonNow = name;
236
- jQuery(this).parent().append('<div id="temporary_button_edit">name:<input type="text" size="47" value="'+name+'" id="ag_add_adminmenu_name_edit" name="ag_add_adminmenu_name_edit" />url:<input type="text" size="47" value="'+url+'" id="ag_add_adminmenu_url_edit" name="ag_add_adminmenu_url_edit" />' + createTargetCombo(target,"edit")+ '<button type="button" id="ag_add_adminmenu_button_edit" name="ag_add_adminmenu_button_edit">Save changes</button></div>');
237
- reloadRemoveButtonEvents();
238
- }
239
- });/*Save editing changes*/
240
- jQuery('#ag_add_adminmenu_button_edit').live("click", function(){
241
- //alert(jQuery(this).parent().html());
242
- var name = jQuery('#ag_add_adminmenu_name_edit').val();
243
- var url = jQuery('#ag_add_adminmenu_url_edit').val();
244
- var target = jQuery('select.editTarget').val();
245
- //var target = jQuery(this).parent().find('button').attr('target');
246
- name = name.replace(/["']{1}/gi,"");
247
- url = url.replace(/["']{1}/gi,"");
248
- jQuery('#temporary_button_edit').remove();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
 
250
- var element = 0;
251
- jQuery('#ag_add_adminmenu :button').each(function(){
252
- //dont use first button for adding new buttons
253
- if(element > 0){
254
- if(jQuery(this).html() == editingButtonNow){
255
- jQuery(this).attr('title',url);
256
- jQuery(this).attr('target',target);
257
- jQuery(this).html(name);
258
- }
259
- }
260
- element++;
261
- });
262
- editingButtonNow = false;
263
- });
 
 
 
 
264
  });
265
 
266
  jQuery(document).ready(function(){
267
- /*Add click handler on main buttons*/
268
- jQuery('#ag_main_menu a, #ag_main_menu li').bind('click',function(){
269
- hideAllSections();
270
- var text = jQuery(this).text();
271
- jQuery(this).attr("class","selected");
272
- showHideSection(text);
273
- });
274
 
275
- /*Admin Menu Reset all setings button*/
276
- jQuery('#ag_edit_adminmenu_reset_button').click(function(){
277
- afterFormClickCreateJson = false;
278
- jQuery('#agca_form').submit();
279
- });
280
 
281
- /*Add new menu item button - creates new HTMl button elements*/
282
- jQuery('#ag_add_adminmenu_button').click(function(){
283
- var name = jQuery('#ag_add_adminmenu_name').val();
284
- var url = jQuery('#ag_add_adminmenu_url').val();
285
- var target = jQuery('#ag_add_adminmenu_target').val();
286
- name = name.replace(/["']{1}/gi,"");
287
- url = url.replace(/["']{1}/gi,"");
288
- jQuery('#ag_add_adminmenu_name').val("");
289
- jQuery('#ag_add_adminmenu_url').val("");
290
- jQuery('#ag_add_adminmenu_target').val("_none");
291
- jQuery('#ag_add_adminmenu').append('<tr><td colspan="2"><button target="'+target+'" title="'+url+'" type="button">'+name+'</button>&nbsp;(<a style="cursor:pointer" class="button_edit">edit</a>)&nbsp;(<a style="cursor:pointer" class="button_remove">remove</a>)</td><td></td></tr>');
292
- reloadRemoveButtonEvents();
293
- });
294
 
295
- /*Add tooltip box*/
296
- jQuery("body").append("<div id='AGToolTipDiv'></div>");
297
 
298
- /*ToolTip*/
299
- jQuery("label[title],#agca_donate_button").each(function() {
300
- jQuery(this).hover(function(e) {
301
- jQuery(this).mousemove(function(e) {
302
- var tipY = e.pageY + 16;
303
- var tipX = e.pageX + 16;
304
- jQuery("#AGToolTipDiv").css({'top': tipY, 'left': tipX});
305
- });
306
- jQuery("#AGToolTipDiv")
307
- .html(jQuery(this).attr('title'))
308
- .stop(true,true)
309
- .fadeIn("fast");
310
- jQuery(this).removeAttr('title');
311
- }, function() {
312
- jQuery("#AGToolTipDiv")
313
- .stop(true,true)
314
- .fadeOut("fast");
315
- jQuery(this).attr('title', jQuery("#AGToolTipDiv").html());
316
- });
317
- });
 
 
 
318
 
319
- /*SECTION FOCUS*/
320
- jQuery('.section_title').focus(function(){
321
- });
322
 
323
- /*HIDE/SHOW New items click*/
324
- jQuery('input[name=agca_admin_bar_new_content]').bind("click",function(){
325
- var checked = jQuery(this).is(":checked");
326
- if(!checked){
327
- jQuery(".new_content_header_submenu").show("slide");
328
- }else{
329
- jQuery(".new_content_header_submenu").hide("slideDown");
330
- }
331
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
 
333
 
334
  });
335
 
336
  /*CLICKING ON ITEMS HANDLING*/
337
  jQuery(document).ready(function(){
338
- jQuery('#agca_footer').change(function(){
339
- });
340
  });
341
 
342
  /*Admin menu*/
343
  jQuery(document).ready(function(){
344
- jQuery('#adminmenu').css('display','block');
345
  });
346
 
347
  /*FORM SUBMITTED*/
348
- jQuery(document).ready(function(){
349
- jQuery('#agca_form').submit(function(){
350
-
351
- /*Serialize checkboxes*/
352
- var array = "{";
353
- var firstElement = true;
354
- var topMarker = "";
355
- jQuery('#ag_edit_adminmenu :checkbox').each(function(){
356
- if(firstElement != true){
357
- array += ", ";
358
- }
359
- topMarker = "";
360
- if(jQuery(this).parent().parent().hasClass('ag_admin_menu_parent')){
361
- topMarker="<-TOP->";
362
- }
363
- array += "\"" + topMarker + jQuery(this).attr('class') + "\" : ";
364
- array += "\"" + jQuery(this).attr('checked') + "\"";
365
- firstElement = false;
366
- });
367
- array += "}|";
368
-
369
- /*Serialize textboxes*/
370
- array += "{";
371
- firstElement = true;
372
- jQuery('#ag_edit_adminmenu :text').each(function(){
373
- if(firstElement != true){
374
- array += ", ";
375
- }
376
- topMarker = "";
377
- if(jQuery(this).parent().hasClass('ag_admin_menu_parent2')){
378
- topMarker="<-TOP->";
379
- }
380
- array += "\"" + topMarker + jQuery(this).attr('class') + "\" : ";
381
- array += "\"" + jQuery(this).val() + "\"";
382
- firstElement = false;
383
- });
384
- array += "}";
385
 
386
- if(afterFormClickCreateJson == true){
387
- jQuery('#ag_edit_adminmenu_json').val(array);
388
- }else{
389
- jQuery('#ag_edit_adminmenu_json').val('');
390
- }
391
- //console.log(array);
392
- //serialize buttons
393
- array = "{";
394
- var element = 0;
395
- jQuery('#ag_add_adminmenu :button').each(function(){
396
- //console.log(jQuery(this).html()+jQuery(this).attr('title'));
397
- if(element > 0){
398
- if(element > 1){
399
- array += ", ";
400
- }
401
- array += "\"" + jQuery(this).html() + "\" : {";
402
- array += " \"value\" : ";
403
- array += "\"" + jQuery(this).attr('title') + "\"";
404
- array += ", \"target\" : ";
405
- array += "\"" + jQuery(this).attr('target') + "\"}";
406
- }
407
- element++;
408
- });
409
- array += "}";
410
- if(element == 1){array="";}
411
- jQuery('#ag_add_adminmenu_json').val(array);
412
 
413
- /*Serialize colors*/
414
- var array = "{";
415
- var firstElement = true;
416
- var topMarker = "";
417
- jQuery('input.color_picker').each(function(){
418
- if(firstElement != true){
419
- array += ", ";
420
- }
421
- array += "\"" + jQuery(this).attr('id') + "\" : ";
422
- array += "\"" + jQuery(this).val() + "\"";
423
- firstElement = false;
424
- });
425
- array += "}";
426
- jQuery('#ag_colorizer_json').val(array);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
427
 
428
- return true;
429
- });
430
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
431
 
432
  /*C O L O R I Z E R*/
433
- function updateTargetColor(id, color){
434
- switch(id)
435
- {
436
- case 'color_background':
437
- jQuery('html, .wp-dialog').css({'background-color':color});
438
- break;
439
- case 'color_footer':
440
- jQuery('#footer').css({'background':color});
441
- if(wpversion >= 3.2){
442
- jQuery('#footer').css({'margin':'0','margin-left':'146px','padding':'15px'});
443
- }
444
- break;
445
- case 'color_header':
446
- jQuery('#wphead').css({'background':color});
447
- if(wpversion >= 3.2){
448
- jQuery('#wphead').css({'margin':'0','margin-left':'-14px','padding-left':'15px'});
449
- jQuery("#backtoblog").attr("style","");
450
- }
451
- break;
452
- case 'color_admin_menu_top_button_background':
453
- jQuery('#adminmenu a.menu-top').css({'background':color});
454
- break;
455
- case 'color_admin_menu_submenu_background':
456
- jQuery("#adminmenu li.wp-has-current-submenu").removeClass("wp-has-current-submenu");
457
- jQuery('#adminmenu .wp-submenu a, #adminmenu li.wp-has-current-submenu .wp-submenu a').each(function(){
458
- jQuery(this).css({'background':color});
459
- });
460
- break;
461
- case 'color_admin_menu_font':
462
- jQuery('#adminmenu, #adminmenu a, #adminmenu p').css({'color':color});
463
- break;
464
- case 'color_admin_menu_behind_background':
465
- jQuery('#adminmenuback, #adminmenuwrap').css({'background-color':color});
466
- break;
467
- case 'color_admin_menu_behind_border':
468
- jQuery('#adminmenuback, #adminmenuwrap').css({'border-color':color});
469
- break;
470
- case 'color_admin_menu_submenu_background_over':
471
- //jQuery('#adminmenu .wp-submenu a:hover').css({'background':color});
472
- break;
473
- case 'color_font_content':
474
- jQuery('#wpbody-content, #wpbody-content label, #wpbody-content p,#wpbody-content .form-table th, #wpbody-content .form-wrap label').css({'color':color});
475
- break;
476
- case 'color_font_header':
477
- jQuery('#wphead, #wphead a').css({'color':color});
478
- break;
479
- case 'color_font_footer':
480
- jQuery('#footer, #footer a').css({'color':color});
481
- break;
482
- case 'color_widget_bar':
483
- jQuery(".widget .widget-top, .postbox h3, .stuffbox h3").css({'background' : color, 'text-shadow' :'none'});
484
- break;
485
- case 'color_widget_background':
486
- jQuery(".widget, .postbox").css('background',color);
487
- //jQuery(".widget, #widget-list .widget-top, .postbox, .menu-item-settings").css('background',color); remove if <3.2 work
488
- break;
489
- default:
490
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
  }
492
  function updateColor(id,color){
493
- jQuery("#"+id).css({'background-color':color});
494
- jQuery("#"+id).val(color);
495
- if(isDarker(color) == true){
496
- jQuery("#"+id).css('color','#ffffff');
497
- }else{
498
- jQuery("#"+id).css('color','#000000');
499
- }
500
- updateTargetColor(id,color);
 
 
501
  }
502
  /*First load apply colours from fields*/
503
 
@@ -522,139 +719,199 @@ jQuery(document).ready(function(){
522
  });*/
523
  /*A J A X*/
524
  jQuery(document).ready(function(){
525
- jQuery(document).ready(function(){
526
- var url="http://wordpress.argonius.com/agca/news.php/news?jsoncallback=?";
527
- jQuery.getJSON(
528
- url,{
529
- wp_ver: wpversion,
530
- agca_ver: agca_version,
531
- format: "json"
532
- },
533
- function(json){
534
- jQuery.each(json.posts,function(i,post){
535
- jQuery('#agca_news').append('<p><strong>Info: </strong>'+post.news+'</p>');
536
- });
537
- jQuery('#agca_news p').each(function(){
538
- jQuery(this).hide();
539
- });
 
 
 
 
 
 
 
 
 
 
 
 
540
 
541
- });
542
- });
543
- setInterval(function() {
544
- if(jQuery('#agca_news p.news_online').size() == 0){
545
- jQuery('#agca_news p:first').addClass('news_online');
546
- jQuery('#agca_news p:first').show();
547
- }else{
548
- var changed = false;
549
- var finish = false;
550
- jQuery('#agca_news p').each(function(){
551
- if(finish != true){
552
- if(changed == true){
553
- jQuery(this).addClass('news_online');
554
- jQuery(this).show();
555
- finish = true;
556
- }
557
- else if(jQuery(this).hasClass('news_online')){
558
- jQuery(this).hide();
559
- jQuery(this).removeClass('news_online');
560
- changed = true;
561
- };
562
- }
563
- });
564
- if(jQuery('#agca_news p.news_online').size() == 0){
565
- jQuery('#agca_news p:first').addClass('news_online');
566
- jQuery('#agca_news p:first').show();
567
- }
568
- }
569
- }, 5000);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
570
 
571
  });
572
  /*A J A X*/
573
 
574
  function isWPHigherOrEqualThan(targetVersion){
575
- var versions = ["0.7",
576
- "0.71",
577
- "0.711",
578
- "0.72",
579
- "1.0",
580
- "1.0.1",
581
- "1.0.2",
582
- "1.2",
583
- "1.2.1",
584
- "1.2.2",
585
- "1.5",
586
- "1.5.1",
587
- "1.5.1.2",
588
- "1.5.1.3",
589
- "1.5.2",
590
- "2.0",
591
- "2.0.1",
592
- "2.0.2",
593
- "2.0.3",
594
- "2.0.4",
595
- "2.0.5",
596
- "2.0.6",
597
- "2.0.7",
598
- "2.0.8",
599
- "2.0.9",
600
- "2.0.10",
601
- "2.0.11",
602
- "2.1",
603
- "2.1.1",
604
- "2.1.2",
605
- "2.1.3",
606
- "2.2",
607
- "2.2.1",
608
- "2.2.2",
609
- "2.2.3",
610
- "2.3",
611
- "2.3.1",
612
- "2.3.2",
613
- "2.3.3",
614
- "2.5",
615
- "2.5.1",
616
- "2.6",
617
- "2.6.1",
618
- "2.6.2",
619
- "2.6.3",
620
- "2.6.5",
621
- "2.7",
622
- "2.7.1",
623
- "2.8",
624
- "2.8.1",
625
- "2.8.2",
626
- "2.8.3",
627
- "2.8.4",
628
- "2.8.5",
629
- "2.8.6",
630
- "2.9",
631
- "2.9.1",
632
- "2.9.2",
633
- "3.0",
634
- "3.0.1",
635
- "3.0.2",
636
- "3.0.3",
637
- "3.0.4",
638
- "3.0.5",
639
- "3.0.6",
640
- "3.1",
641
- "3.1.1",
642
- "3.1.2",
643
- "3.1.3",
644
- "3.1.4",
645
- "3.2",
646
- "3.2.1",
647
- "3.3",
648
- "3.3.1"];
649
- //remove sufixes, beta RC etc
650
- if (wpversion.indexOf("-")!=-1){
651
- var parts = wpversion.split("-");
652
- wpversion = parts[0];
653
- }
654
- for(var i in versions){
655
- if(versions[i] == targetVersion){
656
- if(wpversion >= targetVersion) return true;
657
- }
658
- }
659
- return false;
660
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  var afterFormClickCreateJson = true;
2
  var editingButtonNow = false;
3
+ var agca_ajax_url = agca_global_plugin_url + "ajax.php";
4
  function booleanToChecked(bool){
5
+ if(bool == 'true'){
6
+ return 'checked="checked"';
7
+ }else if(bool == 'checked'){
8
+ return 'checked="checked"';
9
+ }
10
  }
11
 
12
  function hideShowSubmenus(index){
13
 
14
+ var finish = false;
15
+ var found = false;
16
+ jQuery('#ag_edit_adminmenu td').each(function(){
17
+ if(jQuery('#ag_edit_adminmenu td').index(jQuery(this)) >= index && (finish == false)){
18
+ // jQuery(this).find('.agcaMenuEditorPlusMinus').show();
19
+ var caller = jQuery('#ag_edit_adminmenu td:eq(' + index + ')');
20
+ jQuery(caller).find('.agcaMenuEditorPlusMinus .minus').toggle();
21
+ jQuery(caller).find('.agcaMenuEditorPlusMinus .plus').toggle();
22
+ if(jQuery(this).hasClass('ag_admin_menu_child')){
23
+ jQuery(this).parent().toggleClass('noclass');
24
+ found = true;
25
+ }
26
+ if((jQuery('#ag_edit_adminmenu td').index(jQuery(this)) > index) && jQuery(this).hasClass('ag_admin_menu_parent')){
27
+ finish = true;
28
+ }
29
+ }
30
+ });
31
+ /*FOCUS*/
32
+ if(!jQuery('#ag_edit_adminmenu td').eq((index+2)).parent().hasClass('noclass') && (found == true)){
33
+ jQuery('#ag_edit_adminmenu td').eq((index+2)).find('a').trigger('focus');
34
+ };
35
  }
36
 
37
  /*
38
  Makes admin edit page pretty grouping items and submenus, and adding fancy interactions
39
  */
40
  function prettyEditMenuPage(){
41
+ jQuery('#ag_edit_adminmenu td').each(function(){
42
+ if(jQuery(this).hasClass('ag_admin_menu_child')){
43
+ jQuery(this).parent().addClass('noclass');
44
+ };
45
+ });
46
+ jQuery('#ag_edit_adminmenu td').each(function(){
47
+ if(jQuery(this).hasClass('ag_admin_menu_parent')){
48
+ jQuery(this).parent().css('background-color','#d8eAd8');
49
+ jQuery(this).bind('click',function(evt){
50
+ if(evt.target.className == 'ag_admin_menu_parent'){
51
+ hideShowSubmenus(jQuery('#ag_edit_adminmenu td').index(this));
52
+ }
53
+ });
54
+ };
55
+ });
56
+ jQuery('#ag_edit_adminmenu td > a').bind('click',function(){
57
+ jQuery(this).parent().click();
58
+ //jQuery(this).parent().focus();
59
+ });
60
  };
61
 
62
  function createEditMenuPage(checkboxes,textboxes){
63
+ /*Create menu page in AGCA settings*/
64
 
65
+ //console.log(textboxes);
66
+ var counter = 0;
67
+ var TBlength = textboxes.length;
68
+ if(textboxes==""){
69
+ TBlength = 9999999;
70
+ }
71
 
72
+ var topElement="";
73
+ jQuery('ul#adminmenu li').each(function(){
74
+ if(!jQuery(this).hasClass("wp-menu-separator") && !jQuery(this).hasClass("wp-menu-separator-last") && !jQuery(this).hasClass("ag-custom-button") && (counter < TBlength )){
75
 
76
+ //if subelement
77
+ if(jQuery(this).parent().parent().hasClass('wp-submenu')){
78
+ subElement = jQuery(this).find('a').text();
79
+ //console.log(jQuery(this));
80
+ //console.log(subElement);
81
+ var isHidden = "";
82
+ var sub_item_text_value;
83
+ if(textboxes ==""){
84
+ sub_item_text_value = subElement;
85
+ }else{
86
+ sub_item_text_value = textboxes[counter][1];
87
+ isHidden = checkboxes[counter][1];
88
+ }
89
+ jQuery('#ag_edit_adminmenu').append("<tr><td class='ag_admin_menu_child'><div style=\"float:left\"><a tabindex=\"-1\" href=\"javascript:void(0)\" style=\"font-weight:bold;\"title=\""+topElement+" submenu: "+subElement+"\"><span style=\"font-weight:normal\">submenu: </span>"+subElement+"</a></div><div style=\"float:right\"><input type=\"checkbox\" title=\"Remove "+topElement+" submenu: "+subElement+" from menu\" class=\""+subElement+"\" "+booleanToChecked(isHidden)+" name=\"ag_edit_adminmenu_item_sub_"+counter+"\" /></div></td><td class='ag_admin_menu_child2' ><input type=\"text\" title=\"Rename submenu item "+subElement+" with this value\" class=\""+subElement+"\" size=\"47\" value=\""+sub_item_text_value+"\" name=\"ag_edit_adminmenu_item_sub_"+counter+"\" /></td></tr>");
90
+ }
91
+ //if top element
92
+ else{
93
+ topElement = jQuery(this).children('a').clone().children().remove().end().text();
94
+ topElement = jQuery.trim(topElement);
95
+ var top_item_text_value;
96
+ var isHidden = "";
97
+ if(textboxes ==""){
98
+ top_item_text_value = topElement;
99
+ }else{
100
+ top_item_text_value = textboxes[counter][1];
101
+ isHidden = checkboxes[counter][1];
102
+ }
103
+ jQuery('#ag_edit_adminmenu').append("<tr><td class='ag_admin_menu_parent'><br /><span class=\"agcaMenuEditorPlusMinus\"><span class=\"plus\">+</span><span class=\"minus\">-</span></span><a tabindex=\"0\" href=\"javascript:void(0)\" >" + topElement +"</a><div style=\"float:right\"><input title=\"Remove "+topElement+" from menu\" class=\""+jQuery(this).attr("id")+"\" type=\"checkbox\" "+booleanToChecked(isHidden)+" name=\"ag_edit_adminmenu_item_top_"+counter+"\" /></div></td><td class='ag_admin_menu_parent2' ><input title=\"Rename "+topElement+" with this value\" type=\"text\" class=\""+jQuery(this).attr("id")+"\" size=\"47\" value=\""+top_item_text_value+"\" name=\"ag_edit_adminmenu_item_top_"+counter+"\" /></td></tr>");
104
+ }
105
+ counter++;
106
+ }
107
+ });
108
 
109
+ //console.log(checkboxes.replace('<-TOP->','')+"|"+textboxes.replace('<-TOP->',''));
110
+ prettyEditMenuPage();
111
+
112
+
113
  }
114
 
115
  function createEditMenuPageV32(checkboxes,textboxes){
116
+ /*Create menu page in AGCA settings*/
117
 
118
+ var counter = 0;
119
+ var TBlength = textboxes.length;
120
+ if(textboxes==""){
121
+ TBlength = 9999999;
122
+ }
123
 
124
+ var topElement="";
125
+ jQuery('ul#adminmenu li').each(function(){
126
+ if(!jQuery(this).hasClass("wp-menu-separator") && !jQuery(this).hasClass("wp-menu-separator-last") && !jQuery(this).hasClass("ag-custom-button") && (jQuery(this).attr('id') !="collapse-menu") && (counter < TBlength )){
127
 
128
+ //if subelement
129
+ if(jQuery(this).parent().parent().parent().hasClass('wp-submenu')){
130
+ subElement = jQuery(this).find('a').text();
131
+ //console.log(jQuery(this));
132
+ //console.log(subElement);
133
+ var isHidden = "";
134
+ var sub_item_text_value;
135
+ if(textboxes ==""){
136
+ sub_item_text_value = subElement;
137
+ }else{
138
+ sub_item_text_value = textboxes[counter][1];
139
+ isHidden = checkboxes[counter][1];
140
+ }
141
+ jQuery('#ag_edit_adminmenu').append("<tr><td class='ag_admin_menu_child'><div style=\"float:left\"><a tabindex=\"-1\" href=\"javascript:void(0)\" style=\"font-weight:bold;\"title=\""+topElement+" submenu: "+subElement+"\"><span style=\"font-weight:normal\">submenu: </span>"+subElement+"</a></div><div style=\"float:right\"><input type=\"checkbox\" title=\"Remove "+topElement+" submenu: "+subElement+" from menu\" class=\""+subElement+"\" "+booleanToChecked(isHidden)+" name=\"ag_edit_adminmenu_item_sub_"+counter+"\" /></div></td><td class='ag_admin_menu_child2' ><input type=\"text\" title=\"Rename submenu item "+subElement+" with this value\" class=\""+subElement+"\" size=\"47\" value=\""+sub_item_text_value+"\" name=\"ag_edit_adminmenu_item_sub_"+counter+"\" /></td></tr>");
142
+ }
143
+ //if top element
144
+ else{
145
+ topElement = jQuery(this).children('a').clone().children().remove().end().text();
146
+ topElement = jQuery.trim(topElement);
147
+ var top_item_text_value;
148
+ var isHidden = "";
149
+ if(textboxes ==""){
150
+ top_item_text_value = topElement;
151
+ }else{
152
+ top_item_text_value = textboxes[counter][1];
153
+ isHidden = checkboxes[counter][1];
154
+ }
155
+ jQuery('#ag_edit_adminmenu').append("<tr><td class='ag_admin_menu_parent'><br /><span class=\"agcaMenuEditorPlusMinus\"><span class=\"plus\">+</span><span class=\"minus\">-</span></span><a tabindex=\"0\" href=\"javascript:void(0)\" >" + topElement +"</a><div style=\"float:right\"><input title=\"Remove "+topElement+" from menu\" class=\""+jQuery(this).attr("id")+"\" type=\"checkbox\" "+booleanToChecked(isHidden)+" name=\"ag_edit_adminmenu_item_top_"+counter+"\" /></div></td><td class='ag_admin_menu_parent2' ><input title=\"Rename "+topElement+" with this value\" type=\"text\" class=\""+jQuery(this).attr("id")+"\" size=\"47\" value=\""+top_item_text_value+"\" name=\"ag_edit_adminmenu_item_top_"+counter+"\" /></td></tr>");
156
+ }
157
+ counter++;
158
+ }else if(jQuery(this).attr('id') =="collapse-menu"){
159
+ jQuery(this).remove();
160
+ }
161
+ });
162
 
163
+ //console.log(checkboxes.replace('<-TOP->','')+"|"+textboxes.replace('<-TOP->',''));
164
+ prettyEditMenuPage();
165
+
166
+ var parent = null;
167
+ var subs = 0;
168
+ jQuery('#ag_edit_adminmenu tr').each(function(){
169
+ if(jQuery(this).find('td').hasClass('ag_admin_menu_parent')){
170
+ //jQuery(this).css('color','#ffffff');
171
+ if(parent != null){
172
+ if(subs == 0){
173
+ jQuery(parent).find('.agcaMenuEditorPlusMinus').html('<span>&nbsp;&nbsp;&nbsp;</span>');
174
+ }
175
+ }
176
+ subs = 0;
177
+ parent = jQuery(this);
178
+ }else{
179
+ subs++;
180
+ }
181
+
182
+ });
183
  }
184
 
185
  function showHideSection(text) {
186
+ switch(text)
187
+ {
188
+ case 'Admin Bar':
189
+ jQuery('#section_admin_bar').show();
190
+ jQuery('#section_admin_bar .section_title').trigger('focus');
191
+ break;
192
+ case 'Admin Footer':
193
+ jQuery('#section_admin_footer').show();
194
+ jQuery('#section_admin_footer .section_title').trigger('focus');
195
+ break;
196
+ case 'Dashboard Page':
197
+ jQuery('#section_dashboard_page').show();
198
+ jQuery('#section_dashboard_page .section_title').trigger('focus');
199
+ break;
200
+ case 'Login Page':
201
+ jQuery('#section_login_page').show();
202
+ jQuery('#section_login_page .section_title').trigger('focus');
203
+ break;
204
+ case 'Admin Menu':
205
+ jQuery('#section_admin_menu').show();
206
+ jQuery('#section_admin_menu .section_title').trigger('focus');
207
+ break;
208
+ case 'Colorizer':
209
+ jQuery('#section_ag_colorizer_settings').show();
210
+ jQuery('#section_ag_colorizer_settings .section_title').trigger('focus');
211
+ break;
212
+ case 'Advanced':
213
+ jQuery('#section_advanced').show();
214
+ jQuery('#section_advanced .section_title').trigger('focus');
215
+ break;
216
+ default:
217
+ jQuery('#section_admin_bar').show();
218
+ jQuery('#section_admin_bar .section_title').trigger('focus');
219
+ }
220
  }
221
 
222
  function hideAllSections(){
223
+ jQuery('#ag_main_menu li').each(function(){
224
+ jQuery(this).attr("class","normal");
225
+ });
226
+ jQuery('.ag_section').each(function(){
227
+ jQuery(this).hide();
228
+ });
229
  }
230
  function reloadRemoveButtonEvents(){
231
  }
232
  function createTargetCombo(target,clas){
233
 
234
+ var combo = ""
235
 
236
+ combo+= "<select";
237
+ if( clas != null){
238
+ combo+=" class=\"editTarget\" ";
239
+ }
240
+ combo+= ">";
241
+ combo+= "<option value=\"_blank\"";
242
+ if(target == "_blank"){
243
+ combo+= " selected ";
244
+ }
245
+ combo+= ">blank</option>";
246
+ combo+= "<option value=\"_self\"";
247
+ if(target == "_self"){
248
+ combo+= " selected ";
249
+ }
250
+ combo+= ">self</option>";
251
+ combo+= "<option value=\"_parent\"";
252
+ if(target == "_parent"){
253
+ combo+= " selected ";
254
+ }
255
+ combo+= ">parent</option>";
256
+ combo+= "<option value=\"_top\"";
257
+ if(target == "_top"){
258
+ combo+= " selected ";
259
+ }
260
+ combo+= ">top</option>";
261
+ combo+= "</select>";
262
+ return combo;
263
  }
264
 
265
+ function exportSettings(){
266
+ jQuery('#agca_form').attr('action','tools.php?page=ag-custom-admin/plugin.php');
267
+ jQuery('#agca_form #_agca_import_settings').val("false");
268
+ jQuery('#agca_form #_agca_export_settings').val("true");
269
+ jQuery('#agca_form').submit();
270
+ }
271
+
272
+ function importSettings(){
273
+ if(jQuery('#settings_import_file').css("display") == "none"){
274
+ jQuery('#settings_import_file').show("slide");
275
+ }else{
276
+ jQuery('#agca_form').attr('action','tools.php?page=ag-custom-admin/plugin.php');
277
+ if(jQuery('#settings_import_file').val() !=""){
278
+ jQuery('#agca_form #_agca_import_settings').val("true");
279
+ jQuery('#agca_form #_agca_export_settings').val("false");
280
+ jQuery('#agca_form').attr('enctype','multipart/form-data');
281
+ jQuery('#agca_form').submit();
282
+ }else{
283
+ alert("File for import is not selected!");
284
+ }
285
+ }
286
+
287
+ }
288
+
289
+ function savePluginSettings(){
290
+ jQuery('#import_file_area').remove();
291
+ jQuery('#agca_form').submit();
292
+ }
293
+
294
+ jQuery(document).ready(function(){
295
+ jQuery('a.button_remove').live("click", function(){
296
+ jQuery(this).parent().parent().remove();
297
+ });
298
+ jQuery('a.button_edit').live("click", function(){
299
+ if(editingButtonNow == false){
300
+ var name = jQuery(this).parent().find('button').text();
301
+ var url = jQuery(this).parent().find('button').attr('title');
302
+ var target = jQuery(this).parent().find('button').attr('target');
303
+ //console.log(target);
304
+ editingButtonNow = name;
305
+ jQuery(this).parent().append('<div id="temporary_button_edit">name:<input type="text" size="47" value="'+name+'" id="ag_add_adminmenu_name_edit" name="ag_add_adminmenu_name_edit" />url:<input type="text" size="47" value="'+url+'" id="ag_add_adminmenu_url_edit" name="ag_add_adminmenu_url_edit" />' + createTargetCombo(target,"edit")+ '<button type="button" id="ag_add_adminmenu_button_edit" name="ag_add_adminmenu_button_edit">Save changes</button></div>');
306
+ reloadRemoveButtonEvents();
307
+ }
308
+ });/*Save editing changes*/
309
+ jQuery('#ag_add_adminmenu_button_edit').live("click", function(){
310
+ //alert(jQuery(this).parent().html());
311
+ var name = jQuery('#ag_add_adminmenu_name_edit').val();
312
+ var url = jQuery('#ag_add_adminmenu_url_edit').val();
313
+ var target = jQuery('select.editTarget').val();
314
+ //var target = jQuery(this).parent().find('button').attr('target');
315
+ name = name.replace(/["']{1}/gi,"");
316
+ url = url.replace(/["']{1}/gi,"");
317
+ jQuery('#temporary_button_edit').remove();
318
 
319
+ var element = 0;
320
+ jQuery('#ag_add_adminmenu :button').each(function(){
321
+ //dont use first button for adding new buttons
322
+ if(element > 0){
323
+ if(jQuery(this).html() == editingButtonNow){
324
+ jQuery(this).attr('title',url);
325
+ jQuery(this).attr('target',target);
326
+ jQuery(this).html(name);
327
+ }
328
+ }
329
+ element++;
330
+ });
331
+ editingButtonNow = false;
332
+ });
333
+
334
+ setTimeout(function(){
335
+ jQuery('#agca_advertising').show(),700
336
+ });
337
  });
338
 
339
  jQuery(document).ready(function(){
340
+ /*Add click handler on main buttons*/
341
+ jQuery('#ag_main_menu a, #ag_main_menu li').bind('click',function(){
342
+ hideAllSections();
343
+ var text = jQuery(this).text();
344
+ jQuery(this).attr("class","selected");
345
+ showHideSection(text);
346
+ });
347
 
348
+ /*Admin Menu Reset all setings button*/
349
+ jQuery('#ag_edit_adminmenu_reset_button').click(function(){
350
+ afterFormClickCreateJson = false;
351
+ jQuery('#agca_form').submit();
352
+ });
353
 
354
+ /*Add new menu item button - creates new HTMl button elements*/
355
+ jQuery('#ag_add_adminmenu_button').click(function(){
356
+ var name = jQuery('#ag_add_adminmenu_name').val();
357
+ var url = jQuery('#ag_add_adminmenu_url').val();
358
+ var target = jQuery('#ag_add_adminmenu_target').val();
359
+ name = name.replace(/["']{1}/gi,"");
360
+ url = url.replace(/["']{1}/gi,"");
361
+ jQuery('#ag_add_adminmenu_name').val("");
362
+ jQuery('#ag_add_adminmenu_url').val("");
363
+ jQuery('#ag_add_adminmenu_target').val("_none");
364
+ jQuery('#ag_add_adminmenu').append('<tr><td colspan="2"><button target="'+target+'" title="'+url+'" type="button">'+name+'</button>&nbsp;(<a style="cursor:pointer" class="button_edit">edit</a>)&nbsp;(<a style="cursor:pointer" class="button_remove">remove</a>)</td><td></td></tr>');
365
+ reloadRemoveButtonEvents();
366
+ });
367
 
368
+ /*Add tooltip box*/
369
+ jQuery("body").append("<div id='AGToolTipDiv'></div>");
370
 
371
+ /*ToolTip*/
372
+ jQuery("label[title],#agca_donate_button").each(function() {
373
+ jQuery(this).hover(function(e) {
374
+ jQuery(this).mousemove(function(e) {
375
+ var tipY = e.pageY + 16;
376
+ var tipX = e.pageX + 16;
377
+ jQuery("#AGToolTipDiv").css({
378
+ 'top': tipY,
379
+ 'left': tipX
380
+ });
381
+ });
382
+ jQuery("#AGToolTipDiv")
383
+ .html(jQuery(this).attr('title'))
384
+ .stop(true,true)
385
+ .fadeIn("fast");
386
+ jQuery(this).removeAttr('title');
387
+ }, function() {
388
+ jQuery("#AGToolTipDiv")
389
+ .stop(true,true)
390
+ .fadeOut("fast");
391
+ jQuery(this).attr('title', jQuery("#AGToolTipDiv").html());
392
+ });
393
+ });
394
 
395
+ /*SECTION FOCUS*/
396
+ jQuery('.section_title').focus(function(){
397
+ });
398
 
399
+ /*HIDE/SHOW New items click*/
400
+ jQuery('input[name=agca_admin_bar_new_content]').bind("click",function(){
401
+ var checked = jQuery(this).is(":checked");
402
+ if(!checked){
403
+ jQuery(".new_content_header_submenu").show("slide");
404
+ }else{
405
+ jQuery(".new_content_header_submenu").hide("slideDown");
406
+ }
407
+ });
408
+
409
+ /*HIDE/SHOW size of rounded box on login page*/
410
+ jQuery('input[name=agca_login_round_box]').bind("click",function(){
411
+ var checked = jQuery(this).is(":checked");
412
+ if(checked){
413
+ jQuery("#agca_login_round_box_size_block").show("slide");
414
+ }else{
415
+ jQuery("#agca_login_round_box_size_block").hide("slideDown");
416
+ }
417
+ });
418
+
419
+ /*HIDE/SHOW size of rounded submenu box on admin page*/
420
+ jQuery('input[name=agca_admin_menu_submenu_round]').bind("click",function(){
421
+ var checked = jQuery(this).is(":checked");
422
+ if(checked){
423
+ jQuery("#agca_admin_menu_submenu_round_block").show("slide");
424
+ }else{
425
+ jQuery("#agca_admin_menu_submenu_round_block").hide("slideDown");
426
+ }
427
+ });
428
 
429
 
430
  });
431
 
432
  /*CLICKING ON ITEMS HANDLING*/
433
  jQuery(document).ready(function(){
434
+ jQuery('#agca_footer').change(function(){
435
+ });
436
  });
437
 
438
  /*Admin menu*/
439
  jQuery(document).ready(function(){
440
+ jQuery('#adminmenu').css('display','block');
441
  });
442
 
443
  /*FORM SUBMITTED*/
444
+ jQuery(document).ready(function(){
445
+ jQuery('#agca_form').submit(function(){
446
+ processData();
447
+ return true;
448
+ });
449
+ });
450
+
451
+
452
+ function processData(){
453
+ /*Serialize checkboxes*/
454
+ var array = "{";
455
+ var firstElement = true;
456
+ var topMarker = "";
457
+ jQuery('#ag_edit_adminmenu :checkbox').each(function(){
458
+ if(firstElement != true){
459
+ array += ", ";
460
+ }
461
+ topMarker = "";
462
+ if(jQuery(this).parent().parent().hasClass('ag_admin_menu_parent')){
463
+ topMarker="<-TOP->";
464
+ }
465
+ array += "\"" + topMarker + jQuery(this).attr('class') + "\" : ";
466
+ array += "\"" + jQuery(this).attr('checked') + "\"";
467
+ firstElement = false;
468
+ });
469
+ array += "}|";
 
 
 
 
 
 
 
 
 
 
 
470
 
471
+ /*Serialize textboxes*/
472
+ array += "{";
473
+ firstElement = true;
474
+ jQuery('#ag_edit_adminmenu :text').each(function(){
475
+ if(firstElement != true){
476
+ array += ", ";
477
+ }
478
+ topMarker = "";
479
+ if(jQuery(this).parent().hasClass('ag_admin_menu_parent2')){
480
+ topMarker="<-TOP->";
481
+ }
482
+ array += "\"" + topMarker + jQuery(this).attr('class') + "\" : ";
483
+ array += "\"" + jQuery(this).val() + "\"";
484
+ firstElement = false;
485
+ });
486
+ array += "}";
 
 
 
 
 
 
 
 
 
 
487
 
488
+ if(afterFormClickCreateJson == true){
489
+ jQuery('#ag_edit_adminmenu_json').val(array);
490
+ }else{
491
+ jQuery('#ag_edit_adminmenu_json').val('');
492
+ }
493
+ //console.log(array);
494
+ //serialize buttons
495
+ array = "{";
496
+ var element = 0;
497
+ jQuery('#ag_add_adminmenu :button').each(function(){
498
+ //console.log(jQuery(this).html()+jQuery(this).attr('title'));
499
+ if(element > 0){
500
+ if(element > 1){
501
+ array += ", ";
502
+ }
503
+ array += "\"" + jQuery(this).html() + "\" : {";
504
+ array += " \"value\" : ";
505
+ array += "\"" + jQuery(this).attr('title') + "\"";
506
+ array += ", \"target\" : ";
507
+ array += "\"" + jQuery(this).attr('target') + "\"}";
508
+ }
509
+ element++;
510
+ });
511
+ array += "}";
512
+ if(element == 1){
513
+ array="";
514
+ }
515
+ jQuery('#ag_add_adminmenu_json').val(array);
516
 
517
+ /*Serialize colors*/
518
+ var array = "{";
519
+ var firstElement = true;
520
+ var topMarker = "";
521
+ jQuery('input.color_picker').each(function(){
522
+ if(firstElement != true){
523
+ array += ", ";
524
+ }
525
+ array += "\"" + jQuery(this).attr('id') + "\" : ";
526
+ array += "\"" + jQuery(this).val() + "\"";
527
+ firstElement = false;
528
+ });
529
+ array += "}";
530
+ if(!isSettingsImport){
531
+ jQuery('#ag_colorizer_json').val(array);
532
+ }
533
+ }
534
 
535
  /*C O L O R I Z E R*/
536
+ function updateTargetColor(id, color){
537
+ switch(id)
538
+ {
539
+ case 'color_background':
540
+ jQuery('html, .wp-dialog').css({
541
+ 'background-color':color
542
+ });
543
+ break;
544
+ case 'color_footer':
545
+ jQuery('#footer').css({
546
+ 'background':color
547
+ });
548
+ if(wpversion >= 3.2){
549
+ jQuery('#footer').css({
550
+ 'margin':'0',
551
+ 'margin-left':'146px',
552
+ 'padding':'15px'
553
+ });
554
+ }
555
+ break;
556
+ case 'color_header':
557
+ jQuery('#wphead').css({
558
+ 'background':color
559
+ });
560
+
561
+ //wp > 3.3
562
+ jQuery('#wpadminbar').css({'background':color});
563
+ jQuery('#wpadminbar .ab-top-menu').css({'background':color});
564
+
565
+ if(wpversion >= 3.2){
566
+ jQuery('#wphead').css({
567
+ 'margin':'0',
568
+ 'margin-left':'-14px',
569
+ 'padding-left':'15px'
570
+ });
571
+ jQuery("#backtoblog").attr("style","");
572
+ }
573
+ break;
574
+ case 'color_admin_menu_top_button_background':
575
+ jQuery('#adminmenu a.menu-top').css({
576
+ 'background':color
577
+ });
578
+ break;
579
+ case 'color_admin_menu_top_button_current_background':
580
+ jQuery('#adminmenu li.menu-top.wp-menu-open a.menu-top').css({
581
+ 'background':color
582
+ });
583
+ jQuery('#adminmenu li.menu-top.current a.menu-top').css({
584
+ 'background':color
585
+ });
586
+ break;
587
+ case 'color_admin_menu_top_button_hover_background':
588
+ if(color == "")break;
589
+ var selector = '#adminmenu a.menu-top';
590
+ var originalBackground = jQuery(selector).css('background-color');
591
+
592
+ //if first is selected, use second
593
+ if((jQuery(selector+":eq(0)").hasClass('current') || jQuery(selector+":eq(0)").hasClass('wp-has-current-submenu'))){
594
+ originalBackground = jQuery('#adminmenu a.menu-top:eq(1)').css('background-color');
595
+ }
596
+ jQuery(selector).mouseover(function(){
597
+ if(!(jQuery(this).hasClass('current') || jQuery(this).hasClass('wp-has-current-submenu'))){
598
+ jQuery(this).css({'background':color});
599
+ }
600
+ }).mouseout(function(){
601
+ if(!(jQuery(this).hasClass('current') || jQuery(this).hasClass('wp-has-current-submenu'))){
602
+ jQuery(this).css('background',originalBackground);
603
+ }
604
+ });
605
+
606
+
607
+ break;
608
+ case 'color_admin_menu_submenu_background':
609
+ // jQuery("#adminmenu li.wp-has-current-submenu").removeClass("wp-has-current-submenu");
610
+ jQuery('#adminmenu .wp-submenu.sub-open').remove();
611
+ jQuery('#adminmenu .wp-submenu a, #adminmenu li.wp-has-current-submenu .wp-submenu a').each(function(){
612
+ jQuery(this).css({
613
+ 'background':color
614
+ });
615
+ });
616
+ jQuery('#adminmenu .wp-submenu').css({'background':color,'margin-left':'5px','padding':'0px'});
617
+ //jQuery('#adminmenu .wp-submenu').css('border','3px solid red');
618
+ jQuery('#adminmenu .wp-submenu ul').css({'background':'none'});
619
+ jQuery('#adminmenu .wp-submenu ul').css('border','none');
620
+ jQuery('#adminmenu .wp-submenu .wp-submenu-wrap').css('border','none');
621
+
622
+ break;
623
+ case 'color_admin_submenu_font':
624
+ jQuery('#adminmenu .wp-submenu li a').css('color',color);
625
+ break;
626
+ case 'color_admin_menu_submenu_border_top':
627
+ jQuery('#adminmenu > li > a').css('border-top-color',color);
628
+ break;
629
+ case 'color_admin_menu_submenu_border_bottom':
630
+ jQuery('#adminmenu > li > a').css('border-bottom-color',color);
631
+ break;
632
+ case 'color_admin_menu_font':
633
+ jQuery('#adminmenu, #adminmenu a, #adminmenu p').css({
634
+ 'color':color
635
+ });
636
+ break;
637
+ case 'color_admin_menu_behind_background':
638
+ jQuery('#adminmenuback, #adminmenuwrap').css({
639
+ 'background-color':color
640
+ });
641
+ break;
642
+ case 'color_admin_menu_behind_border':
643
+ jQuery('#adminmenuback, #adminmenuwrap').css({
644
+ 'border-color':color
645
+ });
646
+ break;
647
+ case 'color_admin_menu_submenu_background_hover':
648
+ var submenuSelector = '#adminmenu .wp-submenu a';
649
+ var originalSubBackground = jQuery(submenuSelector).css('background-color');
650
+ jQuery(submenuSelector).mouseover(function(){
651
+ jQuery(this).css({
652
+ 'background':color
653
+ });
654
+ }).mouseout(function(){
655
+ jQuery(this).css('background',originalSubBackground);
656
+ });
657
+ //jQuery('#adminmenu .wp-submenu a:hover').css({'background':color});
658
+ break;
659
+ case 'color_font_content':
660
+ jQuery('#wpbody-content, #wpbody-content label, #wpbody-content p,#wpbody-content .form-table th, #wpbody-content .form-wrap label').css({
661
+ 'color':color
662
+ });
663
+ break;
664
+ case 'color_font_header':
665
+ jQuery('#wphead, #wphead a, #wpadminbar a, #wpadminbar span').css({
666
+ 'color':color
667
+ });
668
+ break;
669
+ case 'color_font_footer':
670
+ jQuery('#footer, #footer a').css({
671
+ 'color':color
672
+ });
673
+ break;
674
+ case 'color_widget_bar':
675
+ jQuery(".widget .widget-top, .postbox h3, .stuffbox h3").css({
676
+ 'background' : color,
677
+ 'text-shadow' :'none'
678
+ });
679
+ break;
680
+ case 'color_widget_background':
681
+ jQuery(".widget, .postbox").css('background',color);
682
+ //jQuery(".widget, #widget-list .widget-top, .postbox, .menu-item-settings").css('background',color); remove if <3.2 work
683
+ break;
684
+ default:
685
+ }
686
  }
687
  function updateColor(id,color){
688
+ jQuery("#"+id).css({
689
+ 'background-color':color
690
+ });
691
+ jQuery("#"+id).val(color);
692
+ if(isDarker(color) == true){
693
+ jQuery("#"+id).css('color','#ffffff');
694
+ }else{
695
+ jQuery("#"+id).css('color','#000000');
696
+ }
697
+ updateTargetColor(id,color);
698
  }
699
  /*First load apply colours from fields*/
700
 
719
  });*/
720
  /*A J A X*/
721
  jQuery(document).ready(function(){
722
+
723
+ //Ams
724
+ if(typeof isAGCAPage !== 'undefined'){
725
+ if(isAGCAPage == true){
726
+ //alert('admin page');
727
+ var url="http://argonius.com/ag-custom-admin/ep/ads?jsoncallback=?";
728
+ jQuery.getJSON(
729
+ url,{
730
+ wp_ver: wpversion,
731
+ agca_ver: agca_version,
732
+ format: "json"
733
+ },
734
+ function(json){
735
+ jQuery.each(json,function(i,post){
736
+ jQuery('#agca_advertising ul').append('<li><a target="_blank" href="http://www.argonius.com/ag-custom-admin/ep/ad?id=' + post.id + '" ><img height=\"100px\" src=\"'+post.src+'\" title=\"'+post.title+'\" /></a></li>');
737
+ });
738
+ jQuery('#agca_advertising').show();
739
+
740
+ });
741
+ }
742
+ }
743
+
744
+
745
+ //News
746
+ jQuery(document).ready(function(){
747
+ if(typeof isAGCAPage !== 'undefined'){
748
+ if(isAGCAPage == true){
749
 
750
+ }
751
+ }
752
+ var url="http://wordpress.argonius.com/agca/news.php/news?jsoncallback=?";
753
+ jQuery.getJSON(
754
+ url,{
755
+ wp_ver: wpversion,
756
+ agca_ver: agca_version,
757
+ format: "json"
758
+ },
759
+ function(json){
760
+ jQuery.each(json.posts,function(i,post){
761
+ jQuery('#agca_news').append('<p><strong>Info: </strong>'+post.news+'</p>');
762
+ });
763
+ jQuery('#agca_news p').each(function(){
764
+ jQuery(this).hide();
765
+ });
766
+
767
+ });
768
+ });
769
+ setInterval(function() {
770
+ if(jQuery('#agca_news p.news_online').size() == 0){
771
+ jQuery('#agca_news p:first').addClass('news_online');
772
+ jQuery('#agca_news p:first').show();
773
+ }else{
774
+ var changed = false;
775
+ var finish = false;
776
+ jQuery('#agca_news p').each(function(){
777
+ if(finish != true){
778
+ if(changed == true){
779
+ jQuery(this).addClass('news_online');
780
+ jQuery(this).show();
781
+ finish = true;
782
+ }
783
+ else if(jQuery(this).hasClass('news_online')){
784
+ jQuery(this).hide();
785
+ jQuery(this).removeClass('news_online');
786
+ changed = true;
787
+ };
788
+ }
789
+ });
790
+ if(jQuery('#agca_news p.news_online').size() == 0){
791
+ jQuery('#agca_news p:first').addClass('news_online');
792
+ jQuery('#agca_news p:first').show();
793
+ }
794
+ }
795
+ }, 5000);
796
 
797
  });
798
  /*A J A X*/
799
 
800
  function isWPHigherOrEqualThan(targetVersion){
801
+ var versions = ["0.7",
802
+ "0.71",
803
+ "0.711",
804
+ "0.72",
805
+ "1.0",
806
+ "1.0.1",
807
+ "1.0.2",
808
+ "1.2",
809
+ "1.2.1",
810
+ "1.2.2",
811
+ "1.5",
812
+ "1.5.1",
813
+ "1.5.1.2",
814
+ "1.5.1.3",
815
+ "1.5.2",
816
+ "2.0",
817
+ "2.0.1",
818
+ "2.0.2",
819
+ "2.0.3",
820
+ "2.0.4",
821
+ "2.0.5",
822
+ "2.0.6",
823
+ "2.0.7",
824
+ "2.0.8",
825
+ "2.0.9",
826
+ "2.0.10",
827
+ "2.0.11",
828
+ "2.1",
829
+ "2.1.1",
830
+ "2.1.2",
831
+ "2.1.3",
832
+ "2.2",
833
+ "2.2.1",
834
+ "2.2.2",
835
+ "2.2.3",
836
+ "2.3",
837
+ "2.3.1",
838
+ "2.3.2",
839
+ "2.3.3",
840
+ "2.5",
841
+ "2.5.1",
842
+ "2.6",
843
+ "2.6.1",
844
+ "2.6.2",
845
+ "2.6.3",
846
+ "2.6.5",
847
+ "2.7",
848
+ "2.7.1",
849
+ "2.8",
850
+ "2.8.1",
851
+ "2.8.2",
852
+ "2.8.3",
853
+ "2.8.4",
854
+ "2.8.5",
855
+ "2.8.6",
856
+ "2.9",
857
+ "2.9.1",
858
+ "2.9.2",
859
+ "3.0",
860
+ "3.0.1",
861
+ "3.0.2",
862
+ "3.0.3",
863
+ "3.0.4",
864
+ "3.0.5",
865
+ "3.0.6",
866
+ "3.1",
867
+ "3.1.1",
868
+ "3.1.2",
869
+ "3.1.3",
870
+ "3.1.4",
871
+ "3.2",
872
+ "3.2.1",
873
+ "3.3",
874
+ "3.3.1",
875
+ "3.3.2",
876
+ "3.4",
877
+ "3.4.1",
878
+ "3.4.2",
879
+ "3.5"];
880
+ //remove sufixes, beta RC etc
881
+ if (wpversion.indexOf("-")!=-1){
882
+ var parts = wpversion.split("-");
883
+ wpversion = parts[0];
884
+ }
885
+ for(var i in versions){
886
+ if(versions[i] == targetVersion){
887
+ if(wpversion >= targetVersion) return true;
888
+ }
889
+ }
890
+ return false;
891
+ }
892
+
893
+
894
+ //VALIDATION
895
+ jQuery(document).ready(function() {
896
+ jQuery(".validateNumber").live('keydown',function(event) {
897
+ // Allow only backspace and delete
898
+ var limit = jQuery(this).attr('limit');
899
+ var value = jQuery(this).val();
900
+
901
+ if ( event.keyCode == 46 || event.keyCode == 8 ) {
902
+ } else {
903
+ if((typeof(limit) != undefined) && value.length >= limit){
904
+ return false;
905
+ }
906
+ if (event.keyCode < 95) {
907
+ if (event.keyCode < 48 || event.keyCode > 57 ) {
908
+ event.preventDefault();
909
+ }
910
+ } else {
911
+ if (event.keyCode < 96 || event.keyCode > 105 ) {
912
+ event.preventDefault();
913
+ }
914
+ }
915
+ }
916
+ });
917
+ });
style/ag_style.css CHANGED
@@ -105,4 +105,47 @@ td.ag_admin_menu_parent:hover{
105
  }
106
  #agca_news a{
107
  color:green;
108
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  }
106
  #agca_news a{
107
  color:green;
108
+ }
109
+ #agca_advertising{
110
+ display:block;
111
+ width:100%;
112
+ height: 100px;
113
+ /*background-color: #cccccc;*/
114
+ padding: 0;
115
+ margin: 0;
116
+ }
117
+ #agca_advertising ul{
118
+ padding: 0;
119
+ margin: 0;
120
+ padding-right:5px;
121
+ }
122
+ #agca_advertising > ul > li{
123
+ float:left;
124
+ margin-right: 6px;
125
+ cursor: pointer;
126
+ }
127
+ #agca_form{
128
+ min-width: 835px;/*used for agca menu lineup*/
129
+ }
130
+ .ag-custom-button{
131
+
132
+ /* margin-bottom:-4px !important;*/
133
+ }
134
+ #sidebar_adminmenu_logo{
135
+ margin-bottom: -33px;
136
+ min-height: 28px;
137
+ }
138
+
139
+ .agcaMenuEditorPlusMinus .plus{
140
+ padding-right: 4px;
141
+ }
142
+ .agcaMenuEditorPlusMinus .minus{
143
+ padding-right: 9px;
144
+ display: none;
145
+ }
146
+
147
+ .agcaMenuEditorPlusMinus{
148
+ cursor: default;
149
+ width:10px;
150
+ }
151
+