Version Description
- Fixed issue with comment editing
- Implemented JavaScript error catching
Download this release
Release Info
Developer | vasyl_m |
Plugin | Advanced Access Manager |
Version | 1.0 |
Comparing to | |
See all releases |
Version 1.0
- core/class-mvb_coreplugin.php +62 -0
- core/class-mvb_coretemplate.php +121 -0
- css/images/ajax-loader.gif +0 -0
- css/images/info.png +0 -0
- css/images/linkedin.png +0 -0
- css/images/logo.png +0 -0
- css/images/share_facebook.png +0 -0
- css/images/share_friend.png +0 -0
- css/images/twitter.png +0 -0
- css/images/xit.gif +0 -0
- css/tooltip/black.png +0 -0
- css/tooltip/black_arrow.png +0 -0
- css/tooltip/black_arrow_big.png +0 -0
- css/tooltip/black_big.png +0 -0
- css/tooltip/white.png +0 -0
- css/tooltip/white_arrow.png +0 -0
- css/tooltip/white_arrow_big.png +0 -0
- css/tooltip/white_big.png +0 -0
- css/ui/images/pbar-ani.gif +0 -0
- css/ui/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- css/ui/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- css/ui/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- css/ui/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- css/ui/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- css/ui/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- css/ui/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- css/ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- css/ui/images/ui-icons_222222_256x240.png +0 -0
- css/ui/images/ui-icons_2e83ff_256x240.png +0 -0
- css/ui/images/ui-icons_454545_256x240.png +0 -0
- css/ui/images/ui-icons_888888_256x240.png +0 -0
- css/ui/images/ui-icons_cd0a0a_256x240.png +0 -0
- css/ui/jquery.ui.accordion.css +19 -0
- css/ui/jquery.ui.all.css +11 -0
- css/ui/jquery.ui.autocomplete.css +53 -0
- css/ui/jquery.ui.base.css +6 -0
- css/ui/jquery.ui.button.css +38 -0
- css/ui/jquery.ui.core.css +41 -0
- css/ui/jquery.ui.datepicker.css +68 -0
- css/ui/jquery.ui.dialog.css +21 -0
- css/ui/jquery.ui.progressbar.css +11 -0
- css/ui/jquery.ui.resizable.css +25 -0
- css/ui/jquery.ui.selectable.css +10 -0
- css/ui/jquery.ui.slider.css +24 -0
- css/ui/jquery.ui.tabs.css +18 -0
- css/ui/jquery.ui.theme.css +252 -0
- css/wpaccess_style.css +326 -0
- js/admin-options.js +605 -0
- js/jquery.tools.min.js +145 -0
- js/ui/jquery-ui.min.js +259 -0
- module/class-module_filtermenu.php +174 -0
- module/class-module_filtermetabox.php +79 -0
- module/class-module_optionmanager.php +420 -0
- module/class-module_roles.php +61 -0
- module/class-module_user.php +57 -0
- mvb_config.php +63 -0
- mvb_functions.php +36 -0
- mvb_labels.php +211 -0
- mvb_wp_access.php +612 -0
- readme.txt +127 -0
- screenshot-1.jpg +0 -0
- screenshot-2.jpg +0 -0
- screenshot-3.jpg +0 -0
- templates/admin_options.html +286 -0
core/class-mvb_coreplugin.php
ADDED
@@ -0,0 +1,62 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Copyright (C) <2011> Vasyl Martyniuk <martyniuk.vasyl@gmail.com>
|
5 |
+
|
6 |
+
This program is free software: you can redistribute it and/or modify
|
7 |
+
it under the terms of the GNU General Public License as published by
|
8 |
+
the Free Software Foundation, either version 3 of the License, or
|
9 |
+
(at your option) any later version.
|
10 |
+
|
11 |
+
This program is distributed in the hope that it will be useful,
|
12 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
+
GNU General Public License for more details.
|
15 |
+
|
16 |
+
You should have received a copy of the GNU General Public License
|
17 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
18 |
+
|
19 |
+
*/
|
20 |
+
|
21 |
+
class mvb_corePlugin {
|
22 |
+
|
23 |
+
function __construct() {
|
24 |
+
|
25 |
+
if (is_admin()) {
|
26 |
+
$this->scripts();
|
27 |
+
$this->styles();
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
function styles() {
|
32 |
+
wp_enqueue_style('dashboard');
|
33 |
+
wp_enqueue_style('global');
|
34 |
+
wp_enqueue_style('wp-admin');
|
35 |
+
}
|
36 |
+
|
37 |
+
function scripts() {
|
38 |
+
wp_enqueue_script('postbox');
|
39 |
+
wp_enqueue_script('dashboard');
|
40 |
+
wp_enqueue_script('thickbox');
|
41 |
+
wp_enqueue_script('media-upload');
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Create a potbox widget
|
46 |
+
*/
|
47 |
+
function postbox($id, $title, $content) {
|
48 |
+
$content = '
|
49 |
+
<div id="' . $id . '" class="postbox">
|
50 |
+
<div class="handlediv" title="Click to toggle"><br /></div>
|
51 |
+
<h3 class="hndle"><span>' . $title . '</span></h3>
|
52 |
+
<div class="inside">
|
53 |
+
' . $content . '
|
54 |
+
</div>
|
55 |
+
</div>';
|
56 |
+
|
57 |
+
return $content;
|
58 |
+
}
|
59 |
+
|
60 |
+
}
|
61 |
+
|
62 |
+
?>
|
core/class-mvb_coretemplate.php
ADDED
@@ -0,0 +1,121 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Copyright (C) <2011> Vasyl Martyniuk <martyniuk.vasyl@gmail.com>
|
5 |
+
|
6 |
+
This program is free software: you can redistribute it and/or modify
|
7 |
+
it under the terms of the GNU General Public License as published by
|
8 |
+
the Free Software Foundation, either version 3 of the License, or
|
9 |
+
(at your option) any later version.
|
10 |
+
|
11 |
+
This program is distributed in the hope that it will be useful,
|
12 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
+
GNU General Public License for more details.
|
15 |
+
|
16 |
+
You should have received a copy of the GNU General Public License
|
17 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
18 |
+
|
19 |
+
*/
|
20 |
+
|
21 |
+
/*
|
22 |
+
* Template worker
|
23 |
+
*
|
24 |
+
* This class is helper for working with HTML files
|
25 |
+
*
|
26 |
+
* @version 1.0
|
27 |
+
*/
|
28 |
+
class mvb_coreTemplate {
|
29 |
+
|
30 |
+
/*
|
31 |
+
* Read template from file
|
32 |
+
*
|
33 |
+
* Read file
|
34 |
+
*
|
35 |
+
* @param string Absolute path to file with template
|
36 |
+
* @return mixed Return string on success and False if failed
|
37 |
+
*/
|
38 |
+
|
39 |
+
function readTemplate($path) {
|
40 |
+
if ($path) {
|
41 |
+
$handle = fopen($path, "rb");
|
42 |
+
if ($handle) {
|
43 |
+
$template = fread($handle, filesize($path));
|
44 |
+
fclose($handle);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
return ($template? $template :FALSE);
|
49 |
+
}
|
50 |
+
/*
|
51 |
+
* Get subpart from template
|
52 |
+
*
|
53 |
+
* Searching for specified subpart in template and return subpart's content
|
54 |
+
* if found. Example of subpart -
|
55 |
+
* <!-- ###HELLO_WORLD### begin-->Some content<!-- ###HELLO_WORLD### end-->
|
56 |
+
*
|
57 |
+
* @param string Subpart name
|
58 |
+
* @param string Template to search in
|
59 |
+
* @return string
|
60 |
+
*/
|
61 |
+
|
62 |
+
public function retrieveSub($subTemplate, $template) {
|
63 |
+
$subPart = '';
|
64 |
+
$regExp = '/<!\-\-[\s]?###' . $subTemplate . '###[\s]?begin\-\->';
|
65 |
+
$regExp .= '(.*)<!\-\-[\s]?###' . $subTemplate . '###[\s]?end\-\->/si';
|
66 |
+
|
67 |
+
if (preg_match($regExp, $template, $matches)) {
|
68 |
+
$subPart = $matches[1];
|
69 |
+
}
|
70 |
+
|
71 |
+
return $subPart;
|
72 |
+
}
|
73 |
+
|
74 |
+
/*
|
75 |
+
* Replace subpart with content
|
76 |
+
*
|
77 |
+
* Find proper subpart and replace it with content
|
78 |
+
*
|
79 |
+
* @param string Subpart name
|
80 |
+
* @param string HTML content to replace with
|
81 |
+
* @param string Template to search and replace in
|
82 |
+
* @return string Template with replaced subpart
|
83 |
+
*/
|
84 |
+
|
85 |
+
public function replaceSub($subTemplate, $content, $template) {
|
86 |
+
$result = '';
|
87 |
+
|
88 |
+
$regExp = '/<!\-\-[\s]?###' . $subTemplate . '###[\s]?begin\-\->';
|
89 |
+
$regExp .= '.*<!\-\-[\s]?###' . $subTemplate . '###[\s]?end\-\->/si';
|
90 |
+
|
91 |
+
return $template = preg_replace($regExp, $content, $template);
|
92 |
+
}
|
93 |
+
|
94 |
+
/*
|
95 |
+
* Update markers in template
|
96 |
+
*
|
97 |
+
* Take array with key => value pair and replace key with value
|
98 |
+
* Example of a marker - ###hello_world###
|
99 |
+
*
|
100 |
+
* @param array key => value pair array
|
101 |
+
* @param string HTML template
|
102 |
+
* @return string HTML template with replaced markers
|
103 |
+
*/
|
104 |
+
|
105 |
+
public function updateMarkers($markers, $template) {
|
106 |
+
if (is_array($markers)) {
|
107 |
+
foreach($markers as $marker => $content){
|
108 |
+
$template = str_replace($marker, $content, $template);
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
return $template;
|
113 |
+
}
|
114 |
+
|
115 |
+
public function clearTemplate($template, $pattern = '/(###[a-z0-9_\-]+###)/si'){
|
116 |
+
|
117 |
+
return preg_replace($pattern, '', $template);
|
118 |
+
}
|
119 |
+
|
120 |
+
}
|
121 |
+
?>
|
css/images/ajax-loader.gif
ADDED
Binary file
|
css/images/info.png
ADDED
Binary file
|
css/images/linkedin.png
ADDED
Binary file
|
css/images/logo.png
ADDED
Binary file
|
css/images/share_facebook.png
ADDED
Binary file
|
css/images/share_friend.png
ADDED
Binary file
|
css/images/twitter.png
ADDED
Binary file
|
css/images/xit.gif
ADDED
Binary file
|
css/tooltip/black.png
ADDED
Binary file
|
css/tooltip/black_arrow.png
ADDED
Binary file
|
css/tooltip/black_arrow_big.png
ADDED
Binary file
|
css/tooltip/black_big.png
ADDED
Binary file
|
css/tooltip/white.png
ADDED
Binary file
|
css/tooltip/white_arrow.png
ADDED
Binary file
|
css/tooltip/white_arrow_big.png
ADDED
Binary file
|
css/tooltip/white_big.png
ADDED
Binary file
|
css/ui/images/pbar-ani.gif
ADDED
Binary file
|
css/ui/images/ui-bg_flat_0_aaaaaa_40x100.png
ADDED
Binary file
|
css/ui/images/ui-bg_flat_75_ffffff_40x100.png
ADDED
Binary file
|
css/ui/images/ui-bg_glass_55_fbf9ee_1x400.png
ADDED
Binary file
|
css/ui/images/ui-bg_glass_65_ffffff_1x400.png
ADDED
Binary file
|
css/ui/images/ui-bg_glass_75_dadada_1x400.png
ADDED
Binary file
|
css/ui/images/ui-bg_glass_75_e6e6e6_1x400.png
ADDED
Binary file
|
css/ui/images/ui-bg_glass_95_fef1ec_1x400.png
ADDED
Binary file
|
css/ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png
ADDED
Binary file
|
css/ui/images/ui-icons_222222_256x240.png
ADDED
Binary file
|
css/ui/images/ui-icons_2e83ff_256x240.png
ADDED
Binary file
|
css/ui/images/ui-icons_454545_256x240.png
ADDED
Binary file
|
css/ui/images/ui-icons_888888_256x240.png
ADDED
Binary file
|
css/ui/images/ui-icons_cd0a0a_256x240.png
ADDED
Binary file
|
css/ui/jquery.ui.accordion.css
ADDED
@@ -0,0 +1,19 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* jQuery UI Accordion 1.8.12
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Accordion#theming
|
9 |
+
*/
|
10 |
+
/* IE/Win - Fix animation bug - #4615 */
|
11 |
+
.ui-accordion { width: 100%; }
|
12 |
+
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
13 |
+
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
14 |
+
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important;}
|
15 |
+
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
|
16 |
+
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
17 |
+
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
18 |
+
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
19 |
+
.ui-accordion .ui-accordion-content-active { display: block; }
|
css/ui/jquery.ui.all.css
ADDED
@@ -0,0 +1,11 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* jQuery UI CSS Framework 1.8.12
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Theming
|
9 |
+
*/
|
10 |
+
@import "jquery.ui.base.css";
|
11 |
+
@import "jquery.ui.theme.css";
|
css/ui/jquery.ui.autocomplete.css
ADDED
@@ -0,0 +1,53 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* jQuery UI Autocomplete 1.8.12
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Autocomplete#theming
|
9 |
+
*/
|
10 |
+
.ui-autocomplete { position: absolute; cursor: default; }
|
11 |
+
|
12 |
+
/* workarounds */
|
13 |
+
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
14 |
+
|
15 |
+
/*
|
16 |
+
* jQuery UI Menu 1.8.12
|
17 |
+
*
|
18 |
+
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
19 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20 |
+
* http://jquery.org/license
|
21 |
+
*
|
22 |
+
* http://docs.jquery.com/UI/Menu#theming
|
23 |
+
*/
|
24 |
+
.ui-menu {
|
25 |
+
list-style:none;
|
26 |
+
padding: 2px;
|
27 |
+
margin: 0;
|
28 |
+
display:block;
|
29 |
+
float: left;
|
30 |
+
}
|
31 |
+
.ui-menu .ui-menu {
|
32 |
+
margin-top: -3px;
|
33 |
+
}
|
34 |
+
.ui-menu .ui-menu-item {
|
35 |
+
margin:0;
|
36 |
+
padding: 0;
|
37 |
+
zoom: 1;
|
38 |
+
float: left;
|
39 |
+
clear: left;
|
40 |
+
width: 100%;
|
41 |
+
}
|
42 |
+
.ui-menu .ui-menu-item a {
|
43 |
+
text-decoration:none;
|
44 |
+
display:block;
|
45 |
+
padding:.2em .4em;
|
46 |
+
line-height:1.5;
|
47 |
+
zoom:1;
|
48 |
+
}
|
49 |
+
.ui-menu .ui-menu-item a.ui-state-hover,
|
50 |
+
.ui-menu .ui-menu-item a.ui-state-active {
|
51 |
+
font-weight: normal;
|
52 |
+
margin: -1px;
|
53 |
+
}
|
css/ui/jquery.ui.base.css
ADDED
@@ -0,0 +1,6 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
@import url("jquery.ui.core.css");
|
2 |
+
@import url("jquery.ui.accordion.css");
|
3 |
+
@import url("jquery.ui.button.css");
|
4 |
+
@import url("jquery.ui.dialog.css");
|
5 |
+
@import url("jquery.ui.tabs.css");
|
6 |
+
@import url("jquery.ui.progressbar.css");
|
css/ui/jquery.ui.button.css
ADDED
@@ -0,0 +1,38 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* jQuery UI Button 1.8.12
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Button#theming
|
9 |
+
*/
|
10 |
+
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
11 |
+
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
12 |
+
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
13 |
+
.ui-button-icons-only { width: 3.4em; }
|
14 |
+
button.ui-button-icons-only { width: 3.7em; }
|
15 |
+
|
16 |
+
/*button text element */
|
17 |
+
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
18 |
+
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
19 |
+
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
20 |
+
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
21 |
+
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
|
22 |
+
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
23 |
+
/* no icon support for input elements, provide padding by default */
|
24 |
+
input.ui-button { padding: .4em 1em; }
|
25 |
+
|
26 |
+
/*button icon element(s) */
|
27 |
+
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
28 |
+
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
29 |
+
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
30 |
+
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
31 |
+
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
32 |
+
|
33 |
+
/*button sets*/
|
34 |
+
.ui-buttonset { margin-right: 7px; }
|
35 |
+
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
36 |
+
|
37 |
+
/* workarounds */
|
38 |
+
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
css/ui/jquery.ui.core.css
ADDED
@@ -0,0 +1,41 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* jQuery UI CSS Framework 1.8.12
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Theming/API
|
9 |
+
*/
|
10 |
+
|
11 |
+
/* Layout helpers
|
12 |
+
----------------------------------*/
|
13 |
+
.ui-helper-hidden { display: none; }
|
14 |
+
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
15 |
+
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
16 |
+
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
17 |
+
.ui-helper-clearfix { display: inline-block; }
|
18 |
+
/* required comment for clearfix to work in Opera \*/
|
19 |
+
* html .ui-helper-clearfix { height:1%; }
|
20 |
+
.ui-helper-clearfix { display:block; }
|
21 |
+
/* end clearfix */
|
22 |
+
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
23 |
+
|
24 |
+
|
25 |
+
/* Interaction Cues
|
26 |
+
----------------------------------*/
|
27 |
+
.ui-state-disabled { cursor: default !important; }
|
28 |
+
|
29 |
+
|
30 |
+
/* Icons
|
31 |
+
----------------------------------*/
|
32 |
+
|
33 |
+
/* states and images */
|
34 |
+
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
35 |
+
|
36 |
+
|
37 |
+
/* Misc visuals
|
38 |
+
----------------------------------*/
|
39 |
+
|
40 |
+
/* Overlays */
|
41 |
+
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
css/ui/jquery.ui.datepicker.css
ADDED
@@ -0,0 +1,68 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* jQuery UI Datepicker 1.8.12
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Datepicker#theming
|
9 |
+
*/
|
10 |
+
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
11 |
+
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
12 |
+
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
13 |
+
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
14 |
+
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
15 |
+
.ui-datepicker .ui-datepicker-next { right:2px; }
|
16 |
+
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
17 |
+
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
18 |
+
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
19 |
+
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
20 |
+
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
21 |
+
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
22 |
+
.ui-datepicker select.ui-datepicker-month,
|
23 |
+
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
24 |
+
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
25 |
+
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
26 |
+
.ui-datepicker td { border: 0; padding: 1px; }
|
27 |
+
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
28 |
+
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
29 |
+
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
30 |
+
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
31 |
+
|
32 |
+
/* with multiple calendars */
|
33 |
+
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
34 |
+
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
35 |
+
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
36 |
+
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
37 |
+
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
38 |
+
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
39 |
+
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
40 |
+
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
41 |
+
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
42 |
+
.ui-datepicker-row-break { clear:both; width:100%; }
|
43 |
+
|
44 |
+
/* RTL support */
|
45 |
+
.ui-datepicker-rtl { direction: rtl; }
|
46 |
+
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
47 |
+
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
48 |
+
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
49 |
+
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
50 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
51 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
52 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
53 |
+
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
54 |
+
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
55 |
+
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
56 |
+
|
57 |
+
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
58 |
+
.ui-datepicker-cover {
|
59 |
+
display: none; /*sorry for IE5*/
|
60 |
+
display/**/: block; /*sorry for IE5*/
|
61 |
+
position: absolute; /*must have*/
|
62 |
+
z-index: -1; /*must have*/
|
63 |
+
filter: mask(); /*must have*/
|
64 |
+
top: -4px; /*must have*/
|
65 |
+
left: -4px; /*must have*/
|
66 |
+
width: 200px; /*must have*/
|
67 |
+
height: 200px; /*must have*/
|
68 |
+
}
|
css/ui/jquery.ui.dialog.css
ADDED
@@ -0,0 +1,21 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* jQuery UI Dialog 1.8.12
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Dialog#theming
|
9 |
+
*/
|
10 |
+
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
|
11 |
+
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
12 |
+
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
13 |
+
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
14 |
+
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
15 |
+
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
16 |
+
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
17 |
+
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
18 |
+
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
19 |
+
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
20 |
+
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
21 |
+
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
css/ui/jquery.ui.progressbar.css
ADDED
@@ -0,0 +1,11 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* jQuery UI Progressbar 1.8.12
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Progressbar#theming
|
9 |
+
*/
|
10 |
+
.ui-progressbar { height:2em; text-align: left; }
|
11 |
+
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
|
css/ui/jquery.ui.resizable.css
ADDED
@@ -0,0 +1,25 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* jQuery UI Resizable 1.8.12
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Resizable#theming
|
9 |
+
*/
|
10 |
+
.ui-resizable { position: relative;}
|
11 |
+
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;
|
12 |
+
/* http://bugs.jqueryui.com/ticket/7233
|
13 |
+
- Resizable: resizable handles fail to work in IE if transparent and content overlaps
|
14 |
+
*/
|
15 |
+
background-image:url(data:);
|
16 |
+
}
|
17 |
+
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
18 |
+
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
19 |
+
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
20 |
+
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
21 |
+
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
22 |
+
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
23 |
+
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
24 |
+
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
25 |
+
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}
|
css/ui/jquery.ui.selectable.css
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* jQuery UI Selectable 1.8.12
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Selectable#theming
|
9 |
+
*/
|
10 |
+
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
css/ui/jquery.ui.slider.css
ADDED
@@ -0,0 +1,24 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* jQuery UI Slider 1.8.12
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Slider#theming
|
9 |
+
*/
|
10 |
+
.ui-slider { position: relative; text-align: left; }
|
11 |
+
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
12 |
+
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
13 |
+
|
14 |
+
.ui-slider-horizontal { height: .8em; }
|
15 |
+
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
16 |
+
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
17 |
+
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
18 |
+
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
19 |
+
|
20 |
+
.ui-slider-vertical { width: .8em; height: 100px; }
|
21 |
+
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
22 |
+
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
23 |
+
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
24 |
+
.ui-slider-vertical .ui-slider-range-max { top: 0; }
|
css/ui/jquery.ui.tabs.css
ADDED
@@ -0,0 +1,18 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* jQuery UI Tabs 1.8.12
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Tabs#theming
|
9 |
+
*/
|
10 |
+
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
11 |
+
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
12 |
+
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
13 |
+
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
14 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
|
15 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
16 |
+
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
17 |
+
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
18 |
+
.ui-tabs .ui-tabs-hide { display: none !important; }
|
css/ui/jquery.ui.theme.css
ADDED
@@ -0,0 +1,252 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* jQuery UI CSS Framework 1.8.12
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Theming/API
|
9 |
+
*
|
10 |
+
* To view and modify this theme, visit http://jqueryui.com/themeroller/
|
11 |
+
*/
|
12 |
+
|
13 |
+
|
14 |
+
/* Component containers
|
15 |
+
----------------------------------*/
|
16 |
+
.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; }
|
17 |
+
.ui-widget .ui-widget { font-size: 1em; }
|
18 |
+
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; }
|
19 |
+
.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; }
|
20 |
+
.ui-widget-content a { color: #222222/*{fcContent}*/; }
|
21 |
+
.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; }
|
22 |
+
.ui-widget-header a { color: #222222/*{fcHeader}*/; }
|
23 |
+
|
24 |
+
/* Interaction states
|
25 |
+
----------------------------------*/
|
26 |
+
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; }
|
27 |
+
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; }
|
28 |
+
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; }
|
29 |
+
.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; }
|
30 |
+
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; }
|
31 |
+
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; }
|
32 |
+
.ui-widget :active { outline: none; }
|
33 |
+
|
34 |
+
/* Interaction Cues
|
35 |
+
----------------------------------*/
|
36 |
+
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; }
|
37 |
+
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; }
|
38 |
+
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; }
|
39 |
+
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; }
|
40 |
+
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; }
|
41 |
+
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
42 |
+
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
43 |
+
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
44 |
+
|
45 |
+
/* Icons
|
46 |
+
----------------------------------*/
|
47 |
+
|
48 |
+
/* states and images */
|
49 |
+
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
|
50 |
+
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
|
51 |
+
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; }
|
52 |
+
.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; }
|
53 |
+
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; }
|
54 |
+
.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; }
|
55 |
+
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; }
|
56 |
+
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; }
|
57 |
+
|
58 |
+
/* positioning */
|
59 |
+
.ui-icon-carat-1-n { background-position: 0 0; }
|
60 |
+
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
61 |
+
.ui-icon-carat-1-e { background-position: -32px 0; }
|
62 |
+
.ui-icon-carat-1-se { background-position: -48px 0; }
|
63 |
+
.ui-icon-carat-1-s { background-position: -64px 0; }
|
64 |
+
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
65 |
+
.ui-icon-carat-1-w { background-position: -96px 0; }
|
66 |
+
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
67 |
+
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
68 |
+
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
69 |
+
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
70 |
+
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
71 |
+
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
72 |
+
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
73 |
+
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
74 |
+
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
75 |
+
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
76 |
+
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
77 |
+
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
78 |
+
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
79 |
+
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
80 |
+
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
81 |
+
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
82 |
+
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
83 |
+
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
84 |
+
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
85 |
+
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
86 |
+
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
87 |
+
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
88 |
+
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
89 |
+
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
90 |
+
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
91 |
+
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
92 |
+
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
93 |
+
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
94 |
+
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
95 |
+
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
96 |
+
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
97 |
+
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
98 |
+
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
99 |
+
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
100 |
+
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
101 |
+
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
102 |
+
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
103 |
+
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
104 |
+
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
105 |
+
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
106 |
+
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
107 |
+
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
108 |
+
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
109 |
+
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
110 |
+
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
111 |
+
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
112 |
+
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
113 |
+
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
114 |
+
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
115 |
+
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
116 |
+
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
117 |
+
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
118 |
+
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
119 |
+
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
120 |
+
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
121 |
+
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
122 |
+
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
123 |
+
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
124 |
+
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
125 |
+
.ui-icon-extlink { background-position: -32px -80px; }
|
126 |
+
.ui-icon-newwin { background-position: -48px -80px; }
|
127 |
+
.ui-icon-refresh { background-position: -64px -80px; }
|
128 |
+
.ui-icon-shuffle { background-position: -80px -80px; }
|
129 |
+
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
130 |
+
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
131 |
+
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
132 |
+
.ui-icon-folder-open { background-position: -16px -96px; }
|
133 |
+
.ui-icon-document { background-position: -32px -96px; }
|
134 |
+
.ui-icon-document-b { background-position: -48px -96px; }
|
135 |
+
.ui-icon-note { background-position: -64px -96px; }
|
136 |
+
.ui-icon-mail-closed { background-position: -80px -96px; }
|
137 |
+
.ui-icon-mail-open { background-position: -96px -96px; }
|
138 |
+
.ui-icon-suitcase { background-position: -112px -96px; }
|
139 |
+
.ui-icon-comment { background-position: -128px -96px; }
|
140 |
+
.ui-icon-person { background-position: -144px -96px; }
|
141 |
+
.ui-icon-print { background-position: -160px -96px; }
|
142 |
+
.ui-icon-trash { background-position: -176px -96px; }
|
143 |
+
.ui-icon-locked { background-position: -192px -96px; }
|
144 |
+
.ui-icon-unlocked { background-position: -208px -96px; }
|
145 |
+
.ui-icon-bookmark { background-position: -224px -96px; }
|
146 |
+
.ui-icon-tag { background-position: -240px -96px; }
|
147 |
+
.ui-icon-home { background-position: 0 -112px; }
|
148 |
+
.ui-icon-flag { background-position: -16px -112px; }
|
149 |
+
.ui-icon-calendar { background-position: -32px -112px; }
|
150 |
+
.ui-icon-cart { background-position: -48px -112px; }
|
151 |
+
.ui-icon-pencil { background-position: -64px -112px; }
|
152 |
+
.ui-icon-clock { background-position: -80px -112px; }
|
153 |
+
.ui-icon-disk { background-position: -96px -112px; }
|
154 |
+
.ui-icon-calculator { background-position: -112px -112px; }
|
155 |
+
.ui-icon-zoomin { background-position: -128px -112px; }
|
156 |
+
.ui-icon-zoomout { background-position: -144px -112px; }
|
157 |
+
.ui-icon-search { background-position: -160px -112px; }
|
158 |
+
.ui-icon-wrench { background-position: -176px -112px; }
|
159 |
+
.ui-icon-gear { background-position: -192px -112px; }
|
160 |
+
.ui-icon-heart { background-position: -208px -112px; }
|
161 |
+
.ui-icon-star { background-position: -224px -112px; }
|
162 |
+
.ui-icon-link { background-position: -240px -112px; }
|
163 |
+
.ui-icon-cancel { background-position: 0 -128px; }
|
164 |
+
.ui-icon-plus { background-position: -16px -128px; }
|
165 |
+
.ui-icon-plusthick { background-position: -32px -128px; }
|
166 |
+
.ui-icon-minus { background-position: -48px -128px; }
|
167 |
+
.ui-icon-minusthick { background-position: -64px -128px; }
|
168 |
+
.ui-icon-close { background-position: -80px -128px; }
|
169 |
+
.ui-icon-closethick { background-position: -96px -128px; }
|
170 |
+
.ui-icon-key { background-position: -112px -128px; }
|
171 |
+
.ui-icon-lightbulb { background-position: -128px -128px; }
|
172 |
+
.ui-icon-scissors { background-position: -144px -128px; }
|
173 |
+
.ui-icon-clipboard { background-position: -160px -128px; }
|
174 |
+
.ui-icon-copy { background-position: -176px -128px; }
|
175 |
+
.ui-icon-contact { background-position: -192px -128px; }
|
176 |
+
.ui-icon-image { background-position: -208px -128px; }
|
177 |
+
.ui-icon-video { background-position: -224px -128px; }
|
178 |
+
.ui-icon-script { background-position: -240px -128px; }
|
179 |
+
.ui-icon-alert { background-position: 0 -144px; }
|
180 |
+
.ui-icon-info { background-position: -16px -144px; }
|
181 |
+
.ui-icon-notice { background-position: -32px -144px; }
|
182 |
+
.ui-icon-help { background-position: -48px -144px; }
|
183 |
+
.ui-icon-check { background-position: -64px -144px; }
|
184 |
+
.ui-icon-bullet { background-position: -80px -144px; }
|
185 |
+
.ui-icon-radio-off { background-position: -96px -144px; }
|
186 |
+
.ui-icon-radio-on { background-position: -112px -144px; }
|
187 |
+
.ui-icon-pin-w { background-position: -128px -144px; }
|
188 |
+
.ui-icon-pin-s { background-position: -144px -144px; }
|
189 |
+
.ui-icon-play { background-position: 0 -160px; }
|
190 |
+
.ui-icon-pause { background-position: -16px -160px; }
|
191 |
+
.ui-icon-seek-next { background-position: -32px -160px; }
|
192 |
+
.ui-icon-seek-prev { background-position: -48px -160px; }
|
193 |
+
.ui-icon-seek-end { background-position: -64px -160px; }
|
194 |
+
.ui-icon-seek-start { background-position: -80px -160px; }
|
195 |
+
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
196 |
+
.ui-icon-seek-first { background-position: -80px -160px; }
|
197 |
+
.ui-icon-stop { background-position: -96px -160px; }
|
198 |
+
.ui-icon-eject { background-position: -112px -160px; }
|
199 |
+
.ui-icon-volume-off { background-position: -128px -160px; }
|
200 |
+
.ui-icon-volume-on { background-position: -144px -160px; }
|
201 |
+
.ui-icon-power { background-position: 0 -176px; }
|
202 |
+
.ui-icon-signal-diag { background-position: -16px -176px; }
|
203 |
+
.ui-icon-signal { background-position: -32px -176px; }
|
204 |
+
.ui-icon-battery-0 { background-position: -48px -176px; }
|
205 |
+
.ui-icon-battery-1 { background-position: -64px -176px; }
|
206 |
+
.ui-icon-battery-2 { background-position: -80px -176px; }
|
207 |
+
.ui-icon-battery-3 { background-position: -96px -176px; }
|
208 |
+
.ui-icon-circle-plus { background-position: 0 -192px; }
|
209 |
+
.ui-icon-circle-minus { background-position: -16px -192px; }
|
210 |
+
.ui-icon-circle-close { background-position: -32px -192px; }
|
211 |
+
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
212 |
+
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
213 |
+
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
214 |
+
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
215 |
+
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
216 |
+
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
217 |
+
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
218 |
+
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
219 |
+
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
220 |
+
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
221 |
+
.ui-icon-circle-check { background-position: -208px -192px; }
|
222 |
+
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
223 |
+
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
224 |
+
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
225 |
+
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
226 |
+
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
227 |
+
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
228 |
+
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
229 |
+
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
230 |
+
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
231 |
+
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
232 |
+
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
233 |
+
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
234 |
+
|
235 |
+
|
236 |
+
/* Misc visuals
|
237 |
+
----------------------------------*/
|
238 |
+
|
239 |
+
/* Corner radius */
|
240 |
+
.ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; }
|
241 |
+
.ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; }
|
242 |
+
.ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; }
|
243 |
+
.ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
|
244 |
+
.ui-corner-top { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; }
|
245 |
+
.ui-corner-bottom { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
|
246 |
+
.ui-corner-right { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
|
247 |
+
.ui-corner-left { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; }
|
248 |
+
.ui-corner-all { -moz-border-radius: 4px/*{cornerRadius}*/; -webkit-border-radius: 4px/*{cornerRadius}*/; border-radius: 4px/*{cornerRadius}*/; }
|
249 |
+
|
250 |
+
/* Overlays */
|
251 |
+
.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; }
|
252 |
+
.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; }
|
css/wpaccess_style.css
ADDED
@@ -0,0 +1,326 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
#wp-access{
|
2 |
+
display:none;
|
3 |
+
}
|
4 |
+
|
5 |
+
#metabox-list{
|
6 |
+
margin-top: 20px;
|
7 |
+
}
|
8 |
+
|
9 |
+
#current-role-display{
|
10 |
+
font-weight: bold;
|
11 |
+
}
|
12 |
+
|
13 |
+
.new-capability{
|
14 |
+
float:left;
|
15 |
+
}
|
16 |
+
|
17 |
+
.additional-panel{
|
18 |
+
width: 100%;
|
19 |
+
margin-top: 10px;
|
20 |
+
height: auto;
|
21 |
+
}
|
22 |
+
|
23 |
+
.plugin-logo{
|
24 |
+
background: url('images/logo.png') no-repeat;
|
25 |
+
float:left;
|
26 |
+
margin:10px 0 10px 30px;
|
27 |
+
width:40px;
|
28 |
+
height:40px;
|
29 |
+
}
|
30 |
+
|
31 |
+
.delete-role-table{
|
32 |
+
width:100%;
|
33 |
+
}
|
34 |
+
|
35 |
+
.delete-role-table tr:hover{
|
36 |
+
background-color: #E6E6E6;
|
37 |
+
cursor: pointer;
|
38 |
+
}
|
39 |
+
|
40 |
+
.dialog{
|
41 |
+
display:none;
|
42 |
+
}
|
43 |
+
|
44 |
+
#new-role-name{
|
45 |
+
font-size: 10px;
|
46 |
+
width:150px;
|
47 |
+
}
|
48 |
+
|
49 |
+
.new-role-name-empty{
|
50 |
+
position:absolute;
|
51 |
+
margin: 5px 0 0 7px;
|
52 |
+
color: #9E9B9B;
|
53 |
+
font: 11px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif
|
54 |
+
}
|
55 |
+
|
56 |
+
.initiate-url-empty{
|
57 |
+
position:absolute;
|
58 |
+
margin: 8px 0 0 7px;
|
59 |
+
color: #9E9B9B;
|
60 |
+
font: 12px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif
|
61 |
+
}
|
62 |
+
|
63 |
+
.delete-role-table td{
|
64 |
+
font-size: 12px;
|
65 |
+
padding: 3px 0px;
|
66 |
+
}
|
67 |
+
|
68 |
+
.message-active{
|
69 |
+
display:block;
|
70 |
+
float:left;
|
71 |
+
width:70%;
|
72 |
+
margin: 5px 0;
|
73 |
+
}
|
74 |
+
.message-passive{
|
75 |
+
display:none;
|
76 |
+
}
|
77 |
+
|
78 |
+
.plugin-title{
|
79 |
+
float:left;
|
80 |
+
margin:0px 0 0 15px;
|
81 |
+
}
|
82 |
+
|
83 |
+
.misc-role-section{
|
84 |
+
margin: 10px 0 0 10px;
|
85 |
+
}
|
86 |
+
|
87 |
+
.change-role{
|
88 |
+
font-size: 10px;
|
89 |
+
}
|
90 |
+
|
91 |
+
.misc-role-section label{
|
92 |
+
font-size: 11px;
|
93 |
+
}
|
94 |
+
|
95 |
+
#role-select{
|
96 |
+
margin-top: 5px;
|
97 |
+
}
|
98 |
+
|
99 |
+
#new-role-message-ok, #new-role-message-error{
|
100 |
+
display:none;
|
101 |
+
}
|
102 |
+
|
103 |
+
.mainmenu-subitem-whole{
|
104 |
+
width:100%;
|
105 |
+
margin-bottom: 5px;
|
106 |
+
}
|
107 |
+
.mainmenu-subitem{
|
108 |
+
width: 200px;
|
109 |
+
float: left;
|
110 |
+
}
|
111 |
+
|
112 |
+
.capability-item{
|
113 |
+
width: 200px;
|
114 |
+
margin-bottom: 5px;
|
115 |
+
float:left;
|
116 |
+
font-size: 11px;
|
117 |
+
}
|
118 |
+
|
119 |
+
#capability-form input{
|
120 |
+
width: 85%;
|
121 |
+
}
|
122 |
+
|
123 |
+
.submenu-holder{
|
124 |
+
padding: 2px 0 5px 3px;
|
125 |
+
}
|
126 |
+
|
127 |
+
.ajax-loader-big{
|
128 |
+
background: url('images/ajax-loader.gif') no-repeat;
|
129 |
+
width:100px;
|
130 |
+
height:100px;
|
131 |
+
z-index:1999;
|
132 |
+
position: absolute;
|
133 |
+
top:0px;
|
134 |
+
left:0px;
|
135 |
+
}
|
136 |
+
|
137 |
+
.loading-new{
|
138 |
+
opacity : 0.4;
|
139 |
+
filter: alpha(opacity=40);
|
140 |
+
}
|
141 |
+
|
142 |
+
.tooltip {
|
143 |
+
display:none;
|
144 |
+
background:url(tooltip/black_big.png);
|
145 |
+
height:163px;
|
146 |
+
padding:25px 30px 10px 30px;
|
147 |
+
width:310px;
|
148 |
+
font-size:11px;
|
149 |
+
color:#fff;
|
150 |
+
z-index: 1000;
|
151 |
+
}
|
152 |
+
/*
|
153 |
+
.tooltip {
|
154 |
+
display:none;
|
155 |
+
background-color:#ffa;
|
156 |
+
border:1px solid #cc9;
|
157 |
+
padding:3px;
|
158 |
+
font-size:13px;
|
159 |
+
-moz-box-shadow: 2px 2px 11px #666;
|
160 |
+
-webkit-box-shadow: 2px 2px 11px #666;
|
161 |
+
}
|
162 |
+
|
163 |
+
*/
|
164 |
+
|
165 |
+
.description-table{
|
166 |
+
width: 100%;
|
167 |
+
}
|
168 |
+
|
169 |
+
.description-table td{
|
170 |
+
font-size:11px;
|
171 |
+
}
|
172 |
+
|
173 |
+
.tooltip a{
|
174 |
+
color: #ff853c;
|
175 |
+
font-weight: bold;
|
176 |
+
}
|
177 |
+
|
178 |
+
.info{
|
179 |
+
font-weight: bold;
|
180 |
+
}
|
181 |
+
|
182 |
+
#progressbar{
|
183 |
+
height: 22px;
|
184 |
+
width:98%;
|
185 |
+
margin-left: auto;
|
186 |
+
margin-right: auto;
|
187 |
+
display:none;
|
188 |
+
}
|
189 |
+
|
190 |
+
.ui-progressbar-value {
|
191 |
+
background-image: url(ui/images/pbar-ani.gif);
|
192 |
+
}
|
193 |
+
|
194 |
+
.metaboxlist-holder{
|
195 |
+
margin-top: 10px;
|
196 |
+
}
|
197 |
+
|
198 |
+
.metabox-item{
|
199 |
+
width: 280px;
|
200 |
+
float:left;
|
201 |
+
margin-left: 10px;
|
202 |
+
}
|
203 |
+
|
204 |
+
.metabox-description th{
|
205 |
+
text-align: right;
|
206 |
+
font-size: 10px;
|
207 |
+
padding-top: 5px;
|
208 |
+
}
|
209 |
+
|
210 |
+
.metabox-description td{
|
211 |
+
padding: 5px 0 0 15px;
|
212 |
+
}
|
213 |
+
|
214 |
+
.initiate-url-text{
|
215 |
+
width:70%;
|
216 |
+
}
|
217 |
+
|
218 |
+
#metabox-wpaccess-general p{
|
219 |
+
text-align: justify;
|
220 |
+
}
|
221 |
+
|
222 |
+
.default-roles{
|
223 |
+
float:right;
|
224 |
+
}
|
225 |
+
|
226 |
+
.capability-name{
|
227 |
+
float:left;
|
228 |
+
}
|
229 |
+
|
230 |
+
.info{
|
231 |
+
float: left;
|
232 |
+
}
|
233 |
+
.capability-delete{
|
234 |
+
width: 10px;
|
235 |
+
height: 10px;
|
236 |
+
background: url(images/xit.gif) no-repeat;
|
237 |
+
margin-top:2px;
|
238 |
+
float: left;
|
239 |
+
margin-left: 10px;
|
240 |
+
cursor: pointer;
|
241 |
+
}
|
242 |
+
|
243 |
+
|
244 |
+
.capability-delete:hover{
|
245 |
+
background: url(images/xit.gif) no-repeat -10px 0;
|
246 |
+
}
|
247 |
+
|
248 |
+
.capability-description{
|
249 |
+
width: 10px;
|
250 |
+
height: 10px;
|
251 |
+
background: url(images/info.png) no-repeat;
|
252 |
+
margin-top:2px;
|
253 |
+
margin-left: 10px;
|
254 |
+
cursor: pointer;
|
255 |
+
}
|
256 |
+
|
257 |
+
|
258 |
+
.capability-description:hover{
|
259 |
+
background: url(images/info.png) no-repeat -10px 0;
|
260 |
+
}
|
261 |
+
|
262 |
+
/* SEXY BOOKMARKS */
|
263 |
+
div.sexy-bookmarks {
|
264 |
+
margin:10px 0 0 0;
|
265 |
+
clear: both;
|
266 |
+
}
|
267 |
+
|
268 |
+
div.sexy-bookmarks ul.socials {
|
269 |
+
background:transparent none;
|
270 |
+
border:0 none;
|
271 |
+
outline:0 none;
|
272 |
+
}
|
273 |
+
|
274 |
+
div.sexy-bookmarks ul.socials li {
|
275 |
+
display:inline;
|
276 |
+
float:left;
|
277 |
+
list-style-type:none;
|
278 |
+
margin:0;
|
279 |
+
height:29px;
|
280 |
+
width:55px;
|
281 |
+
cursor:pointer;
|
282 |
+
padding:0;
|
283 |
+
background-color:transparent;
|
284 |
+
border:0 none;
|
285 |
+
outline:0 none;
|
286 |
+
}
|
287 |
+
|
288 |
+
div.sexy-bookmarks ul.socials a {
|
289 |
+
display:block !important;
|
290 |
+
width:50px !important;
|
291 |
+
height:29px !important;
|
292 |
+
text-indent: -9999px !important;
|
293 |
+
background-color:transparent !important;
|
294 |
+
}
|
295 |
+
|
296 |
+
.sexy-mail {
|
297 |
+
background: url('images/share_friend.png') no-repeat bottom;
|
298 |
+
}
|
299 |
+
.sexy-mail:hover {
|
300 |
+
background: url('images/share_friend.png') no-repeat top;
|
301 |
+
}
|
302 |
+
|
303 |
+
.sexy-facebook {
|
304 |
+
background: url('images/share_facebook.png') no-repeat bottom;
|
305 |
+
}
|
306 |
+
.sexy-facebook:hover {
|
307 |
+
background: url('images/share_facebook.png') no-repeat top;
|
308 |
+
}
|
309 |
+
|
310 |
+
.sexy-twitter {
|
311 |
+
background: url('images/twitter.png') no-repeat bottom;
|
312 |
+
}
|
313 |
+
.sexy-twitter:hover {
|
314 |
+
background: url('images/twitter.png') no-repeat top;
|
315 |
+
}
|
316 |
+
|
317 |
+
.sexy-linkedin {
|
318 |
+
background: url('images/linkedin.png') no-repeat bottom;
|
319 |
+
}
|
320 |
+
.sexy-linkedin:hover {
|
321 |
+
background: url('images/linkedin.png') no-repeat top;
|
322 |
+
}
|
323 |
+
|
324 |
+
#emergency-curl{
|
325 |
+
display : none;
|
326 |
+
}
|
js/admin-options.js
ADDED
@@ -0,0 +1,605 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
Copyright (C) <2011> Vasyl Martyniuk <martyniuk.vasyl@gmail.com>
|
3 |
+
|
4 |
+
This program is free software: you can redistribute it and/or modify
|
5 |
+
it under the terms of the GNU General Public License as published by
|
6 |
+
the Free Software Foundation, either version 3 of the License, or
|
7 |
+
(at your option) any later version.
|
8 |
+
|
9 |
+
This program is distributed in the hope that it will be useful,
|
10 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12 |
+
GNU General Public License for more details.
|
13 |
+
|
14 |
+
You should have received a copy of the GNU General Public License
|
15 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16 |
+
|
17 |
+
*/
|
18 |
+
|
19 |
+
function mvbam_object(){
|
20 |
+
/*
|
21 |
+
* Indicates how many changes happend on form
|
22 |
+
*
|
23 |
+
* @var int
|
24 |
+
* @access private
|
25 |
+
*/
|
26 |
+
this.formChanged = 0;
|
27 |
+
|
28 |
+
/*
|
29 |
+
* Array of pre-defined capabilities for default WP roles
|
30 |
+
*
|
31 |
+
* @var array
|
32 |
+
* @access private
|
33 |
+
*/
|
34 |
+
this.roleCapabilities = {
|
35 |
+
radio2 : ['moderate_comments', 'manage_categories', 'manage_links', 'upload_files',
|
36 |
+
'unfiltered_html', 'edit_posts', 'edit_others_posts', 'edit_published_posts',
|
37 |
+
'publish_posts', 'edit_pages', 'read', 'level_7', 'level_6', 'level_5', 'level_4',
|
38 |
+
'level_3', 'level_2', 'level_1', 'level_0', 'edit_others_pages', 'edit_published_pages',
|
39 |
+
'publish_pages', 'delete_pages', 'delete_others_pages', 'delete_published_pages',
|
40 |
+
'delete_posts', 'delete_others_posts', 'delete_published_posts', 'delete_private_posts',
|
41 |
+
'read_private_posts', 'delete_private_pages', 'edit_private_pages', 'read_private_pages'],
|
42 |
+
radio3 : ['upload_files', 'edit_posts', 'edit_others_posts', 'edit_published_posts',
|
43 |
+
'publish_posts', 'read', 'level_2', 'level_1', 'level_0', 'delete_posts', 'delete_published_posts',],
|
44 |
+
radio4 : ['edit_posts', 'read', 'level_1', 'level_0', 'delete_posts'],
|
45 |
+
radio5 : ['read', 'level_0']
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
/*
|
50 |
+
* **
|
51 |
+
*/
|
52 |
+
mvbam_object.prototype.addNewRole = function(){
|
53 |
+
var newRoleTitle = jQuery.trim(jQuery('#new-role-name').val());
|
54 |
+
if (!newRoleTitle){
|
55 |
+
jQuery('#new-role-name').effect('highlight',3000);
|
56 |
+
return;
|
57 |
+
}
|
58 |
+
jQuery('#new-role-name').val('');
|
59 |
+
jQuery('.new-role-name-empty').show();
|
60 |
+
this.showAjaxLoader('#tabs');
|
61 |
+
var params = {
|
62 |
+
'action' : 'mvbam',
|
63 |
+
'sub_action' : 'create_role',
|
64 |
+
'_ajax_nonce': wpaccessLocal.nonce,
|
65 |
+
'role' : newRoleTitle
|
66 |
+
};
|
67 |
+
var _this = this;
|
68 |
+
jQuery.post(ajaxurl, params, function(data){
|
69 |
+
if (data.result == 'success'){
|
70 |
+
var nOption = '<option value="'+data.new_role+'">'+newRoleTitle+'</option>';
|
71 |
+
jQuery('#role option:last').after(nOption);
|
72 |
+
jQuery('#role').val(data.new_role);
|
73 |
+
_this.getRoleOptionList(data.new_role);
|
74 |
+
jQuery('div #new-role-form').hide();
|
75 |
+
jQuery('.change-role').show();
|
76 |
+
//jQuery('#new-role-message-error').hide();
|
77 |
+
jQuery('.delete-role-table tbody').append(data.html);
|
78 |
+
jQuery('#new-role-message-ok').show().delay(2000).hide('slow');
|
79 |
+
|
80 |
+
}else{
|
81 |
+
_this.removeAjaxLoader('#tabs');
|
82 |
+
// jQuery('#new-role-message-ok').hide();
|
83 |
+
jQuery('#new-role-message-error').show().delay(2000).hide('slow');
|
84 |
+
}
|
85 |
+
}, 'json');
|
86 |
+
}
|
87 |
+
|
88 |
+
mvbam_object.prototype.showAjaxLoader = function(selector){
|
89 |
+
jQuery(selector).addClass('loading-new');
|
90 |
+
jQuery(selector).prepend('<div class="ajax-loader-big"></div>');
|
91 |
+
jQuery('.ajax-loader-big').css({
|
92 |
+
top: 150,
|
93 |
+
left: jQuery(selector).width()/2 - 25
|
94 |
+
});
|
95 |
+
}
|
96 |
+
|
97 |
+
mvbam_object.prototype.getRoleOptionList = function(currentRoleID){
|
98 |
+
this.showAjaxLoader('#tabs');
|
99 |
+
|
100 |
+
var params = {
|
101 |
+
'action' : 'render_rolelist',
|
102 |
+
'_ajax_nonce': wpaccessLocal.nonce,
|
103 |
+
'role' : currentRoleID
|
104 |
+
};
|
105 |
+
jQuery('#current_role').val(currentRoleID);
|
106 |
+
var _this = this;
|
107 |
+
jQuery.post(wpaccessLocal.handlerURL, params, function(data){
|
108 |
+
jQuery('#tabs').tabs('destroy');
|
109 |
+
jQuery('#tabs').replaceWith(data.html);
|
110 |
+
_this.configureElements();
|
111 |
+
jQuery('div #role-select').hide();
|
112 |
+
jQuery('#current-role-display').html(jQuery('#role option:selected').text());
|
113 |
+
jQuery('.change-role').show();
|
114 |
+
//hide or show Restore Default according to server options
|
115 |
+
if (data.restorable){
|
116 |
+
//sorry to lazy to create my own style :)
|
117 |
+
jQuery('#delete-action').show();
|
118 |
+
}else{
|
119 |
+
jQuery('#delete-action').hide();
|
120 |
+
}
|
121 |
+
}, 'json');
|
122 |
+
}
|
123 |
+
|
124 |
+
mvbam_object.prototype.configureElements = function(){
|
125 |
+
this.configureMainMenu();
|
126 |
+
this.configureMetaboxes();
|
127 |
+
this.configureCapabilities();
|
128 |
+
}
|
129 |
+
|
130 |
+
mvbam_object.prototype.configureMainMenu = function(){
|
131 |
+
jQuery( "#tabs" ).tabs();
|
132 |
+
this.configureAccordion("#main-menu-options");
|
133 |
+
jQuery('#main-menu-options > div').each(function(){
|
134 |
+
jQuery('#whole', this).bind('click',{
|
135 |
+
_this: this
|
136 |
+
}, function(event){
|
137 |
+
var checked = (jQuery(this).attr('checked') ? true : false);
|
138 |
+
jQuery('input:checkbox', event.data._this).attr('checked', checked);
|
139 |
+
});
|
140 |
+
});
|
141 |
+
}
|
142 |
+
|
143 |
+
mvbam_object.prototype.configureMetaboxes = function(){
|
144 |
+
this.configureAccordion('#metabox-list');
|
145 |
+
var _this = this;
|
146 |
+
jQuery('.initiate-metaboxes').bind('click', function(event){
|
147 |
+
jQuery('#initiate-message').hide();
|
148 |
+
jQuery('#progressbar').progressbar({
|
149 |
+
value: 0
|
150 |
+
}).show();
|
151 |
+
_this.initiationChain('');
|
152 |
+
});
|
153 |
+
|
154 |
+
jQuery('.initiate-url').bind('click', function(event){
|
155 |
+
var val = jQuery('.initiate-url-text').val();
|
156 |
+
if (jQuery.trim(val)){
|
157 |
+
jQuery('#initiate-message').hide();
|
158 |
+
jQuery('#progressbar').progressbar({
|
159 |
+
value: 20
|
160 |
+
}).show();
|
161 |
+
var params = {
|
162 |
+
'action' : 'mvbam',
|
163 |
+
'sub_action' : 'initiate_url',
|
164 |
+
'_ajax_nonce': wpaccessLocal.nonce,
|
165 |
+
'url' : val
|
166 |
+
};
|
167 |
+
jQuery.post(ajaxurl, params, function(data){
|
168 |
+
jQuery('.initiate-url-text').val('');
|
169 |
+
jQuery('.initiate-url-empty').show();
|
170 |
+
if (data.status == 'success'){
|
171 |
+
jQuery('#progressbar').progressbar('option', 'value', 100);
|
172 |
+
_this.grabInitiatedWM();
|
173 |
+
}else{
|
174 |
+
_this.emergencyCall(data);
|
175 |
+
}
|
176 |
+
}, 'json');
|
177 |
+
}else{
|
178 |
+
jQuery('.initiate-url-text').effect('highlight',3000);
|
179 |
+
}
|
180 |
+
});
|
181 |
+
|
182 |
+
jQuery('.initiate-url-empty').click(function(){
|
183 |
+
jQuery('#initiateURL').focus();
|
184 |
+
});
|
185 |
+
jQuery('#initiateURL').focus(function(){
|
186 |
+
jQuery('.initiate-url-empty').hide();
|
187 |
+
});
|
188 |
+
jQuery('#initiateURL').blur(function(){
|
189 |
+
if (!jQuery.trim(jQuery(this).val())){
|
190 |
+
jQuery('.initiate-url-empty').show();
|
191 |
+
}
|
192 |
+
});
|
193 |
+
}
|
194 |
+
|
195 |
+
mvbam_object.prototype.configureCapabilities = function(){
|
196 |
+
var _this = this;
|
197 |
+
jQuery(".capability-description").each(function(){
|
198 |
+
if(jQuery(this).attr('title')){
|
199 |
+
jQuery(this).tooltip({
|
200 |
+
position : 'center right',
|
201 |
+
events : {
|
202 |
+
def: "click,mouseout",
|
203 |
+
input: "focus,blur",
|
204 |
+
widget: "focus mouseover,blur mouseout",
|
205 |
+
tooltip: "mouseover,mouseout"
|
206 |
+
}
|
207 |
+
});
|
208 |
+
}else{
|
209 |
+
jQuery(this).remove();
|
210 |
+
}
|
211 |
+
});
|
212 |
+
|
213 |
+
jQuery('.default-roles').buttonset();
|
214 |
+
jQuery('#new-capability').button({
|
215 |
+
icons: {
|
216 |
+
primary: "ui-icon-plus"
|
217 |
+
}
|
218 |
+
}).bind('click', function(e){
|
219 |
+
e.preventDefault();
|
220 |
+
_this.addNewCapability();
|
221 |
+
});
|
222 |
+
}
|
223 |
+
|
224 |
+
mvbam_object.prototype.addNewCapability = function(){
|
225 |
+
jQuery( "#capability-form #new-cap" ).val('').focus();
|
226 |
+
jQuery( "#capability-form" ).dialog({
|
227 |
+
resizable: false,
|
228 |
+
height:150,
|
229 |
+
modal: false,
|
230 |
+
buttons: {
|
231 |
+
"Add Capability": function() {
|
232 |
+
var cap = jQuery( "#capability-form #new-cap" ).val();
|
233 |
+
|
234 |
+
if (jQuery.trim(cap)){
|
235 |
+
jQuery( this ).dialog( "close" );
|
236 |
+
var params = {
|
237 |
+
'action' : 'mvbam',
|
238 |
+
'sub_action' : 'add_capability',
|
239 |
+
'_ajax_nonce': wpaccessLocal.nonce,
|
240 |
+
'cap' : cap,
|
241 |
+
'role' : jQuery('#role').val()
|
242 |
+
};
|
243 |
+
jQuery.post(ajaxurl, params, function(data){
|
244 |
+
if (data.status == 'success'){
|
245 |
+
jQuery('.capability-item:last').after(data.html);
|
246 |
+
jQuery('.capability-item:last .info').remove();
|
247 |
+
}else{
|
248 |
+
alert(data.message);
|
249 |
+
}
|
250 |
+
}, 'json');
|
251 |
+
}else{
|
252 |
+
jQuery( "#capability-form #new-cap" ).effect('highlight', 5000);
|
253 |
+
}
|
254 |
+
},
|
255 |
+
Cancel: function() {
|
256 |
+
jQuery( this ).dialog( "close" );
|
257 |
+
}
|
258 |
+
}
|
259 |
+
});
|
260 |
+
}
|
261 |
+
|
262 |
+
mvbam_object.prototype.emergencyCall = function(data){
|
263 |
+
var _this = this;
|
264 |
+
jQuery.ajax(data.url, {
|
265 |
+
success : function(){
|
266 |
+
if (data.next){
|
267 |
+
_this.initiationChain(data.next);
|
268 |
+
}else{
|
269 |
+
jQuery('#progressbar').progressbar("option", "value", 100);
|
270 |
+
_this.grabInitiatedWM();
|
271 |
+
}
|
272 |
+
},
|
273 |
+
error : function(jqXHR, textStatus, errorThrown){
|
274 |
+
if (textStatus != 'timeout'){
|
275 |
+
if (data.next){
|
276 |
+
_this.initiationChain(data.next);
|
277 |
+
}else{
|
278 |
+
jQuery('#progressbar').progressbar("option", "value", 100);
|
279 |
+
_this.grabInitiatedWM();
|
280 |
+
}
|
281 |
+
}else{
|
282 |
+
alert('Error Appears during Metabox initialization!');
|
283 |
+
jQuery('#progressbar').progressbar("option", "value", 100);
|
284 |
+
_this.grabInitiatedWM();
|
285 |
+
}
|
286 |
+
},
|
287 |
+
timeout : 5000
|
288 |
+
});
|
289 |
+
|
290 |
+
}
|
291 |
+
|
292 |
+
mvbam_object.prototype.initiationChain = function(next){
|
293 |
+
//start initiation
|
294 |
+
var params = {
|
295 |
+
'action' : 'mvbam',
|
296 |
+
'sub_action' : 'initiate_wm',
|
297 |
+
'_ajax_nonce': wpaccessLocal.nonce,
|
298 |
+
'next' : next
|
299 |
+
};
|
300 |
+
var _this = this;
|
301 |
+
jQuery.post(ajaxurl, params, function(data){
|
302 |
+
jQuery('#progressbar').progressbar("option", "value", data.value);
|
303 |
+
if (data.status == 'success'){
|
304 |
+
if (data.next){
|
305 |
+
_this.initiationChain(data.next);
|
306 |
+
}else{
|
307 |
+
jQuery('#progressbar').progressbar("option", "value", 100);
|
308 |
+
_this.grabInitiatedWM();
|
309 |
+
}
|
310 |
+
}else{
|
311 |
+
//try directly to go to that page
|
312 |
+
_this.emergencyCall(data);
|
313 |
+
}
|
314 |
+
}, 'json');
|
315 |
+
}
|
316 |
+
|
317 |
+
mvbam_object.prototype.grabInitiatedWM = function(){
|
318 |
+
jQuery('#progressbar').progressbar('destroy').hide();
|
319 |
+
jQuery('#initiate-message').show();
|
320 |
+
jQuery('#metabox-list').empty().css({
|
321 |
+
'height' : '200px',
|
322 |
+
'width' : '100%'
|
323 |
+
});
|
324 |
+
this.showAjaxLoader('#metabox-list');
|
325 |
+
var params = {
|
326 |
+
'action' : 'mvbam',
|
327 |
+
'sub_action' : 'render_metabox_list',
|
328 |
+
'_ajax_nonce': wpaccessLocal.nonce,
|
329 |
+
'role' : jQuery('#current_role').val()
|
330 |
+
};
|
331 |
+
var _this = this;
|
332 |
+
jQuery.post(ajaxurl, params, function(data){
|
333 |
+
jQuery('#metabox-list').replaceWith(data);
|
334 |
+
_this.configureAccordion('#metabox-list');
|
335 |
+
});
|
336 |
+
}
|
337 |
+
|
338 |
+
mvbam_object.prototype.configureAccordion = function(selector){
|
339 |
+
var icons = {
|
340 |
+
header: "ui-icon-circle-arrow-e",
|
341 |
+
headerSelected: "ui-icon-circle-arrow-s"
|
342 |
+
};
|
343 |
+
|
344 |
+
jQuery(selector).accordion({
|
345 |
+
collapsible: true,
|
346 |
+
header: 'h4',
|
347 |
+
autoHeight: false,
|
348 |
+
icons: icons,
|
349 |
+
active: -1
|
350 |
+
});
|
351 |
+
}
|
352 |
+
|
353 |
+
mvbam_object.prototype.deleteRole = function(role){
|
354 |
+
jQuery('#delete-role-title').html(jQuery('.delete-role-table #dl-row-'+role+' td:first').html());
|
355 |
+
var _this = this;
|
356 |
+
jQuery( "#dialog-delete-confirm" ).dialog({
|
357 |
+
resizable: false,
|
358 |
+
height:180,
|
359 |
+
modal: true,
|
360 |
+
buttons: {
|
361 |
+
"Delete Role": function() {
|
362 |
+
var params = {
|
363 |
+
'action' : 'mvbam',
|
364 |
+
'sub_action' : 'delete_role',
|
365 |
+
'_ajax_nonce': wpaccessLocal.nonce,
|
366 |
+
'role' : role
|
367 |
+
};
|
368 |
+
jQuery.post(ajaxurl, params, function(){
|
369 |
+
jQuery('.delete-role-table #dl-row-' + role).remove();
|
370 |
+
if (jQuery('#role option[value="'+role+'"]').attr('selected')){
|
371 |
+
_this.getRoleOptionList(jQuery('#role option:first').val());
|
372 |
+
}
|
373 |
+
jQuery('#role option[value="'+role+'"]').remove();
|
374 |
+
});
|
375 |
+
jQuery( this ).dialog( "close" );
|
376 |
+
},
|
377 |
+
Cancel: function() {
|
378 |
+
jQuery( this ).dialog( "close" );
|
379 |
+
}
|
380 |
+
}
|
381 |
+
});
|
382 |
+
}
|
383 |
+
|
384 |
+
mvbam_object.prototype.changeCapabilities = function(type){
|
385 |
+
switch(type){
|
386 |
+
case 'radio1': //administrator
|
387 |
+
jQuery('.capability-item input').attr('checked', true);
|
388 |
+
break;
|
389 |
+
|
390 |
+
case 'radio2': //editor
|
391 |
+
case 'radio3': //author
|
392 |
+
case 'radio4': //contributor
|
393 |
+
case 'radio5': //subscriber
|
394 |
+
jQuery('.capability-item input').attr('checked', false);
|
395 |
+
for (var c in this.roleCapabilities[type]){
|
396 |
+
jQuery('.capability-item input[name*="['+this.roleCapabilities[type][c]+']"]').attr('checked', true);
|
397 |
+
}
|
398 |
+
break;
|
399 |
+
|
400 |
+
case 'radio6': //clear all
|
401 |
+
jQuery('.capability-item input').attr('checked', false);
|
402 |
+
break;
|
403 |
+
|
404 |
+
default:
|
405 |
+
break;
|
406 |
+
}
|
407 |
+
}
|
408 |
+
|
409 |
+
mvbam_object.prototype.changeRole = function(){
|
410 |
+
var currentRoleID = jQuery('#role').val();
|
411 |
+
this.getRoleOptionList(currentRoleID);
|
412 |
+
this.formChanged = 0;
|
413 |
+
}
|
414 |
+
|
415 |
+
mvbam_object.prototype.submitForm = function(){
|
416 |
+
this.formChanged = -1;
|
417 |
+
jQuery('#ajax-loading').show();
|
418 |
+
}
|
419 |
+
|
420 |
+
mvbam_object.prototype.goodbye = function(e){
|
421 |
+
if (this.formChanged > 0){
|
422 |
+
if(!e) e = window.event;
|
423 |
+
//e.cancelBubble is supported by IE - this will kill the bubbling process.
|
424 |
+
e.cancelBubble = true;
|
425 |
+
e.returnValue = 'You sure you want to leave?'; //This is displayed on the dialog
|
426 |
+
|
427 |
+
//e.stopPropagation works in Firefox.
|
428 |
+
if (e.stopPropagation) {
|
429 |
+
e.stopPropagation();
|
430 |
+
e.preventDefault();
|
431 |
+
}
|
432 |
+
}
|
433 |
+
}
|
434 |
+
|
435 |
+
mvbam_object.prototype.restoreDefault = function(){
|
436 |
+
var _this = this;
|
437 |
+
jQuery( "#dialog-confirm" ).dialog({
|
438 |
+
resizable: false,
|
439 |
+
height:180,
|
440 |
+
modal: true,
|
441 |
+
buttons: {
|
442 |
+
"Restore": function() {
|
443 |
+
var role = jQuery('#current_role').val();
|
444 |
+
var params = {
|
445 |
+
'action' : 'mvbam',
|
446 |
+
'sub_action' : 'restore_role',
|
447 |
+
'_ajax_nonce': wpaccessLocal.nonce,
|
448 |
+
'role' : role
|
449 |
+
};
|
450 |
+
var _dialog = this;
|
451 |
+
jQuery.post(ajaxurl, params, function(data){
|
452 |
+
if (data.status == 'success'){
|
453 |
+
_this.getRoleOptionList(role);
|
454 |
+
}else{
|
455 |
+
//TODO - Implement error
|
456 |
+
alert('Current Role can not be restored!');
|
457 |
+
}
|
458 |
+
jQuery( _dialog ).dialog( "close" );
|
459 |
+
},'json');
|
460 |
+
},
|
461 |
+
Cancel: function() {
|
462 |
+
jQuery( this ).dialog( "close" );
|
463 |
+
}
|
464 |
+
}
|
465 |
+
});
|
466 |
+
}
|
467 |
+
|
468 |
+
mvbam_object.prototype.removeAjaxLoader = function(selector){
|
469 |
+
jQuery(selector).removeClass('loading-new');
|
470 |
+
jQuery('.ajax-loader-big').remove();
|
471 |
+
}
|
472 |
+
|
473 |
+
mvbam_object.prototype.deleteCapability = function(cap, label){
|
474 |
+
jQuery('#delete-capability-title').html(label);
|
475 |
+
var _this = this;
|
476 |
+
jQuery( "#dialog-delete-capability" ).dialog({
|
477 |
+
resizable: false,
|
478 |
+
height:180,
|
479 |
+
modal: true,
|
480 |
+
buttons: {
|
481 |
+
"Delete Capability": function() {
|
482 |
+
var params = {
|
483 |
+
'action' : 'mvbam',
|
484 |
+
'sub_action' : 'delete_capability',
|
485 |
+
'_ajax_nonce': wpaccessLocal.nonce,
|
486 |
+
'cap' : cap
|
487 |
+
};
|
488 |
+
jQuery.post(ajaxurl, params, function(data){
|
489 |
+
if (data.status == 'success'){
|
490 |
+
jQuery('#cap-' + cap).parent().parent().remove();
|
491 |
+
}else{
|
492 |
+
alert(data.message);
|
493 |
+
}
|
494 |
+
}, 'json');
|
495 |
+
jQuery( this ).dialog( "close" );
|
496 |
+
},
|
497 |
+
Cancel: function() {
|
498 |
+
jQuery( this ).dialog( "close" );
|
499 |
+
}
|
500 |
+
}
|
501 |
+
});
|
502 |
+
}
|
503 |
+
|
504 |
+
//**********************************************
|
505 |
+
|
506 |
+
jQuery(document).ready(function(){
|
507 |
+
|
508 |
+
try{
|
509 |
+
mObj = new mvbam_object();
|
510 |
+
|
511 |
+
mObj.configureElements();
|
512 |
+
jQuery('.change-role').bind('click', function(e){
|
513 |
+
e.preventDefault();
|
514 |
+
jQuery('div #role-select').show();
|
515 |
+
jQuery(this).hide();
|
516 |
+
});
|
517 |
+
|
518 |
+
jQuery('#role-ok').bind('click', function(e){
|
519 |
+
e.preventDefault();
|
520 |
+
if (mObj.formChanged > 0){
|
521 |
+
jQuery( "#leave-confirm" ).dialog({
|
522 |
+
resizable: false,
|
523 |
+
height: 180,
|
524 |
+
modal: true,
|
525 |
+
buttons: {
|
526 |
+
"Change Role": function() {
|
527 |
+
jQuery( this ).dialog( "close" );
|
528 |
+
mObj.changeRole();
|
529 |
+
},
|
530 |
+
Cancel: function() {
|
531 |
+
jQuery( this ).dialog( "close" );
|
532 |
+
}
|
533 |
+
}
|
534 |
+
});
|
535 |
+
}else{
|
536 |
+
mObj.changeRole();
|
537 |
+
}
|
538 |
+
|
539 |
+
});
|
540 |
+
|
541 |
+
|
542 |
+
jQuery('.new-role-name-empty').click(function(e){
|
543 |
+
e.preventDefault();
|
544 |
+
jQuery('#new-role-name').focus();
|
545 |
+
});
|
546 |
+
jQuery('#new-role-name').focus(function(){
|
547 |
+
jQuery('.new-role-name-empty').hide();
|
548 |
+
});
|
549 |
+
jQuery('#new-role-name').blur(function(){
|
550 |
+
if (!jQuery.trim(jQuery(this).val())){
|
551 |
+
jQuery('.new-role-name-empty').show();
|
552 |
+
}
|
553 |
+
});
|
554 |
+
jQuery('#new-role-name').keypress(function(event){
|
555 |
+
if (event.which == 13){
|
556 |
+
event.preventDefault();
|
557 |
+
mObj.addNewRole();
|
558 |
+
};
|
559 |
+
});
|
560 |
+
|
561 |
+
jQuery('#wp-access').keypress(function(event){
|
562 |
+
if (event.which == 13){
|
563 |
+
event.preventDefault();
|
564 |
+
};
|
565 |
+
});
|
566 |
+
|
567 |
+
jQuery('#new-role-ok').bind('click', function(e){
|
568 |
+
e.preventDefault();
|
569 |
+
mObj.addNewRole();
|
570 |
+
});
|
571 |
+
|
572 |
+
jQuery('#role-cancel').bind('click', function(e){
|
573 |
+
e.preventDefault();
|
574 |
+
jQuery('div #role-select').hide();
|
575 |
+
jQuery('.change-role').show();
|
576 |
+
});
|
577 |
+
jQuery('#new-role-cancel').bind('click', function(e){
|
578 |
+
e.preventDefault();
|
579 |
+
jQuery('div #new-role-form').hide();
|
580 |
+
jQuery('.change-role').show();
|
581 |
+
});
|
582 |
+
|
583 |
+
jQuery('#role-tabs').tabs();
|
584 |
+
|
585 |
+
jQuery('.deletion').bind('click', function(e){
|
586 |
+
e.preventDefault();
|
587 |
+
mObj.restoreDefault();
|
588 |
+
});
|
589 |
+
|
590 |
+
jQuery('#wp-access').bind('change', function(e){
|
591 |
+
mObj.formChanged++;
|
592 |
+
});
|
593 |
+
jQuery('#role').bind('change', function(e){
|
594 |
+
mObj.formChanged -= 1;
|
595 |
+
});
|
596 |
+
|
597 |
+
jQuery('.message-active').show().delay(5000).hide('slow');
|
598 |
+
|
599 |
+
//window.onbeforeunload = mObj.goodbye;
|
600 |
+
|
601 |
+
jQuery('#wp-access').show();
|
602 |
+
}catch(err){
|
603 |
+
jQuery('#wp-access').show();
|
604 |
+
}
|
605 |
+
});
|
js/jquery.tools.min.js
ADDED
@@ -0,0 +1,145 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*!
|
2 |
+
* jQuery Tools v1.2.5 - The missing UI library for the Web
|
3 |
+
*
|
4 |
+
* tooltip/tooltip.js
|
5 |
+
*
|
6 |
+
* NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
|
7 |
+
*
|
8 |
+
* http://flowplayer.org/tools/
|
9 |
+
*
|
10 |
+
*/
|
11 |
+
(function(a){
|
12 |
+
a.tools=a.tools||{
|
13 |
+
version:"v1.2.5"
|
14 |
+
},a.tools.tooltip={
|
15 |
+
conf:{
|
16 |
+
effect:"toggle",
|
17 |
+
fadeOutSpeed:"fast",
|
18 |
+
predelay:0,
|
19 |
+
delay:30,
|
20 |
+
opacity:1,
|
21 |
+
tip:0,
|
22 |
+
position:["top","center"],
|
23 |
+
offset:[0,0],
|
24 |
+
relative:!1,
|
25 |
+
cancelDefault:!0,
|
26 |
+
events:{
|
27 |
+
def:"mouseenter,mouseleave",
|
28 |
+
input:"focus,blur",
|
29 |
+
widget:"focus mouseenter,blur mouseleave",
|
30 |
+
tooltip:"mouseenter,mouseleave"
|
31 |
+
},
|
32 |
+
layout:"<div/>",
|
33 |
+
tipClass:"tooltip"
|
34 |
+
},
|
35 |
+
addEffect:function(a,c,d){
|
36 |
+
b[a]=[c,d]
|
37 |
+
}
|
38 |
+
};
|
39 |
+
|
40 |
+
var b={
|
41 |
+
toggle:[function(a){
|
42 |
+
var b=this.getConf(),c=this.getTip(),d=b.opacity;
|
43 |
+
d<1&&c.css({
|
44 |
+
opacity:d
|
45 |
+
}),c.show(),a.call()
|
46 |
+
},function(a){
|
47 |
+
this.getTip().hide(),a.call()
|
48 |
+
}],
|
49 |
+
fade:[function(a){
|
50 |
+
var b=this.getConf();
|
51 |
+
this.getTip().fadeTo(b.fadeInSpeed,b.opacity,a)
|
52 |
+
},function(a){
|
53 |
+
this.getTip().fadeOut(this.getConf().fadeOutSpeed,a)
|
54 |
+
}]
|
55 |
+
};
|
56 |
+
|
57 |
+
function c(b,c,d){
|
58 |
+
var e=d.relative?b.position().top:b.offset().top,f=d.relative?b.position().left:b.offset().left,g=d.position[0];
|
59 |
+
e-=c.outerHeight()-d.offset[0],f+=b.outerWidth()+d.offset[1],/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());
|
60 |
+
var h=c.outerHeight()+b.outerHeight();
|
61 |
+
g=="center"&&(e+=h/2),g=="bottom"&&(e+=h),g=d.position[1];
|
62 |
+
var i=c.outerWidth()+b.outerWidth();
|
63 |
+
g=="center"&&(f-=i/2),g=="left"&&(f-=i);
|
64 |
+
return{
|
65 |
+
top:e,
|
66 |
+
left:f
|
67 |
+
}
|
68 |
+
}
|
69 |
+
function d(d,e){
|
70 |
+
var f=this,g=d.add(f),h,i=0,j=0,k=d.attr("title"),l=d.attr("data-tooltip"),m=b[e.effect],n,o=d.is(":input"),p=o&&d.is(":checkbox, :radio, select, :button, :submit"),q=d.attr("type"),r=e.events[q]||e.events[o?p?"widget":"input":"def"];
|
71 |
+
if(!m)throw"Nonexistent effect \""+e.effect+"\"";
|
72 |
+
r=r.split(/,\s*/);
|
73 |
+
if(r.length!=2)throw"Tooltip: bad events configuration for "+q;
|
74 |
+
d.bind(r[0],function(a){
|
75 |
+
clearTimeout(i),e.predelay?j=setTimeout(function(){
|
76 |
+
f.show(a)
|
77 |
+
},e.predelay):f.show(a)
|
78 |
+
}).bind(r[1],function(a){
|
79 |
+
clearTimeout(j),e.delay?i=setTimeout(function(){
|
80 |
+
f.hide(a)
|
81 |
+
},e.delay):f.hide(a)
|
82 |
+
}),k&&e.cancelDefault&&(d.removeAttr("title"),d.data("title",k)),a.extend(f,{
|
83 |
+
show:function(b){
|
84 |
+
if(!h){
|
85 |
+
l?h=a(l):e.tip?h=a(e.tip).eq(0):k?h=a(e.layout).addClass(e.tipClass).appendTo(document.body).hide().append(k):(h=d.next(),h.length||(h=d.parent().next()));
|
86 |
+
if(!h.length)throw"Cannot find tooltip for "+d
|
87 |
+
}
|
88 |
+
if(f.isShown())return f;
|
89 |
+
h.stop(!0,!0);
|
90 |
+
var o=c(d,h,e);
|
91 |
+
e.tip&&h.html(d.data("title")),b=b||a.Event(),b.type="onBeforeShow",g.trigger(b,[o]);
|
92 |
+
if(b.isDefaultPrevented())return f;
|
93 |
+
o=c(d,h,e),h.css({
|
94 |
+
position:"absolute",
|
95 |
+
top:o.top,
|
96 |
+
left:o.left
|
97 |
+
}),n=!0,m[0].call(f,function(){
|
98 |
+
b.type="onShow",n="full",g.trigger(b)
|
99 |
+
});
|
100 |
+
var p=e.events.tooltip.split(/,\s*/);
|
101 |
+
h.data("__set")||(h.bind(p[0],function(){
|
102 |
+
clearTimeout(i),clearTimeout(j)
|
103 |
+
}),p[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&h.bind(p[1],function(a){
|
104 |
+
a.relatedTarget!=d[0]&&d.trigger(r[1].split(" ")[0])
|
105 |
+
}),h.data("__set",!0));
|
106 |
+
return f
|
107 |
+
},
|
108 |
+
hide:function(c){
|
109 |
+
if(!h||!f.isShown())return f;
|
110 |
+
c=c||a.Event(),c.type="onBeforeHide",g.trigger(c);
|
111 |
+
if(!c.isDefaultPrevented()){
|
112 |
+
n=!1,b[e.effect][1].call(f,function(){
|
113 |
+
c.type="onHide",g.trigger(c)
|
114 |
+
});
|
115 |
+
return f
|
116 |
+
}
|
117 |
+
},
|
118 |
+
isShown:function(a){
|
119 |
+
return a?n=="full":n
|
120 |
+
},
|
121 |
+
getConf:function(){
|
122 |
+
return e
|
123 |
+
},
|
124 |
+
getTip:function(){
|
125 |
+
return h
|
126 |
+
},
|
127 |
+
getTrigger:function(){
|
128 |
+
return d
|
129 |
+
}
|
130 |
+
}),a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(b,c){
|
131 |
+
a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){
|
132 |
+
b&&a(f).bind(c,b);
|
133 |
+
return f
|
134 |
+
}
|
135 |
+
})
|
136 |
+
}
|
137 |
+
a.fn.tooltip=function(b){
|
138 |
+
var c=this.data("tooltip");
|
139 |
+
if(c)return c;
|
140 |
+
b=a.extend(!0,{},a.tools.tooltip.conf,b),typeof b.position=="string"&&(b.position=b.position.split(/,?\s/)),this.each(function(){
|
141 |
+
c=new d(a(this),b),a(this).data("tooltip",c)
|
142 |
+
});
|
143 |
+
return b.api?c:this
|
144 |
+
}
|
145 |
+
})(jQuery);
|
js/ui/jquery-ui.min.js
ADDED
@@ -0,0 +1,259 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*!
|
2 |
+
* jQuery UI 1.8.15
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI
|
9 |
+
*/
|
10 |
+
(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.15",
|
11 |
+
keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=
|
12 |
+
this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,
|
13 |
+
"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":
|
14 |
+
"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,
|
15 |
+
outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a,
|
16 |
+
"tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&
|
17 |
+
a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&
|
18 |
+
c.ui.isOverAxis(b,e,i)}})}})(jQuery);
|
19 |
+
;/*!
|
20 |
+
* jQuery UI Widget 1.8.15
|
21 |
+
*
|
22 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
23 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
24 |
+
* http://jquery.org/license
|
25 |
+
*
|
26 |
+
* http://docs.jquery.com/UI/Widget
|
27 |
+
*/
|
28 |
+
(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
|
29 |
+
a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;
|
30 |
+
e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,
|
31 |
+
this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
|
32 |
+
widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},
|
33 |
+
enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
|
34 |
+
;/*!
|
35 |
+
* jQuery UI Mouse 1.8.15
|
36 |
+
*
|
37 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
38 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
39 |
+
* http://jquery.org/license
|
40 |
+
*
|
41 |
+
* http://docs.jquery.com/UI/Mouse
|
42 |
+
*
|
43 |
+
* Depends:
|
44 |
+
* jquery.ui.widget.js
|
45 |
+
*/
|
46 |
+
(function(b){b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(c){return a._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(true===b.data(c.target,a.widgetName+".preventClickEvent")){b.removeData(c.target,a.widgetName+".preventClickEvent");c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=
|
47 |
+
a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var c=this,e=a.which==1,f=typeof this.options.cancel=="string"?b(a.target).closest(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=this._mouseStart(a)!==
|
48 |
+
false;if(!this._mouseStarted){a.preventDefault();return true}}true===b.data(a.target,this.widgetName+".preventClickEvent")&&b.removeData(a.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(d){return c._mouseMove(d)};this._mouseUpDelegate=function(d){return c._mouseUp(d)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return a.originalEvent.mouseHandled=true}},_mouseMove:function(a){if(b.browser.msie&&
|
49 |
+
!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=
|
50 |
+
false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
|
51 |
+
;/*
|
52 |
+
* jQuery UI Position 1.8.15
|
53 |
+
*
|
54 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
55 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
56 |
+
* http://jquery.org/license
|
57 |
+
*
|
58 |
+
* http://docs.jquery.com/UI/Position
|
59 |
+
*/
|
60 |
+
(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY,
|
61 |
+
left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+=
|
62 |
+
k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-=
|
63 |
+
m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left=
|
64 |
+
d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+=
|
65 |
+
a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b),
|
66 |
+
g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery);
|
67 |
+
;/*
|
68 |
+
* jQuery UI Accordion 1.8.15
|
69 |
+
*
|
70 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
71 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
72 |
+
* http://jquery.org/license
|
73 |
+
*
|
74 |
+
* http://docs.jquery.com/UI/Accordion
|
75 |
+
*
|
76 |
+
* Depends:
|
77 |
+
* jquery.ui.core.js
|
78 |
+
* jquery.ui.widget.js
|
79 |
+
*/
|
80 |
+
(function(c){c.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");
|
81 |
+
a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
|
82 |
+
if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion",
|
83 |
+
function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a=
|
84 |
+
this.options;if(a.icons){c("<span></span>").addClass("ui-icon "+a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex");
|
85 |
+
this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons();
|
86 |
+
b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target);
|
87 |
+
a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+
|
88 |
+
c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options;
|
89 |
+
if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(j,g,e,b,f);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);
|
90 |
+
if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(),
|
91 |
+
e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight||
|
92 |
+
e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false",
|
93 |
+
"aria-selected":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.15",
|
94 |
+
animations:{slide:function(a,b){a=c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/);
|
95 |
+
f[i]={value:j[1],unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide",
|
96 |
+
paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery);
|
97 |
+
;/*
|
98 |
+
* jQuery UI Button 1.8.15
|
99 |
+
*
|
100 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
101 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
102 |
+
* http://jquery.org/license
|
103 |
+
*
|
104 |
+
* http://docs.jquery.com/UI/Button
|
105 |
+
*
|
106 |
+
* Depends:
|
107 |
+
* jquery.ui.core.js
|
108 |
+
* jquery.ui.widget.js
|
109 |
+
*/
|
110 |
+
(function(b){var h,i,j,g,l=function(){var a=b(this).find(":ui-button");setTimeout(function(){a.button("refresh")},1)},k=function(a){var c=a.name,e=a.form,f=b([]);if(c)f=e?b(e).find("[name='"+c+"']"):b("[name='"+c+"']",a.ownerDocument).filter(function(){return!this.form});return f};b.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",l);if(typeof this.options.disabled!==
|
111 |
+
"boolean")this.options.disabled=this.element.propAttr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var a=this,c=this.options,e=this.type==="checkbox"||this.type==="radio",f="ui-state-hover"+(!e?" ui-state-active":"");if(c.label===null)c.label=this.buttonElement.html();if(this.element.is(":disabled"))c.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",function(){if(!c.disabled){b(this).addClass("ui-state-hover");
|
112 |
+
this===h&&b(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){c.disabled||b(this).removeClass(f)}).bind("click.button",function(d){if(c.disabled){d.preventDefault();d.stopImmediatePropagation()}});this.element.bind("focus.button",function(){a.buttonElement.addClass("ui-state-focus")}).bind("blur.button",function(){a.buttonElement.removeClass("ui-state-focus")});if(e){this.element.bind("change.button",function(){g||a.refresh()});this.buttonElement.bind("mousedown.button",function(d){if(!c.disabled){g=
|
113 |
+
false;i=d.pageX;j=d.pageY}}).bind("mouseup.button",function(d){if(!c.disabled)if(i!==d.pageX||j!==d.pageY)g=true})}if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(c.disabled||g)return false;b(this).toggleClass("ui-state-active");a.buttonElement.attr("aria-pressed",a.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",function(){if(c.disabled||g)return false;b(this).addClass("ui-state-active");a.buttonElement.attr("aria-pressed","true");
|
114 |
+
var d=a.element[0];k(d).not(d).map(function(){return b(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")});else{this.buttonElement.bind("mousedown.button",function(){if(c.disabled)return false;b(this).addClass("ui-state-active");h=this;b(document).one("mouseup",function(){h=null})}).bind("mouseup.button",function(){if(c.disabled)return false;b(this).removeClass("ui-state-active")}).bind("keydown.button",function(d){if(c.disabled)return false;if(d.keyCode==b.ui.keyCode.SPACE||
|
115 |
+
d.keyCode==b.ui.keyCode.ENTER)b(this).addClass("ui-state-active")}).bind("keyup.button",function(){b(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(d){d.keyCode===b.ui.keyCode.SPACE&&b(this).click()})}this._setOption("disabled",c.disabled);this._resetButton()},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type===
|
116 |
+
"radio"){var a=this.element.parents().filter(":last"),c="label[for="+this.element.attr("id")+"]";this.buttonElement=a.find(c);if(!this.buttonElement.length){a=a.length?a.siblings():this.element.siblings();this.buttonElement=a.filter(c);if(!this.buttonElement.length)this.buttonElement=a.find(c)}this.element.addClass("ui-helper-hidden-accessible");(a=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",a)}else this.buttonElement=this.element},
|
117 |
+
widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title");
|
118 |
+
b.Widget.prototype.destroy.call(this)},_setOption:function(a,c){b.Widget.prototype._setOption.apply(this,arguments);if(a==="disabled")c?this.element.propAttr("disabled",true):this.element.propAttr("disabled",false);else this._resetButton()},refresh:function(){var a=this.element.is(":disabled");a!==this.options.disabled&&this._setOption("disabled",a);if(this.type==="radio")k(this.element[0]).each(function(){b(this).is(":checked")?b(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
|
119 |
+
"true"):b(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false")},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var a=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
|
120 |
+
c=b("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),e=this.options.icons,f=e.primary&&e.secondary,d=[];if(e.primary||e.secondary){if(this.options.text)d.push("ui-button-text-icon"+(f?"s":e.primary?"-primary":"-secondary"));e.primary&&a.prepend("<span class='ui-button-icon-primary ui-icon "+e.primary+"'></span>");e.secondary&&a.append("<span class='ui-button-icon-secondary ui-icon "+e.secondary+"'></span>");if(!this.options.text){d.push(f?"ui-button-icons-only":
|
121 |
+
"ui-button-icon-only");this.hasTitle||a.attr("title",c)}}else d.push("ui-button-text-only");a.addClass(d.join(" "))}}});b.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,c){a==="disabled"&&this.buttons.button("option",a,c);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var a=this.element.css("direction")===
|
122 |
+
"ltr";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(a?"ui-corner-left":"ui-corner-right").end().filter(":last").addClass(a?"ui-corner-right":"ui-corner-left").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");
|
123 |
+
b.Widget.prototype.destroy.call(this)}})})(jQuery);
|
124 |
+
;/*
|
125 |
+
* jQuery UI Dialog 1.8.15
|
126 |
+
*
|
127 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
128 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
129 |
+
* http://jquery.org/license
|
130 |
+
*
|
131 |
+
* http://docs.jquery.com/UI/Dialog
|
132 |
+
*
|
133 |
+
* Depends:
|
134 |
+
* jquery.ui.core.js
|
135 |
+
* jquery.ui.widget.js
|
136 |
+
* jquery.ui.button.js
|
137 |
+
* jquery.ui.draggable.js
|
138 |
+
* jquery.ui.mouse.js
|
139 |
+
* jquery.ui.position.js
|
140 |
+
* jquery.ui.resizable.js
|
141 |
+
*/
|
142 |
+
(function(c,l){var m={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},n={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},o=c.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,
|
143 |
+
position:{my:"center",at:"center",collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&&c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||" ",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+
|
144 |
+
b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),
|
145 |
+
h=c('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("<span></span>")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("<span></span>").addClass("ui-dialog-title").attr("id",
|
146 |
+
e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
|
147 |
+
a.uiDialog.remove();a.originalTitle&&a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!==
|
148 |
+
b.uiDialog[0]){e=c(this).css("z-index");isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()};c.ui.dialog.maxZ+=1;
|
149 |
+
d.uiDialog.css("z-index",c.ui.dialog.maxZ);d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target===
|
150 |
+
f[0]&&e.shiftKey){g.focus(1);return false}}});c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("<div></div>").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a,
|
151 |
+
function(){return!(d=true)});if(d){c.each(a,function(f,h){h=c.isFunction(h)?{click:h,text:f}:h;var i=c('<button type="button"></button>').click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.each(h,function(j,k){if(j!=="click")j in o?i[j](k):i.attr(j,k)});c.fn.button&&i.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",
|
152 |
+
handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition,
|
153 |
+
originalSize:f.originalSize,position:f.position,size:f.size}}a=a===l?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize",
|
154 |
+
f,b(h))},stop:function(f,h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "):
|
155 |
+
[a[0],a[1]];if(b.length===1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},a));e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f);
|
156 |
+
if(g in m)e=true;if(g in n)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"):
|
157 |
+
e.removeClass("ui-dialog-disabled");break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a=
|
158 |
+
this.options,b,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height-
|
159 |
+
b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.15",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),
|
160 |
+
create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()<c.ui.dialog.overlay.maxZ)return false})},1);c(document).bind("keydown.dialog-overlay",function(d){if(a.options.closeOnEscape&&d.keyCode&&d.keyCode===c.ui.keyCode.ESCAPE){a.close(d);d.preventDefault()}});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b=(this.oldInstances.pop()||c("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
|
161 |
+
height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
|
162 |
+
b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a<b?c(window).height()+"px":a+"px"}else return c(document).height()+"px"},width:function(){var a,b;if(c.browser.msie){a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);b=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return a<b?c(window).width()+"px":a+"px"}else return c(document).width()+"px"},resize:function(){var a=c([]);c.each(c.ui.dialog.overlay.instances,function(){a=
|
163 |
+
a.add(this)});a.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
|
164 |
+
;/*
|
165 |
+
* jQuery UI Tabs 1.8.15
|
166 |
+
*
|
167 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
168 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
169 |
+
* http://jquery.org/license
|
170 |
+
*
|
171 |
+
* http://docs.jquery.com/UI/Tabs
|
172 |
+
*
|
173 |
+
* Depends:
|
174 |
+
* jquery.ui.core.js
|
175 |
+
* jquery.ui.widget.js
|
176 |
+
*/
|
177 |
+
(function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading…</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&&
|
178 |
+
e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=
|
179 |
+
d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]||
|
180 |
+
(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
|
181 |
+
this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected=
|
182 |
+
this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
|
183 |
+
if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));
|
184 |
+
this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+
|
185 |
+
g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",
|
186 |
+
function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")};
|
187 |
+
this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected=
|
188 |
+
-1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";
|
189 |
+
d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=
|
190 |
+
d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b,
|
191 |
+
e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]);
|
192 |
+
j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();
|
193 |
+
if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1<this.anchors.length?1:-1));e.disabled=d.map(d.grep(e.disabled,function(h){return h!=b}),function(h){return h>=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null,
|
194 |
+
this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this},
|
195 |
+
load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c,
|
196 |
+
"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},
|
197 |
+
url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.15"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&
|
198 |
+
a.rotate(null)}:function(){t=c.selected;h()});if(b){this.element.bind("tabsshow",h);this.anchors.bind(c.event+".tabs",e);h()}else{clearTimeout(a.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(c.event+".tabs",e);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
|
199 |
+
;/*
|
200 |
+
* jQuery UI Progressbar 1.8.15
|
201 |
+
*
|
202 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
203 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
204 |
+
* http://jquery.org/license
|
205 |
+
*
|
206 |
+
* http://docs.jquery.com/UI/Progressbar
|
207 |
+
*
|
208 |
+
* Depends:
|
209 |
+
* jquery.ui.core.js
|
210 |
+
* jquery.ui.widget.js
|
211 |
+
*/
|
212 |
+
(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
|
213 |
+
this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*
|
214 |
+
this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.15"})})(jQuery);
|
215 |
+
;/*
|
216 |
+
* jQuery UI Effects 1.8.15
|
217 |
+
*
|
218 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
219 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
220 |
+
* http://jquery.org/license
|
221 |
+
*
|
222 |
+
* http://docs.jquery.com/UI/Effects/
|
223 |
+
*/
|
224 |
+
jQuery.effects||function(f,j){function m(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],
|
225 |
+
16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return n.transparent;return n[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return m(b)}function o(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
|
226 |
+
a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function p(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=
|
227 |
+
a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function l(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor",
|
228 |
+
"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=m(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
|
229 |
+
0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,
|
230 |
+
211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},q=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,
|
231 |
+
d){if(f.isFunction(b)){d=b;b=null}return this.queue(function(){var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("class");f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});r=p(o.call(this));e.attr("class",v);e.animate(u(h,r),{queue:false,duration:a,easing:b,complete:function(){f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments);f.dequeue(this)}})})};
|
232 |
+
f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,
|
233 |
+
[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.15",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=
|
234 |
+
0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});
|
235 |
+
c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);return c},setTransition:function(c,
|
236 |
+
a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(l(c))return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);
|
237 |
+
a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(l(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(l(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%",
|
238 |
+
"pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*
|
239 |
+
((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=
|
240 |
+
e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=
|
241 |
+
e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/
|
242 |
+
h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);if(a<1)return-0.5*
|
243 |
+
h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,a,b,d,e){return d-f.easing.easeOutBounce(c,
|
244 |
+
e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;return f.easing.easeOutBounce(c,a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);
|
245 |
+
;/*
|
246 |
+
* jQuery UI Effects Highlight 1.8.15
|
247 |
+
*
|
248 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
249 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
250 |
+
* http://jquery.org/license
|
251 |
+
*
|
252 |
+
* http://docs.jquery.com/UI/Effects/Highlight
|
253 |
+
*
|
254 |
+
* Depends:
|
255 |
+
* jquery.effects.core.js
|
256 |
+
*/
|
257 |
+
(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&&
|
258 |
+
this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
|
259 |
+
;
|
module/class-module_filtermenu.php
ADDED
@@ -0,0 +1,174 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Copyright (C) <2011> Vasyl Martyniuk <martyniuk.vasyl@gmail.com>
|
5 |
+
|
6 |
+
This program is free software: you can redistribute it and/or modify
|
7 |
+
it under the terms of the GNU General Public License as published by
|
8 |
+
the Free Software Foundation, either version 3 of the License, or
|
9 |
+
(at your option) any later version.
|
10 |
+
|
11 |
+
This program is distributed in the hope that it will be useful,
|
12 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
+
GNU General Public License for more details.
|
15 |
+
|
16 |
+
You should have received a copy of the GNU General Public License
|
17 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
18 |
+
|
19 |
+
*/
|
20 |
+
|
21 |
+
class module_filterMenu extends module_User {
|
22 |
+
|
23 |
+
private $cParams;
|
24 |
+
|
25 |
+
function __construct() {
|
26 |
+
|
27 |
+
parent::__construct();
|
28 |
+
|
29 |
+
$this->cParams = get_option(WPACCESS_PREFIX . 'options');
|
30 |
+
}
|
31 |
+
|
32 |
+
function manage() {
|
33 |
+
global $menu, $submenu;
|
34 |
+
|
35 |
+
$userRoles = $this->getCurrentUserRole();
|
36 |
+
if (is_array($userRoles)) {
|
37 |
+
foreach ($userRoles as $role) {
|
38 |
+
if (is_array($this->cParams[$role]['menu'])) {
|
39 |
+
foreach ($this->cParams[$role]['menu'] as $main => $data) {
|
40 |
+
if ($data['whole'] == 1) {
|
41 |
+
$this->unsetMainMenuItem($main);
|
42 |
+
} elseif (is_array($data['sub'])) {
|
43 |
+
foreach ($data['sub'] as $sub => $dummy) {
|
44 |
+
$this->unsetSubMenuItem($main, $sub);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
}
|
49 |
+
}
|
50 |
+
} else {
|
51 |
+
wp_die('You are not authorized to view this page');
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
function checkAccess($requestedMenu) {
|
56 |
+
|
57 |
+
$userRoles = $this->getCurrentUserRole();
|
58 |
+
|
59 |
+
if (is_array($userRoles)) {
|
60 |
+
foreach ($userRoles as $role) {
|
61 |
+
if ($role == 'administrator') {
|
62 |
+
return TRUE;
|
63 |
+
}
|
64 |
+
|
65 |
+
if (is_array($this->cParams[$role]['menu'])) {
|
66 |
+
foreach ($this->cParams[$role]['menu'] as $menu => $sub) {
|
67 |
+
if (($sub['whole']) == 1 && ($this->compareMenus($requestedMenu, $menu))) {
|
68 |
+
return FALSE;
|
69 |
+
}
|
70 |
+
|
71 |
+
if (is_array($sub['sub'])) {
|
72 |
+
foreach ($sub['sub'] as $subMenu => $dummy) {
|
73 |
+
if ($this->compareMenus($requestedMenu, $subMenu)) {
|
74 |
+
return FALSE;
|
75 |
+
}
|
76 |
+
}
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
return TRUE;
|
84 |
+
}
|
85 |
+
|
86 |
+
function compareMenus($requestedMenu, $menu) {
|
87 |
+
$result = FALSE;
|
88 |
+
|
89 |
+
$parts = preg_split('/\?/', $menu);
|
90 |
+
if (count($parts) == 2) {
|
91 |
+
$params = preg_split('/&/', $parts[1]);
|
92 |
+
if (is_array($params) && (strpos($requestedMenu, $parts[0]) !== FALSE)) {
|
93 |
+
foreach ($params as $param) {
|
94 |
+
if (strpos($requestedMenu, $param) !== FALSE) {
|
95 |
+
$result = TRUE;
|
96 |
+
break;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
}
|
100 |
+
} else {
|
101 |
+
if (strpos($requestedMenu, $parts[0]) !== FALSE) {
|
102 |
+
$result = TRUE;
|
103 |
+
}
|
104 |
+
//TODO - Emergency solution
|
105 |
+
if (isset($_REQUEST['post_type']) && ($_REQUEST['post_type'] != 'post')
|
106 |
+
&& in_array($menu, array('edit.php', 'post-new.php'))) {
|
107 |
+
$result = FALSE;
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
return $result;
|
112 |
+
}
|
113 |
+
|
114 |
+
/*
|
115 |
+
function _compareMenus($requestedMenu, $menu) {
|
116 |
+
$result = FALSE;
|
117 |
+
|
118 |
+
$parts = preg_split('/\?/', $menu);
|
119 |
+
if (count($parts) == 2) {
|
120 |
+
$params = preg_split('/&/', $parts[1]);
|
121 |
+
if (is_array($params) && (strpos($requestedMenu, $parts[0]) !== FALSE)) {
|
122 |
+
foreach ($params as $param) {
|
123 |
+
if (strpos($requestedMenu, $param) !== FALSE) {
|
124 |
+
$result = TRUE;
|
125 |
+
break;
|
126 |
+
}
|
127 |
+
}
|
128 |
+
}
|
129 |
+
} else {
|
130 |
+
if (strpos($requestedMenu, $parts[0]) !== FALSE) {
|
131 |
+
$result = TRUE;
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
return $result;
|
136 |
+
}
|
137 |
+
*/
|
138 |
+
|
139 |
+
function unsetMainMenuItem($menuItem) {
|
140 |
+
global $menu, $submenu;
|
141 |
+
|
142 |
+
if (is_array($menu)) {
|
143 |
+
foreach ($menu as $key => $item) {
|
144 |
+
if ($item[2] == $menuItem) {
|
145 |
+
unset($menu[$key]);
|
146 |
+
unset($submenu[$menuItem]);
|
147 |
+
}
|
148 |
+
}
|
149 |
+
}
|
150 |
+
}
|
151 |
+
|
152 |
+
function unsetSubMenuItem($dummy, $submenuItem) {
|
153 |
+
global $submenu;
|
154 |
+
|
155 |
+
$result = FALSE; //not deleted
|
156 |
+
if (is_array($submenu)) {
|
157 |
+
foreach ($submenu as $main => $subs) {
|
158 |
+
if (is_array($subs)) {
|
159 |
+
foreach ($subs as $key => $item) {
|
160 |
+
if ($item[2] == $submenuItem) {
|
161 |
+
unset($submenu[$main][$key]);
|
162 |
+
return TRUE;
|
163 |
+
}
|
164 |
+
}
|
165 |
+
}
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
return $result;
|
170 |
+
}
|
171 |
+
|
172 |
+
}
|
173 |
+
|
174 |
+
?>
|
module/class-module_filtermetabox.php
ADDED
@@ -0,0 +1,79 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Copyright (C) <2011> Vasyl Martyniuk <martyniuk.vasyl@gmail.com>
|
5 |
+
|
6 |
+
This program is free software: you can redistribute it and/or modify
|
7 |
+
it under the terms of the GNU General Public License as published by
|
8 |
+
the Free Software Foundation, either version 3 of the License, or
|
9 |
+
(at your option) any later version.
|
10 |
+
|
11 |
+
This program is distributed in the hope that it will be useful,
|
12 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
+
GNU General Public License for more details.
|
15 |
+
|
16 |
+
You should have received a copy of the GNU General Public License
|
17 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
18 |
+
|
19 |
+
*/
|
20 |
+
|
21 |
+
class module_filterMetabox extends module_User {
|
22 |
+
|
23 |
+
private $cParams;
|
24 |
+
|
25 |
+
function __construct() {
|
26 |
+
|
27 |
+
parent::__construct();
|
28 |
+
|
29 |
+
$this->cParams = get_option(WPACCESS_PREFIX . 'options');
|
30 |
+
}
|
31 |
+
|
32 |
+
function manage($area = 'post') {
|
33 |
+
global $wp_meta_boxes, $post;
|
34 |
+
|
35 |
+
$userRoles = $this->getCurrentUserRole();
|
36 |
+
|
37 |
+
if (is_array($userRoles)) {
|
38 |
+
foreach ($userRoles as $role) {
|
39 |
+
// debug($this->cParams[$role]);
|
40 |
+
if (is_array($this->cParams[$role]) && is_array($this->cParams[$role]['metaboxes'])) {
|
41 |
+
switch ($area) {
|
42 |
+
case 'dashboard':
|
43 |
+
if (is_array($wp_meta_boxes['dashboard'])) {
|
44 |
+
foreach ($wp_meta_boxes['dashboard'] as $position => $metaboxes) {
|
45 |
+
foreach ($metaboxes as $priority => $metaboxes1) {
|
46 |
+
foreach ($metaboxes1 as $metabox => $data) {
|
47 |
+
if (isset($this->cParams[$role]['metaboxes']['dashboard-' . $metabox])) {
|
48 |
+
unset($wp_meta_boxes['dashboard'][$position][$priority][$metabox]);
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
52 |
+
}
|
53 |
+
}
|
54 |
+
break;
|
55 |
+
|
56 |
+
default:
|
57 |
+
if ($wp_meta_boxes[$post->post_type]) {
|
58 |
+
foreach ($wp_meta_boxes[$post->post_type] as $position => $metaboxes) {
|
59 |
+
foreach ($metaboxes as $priority => $metaboxes1) {
|
60 |
+
foreach ($metaboxes1 as $metabox => $data) {
|
61 |
+
if (isset($this->cParams[$role]['metaboxes'][$post->post_type . '-' . $metabox])) {
|
62 |
+
unset($wp_meta_boxes[$post->post_type][$position][$priority][$metabox]);
|
63 |
+
}
|
64 |
+
}
|
65 |
+
}
|
66 |
+
}
|
67 |
+
}
|
68 |
+
break;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
72 |
+
} else {
|
73 |
+
wp_die('You are not authorized to view this page');
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
}
|
78 |
+
|
79 |
+
?>
|
module/class-module_optionmanager.php
ADDED
@@ -0,0 +1,420 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Copyright (C) <2011> Vasyl Martyniuk <martyniuk.vasyl@gmail.com>
|
5 |
+
|
6 |
+
This program is free software: you can redistribute it and/or modify
|
7 |
+
it under the terms of the GNU General Public License as published by
|
8 |
+
the Free Software Foundation, either version 3 of the License, or
|
9 |
+
(at your option) any later version.
|
10 |
+
|
11 |
+
This program is distributed in the hope that it will be useful,
|
12 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
+
GNU General Public License for more details.
|
15 |
+
|
16 |
+
You should have received a copy of the GNU General Public License
|
17 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
18 |
+
|
19 |
+
*/
|
20 |
+
|
21 |
+
class module_optionManager extends mvb_corePlugin {
|
22 |
+
/*
|
23 |
+
* Indicate if return rendered HTML or
|
24 |
+
* print it
|
25 |
+
*
|
26 |
+
* @var bool
|
27 |
+
* @access private
|
28 |
+
*/
|
29 |
+
|
30 |
+
private $return;
|
31 |
+
|
32 |
+
/*
|
33 |
+
* Template object holder
|
34 |
+
*
|
35 |
+
* @var object <mvb_coreTemplate>
|
36 |
+
* @access private
|
37 |
+
*/
|
38 |
+
private $templObj;
|
39 |
+
|
40 |
+
/*
|
41 |
+
* HTML templated from file
|
42 |
+
*
|
43 |
+
* @var string Template to work with
|
44 |
+
* @access private
|
45 |
+
*/
|
46 |
+
private $template;
|
47 |
+
|
48 |
+
/*
|
49 |
+
* Array of User Roles
|
50 |
+
*
|
51 |
+
* @var array
|
52 |
+
* @access private
|
53 |
+
*/
|
54 |
+
private $roles;
|
55 |
+
|
56 |
+
/*
|
57 |
+
* Current role to work with
|
58 |
+
*
|
59 |
+
* @var string
|
60 |
+
* @access private
|
61 |
+
*/
|
62 |
+
private $currentRole;
|
63 |
+
|
64 |
+
/*
|
65 |
+
* Current plugin's params from option database table
|
66 |
+
*
|
67 |
+
* @var array
|
68 |
+
* @access private
|
69 |
+
*/
|
70 |
+
private $currentParams;
|
71 |
+
|
72 |
+
/*
|
73 |
+
* Initiate an object and other parameters
|
74 |
+
*
|
75 |
+
* @param string Current role to work with
|
76 |
+
* @param bool If TRUE, then return rendered HTML to the caller
|
77 |
+
*/
|
78 |
+
|
79 |
+
function __construct($curentRole = FALSE, $return = FALSE) {
|
80 |
+
global $table_prefix;
|
81 |
+
|
82 |
+
$this->pObj = $pObj;
|
83 |
+
$this->return = $return;
|
84 |
+
$this->templObj = new mvb_coreTemplate();
|
85 |
+
$templatePath = WPACCESS_TEMPLATE_DIR . 'admin_options.html';
|
86 |
+
$this->template = $this->templObj->readTemplate($templatePath);
|
87 |
+
$this->roles = get_option($table_prefix . 'user_roles');
|
88 |
+
$this->custom_caps = get_option(WPACCESS_PREFIX . 'custom_caps');
|
89 |
+
if (!is_array($this->custom_caps)) {
|
90 |
+
$this->custom_caps = array();
|
91 |
+
}
|
92 |
+
$roleList = array_keys($this->roles);
|
93 |
+
/*
|
94 |
+
* Expecting that there are more then 1 role :)
|
95 |
+
* Any way is event one, not a big deal
|
96 |
+
*/
|
97 |
+
$defaultRole = ($roleList[0] == 'administrator' ? $roleList[1] : $roleList[0]);
|
98 |
+
if (!$curentRole) {
|
99 |
+
$this->currentRole = $defaultRole;
|
100 |
+
} else {
|
101 |
+
/*
|
102 |
+
* If someone tried to cheat
|
103 |
+
*/
|
104 |
+
$this->currentRole = ($curentRole != 'administrator' ? $curentRole : $defaultRole);
|
105 |
+
}
|
106 |
+
|
107 |
+
$this->currentParams = get_option(WPACCESS_PREFIX . 'options');
|
108 |
+
$this->userSummary = count_users();
|
109 |
+
}
|
110 |
+
|
111 |
+
function getTemplate() {
|
112 |
+
|
113 |
+
return $this->template;
|
114 |
+
}
|
115 |
+
|
116 |
+
function manage() {
|
117 |
+
global $table_prefix;
|
118 |
+
|
119 |
+
if (isset($_POST['submited'])) {
|
120 |
+
$params = $_POST['wpaccess'];
|
121 |
+
$this->currentParams[$this->currentRole]['menu'] = $params[$this->currentRole]['menu'];
|
122 |
+
$this->currentParams[$this->currentRole]['metaboxes'] = $params[$this->currentRole]['metabox'];
|
123 |
+
update_option(WPACCESS_PREFIX . 'options', $this->currentParams);
|
124 |
+
|
125 |
+
/*
|
126 |
+
* Update Role's Capabilities
|
127 |
+
*/
|
128 |
+
$this->roles[$this->currentRole]['capabilities'] = $params[$this->currentRole]['advance'];
|
129 |
+
update_option($table_prefix . 'user_roles', $this->roles);
|
130 |
+
}
|
131 |
+
|
132 |
+
$mainHolder = $this->postbox('metabox-wpaccess-options', 'Options List', $this->getMainOptionsList());
|
133 |
+
$this->template = $this->renderRoleSelector($this->template);
|
134 |
+
$this->template = $this->renderDeleteRoleList($this->template);
|
135 |
+
$content = $this->templObj->replaceSub('MAIN_OPTIONS_LIST', $mainHolder, $this->template);
|
136 |
+
$markerArray = array(
|
137 |
+
'###current_role###' => $this->roles[$this->currentRole]['name'],
|
138 |
+
'###current_role_id###' => $this->currentRole,
|
139 |
+
'###site_url###' => get_option('siteurl'),
|
140 |
+
'###message_class###' => (isset($_POST['submited']) ? 'message-active' : 'message-passive'),
|
141 |
+
'###nonce###' => wp_nonce_field(WPACCESS_PREFIX . 'options'),
|
142 |
+
'###metabox_general_info###' => $this->postbox('metabox-wpaccess-general', 'General Info', '<p>For <b>Main Menu</b> and <b>Metaboxes&Widgets</b> select proper checkbox to restrict access to resource. For <b>Capabilities</b> - select proper checkbox to give new capability to role</p>'),
|
143 |
+
);
|
144 |
+
$content = $this->templObj->updateMarkers($markerArray, $content);
|
145 |
+
//add filter to future add-ons
|
146 |
+
$content = apply_filters(WPACCESS_PREFIX . 'option_page', $content);
|
147 |
+
|
148 |
+
if ($this->return) {
|
149 |
+
return $content;
|
150 |
+
} else {
|
151 |
+
echo $content;
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
function renderDeleteRoleList($template) {
|
156 |
+
|
157 |
+
$listTemplate = $this->templObj->retrieveSub('DELETE_ROLE_LIST', $template);
|
158 |
+
$itemTemplate = $this->templObj->retrieveSub('DELETE_ROLE_ITEM', $listTemplate);
|
159 |
+
$list = '';
|
160 |
+
if (is_array($this->roles)) {
|
161 |
+
foreach ($this->roles as $role => $data) {
|
162 |
+
if ($role == 'administrator') {
|
163 |
+
continue;
|
164 |
+
}
|
165 |
+
$list .= $this->renderDeleteRoleItem($role, $data, $itemTemplate);
|
166 |
+
}
|
167 |
+
}
|
168 |
+
$listTemplate = $this->templObj->replaceSub('DELETE_ROLE_ITEM', $list, $listTemplate);
|
169 |
+
|
170 |
+
return $this->templObj->replaceSub('DELETE_ROLE_LIST', $listTemplate, $template);
|
171 |
+
}
|
172 |
+
|
173 |
+
function renderDeleteRoleItem($role, $data, $template = '') {
|
174 |
+
/*
|
175 |
+
* This is used for ajax
|
176 |
+
*/
|
177 |
+
if (!$template) {
|
178 |
+
$listTemplate = $this->templObj->retrieveSub('DELETE_ROLE_LIST', $this->template);
|
179 |
+
$template = $this->templObj->retrieveSub('DELETE_ROLE_ITEM', $listTemplate);
|
180 |
+
}
|
181 |
+
$count = isset($this->userSummary['avail_roles'][$role]) ? $this->userSummary['avail_roles'][$role] : 0;
|
182 |
+
$deleteTemplate = $this->templObj->retrieveSub('DELETE_ROLE_BUTTON', $template);
|
183 |
+
$markerArray = array(
|
184 |
+
'###role_id###' => esc_js($role),
|
185 |
+
'###role_name###' => stripcslashes($data['name']),
|
186 |
+
'###count###' => $count,
|
187 |
+
);
|
188 |
+
if (!$count) {
|
189 |
+
$template = $this->templObj->replaceSub('DELETE_ROLE_BUTTON', $deleteTemplate, $template);
|
190 |
+
} else {
|
191 |
+
$template = $this->templObj->replaceSub('DELETE_ROLE_BUTTON', '', $template);
|
192 |
+
}
|
193 |
+
|
194 |
+
return $this->templObj->updateMarkers($markerArray, $template);
|
195 |
+
}
|
196 |
+
|
197 |
+
function getMainOptionsList() {
|
198 |
+
|
199 |
+
$mainHolder = $this->templObj->retrieveSub('MAIN_OPTIONS_LIST', $this->template);
|
200 |
+
|
201 |
+
return $this->renderMainMenuOptions($mainHolder);
|
202 |
+
}
|
203 |
+
|
204 |
+
function renderRoleSelector($template) {
|
205 |
+
$listTemplate = $this->templObj->retrieveSub('ROLE_LIST', $template);
|
206 |
+
$list = '';
|
207 |
+
if (is_array($this->roles)) {
|
208 |
+
foreach ($this->roles as $role => $data) {
|
209 |
+
if ($role == 'administrator') {
|
210 |
+
continue;
|
211 |
+
}
|
212 |
+
|
213 |
+
$markers = array(
|
214 |
+
'###value###' => $role,
|
215 |
+
'###title###' => stripcslashes($data['name']) . ' ', //nicer view :)
|
216 |
+
'###selected###' => ($this->currentRole == $role ? 'selected' : ''),
|
217 |
+
);
|
218 |
+
$list .= $this->templObj->updateMarkers($markers, $listTemplate);
|
219 |
+
}
|
220 |
+
}
|
221 |
+
|
222 |
+
return $this->templObj->replaceSub('ROLE_LIST', $list, $template);
|
223 |
+
}
|
224 |
+
|
225 |
+
function renderMainMenuOptions($template) {
|
226 |
+
global $menu, $submenu, $capabilitiesDesc;
|
227 |
+
/*
|
228 |
+
* First Tab - Main Menu
|
229 |
+
*/
|
230 |
+
$listTemplate = $this->templObj->retrieveSub('MAIN_MENU_LIST', $template);
|
231 |
+
$itemTemplate = $this->templObj->retrieveSub('MAIN_MENU_ITEM', $listTemplate);
|
232 |
+
$sublistTemplate = $this->templObj->retrieveSub('MAIN_MENU_SUBLIST', $itemTemplate);
|
233 |
+
$subitemTemplate = $this->templObj->retrieveSub('MAIN_MENU_SUBITEM', $sublistTemplate);
|
234 |
+
$list = '';
|
235 |
+
|
236 |
+
if (is_array($menu)) {
|
237 |
+
foreach ($menu as $menuItem) {
|
238 |
+
if (!$menuItem[0]) { //seperator
|
239 |
+
continue;
|
240 |
+
}
|
241 |
+
//render submenu
|
242 |
+
$subList = '';
|
243 |
+
if (isset($submenu[$menuItem[2]]) && is_array($submenu[$menuItem[2]])) {
|
244 |
+
foreach ($submenu[$menuItem[2]] as $submenuItem) {
|
245 |
+
$checked = $this->checkChecked('submenu', array($menuItem[2], $submenuItem[2]));
|
246 |
+
|
247 |
+
$markers = array(
|
248 |
+
'###submenu_name###' => $this->removeHTML($submenuItem[0]),
|
249 |
+
'###value###' => $submenuItem[2],
|
250 |
+
'###checked###' => $checked
|
251 |
+
);
|
252 |
+
$subList .= $this->templObj->updateMarkers($markers, $subitemTemplate);
|
253 |
+
}
|
254 |
+
$subList = $this->templObj->replaceSub('MAIN_MENU_SUBITEM', $subList, $sublistTemplate);
|
255 |
+
}
|
256 |
+
$tTempl = $this->templObj->replaceSub('MAIN_MENU_SUBLIST', $subList, $itemTemplate);
|
257 |
+
$markers = array(
|
258 |
+
'###name###' => $this->removeHTML($menuItem[0]),
|
259 |
+
'###id###' => $menuItem[5],
|
260 |
+
'###menu###' => $menuItem[2],
|
261 |
+
'###role###' => $this->currentRole,
|
262 |
+
'###whole_checked###' => $this->checkChecked('menu', array($menuItem[2]))
|
263 |
+
);
|
264 |
+
$list .= $this->templObj->updateMarkers($markers, $tTempl);
|
265 |
+
}
|
266 |
+
}
|
267 |
+
$listTemplate = $this->templObj->replaceSub('MAIN_MENU_ITEM', $list, $listTemplate);
|
268 |
+
$template = $this->templObj->replaceSub('MAIN_MENU_LIST', $listTemplate, $template);
|
269 |
+
/*
|
270 |
+
* Second Tab - Metaboxes
|
271 |
+
*/
|
272 |
+
$listTemplate = $this->renderMetaboxList($template);
|
273 |
+
$template = $this->templObj->replaceSub('METABOX_LIST', $listTemplate, $template);
|
274 |
+
/*
|
275 |
+
* Third Tab - Advance Settings
|
276 |
+
*/
|
277 |
+
$m = new module_User();
|
278 |
+
$capList = $m->getAllCaps();
|
279 |
+
|
280 |
+
$listTemplate = $this->templObj->retrieveSub('CAPABILITY_LIST', $template);
|
281 |
+
$itemTemplate = $this->templObj->retrieveSub('CAPABILITY_ITEM', $listTemplate);
|
282 |
+
$list = '';
|
283 |
+
if (is_array($capList)) {
|
284 |
+
foreach ($capList as $cap => $dump) {
|
285 |
+
$markers = array(
|
286 |
+
'###role###' => $this->currentRole,
|
287 |
+
'###title###' => $cap,
|
288 |
+
'###description###' => htmlspecialchars($capabilitiesDesc[$cap], ENT_QUOTES),
|
289 |
+
'###checked###' => $this->checkChecked('capability', array($cap)),
|
290 |
+
'###cap_name###' => $m->getCapabilityHumanTitle($cap)
|
291 |
+
);
|
292 |
+
$titem = $this->templObj->updateMarkers($markers, $itemTemplate);
|
293 |
+
if (!in_array($cap, $this->custom_caps)) {
|
294 |
+
$titem = $this->templObj->replaceSub('CAPABILITY_DELETE', '', $titem);
|
295 |
+
} else {
|
296 |
+
$titem = $this->templObj->replaceSub('CAPABILITY_DELETE', $this->templObj->retrieveSub('CAPABILITY_DELETE', $titem), $titem);
|
297 |
+
}
|
298 |
+
$list .= $titem;
|
299 |
+
}
|
300 |
+
}
|
301 |
+
$listTemplate = $this->templObj->replaceSub('CAPABILITY_ITEM', $list, $listTemplate);
|
302 |
+
$template = $this->templObj->replaceSub('CAPABILITY_LIST', $listTemplate, $template);
|
303 |
+
|
304 |
+
return $template;
|
305 |
+
}
|
306 |
+
|
307 |
+
function renderMetaboxList($template) {
|
308 |
+
global $wp_post_types;
|
309 |
+
|
310 |
+
$listTemplate = $this->templObj->retrieveSub('METABOX_LIST', $template);
|
311 |
+
|
312 |
+
$itemTemplate = $this->templObj->retrieveSub('METABOX_LIST_ITEM', $listTemplate);
|
313 |
+
$list = '';
|
314 |
+
|
315 |
+
|
316 |
+
if (is_array($this->currentParams['settings']['metaboxes'])) {
|
317 |
+
$plistTemplate = $this->templObj->retrieveSub('POST_METABOXES_LIST', $itemTemplate);
|
318 |
+
$pitemTemplate = $this->templObj->retrieveSub('POST_METABOXES_ITEM', $plistTemplate);
|
319 |
+
|
320 |
+
foreach ($this->currentParams['settings']['metaboxes'] as $post_type => $metaboxes) {
|
321 |
+
|
322 |
+
if (!isset($wp_post_types[$post_type])) {
|
323 |
+
if ($post_type != 'dashboard') {
|
324 |
+
continue;
|
325 |
+
}
|
326 |
+
}
|
327 |
+
|
328 |
+
$mList = '';
|
329 |
+
foreach ($metaboxes as $position => $metaboxes1) {
|
330 |
+
foreach ($metaboxes1 as $priority => $metaboxes2) {
|
331 |
+
|
332 |
+
if (is_array($metaboxes2) && count($metaboxes2)) {
|
333 |
+
foreach ($metaboxes2 as $id => $data) {
|
334 |
+
|
335 |
+
if (is_array($data)) {
|
336 |
+
//strip html for metaboxes. The reason - dashboard metaboxes
|
337 |
+
$data['title'] = $this->removeHTML($data['title']);
|
338 |
+
$markerArray = array(
|
339 |
+
'###priority###' => $priority,
|
340 |
+
'###internal_id###' => $post_type . '-' . $id,
|
341 |
+
'###position###' => $position,
|
342 |
+
'###checked###' => $this->checkChecked('metabox', array($post_type . '-' . $id)),
|
343 |
+
'###role###' => $this->currentRole
|
344 |
+
);
|
345 |
+
foreach ($data as $key => $value) {
|
346 |
+
$markerArray['###' . $key . '###'] = ($value ? $value : $data['id']);
|
347 |
+
}
|
348 |
+
$mList .= $this->templObj->updateMarkers($markerArray, $pitemTemplate);
|
349 |
+
}
|
350 |
+
}
|
351 |
+
}
|
352 |
+
}
|
353 |
+
}
|
354 |
+
$tList = $this->templObj->replaceSub('POST_METABOXES_ITEM', $mList, $plistTemplate);
|
355 |
+
$tList = $this->templObj->replaceSub('POST_METABOXES_LIST', $mList, $itemTemplate);
|
356 |
+
$label = ($post_type != 'dashboard' ? $wp_post_types[$post_type]->labels->name : 'Dashboard');
|
357 |
+
$list .= $this->templObj->updateMarkers(array('###post_type_label###' => $label), $tList);
|
358 |
+
}
|
359 |
+
$listTemplate = $this->templObj->replaceSub('METABOX_LIST_EMPTY', '', $listTemplate);
|
360 |
+
$listTemplate = $this->templObj->replaceSub('METABOX_LIST_ITEM', $list, $listTemplate);
|
361 |
+
} else {
|
362 |
+
$emptyMessage = $this->templObj->retrieveSub('METABOX_LIST_EMPTY', $listTemplate);
|
363 |
+
$listTemplate = $this->templObj->replaceSub('METABOX_LIST_ITEM', '', $listTemplate);
|
364 |
+
$listTemplate = $this->templObj->replaceSub('METABOX_LIST_EMPTY', $emptyMessage, $listTemplate);
|
365 |
+
}
|
366 |
+
|
367 |
+
return $listTemplate;
|
368 |
+
}
|
369 |
+
|
370 |
+
function removeHTML($text) {
|
371 |
+
$text = preg_replace(
|
372 |
+
array(
|
373 |
+
"'<span[^>]*?>.*?</span[^>]*?>'si",
|
374 |
+
), '', $text);
|
375 |
+
|
376 |
+
$text = preg_replace('/<a[^>]*href[[:space:]]*=[[:space:]]*["\']?[[:space:]]*javascript[^>]*/i', '', $text);
|
377 |
+
|
378 |
+
// Return clean content
|
379 |
+
return $text;
|
380 |
+
}
|
381 |
+
|
382 |
+
function checkChecked($type, $args) {
|
383 |
+
$checked = '';
|
384 |
+
switch ($type) {
|
385 |
+
case 'submenu':
|
386 |
+
if ($this->currentParams[$this->currentRole]['menu'][$args[0]]['sub'][$args[1]] ||
|
387 |
+
$this->currentParams[$this->currentRole]['menu'][$args[0]]['whole']) {
|
388 |
+
|
389 |
+
$checked = 'checked';
|
390 |
+
}
|
391 |
+
break;
|
392 |
+
|
393 |
+
case 'menu':
|
394 |
+
if ($this->currentParams[$this->currentRole]['menu'][$args[0]]['whole']) {
|
395 |
+
$checked = 'checked';
|
396 |
+
}
|
397 |
+
break;
|
398 |
+
|
399 |
+
case 'capability':
|
400 |
+
if (isset($this->roles[$this->currentRole][capabilities][$args[0]])) {
|
401 |
+
$checked = 'checked';
|
402 |
+
}
|
403 |
+
break;
|
404 |
+
|
405 |
+
case 'metabox':
|
406 |
+
if (isset($this->currentParams[$this->currentRole]['metaboxes'][$args[0]])) {
|
407 |
+
$checked = 'checked';
|
408 |
+
}
|
409 |
+
break;
|
410 |
+
|
411 |
+
default:
|
412 |
+
break;
|
413 |
+
}
|
414 |
+
|
415 |
+
return $checked;
|
416 |
+
}
|
417 |
+
|
418 |
+
}
|
419 |
+
|
420 |
+
?>
|
module/class-module_roles.php
ADDED
@@ -0,0 +1,61 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Copyright (C) <2011> Vasyl Martyniuk <martyniuk.vasyl@gmail.com>
|
5 |
+
|
6 |
+
This program is free software: you can redistribute it and/or modify
|
7 |
+
it under the terms of the GNU General Public License as published by
|
8 |
+
the Free Software Foundation, either version 3 of the License, or
|
9 |
+
(at your option) any later version.
|
10 |
+
|
11 |
+
This program is distributed in the hope that it will be useful,
|
12 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
+
GNU General Public License for more details.
|
15 |
+
|
16 |
+
You should have received a copy of the GNU General Public License
|
17 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
18 |
+
|
19 |
+
*/
|
20 |
+
|
21 |
+
class module_Roles extends WP_Roles {
|
22 |
+
|
23 |
+
function __construct() {
|
24 |
+
parent::__construct();
|
25 |
+
}
|
26 |
+
|
27 |
+
/*
|
28 |
+
* Create a New User's Role
|
29 |
+
*
|
30 |
+
* Use add_role function from WP_Roles to create a new User Role
|
31 |
+
*
|
32 |
+
* @param string User Role title
|
33 |
+
* @return array Result
|
34 |
+
*/
|
35 |
+
|
36 |
+
function createNewRole($newRoleTitle) {
|
37 |
+
global $table_prefix, $defCapabilities;
|
38 |
+
|
39 |
+
if (preg_match('/^[a-z0-9\s]{1,}$/i', trim($newRoleTitle))) {
|
40 |
+
$newRole = strtolower(str_replace(' ', '_', $newRoleTitle));
|
41 |
+
if ($this->add_role($newRole, $newRoleTitle, $defCapabilities)) {
|
42 |
+
$status = 'success';
|
43 |
+
} else {
|
44 |
+
$status = 'error';
|
45 |
+
}
|
46 |
+
} else {
|
47 |
+
//TODO - Now only one error appears on front - "Already exists"
|
48 |
+
$status = 'error';
|
49 |
+
}
|
50 |
+
|
51 |
+
$result = array(
|
52 |
+
'result' => $status,
|
53 |
+
'new_role' => $newRole,
|
54 |
+
);
|
55 |
+
|
56 |
+
return $result;
|
57 |
+
}
|
58 |
+
|
59 |
+
}
|
60 |
+
|
61 |
+
?>
|
module/class-module_user.php
ADDED
@@ -0,0 +1,57 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Copyright (C) <2011> Vasyl Martyniuk <martyniuk.vasyl@gmail.com>
|
5 |
+
|
6 |
+
This program is free software: you can redistribute it and/or modify
|
7 |
+
it under the terms of the GNU General Public License as published by
|
8 |
+
the Free Software Foundation, either version 3 of the License, or
|
9 |
+
(at your option) any later version.
|
10 |
+
|
11 |
+
This program is distributed in the hope that it will be useful,
|
12 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
+
GNU General Public License for more details.
|
15 |
+
|
16 |
+
You should have received a copy of the GNU General Public License
|
17 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
18 |
+
|
19 |
+
*/
|
20 |
+
|
21 |
+
class module_User extends WP_User {
|
22 |
+
|
23 |
+
function __construct() {
|
24 |
+
parent::__construct(get_current_user_id());
|
25 |
+
}
|
26 |
+
|
27 |
+
function getCurrentUserRole() {
|
28 |
+
if (is_array($this->data->{$this->cap_key})){
|
29 |
+
$result = array_keys($this->data->{$this->cap_key});
|
30 |
+
}else{
|
31 |
+
$result = array();
|
32 |
+
}
|
33 |
+
return $result;
|
34 |
+
}
|
35 |
+
|
36 |
+
function getAllCaps() {
|
37 |
+
|
38 |
+
return $this->allcaps;
|
39 |
+
}
|
40 |
+
|
41 |
+
function getCapabilityHumanTitle($cap) {
|
42 |
+
|
43 |
+
$title = array();
|
44 |
+
$parts = preg_split('/_/', $cap);
|
45 |
+
if (is_array($parts)) {
|
46 |
+
foreach ($parts as &$part) {
|
47 |
+
$part = ucfirst($part);
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
return implode(' ', $parts);
|
52 |
+
}
|
53 |
+
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
?>
|
mvb_config.php
ADDED
@@ -0,0 +1,63 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Copyright (C) <2011> Vasyl Martyniuk <martyniuk.vasyl@gmail.com>
|
5 |
+
|
6 |
+
This program is free software: you can redistribute it and/or modify
|
7 |
+
it under the terms of the GNU General Public License as published by
|
8 |
+
the Free Software Foundation, either version 3 of the License, or
|
9 |
+
(at your option) any later version.
|
10 |
+
|
11 |
+
This program is distributed in the hope that it will be useful,
|
12 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
+
GNU General Public License for more details.
|
15 |
+
|
16 |
+
You should have received a copy of the GNU General Public License
|
17 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
18 |
+
|
19 |
+
*/
|
20 |
+
|
21 |
+
/*
|
22 |
+
* Core constants
|
23 |
+
*/
|
24 |
+
define('AUTHOR_PREFIX', 'mvb_');
|
25 |
+
define('WPACCESS_PREFIX', 'wpaccess_');
|
26 |
+
define('WPACCESS_BASE_DIR', dirname(__FILE__) . '/');
|
27 |
+
define('WPACCESS_DIRNAME', basename(WPACCESS_BASE_DIR));
|
28 |
+
/*
|
29 |
+
* Plugin constants
|
30 |
+
*/
|
31 |
+
define('WPACCESS_BASE_URL', WP_PLUGIN_URL . '/' . WPACCESS_DIRNAME . '/');
|
32 |
+
|
33 |
+
|
34 |
+
define('WPACCESS_TEMPLATE_DIR', WPACCESS_BASE_DIR . 'templates/');
|
35 |
+
define('WPACCESS_CSS_URL', WPACCESS_BASE_URL . 'css/');
|
36 |
+
define('WPACCESS_JS_URL', WPACCESS_BASE_URL . 'js/');
|
37 |
+
//load general files
|
38 |
+
require_once('mvb_functions.php');
|
39 |
+
require_once('mvb_labels.php');
|
40 |
+
|
41 |
+
//load auther's private core library
|
42 |
+
if (!class_exists('mvb_corePlugin')) {
|
43 |
+
require_once('core/class-mvb_coreplugin.php');
|
44 |
+
}
|
45 |
+
if (!class_exists('mvb_coreTemplate')) {
|
46 |
+
require_once('core/class-mvb_coretemplate.php');
|
47 |
+
}
|
48 |
+
|
49 |
+
//load additional classes
|
50 |
+
require_once('module/class-module_roles.php');
|
51 |
+
require_once('module/class-module_user.php');
|
52 |
+
require_once('module/class-module_filtermenu.php');
|
53 |
+
require_once('module/class-module_filtermetabox.php');
|
54 |
+
require_once('module/class-module_optionmanager.php');
|
55 |
+
|
56 |
+
/*
|
57 |
+
* Default capabilities for new Role
|
58 |
+
*/
|
59 |
+
$defCapabilities = array(
|
60 |
+
'read' => 1,
|
61 |
+
'level_0' => 1
|
62 |
+
);
|
63 |
+
?>
|
mvb_functions.php
ADDED
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Copyright (C) <2011> Vasyl Martyniuk <martyniuk.vasyl@gmail.com>
|
5 |
+
|
6 |
+
This program is free software: you can redistribute it and/or modify
|
7 |
+
it under the terms of the GNU General Public License as published by
|
8 |
+
the Free Software Foundation, either version 3 of the License, or
|
9 |
+
(at your option) any later version.
|
10 |
+
|
11 |
+
This program is distributed in the hope that it will be useful,
|
12 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
+
GNU General Public License for more details.
|
15 |
+
|
16 |
+
You should have received a copy of the GNU General Public License
|
17 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
18 |
+
|
19 |
+
*/
|
20 |
+
/*
|
21 |
+
function debug($what) {
|
22 |
+
echo '<pre>';
|
23 |
+
print_r($what);
|
24 |
+
echo '</pre>';
|
25 |
+
}
|
26 |
+
*
|
27 |
+
*/
|
28 |
+
|
29 |
+
|
30 |
+
function init_wpaccess() {
|
31 |
+
static $mvb_wpAccess;
|
32 |
+
|
33 |
+
$mvb_wpAccess = new mvb_WPAccess();
|
34 |
+
}
|
35 |
+
|
36 |
+
?>
|
mvb_labels.php
ADDED
@@ -0,0 +1,211 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Copyright (C) <2011> Vasyl Martyniuk <martyniuk.vasyl@gmail.com>
|
5 |
+
|
6 |
+
This program is free software: you can redistribute it and/or modify
|
7 |
+
it under the terms of the GNU General Public License as published by
|
8 |
+
the Free Software Foundation, either version 3 of the License, or
|
9 |
+
(at your option) any later version.
|
10 |
+
|
11 |
+
This program is distributed in the hope that it will be useful,
|
12 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
+
GNU General Public License for more details.
|
15 |
+
|
16 |
+
You should have received a copy of the GNU General Public License
|
17 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
18 |
+
|
19 |
+
*/
|
20 |
+
|
21 |
+
/*
|
22 |
+
* TODO - Kindly to say, not the best way. But enough for first time
|
23 |
+
*
|
24 |
+
*/
|
25 |
+
|
26 |
+
$capabilitiesDesc = array(
|
27 |
+
'switch_themes' => '
|
28 |
+
<b>Since 2.0</b><br/>
|
29 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels">Administration Panel</a> options:<br/>
|
30 |
+
- Appearance<br/>
|
31 |
+
- Appearance > Themes',
|
32 |
+
'edit_themes' => '
|
33 |
+
<b>Since 2.0</b><br/>
|
34 |
+
Allows access to Appearance > <a href="http://codex.wordpress.org/Appearance_Editor_SubPanel" target="_blank" title="Appearance Editor SubPanel">Theme Editor</a> to edit theme files.',
|
35 |
+
'edit_theme_options' => '
|
36 |
+
<b>Since 3.0</b><br/>
|
37 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels">Administration Panel</a> options:<br/>
|
38 |
+
- Appearance > <a href="http://codex.wordpress.org/Appearance_Background_SubPanel" target="_blank" title="Appearance Background SubPanel" >Background</a><br/>
|
39 |
+
- Appearance > <a href="http://codex.wordpress.org/Appearance_Header_SubPanel" target="_blank" title="Appearance Header SubPanel" >Header</a><br/>
|
40 |
+
- Appearance > <a href="http://codex.wordpress.org/Appearance_Menus_SubPanel" target="_blank" title="Appearance Menus SubPanel" >Menus</a><br/>
|
41 |
+
- Appearance > <a href="http://codex.wordpress.org/Appearance_Widgets_SubPanel" target="_blank" title="Appearance Widgets SubPanel" >Widgets</a><br/>
|
42 |
+
- Also allows access to Theme Options pages if they are included in the Theme',
|
43 |
+
'edit_published_posts' => '
|
44 |
+
<div style="font-size:10px;"><b>Since 2.0</b><br/>
|
45 |
+
User can edit their published posts. <i>This capability is off by default.</i>
|
46 |
+
The core checks the capability <b>edit_posts</b>, but on demand this check is changed to <b>edit_published_posts</b>.<br/>
|
47 |
+
If you don\'t want a user to be able edit his published posts, remove this capability. <i>(see also <a href="http://www.im-web-gefunden.de/wordpress-plugins/role-manager/#comment-5602" target="_blank" >this comment</a> on the <a href="http://www.im-web-gefunden.de/wordpress-plugins/role-manager/" target="_blank" title="http://www.im-web-gefunden.de/wordpress-plugins/role-manager/">Role Manager Plugin Homepage</a>).</i></div>',
|
48 |
+
'edit_others_posts' => '
|
49 |
+
<div style="font-size:10px;"><b>Since 2.0</b><br/>
|
50 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels" >Administration Panel</a> options:<br/>
|
51 |
+
- Manage > Comments (<i>Lets user delete and edit every comment, see edit_posts above</i>)<br/>
|
52 |
+
- user can edit other users\' posts through function get_others_drafts()<br/>
|
53 |
+
- user can see other users\' images in inline-uploading [no? see <a href="http://trac.wordpress.org/file/trunk/wp-admin/inline-uploading.php" target="_blank" >inline-uploading.php</a>]<br/>
|
54 |
+
',
|
55 |
+
'manage_options' => '
|
56 |
+
<b>Since 2.0</b><br/>
|
57 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels">Administration Panel</a> options:
|
58 |
+
<table class="description-table">
|
59 |
+
<tbody>
|
60 |
+
<tr>
|
61 |
+
<td>Settings > General</td>
|
62 |
+
<td>Settings > Writing</td>
|
63 |
+
</tr>
|
64 |
+
<tr>
|
65 |
+
<td>Settings > Writing</td>
|
66 |
+
<td>Settings > Reading</td>
|
67 |
+
</tr>
|
68 |
+
<tr>
|
69 |
+
<td>Settings > Discussion</td>
|
70 |
+
<td>Settings > Permalinks</td>
|
71 |
+
</tr>
|
72 |
+
<tr>
|
73 |
+
<td>Settings > Miscellaneous</td>
|
74 |
+
<td> </td>
|
75 |
+
</tr>
|
76 |
+
</tbody>
|
77 |
+
</table>',
|
78 |
+
'install_themes' => '
|
79 |
+
<b>Since 2.0</b><br/>
|
80 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels">Administration Panel</a> options:<br/>
|
81 |
+
- Appearance > Add New Themes',
|
82 |
+
'activate_plugins' => '
|
83 |
+
<b>Since 2.0</b><br/>
|
84 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels" >Administration Panel</a> options:<br/>
|
85 |
+
- <a href="http://codex.wordpress.org/Administration_Panels#Plugins_-_Add_Functionality_to_your_Blog" target="_blank" title="Administration Panels">Plugins</a>',
|
86 |
+
'edit_plugins' => '
|
87 |
+
<b>Since 2.0</b><br/>
|
88 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels">Administration Panel</a> options:<br/>
|
89 |
+
- <a href="http://codex.wordpress.org/Administration_Panels#Plugins_-_Add_Functionality_to_your_Blog" target="_blank" title="Administration Panels">Plugins</a> > <a href="http://codex.wordpress.org/Administration_Panels#Plugin_Editor" target="_blank" title="Administration Panels">Plugin Editor</a>',
|
90 |
+
'install_plugins' => '
|
91 |
+
<b>Since 2.0</b>
|
92 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels">Administration Panel</a> options:<br/>
|
93 |
+
- <a href="http://codex.wordpress.org/Administration_Panels#Plugins_-_Add_Functionality_to_your_Blog" target="_blank" title="Administration Panels">Plugins</a> > Add New',
|
94 |
+
'edit_users' => '
|
95 |
+
<b>Since 2.0</b><br/>
|
96 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels">Administration Panel</a> options:<br/>
|
97 |
+
- <a href="http://codex.wordpress.org/Administration_Panels#Users_-_Your_Blogging_Family" target="_blank" title="Administration Panels">Users</a>',
|
98 |
+
'edit_files' => '
|
99 |
+
<b>Since 2.0</b><br/>
|
100 |
+
<b>Note:</b> No longer used.',
|
101 |
+
'moderate_comments' => '
|
102 |
+
<b>Since 2.0</b><br/>
|
103 |
+
Allows users to moderate comments from the Comments SubPanel (although a user needs the <b>edit_posts</b> Capability in order to access this)',
|
104 |
+
'manage_categories' => '
|
105 |
+
<b>Since 2.0</b><br/>
|
106 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels">Administration Panel</a> options:<br/>
|
107 |
+
- Posts > Categories<br/>
|
108 |
+
- Links > Categories',
|
109 |
+
'manage_links' => '
|
110 |
+
<b>Since 2.0</b><br/>
|
111 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels">Administration Panel</a> options:<br/>
|
112 |
+
- Links<br/>
|
113 |
+
- Links > Add New',
|
114 |
+
'upload_files' => '
|
115 |
+
<b>Since 2.0</b><br/>
|
116 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels">Administration Panel</a> options:<br/>
|
117 |
+
- Media<br/>
|
118 |
+
- Media > Add New',
|
119 |
+
'import' => '
|
120 |
+
<b>Since 2.0</b><br/>
|
121 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels">Administration Panel</a> options:<br/>
|
122 |
+
- Tools > Import<br/>
|
123 |
+
- Tools > Export',
|
124 |
+
'unfiltered_html' => '
|
125 |
+
<b>Since 2.0</b><br/>
|
126 |
+
Allows user to post HTML markup or even JavaScript code in pages, posts, and comments.<br/><br/>
|
127 |
+
<b>Note:</b> Enabling this option for untrusted users may result in their posting malicious or poorly formatted code.',
|
128 |
+
'edit_posts' => '
|
129 |
+
<b>Since 2.0</b><br/>
|
130 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels">Administration Panel</a> options:<br/>
|
131 |
+
- Posts<br/>
|
132 |
+
- Posts > Add New<br/>
|
133 |
+
- Comments<br/>
|
134 |
+
- Comments > Awaiting Moderation',
|
135 |
+
'publish_posts' => '
|
136 |
+
<b>Since 2.0</b><br/>
|
137 |
+
See and use the "publish" button when editing their post <i>(otherwise they can only save drafts)</i><br/>
|
138 |
+
Can use XML-RPC to publish <i>(otherwise they get a "Sorry, you can not post on this weblog or category.")</i>',
|
139 |
+
'edit_pages' => '
|
140 |
+
<b>Since 2.0</b><br/>
|
141 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels">Administration Panel</a> options:<br/>
|
142 |
+
- Pages<br/>
|
143 |
+
- Pages > Add New',
|
144 |
+
'read' => '
|
145 |
+
<b>Since 2.0</b><br/>
|
146 |
+
Allows access to <a href="http://codex.wordpress.org/Administration_Panels" target="_blank" title="Administration Panels">Administration Panel</a> options:<br/>
|
147 |
+
- <a href="http://codex.wordpress.org/Dashboard_Dashboard_SubPanel" target="_blank" title="Dashboard Dashboard SubPanel">Dashboard</a><br/>
|
148 |
+
- Users > Your Profile<br/>
|
149 |
+
<i>Used nowhere in the core code except the menu.php</i>',
|
150 |
+
'edit_others_pages' => '<b>Since 2.1</b>',
|
151 |
+
'edit_published_pages' => '<b>Since 2.1</b>',
|
152 |
+
'edit_published_pages_2' => '<b>Since 2.1</b>',
|
153 |
+
'delete_pages' => '<b>Since 2.1</b>',
|
154 |
+
'delete_others_pages' => '<b>Since 2.1</b>',
|
155 |
+
'delete_published_pages' => '<b>Since 2.1</b>',
|
156 |
+
'delete_posts' => '<b>Since 2.1</b>',
|
157 |
+
'delete_others_posts' => '<b>Since 2.1</b>',
|
158 |
+
'delete_published_posts' => '<b>Since 2.1</b>',
|
159 |
+
'delete_private_posts' => '<b>Since 2.1</b>',
|
160 |
+
'edit_private_posts' => '<b>Since 2.1</b>',
|
161 |
+
'read_private_posts' => '<b>Since 2.1</b>',
|
162 |
+
'delete_private_pages' => '<b>Since 2.1</b>',
|
163 |
+
'edit_private_pages' => '<b>Since 2.1</b>',
|
164 |
+
'read_private_pages' => '<b>Since 2.1</b>',
|
165 |
+
'delete_users' => '<b>Since 2.1</b>',
|
166 |
+
'create_users' => '<b>Since 2.1</b>',
|
167 |
+
'unfiltered_upload' => '<b>Since 2.3</b>',
|
168 |
+
'edit_dashboard' => '<b>Since 2.5</b>',
|
169 |
+
'update_plugins' => '<b>Since 2.6</b>',
|
170 |
+
'delete_plugins' => '<b>Since 2.6</b>',
|
171 |
+
'update_core' => '<b>Since 3.0</b>',
|
172 |
+
'list_users' => '<b>Since 3.0</b>',
|
173 |
+
'remove_users' => '<b>Since 3.0</b>',
|
174 |
+
'add_users' => '<b>Since 3.0</b>',
|
175 |
+
'promote_users' => '<b>Since 3.0</b>',
|
176 |
+
'delete_themes' => '<b>Since 3.0</b>',
|
177 |
+
'export' => '<b>Since 3.0</b>',
|
178 |
+
'edit_comment' => '<b>Since 3.1</b>',
|
179 |
+
'manage_sites' => '
|
180 |
+
<b>Since 3.0</b><br/>
|
181 |
+
Multi-site only<br/>
|
182 |
+
Allows access to <a href="http://codex.wordpress.org/Network_Admin#Sites" target="_blank" title="Network Admin">Network Sites</a> menu<br/>
|
183 |
+
Allows user to add, edit, delete, archive, unarchive, activate, deactivate, spam and unspam new site/blog in the network',
|
184 |
+
'manage_network_users' => '
|
185 |
+
<b>Since 3.0</b><br/>
|
186 |
+
Multi-site only<br/>
|
187 |
+
Allows access to <a href="http://codex.wordpress.org/Network_Admin#Users" target="_blank" title="Network Admin">Network Users</a> menu',
|
188 |
+
'manage_network_themes' => '
|
189 |
+
<b>Since 3.0</b><br/>
|
190 |
+
Multi-site only<br/>
|
191 |
+
Allows access to <a href="http://codex.wordpress.org/Network_Admin#Themes" target="_blank" title="Network Admin">Network Themes</a> menu',
|
192 |
+
'manage_network_options' => '
|
193 |
+
<b>Since 3.0</b><br/>
|
194 |
+
Multi-site only<br/>
|
195 |
+
Allows access to <a href="http://codex.wordpress.org/Network_Admin#Settings" target="_blank" title="Network Admin">Network Options</a> menu',
|
196 |
+
'level_0' => 'User Level 0 converts to <a href="javascript:void(0);" title="">Subscriber</a>',
|
197 |
+
'level_1' => 'User Level 1 converts to <a href="javascript:void(0);" title="">Contributor</a>',
|
198 |
+
'level_2' => 'User Level 2 converts to <a href="javascript:void(0);" title="">Author</a>',
|
199 |
+
'level_3' => 'User Level 3 converts to <a href="javascript:void(0);" title="">Author</a>',
|
200 |
+
'level_4' => 'User Level 4 converts to <a href="javascript:void(0);" title="">Author</a>',
|
201 |
+
'level_5' => 'User Level 5 converts to <a href="javascript:void(0);" title="">Editor</a>',
|
202 |
+
'level_6' => 'User Level 6 converts to <a href="javascript:void(0);" title="">Editor</a>',
|
203 |
+
'level_7' => 'User Level 7 converts to <a href="javascript:void(0);" title="">Editor</a>',
|
204 |
+
'level_8' => 'User Level 8 converts to <a href="javascript:void(0);" title="">Administrator</a>',
|
205 |
+
'level_9' => 'User Level 9 converts to <a href="javascript:void(0);" title="">Administrator</a>',
|
206 |
+
'level_10' => 'User Level 10 converts to <a href="javascript:void(0);" title="">Administrator</a>',
|
207 |
+
'publish_pages' => '<b>Description does not exist</b>',
|
208 |
+
'administrator' => '<b>Description does not exist</b>',
|
209 |
+
'update_themes' => '<b>Description does not exist</b>',
|
210 |
+
);
|
211 |
+
?>
|
mvb_wp_access.php
ADDED
@@ -0,0 +1,612 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin Name: Advanced Access Manager
|
5 |
+
Description: Manage user roles and capabilities
|
6 |
+
Version: 1.0
|
7 |
+
Author: Vasyl Martyniuk
|
8 |
+
Author URI: http://www.whimba.com
|
9 |
+
*/
|
10 |
+
|
11 |
+
/*
|
12 |
+
Copyright (C) <2011> Vasyl Martyniuk <martyniuk.vasyl@gmail.com>
|
13 |
+
|
14 |
+
This program is free software: you can redistribute it and/or modify
|
15 |
+
it under the terms of the GNU General Public License as published by
|
16 |
+
the Free Software Foundation, either version 3 of the License, or
|
17 |
+
(at your option) any later version.
|
18 |
+
|
19 |
+
This program is distributed in the hope that it will be useful,
|
20 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
+
GNU General Public License for more details.
|
23 |
+
|
24 |
+
You should have received a copy of the GNU General Public License
|
25 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
26 |
+
|
27 |
+
*/
|
28 |
+
|
29 |
+
/* Version check */
|
30 |
+
global $wp_version;
|
31 |
+
|
32 |
+
$exit_msg = 'Advanced Access Manager requires WordPress 3.1 or newer. '
|
33 |
+
. '<a href="http://codex.wordpress.org/Upgrading_WordPress">Update now!</a>';
|
34 |
+
|
35 |
+
if (version_compare($wp_version, '3.1', '<')) {
|
36 |
+
exit($exit_msg);
|
37 |
+
}
|
38 |
+
|
39 |
+
if (phpversion() < '5') {
|
40 |
+
exit('Advanced Access Manager requires PHP 5 or newer');
|
41 |
+
}
|
42 |
+
|
43 |
+
require_once('mvb_config.php');
|
44 |
+
|
45 |
+
class mvb_WPAccess extends mvb_corePlugin {
|
46 |
+
|
47 |
+
function __construct() {
|
48 |
+
global $post;
|
49 |
+
|
50 |
+
if (is_admin()) {
|
51 |
+
|
52 |
+
if ($_GET['page'] == 'wp_access') {
|
53 |
+
parent::__construct(WPACCESS_BASE_URL, WP_PLUGIN_DIR);
|
54 |
+
//css
|
55 |
+
wp_enqueue_style('jquery-ui', WPACCESS_CSS_URL . 'ui/jquery.ui.all.css');
|
56 |
+
wp_enqueue_style('wpaccess-style', WPACCESS_CSS_URL . 'wpaccess_style.css');
|
57 |
+
}
|
58 |
+
|
59 |
+
/*
|
60 |
+
* Configure Plugin Environmnet
|
61 |
+
*/
|
62 |
+
add_action('admin_menu', array($this, 'admin_menu'), 999);
|
63 |
+
add_action('wp_print_scripts', array($this, 'wp_print_scripts'), 1);
|
64 |
+
add_action('admin_action_render_rolelist', array($this, 'render_rolelist'));
|
65 |
+
|
66 |
+
//Add Capabilities WP core forgot to
|
67 |
+
add_filter('map_meta_cap', array($this, 'map_meta_cap'), 10, 4);
|
68 |
+
|
69 |
+
//ajax
|
70 |
+
add_action('wp_ajax_mvbam', array($this, 'ajax'));
|
71 |
+
|
72 |
+
/*
|
73 |
+
* Initialize Metabox filter hook
|
74 |
+
* Temporary - This was the only way to inject into process of metabox
|
75 |
+
* rendering
|
76 |
+
*/
|
77 |
+
if (isset($_GET['post'])) {
|
78 |
+
$post_type = get_post_field('post_type', (int) $_GET['post']);
|
79 |
+
} elseif (isset($_POST['post_ID'])) {
|
80 |
+
$post_type = get_post_field('post_type', (int) $_POST['post_ID']);
|
81 |
+
} elseif (isset($_REQUEST['post_type'])) {
|
82 |
+
$post_type = trim($_REQUEST['post_type']);
|
83 |
+
} else {
|
84 |
+
$post_type = 'post';
|
85 |
+
}
|
86 |
+
|
87 |
+
if ($post_type) {
|
88 |
+
add_action("do_meta_boxes", array($this, 'metaboxes'), 999, 3);
|
89 |
+
}
|
90 |
+
}
|
91 |
+
/*
|
92 |
+
* Main Hook, used to check if user is authorized to do an action
|
93 |
+
* Executes after WordPress environment loaded and configured
|
94 |
+
*/
|
95 |
+
add_action('wp_loaded', array($this, 'check'), 999);
|
96 |
+
}
|
97 |
+
|
98 |
+
public function map_meta_cap($caps, $cap, $user_id, $args) {
|
99 |
+
|
100 |
+
switch ($cap) {
|
101 |
+
case 'edit_comment':
|
102 |
+
$caps[] = 'edit_comment';
|
103 |
+
break;
|
104 |
+
|
105 |
+
default:
|
106 |
+
break;
|
107 |
+
}
|
108 |
+
|
109 |
+
return $caps;
|
110 |
+
}
|
111 |
+
|
112 |
+
/*
|
113 |
+
* Ajax interface
|
114 |
+
*/
|
115 |
+
|
116 |
+
public function ajax() {
|
117 |
+
|
118 |
+
check_ajax_referer(WPACCESS_PREFIX . 'ajax');
|
119 |
+
|
120 |
+
switch ($_POST['sub_action']) {
|
121 |
+
case 'restore_role':
|
122 |
+
$this->restore_role($_POST['role']);
|
123 |
+
break;
|
124 |
+
|
125 |
+
case 'create_role':
|
126 |
+
$this->create_role();
|
127 |
+
break;
|
128 |
+
|
129 |
+
case 'delete_role':
|
130 |
+
$this->delete_role();
|
131 |
+
break;
|
132 |
+
|
133 |
+
case 'render_metabox_list':
|
134 |
+
$this->render_metabox_list();
|
135 |
+
break;
|
136 |
+
|
137 |
+
case 'initiate_wm':
|
138 |
+
$this->initiate_wm();
|
139 |
+
break;
|
140 |
+
|
141 |
+
case 'initiate_url':
|
142 |
+
$this->initiate_url();
|
143 |
+
break;
|
144 |
+
|
145 |
+
case 'add_capability':
|
146 |
+
$this->add_capability();
|
147 |
+
break;
|
148 |
+
|
149 |
+
case 'delete_capability':
|
150 |
+
$this->delete_capability();
|
151 |
+
break;
|
152 |
+
|
153 |
+
default:
|
154 |
+
die();
|
155 |
+
break;
|
156 |
+
}
|
157 |
+
}
|
158 |
+
|
159 |
+
/*
|
160 |
+
* Add New Capability
|
161 |
+
*
|
162 |
+
*/
|
163 |
+
|
164 |
+
protected function add_capability() {
|
165 |
+
global $wpdb;
|
166 |
+
|
167 |
+
$cap = strtolower(trim($_POST['cap']));
|
168 |
+
|
169 |
+
if ($cap) {
|
170 |
+
$cap = str_replace(array(' ', "'", '"'), array('_', '', ''), $cap);
|
171 |
+
$m = new module_User();
|
172 |
+
$capList = $m->getAllCaps();
|
173 |
+
|
174 |
+
if (!isset($capList[$cap])) { //create new capability
|
175 |
+
$roles = get_option($wpdb->prefix . 'user_roles');
|
176 |
+
$roles['administrator']['capabilities'][$cap] = 1; //add this role for admin automatically
|
177 |
+
update_option($wpdb->prefix . 'user_roles', $roles);
|
178 |
+
//save this capability as custom created
|
179 |
+
$custom_caps = get_option(WPACCESS_PREFIX . 'custom_caps');
|
180 |
+
if (!is_array($custom_caps)) {
|
181 |
+
$custom_caps = array();
|
182 |
+
}
|
183 |
+
$custom_caps[] = $cap;
|
184 |
+
update_option(WPACCESS_PREFIX . 'custom_caps', $custom_caps);
|
185 |
+
//render html
|
186 |
+
$tmpl = new mvb_coreTemplate();
|
187 |
+
$templatePath = WPACCESS_TEMPLATE_DIR . 'admin_options.html';
|
188 |
+
$template = $tmpl->readTemplate($templatePath);
|
189 |
+
$listTemplate = $tmpl->retrieveSub('CAPABILITY_LIST', $template);
|
190 |
+
$itemTemplate = $tmpl->retrieveSub('CAPABILITY_ITEM', $listTemplate);
|
191 |
+
$markers = array(
|
192 |
+
'###role###' => $_POST['role'],
|
193 |
+
'###title###' => $cap,
|
194 |
+
'###description###' => '',
|
195 |
+
'###checked###' => 'checked',
|
196 |
+
'###cap_name###' => $m->getCapabilityHumanTitle($cap)
|
197 |
+
);
|
198 |
+
$titem = $tmpl->updateMarkers($markers, $itemTemplate);
|
199 |
+
$titem = $tmpl->replaceSub('CAPABILITY_DELETE', $tmpl->retrieveSub('CAPABILITY_DELETE', $titem), $titem);
|
200 |
+
|
201 |
+
$result = array(
|
202 |
+
'status' => 'success',
|
203 |
+
'html' => $titem
|
204 |
+
);
|
205 |
+
} else {
|
206 |
+
$result = array(
|
207 |
+
'status' => 'error',
|
208 |
+
'message' => 'Capability ' . $_POST['cap'] . ' already exists'
|
209 |
+
);
|
210 |
+
}
|
211 |
+
} else {
|
212 |
+
$result = array(
|
213 |
+
'status' => 'error',
|
214 |
+
'message' => 'Empty Capability'
|
215 |
+
);
|
216 |
+
}
|
217 |
+
|
218 |
+
die(json_encode($result));
|
219 |
+
}
|
220 |
+
|
221 |
+
/*
|
222 |
+
* Delete capability
|
223 |
+
*/
|
224 |
+
|
225 |
+
protected function delete_capability() {
|
226 |
+
global $wpdb;
|
227 |
+
|
228 |
+
$cap = trim($_POST['cap']);
|
229 |
+
$custom_caps = get_option(WPACCESS_PREFIX . 'custom_caps');
|
230 |
+
|
231 |
+
if (in_array($cap, $custom_caps)) {
|
232 |
+
$roles = get_option($wpdb->prefix . 'user_roles');
|
233 |
+
if (is_array($roles)) {
|
234 |
+
foreach ($roles as &$role) {
|
235 |
+
if (isset($role['capabilities'][$cap])) {
|
236 |
+
unset($role['capabilities'][$cap]);
|
237 |
+
}
|
238 |
+
}
|
239 |
+
}
|
240 |
+
update_option($wpdb->prefix . 'user_roles', $roles);
|
241 |
+
$result = array(
|
242 |
+
'status' => 'success'
|
243 |
+
);
|
244 |
+
} else {
|
245 |
+
$result = array(
|
246 |
+
'status' => 'error',
|
247 |
+
'message' => 'Current Capability can not be deleted'
|
248 |
+
);
|
249 |
+
}
|
250 |
+
|
251 |
+
die(json_encode($result));
|
252 |
+
}
|
253 |
+
|
254 |
+
/*
|
255 |
+
* Restore default User Roles
|
256 |
+
*
|
257 |
+
* @param string User Role
|
258 |
+
* @return bool True if success
|
259 |
+
*/
|
260 |
+
|
261 |
+
protected function restore_role($role) {
|
262 |
+
global $wpdb;
|
263 |
+
|
264 |
+
//get current roles settings
|
265 |
+
$or_roles = get_option(WPACCESS_PREFIX . 'original_user_roles');
|
266 |
+
$roles = get_option($wpdb->prefix . 'user_roles');
|
267 |
+
$options = get_option(WPACCESS_PREFIX . 'options');
|
268 |
+
|
269 |
+
if (isset($or_roles[$role]) && isset($roles[$role]) && ($role != 'administrator')) {
|
270 |
+
$roles[$role] = $or_roles[$role];
|
271 |
+
//save current setting to DB
|
272 |
+
update_option($wpdb->prefix . 'user_roles', $roles);
|
273 |
+
//unset all option with metaboxes and menu
|
274 |
+
unset($options[$role]);
|
275 |
+
update_option(WPACCESS_PREFIX . 'options', $options);
|
276 |
+
|
277 |
+
$result = array('status' => 'success');
|
278 |
+
} else {
|
279 |
+
$result = array('status' => 'error');
|
280 |
+
}
|
281 |
+
|
282 |
+
die(json_encode($result));
|
283 |
+
}
|
284 |
+
|
285 |
+
/*
|
286 |
+
* Initialize or filter the list of metaboxes
|
287 |
+
*
|
288 |
+
* This function is responsible for initializing the list of metaboxes if
|
289 |
+
* "grab" parameter with value "metabox" if precent on _GET global array.
|
290 |
+
* In other way it filters the list of metaboxes according to user's Role
|
291 |
+
*
|
292 |
+
* @param mixed Result of execution get_user_option() in user.php file
|
293 |
+
* @param string $option User option name
|
294 |
+
* @param int $user Optional. User ID
|
295 |
+
* @return mixed
|
296 |
+
*/
|
297 |
+
|
298 |
+
function metaboxes($post_type, $priority, $post) {
|
299 |
+
global $wp_meta_boxes;
|
300 |
+
|
301 |
+
$currentOptions = get_option(WPACCESS_PREFIX . 'options');
|
302 |
+
|
303 |
+
/*
|
304 |
+
* Check if this is a process of initialization the metaboxes.
|
305 |
+
* This process starts when admin click on "Refresh List" or "Initialize list"
|
306 |
+
* on User->Access Manager page
|
307 |
+
*/
|
308 |
+
|
309 |
+
if (isset($_GET['grab']) && ($_GET['grab'] == 'metaboxes')) {
|
310 |
+
if (!is_array($currentOptions['settings']['metaboxes'][$post_type])) {
|
311 |
+
$currentOptions['settings']['metaboxes'][$post_type] = array();
|
312 |
+
}
|
313 |
+
|
314 |
+
if (is_array($wp_meta_boxes[$post_type])) {
|
315 |
+
$currentOptions['settings']['metaboxes'][$post_type] = array_merge($currentOptions['settings']['metaboxes'][$post_type], $wp_meta_boxes[$post_type]);
|
316 |
+
update_option(WPACCESS_PREFIX . 'options', $currentOptions);
|
317 |
+
}
|
318 |
+
} else {
|
319 |
+
$screen = get_current_screen();
|
320 |
+
$m = new module_filterMetabox();
|
321 |
+
switch ($screen->id) {
|
322 |
+
case 'dashboard':
|
323 |
+
$m->manage('dashboard');
|
324 |
+
break;
|
325 |
+
|
326 |
+
default:
|
327 |
+
$m->manage();
|
328 |
+
break;
|
329 |
+
}
|
330 |
+
}
|
331 |
+
}
|
332 |
+
|
333 |
+
/*
|
334 |
+
* Activation hook
|
335 |
+
*
|
336 |
+
* Save default user settings
|
337 |
+
*/
|
338 |
+
|
339 |
+
function activate() {
|
340 |
+
global $wpdb;
|
341 |
+
|
342 |
+
//get current roles settings
|
343 |
+
$roles = get_option($wpdb->prefix . 'user_roles');
|
344 |
+
//save current setting to DB
|
345 |
+
update_option(WPACCESS_PREFIX . 'original_user_roles', $roles);
|
346 |
+
//add custom capabilities
|
347 |
+
//add custom capabilities
|
348 |
+
$custom_caps = get_option(WPACCESS_PREFIX . 'custom_caps');
|
349 |
+
if (!is_array($custom_caps)) {
|
350 |
+
$custom_caps = array();
|
351 |
+
}
|
352 |
+
$custom_caps[] = 'edit_comment';
|
353 |
+
update_option(WPACCESS_PREFIX . 'custom_caps', $custom_caps);
|
354 |
+
$roles = get_option($wpdb->prefix . 'user_roles');
|
355 |
+
$roles['administrator']['capabilities']['edit_comment'] = 1; //add this role for admin automatically
|
356 |
+
update_option($wpdb->prefix . 'user_roles', $roles);
|
357 |
+
}
|
358 |
+
|
359 |
+
/*
|
360 |
+
* Deactivation hook
|
361 |
+
*
|
362 |
+
* Delete all record in DB related to current plugin
|
363 |
+
* Restore original user roles
|
364 |
+
*/
|
365 |
+
|
366 |
+
function deactivate() {
|
367 |
+
|
368 |
+
$roles = get_option(WPACCESS_PREFIX . 'original_user_roles');
|
369 |
+
|
370 |
+
if (is_array($roles) && count($roles)) {
|
371 |
+
update_option($wpdb->prefix . 'user_roles', $roles);
|
372 |
+
}
|
373 |
+
delete_option(WPACCESS_PREFIX . 'original_user_roles');
|
374 |
+
delete_option(WPACCESS_PREFIX . 'options');
|
375 |
+
}
|
376 |
+
|
377 |
+
/*
|
378 |
+
* Print general JS files and localization
|
379 |
+
*
|
380 |
+
*/
|
381 |
+
|
382 |
+
function wp_print_scripts() {
|
383 |
+
if ($_GET['page'] == 'wp_access') {
|
384 |
+
parent::scripts();
|
385 |
+
wp_enqueue_script('jquery-ui', WPACCESS_JS_URL . 'ui/jquery-ui.min.js');
|
386 |
+
wp_enqueue_script('wpaccess-admin', WPACCESS_JS_URL . 'admin-options.js');
|
387 |
+
wp_enqueue_script('jquery-tooltip', WPACCESS_JS_URL . 'jquery.tools.min.js');
|
388 |
+
wp_localize_script('wpaccess-admin', 'wpaccessLocal', array(
|
389 |
+
'handlerURL' => site_url() . '/wp-admin/index.php', //can't use admin-ajax.php in fact it doesn't load menu and submenu
|
390 |
+
'nonce' => wp_create_nonce(WPACCESS_PREFIX . 'ajax')
|
391 |
+
));
|
392 |
+
}
|
393 |
+
}
|
394 |
+
|
395 |
+
/*
|
396 |
+
* Initialize Widgets and Metaboxes
|
397 |
+
*
|
398 |
+
* Part of AJAX interface. Using for metabox and widget initialization.
|
399 |
+
* Go through the list of all registered post types and with http request
|
400 |
+
* try to access the edit page and grab the list of rendered metaboxes.
|
401 |
+
*
|
402 |
+
* @return string JSON encoded string with result
|
403 |
+
*/
|
404 |
+
|
405 |
+
function initiate_wm() {
|
406 |
+
global $wp_post_types;
|
407 |
+
|
408 |
+
check_ajax_referer(WPACCESS_PREFIX . 'ajax');
|
409 |
+
|
410 |
+
/*
|
411 |
+
* Go through the list of registered post types and try to grab
|
412 |
+
* rendered metaboxes
|
413 |
+
* Parameter next in _POST array shows the next port type in list of
|
414 |
+
* registered metaboxes. This is done for emulating the progress bar
|
415 |
+
* after clicking "Refresh List" or "Initialize List"
|
416 |
+
*/
|
417 |
+
$next = trim($_POST['next']);
|
418 |
+
$typeList = array_keys($wp_post_types);
|
419 |
+
//add dashboard
|
420 |
+
// array_unshift($typeList, 'dashboard');
|
421 |
+
$typeQuant = count($typeList) + 1;
|
422 |
+
|
423 |
+
if ($next) { //if next present, means that process continuing
|
424 |
+
$i = 0;
|
425 |
+
while ($typeList[$i] != $next) { //find post type
|
426 |
+
$i++;
|
427 |
+
}
|
428 |
+
$current = $next;
|
429 |
+
if ($typeList[$i + 1]) { //continue the initialization process?
|
430 |
+
$next = $typeList[$i + 1];
|
431 |
+
} else {
|
432 |
+
$next = FALSE;
|
433 |
+
}
|
434 |
+
} else { //this is the beggining
|
435 |
+
$current = 'dashboard';
|
436 |
+
$next = isset($typeList[0]) ? $typeList[0] : '';
|
437 |
+
}
|
438 |
+
if ($current == 'dashboard') {
|
439 |
+
$url = add_query_arg('grab', 'metaboxes', admin_url('index.php'));
|
440 |
+
} else {
|
441 |
+
$url = add_query_arg('grab', 'metaboxes', admin_url('post-new.php?post_type=' . $current));
|
442 |
+
}
|
443 |
+
|
444 |
+
//grab metaboxes
|
445 |
+
$result = $this->cURL($url);
|
446 |
+
|
447 |
+
$result['value'] = round((($i + 1) / $typeQuant) * 100); //value for progress bar
|
448 |
+
$result['next'] = ($next ? $next : '' ); //if empty, stop initialization
|
449 |
+
|
450 |
+
die(json_encode($result));
|
451 |
+
}
|
452 |
+
|
453 |
+
/*
|
454 |
+
* Initialize single URL
|
455 |
+
*
|
456 |
+
* Sometimes not all metaboxes are rendered if there are conditions. For example
|
457 |
+
* render Shipping Address Metabox if status of custom post type is Approved.
|
458 |
+
* So this metabox will be not visible during general initalization in function
|
459 |
+
* initiateWM(). That is why this function do that manually
|
460 |
+
*
|
461 |
+
* @return string JSON encoded string with result
|
462 |
+
*/
|
463 |
+
|
464 |
+
function initiate_url() {
|
465 |
+
|
466 |
+
check_ajax_referer(WPACCESS_PREFIX . 'ajax');
|
467 |
+
|
468 |
+
$url = $_POST['url'];
|
469 |
+
if ($url) {
|
470 |
+
$url = add_query_arg('grab', 'metaboxes', $url);
|
471 |
+
$result = $this->cURL($url);
|
472 |
+
} else {
|
473 |
+
$result = array('status' => 'error');
|
474 |
+
}
|
475 |
+
|
476 |
+
die(json_encode($result));
|
477 |
+
}
|
478 |
+
|
479 |
+
/*
|
480 |
+
* Initiate HTTP request
|
481 |
+
*
|
482 |
+
* @param string Requested URL
|
483 |
+
* @return bool Always return TRUE
|
484 |
+
*/
|
485 |
+
|
486 |
+
function cURL($url) {
|
487 |
+
$header = array(
|
488 |
+
'User-Agent' => $_SERVER['HTTP_USER_AGENT']
|
489 |
+
);
|
490 |
+
|
491 |
+
if (is_array($_COOKIE)) {
|
492 |
+
foreach ($_COOKIE as $key => $value) {
|
493 |
+
$cookies[] = new WP_Http_Cookie(array(
|
494 |
+
'name' => $key,
|
495 |
+
'value' => $value
|
496 |
+
));
|
497 |
+
}
|
498 |
+
}
|
499 |
+
|
500 |
+
$res = wp_remote_request($url, array(
|
501 |
+
'headers' => $header,
|
502 |
+
'cookies' => $cookies,
|
503 |
+
'timeout' => 5
|
504 |
+
));
|
505 |
+
|
506 |
+
if ($res instanceof WP_Error) {
|
507 |
+
$result = array(
|
508 |
+
'status' => 'error',
|
509 |
+
'url' => $url
|
510 |
+
);
|
511 |
+
} else {
|
512 |
+
$result = array('status' => 'success');
|
513 |
+
}
|
514 |
+
|
515 |
+
return $result;
|
516 |
+
}
|
517 |
+
|
518 |
+
/*
|
519 |
+
* Render metabox list after initialization
|
520 |
+
*
|
521 |
+
* Part of AJAX interface. Is used for rendering the list of initialized
|
522 |
+
* metaboxes.
|
523 |
+
*
|
524 |
+
* @return string HTML string with result
|
525 |
+
*/
|
526 |
+
|
527 |
+
function render_metabox_list() {
|
528 |
+
|
529 |
+
$m = new module_optionManager($_POST['role']);
|
530 |
+
die($m->renderMetaboxList($m->getTemplate()));
|
531 |
+
}
|
532 |
+
|
533 |
+
function create_role() {
|
534 |
+
|
535 |
+
$m = new module_Roles();
|
536 |
+
$result = $m->createNewRole($_POST['role']);
|
537 |
+
if ($result['result'] == 'success') {
|
538 |
+
$m = new module_optionManager($result['new_role']);
|
539 |
+
$result['html'] = $m->renderDeleteRoleItem($result['new_role'], array('name' => $_POST['role']));
|
540 |
+
}
|
541 |
+
|
542 |
+
die(json_encode($result));
|
543 |
+
}
|
544 |
+
|
545 |
+
function delete_role() {
|
546 |
+
|
547 |
+
$m = new module_Roles();
|
548 |
+
$m->remove_role($_POST['role']);
|
549 |
+
die();
|
550 |
+
}
|
551 |
+
|
552 |
+
function render_rolelist() {
|
553 |
+
|
554 |
+
$m = new module_optionManager($_POST['role']);
|
555 |
+
$or_roles = get_option(WPACCESS_PREFIX . 'original_user_roles');
|
556 |
+
$result = array(
|
557 |
+
'html' => $m->getMainOptionsList(),
|
558 |
+
'restorable' => ($or_roles[$_POST['role']] ? TRUE : FALSE)
|
559 |
+
);
|
560 |
+
|
561 |
+
die(json_encode($result));
|
562 |
+
}
|
563 |
+
|
564 |
+
/*
|
565 |
+
* Main function for checking if user has access to a page
|
566 |
+
*
|
567 |
+
* Check if current user has access to requested page. If no, print an
|
568 |
+
* notification
|
569 |
+
*
|
570 |
+
*/
|
571 |
+
|
572 |
+
function check() {
|
573 |
+
$uri = $_SERVER['REQUEST_URI'];
|
574 |
+
|
575 |
+
$m = new module_filterMenu();
|
576 |
+
|
577 |
+
if (!$m->checkAccess($uri)) {
|
578 |
+
wp_die('<p>' . __('You do not have sufficient permissions to perform this action') . '</p>');
|
579 |
+
}
|
580 |
+
}
|
581 |
+
|
582 |
+
/*
|
583 |
+
* Main function for menu filtering
|
584 |
+
*
|
585 |
+
* Add Access Manager submenu to User main menu and additionality filter
|
586 |
+
* the Main Menu according to settings
|
587 |
+
*
|
588 |
+
*/
|
589 |
+
|
590 |
+
function admin_menu() {
|
591 |
+
add_submenu_page('users.php', __('Access Manager'), __('Access Manager'), 'administrator', 'wp_access', array($this, 'manager_page'));
|
592 |
+
|
593 |
+
//filter the menu
|
594 |
+
$m = new module_filterMenu();
|
595 |
+
$m->manage();
|
596 |
+
}
|
597 |
+
|
598 |
+
/*
|
599 |
+
* Option page renderer
|
600 |
+
*/
|
601 |
+
|
602 |
+
function manager_page() {
|
603 |
+
$m = new module_optionManager($_POST['current_role']);
|
604 |
+
$m->manage();
|
605 |
+
}
|
606 |
+
|
607 |
+
}
|
608 |
+
|
609 |
+
register_activation_hook(__FILE__, array('mvb_WPAccess', 'activate'));
|
610 |
+
register_deactivation_hook(__FILE__, array('mvb_WPAccess', 'deactivate'));
|
611 |
+
add_action('init', 'init_wpaccess');
|
612 |
+
?>
|
readme.txt
ADDED
@@ -0,0 +1,127 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
=== Advanced Access Manager ===
|
2 |
+
Contributors: vasyl_m
|
3 |
+
Donate link: http://whimba.com/advanced-access-manager-donation/
|
4 |
+
Tags: user role, access manager, filter posts, user control, capability, metabox, user access, filter menu, role manager, filter pages, dashboard widget, access control, expire link, expire
|
5 |
+
Requires at least: 3.0
|
6 |
+
Tested up to: 3.2.1
|
7 |
+
Stable tag: 1.0
|
8 |
+
|
9 |
+
Graphic interface to manage User Roles and Capabilities
|
10 |
+
|
11 |
+
== Description ==
|
12 |
+
|
13 |
+
If you want to filter Admin Menu for some User Roles or just delete unnecessary
|
14 |
+
dashboard widgets or metaboxes in Edit Post Page, this plugin is for you.
|
15 |
+
You can do following things with Advanced Access Manager:
|
16 |
+
|
17 |
+
* Filter Admin Menu for specific User Role
|
18 |
+
* Filter Dashboard Widgets for specific User Role
|
19 |
+
* Filter List of Metaboxes in Edit Post page for specific User Role
|
20 |
+
* Add new User Capabilities
|
21 |
+
* Delete created User Capabilities
|
22 |
+
* Create new User Roles
|
23 |
+
* Delete any User Role
|
24 |
+
* Save current User Roles settings and restore later
|
25 |
+
|
26 |
+
About additional features, I'm working on now, you can find on my <a href="http://whimba.com/new-features-in-advanced-access-manager/" target="_blank">website</a>.
|
27 |
+
|
28 |
+
[youtube http://www.youtube.com/watch?v=zkyxply_JHs]
|
29 |
+
|
30 |
+
If you have any problems with current plugin, please send me an email or leave a
|
31 |
+
message on Forums Posts.
|
32 |
+
|
33 |
+
== Installation ==
|
34 |
+
|
35 |
+
1. Upload `advanced-access-manager` folder to the `/wp-content/plugins/` directory
|
36 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress
|
37 |
+
3. Find Access Manager under Users Admin Menu
|
38 |
+
|
39 |
+
== Frequently Asked Questions ==
|
40 |
+
|
41 |
+
= It is not working! Why? =
|
42 |
+
|
43 |
+
Actually it works. To make Advanced Access Manager good looking and easy to navigate,
|
44 |
+
I'm using the latest JavaScript libraries - jQuery and jQuery UI. And this is a standard
|
45 |
+
for today. If you have installed plugins out of date, you, probably will have some problems.
|
46 |
+
In such way, please <a href="mailto:admin@whimba.com">contact me</a> or leave a message on a Forums Posts.
|
47 |
+
|
48 |
+
= What is "Initiate URL" button for, under "Metaboxes & Widgets" Tab? =
|
49 |
+
|
50 |
+
Sometimes list of additional metaboxes is conditional on edit post page. Like e.g.
|
51 |
+
display custom metabox "Photos" only if Post Status is Published. Access Manager
|
52 |
+
initiates the list of metaboxes for each post in status auto-draft. So that is why
|
53 |
+
you have to put manually the URL to the edit post page where list of additional
|
54 |
+
metaboxes can be picked by the plugin.
|
55 |
+
|
56 |
+
= I can't edit comments. What should I do? =
|
57 |
+
|
58 |
+
To be able to edit comments, just go to "Capabilities" Tab and add new Capability -
|
59 |
+
"Edit Comment". For administrator it'll automatically be added and this will let
|
60 |
+
to configure comment editing for other roles.
|
61 |
+
|
62 |
+
= I unchecked some Menus on "Main Menu" Tab but they are still not shown. Why? =
|
63 |
+
|
64 |
+
The reason is that "Main Menu" Tab is not directly related to list of Capabilities.
|
65 |
+
It means, if you selected/deselected some Menu or Submenu it will not add or delete
|
66 |
+
correct capabilities to current User Role. In such way if you want to give somebody
|
67 |
+
access to backend I recommend to use predefined set of options "Editor" and then
|
68 |
+
just filter Main Menu.
|
69 |
+
|
70 |
+
= What is "Restore Default" link near Save button? =
|
71 |
+
|
72 |
+
Advanced Access Manager has implemented activation hook which will store all User
|
73 |
+
Roles defined in the system with the list of capabilities. So if you did something wrong,
|
74 |
+
you'll be able to restore original settings.
|
75 |
+
After Advanced Access Manager deactivation, all setting will be restored automatically.
|
76 |
+
|
77 |
+
== Screenshots ==
|
78 |
+
|
79 |
+
1. General view of Access Manager
|
80 |
+
2. List of Metaboxes to Manage
|
81 |
+
3. List of Capabilities
|
82 |
+
|
83 |
+
== Changelog ==
|
84 |
+
|
85 |
+
= 1.0 =
|
86 |
+
* Fixed issue with comment editing
|
87 |
+
* Implemented JavaScript error catching
|
88 |
+
|
89 |
+
= 0.9.8 =
|
90 |
+
* Added ability to add or remove Capabilities
|
91 |
+
* Fixed bug with network admin dashboard
|
92 |
+
* Fixed bug with Metabox initialization
|
93 |
+
* Fixed bug with whole branch checkbox if menu name has incompatible symbols for element's attribute ID
|
94 |
+
* Changed metabox list view
|
95 |
+
* Auto hide/show "Restore Default" link according to current User Role
|
96 |
+
* Optimized JavaScript and CSS
|
97 |
+
* Deleted Empty submenu holder. For example - Comments
|
98 |
+
* Changed bothering tooltip behavior
|
99 |
+
* Fixed bug with General metabox on Access Manager Option page
|
100 |
+
* Changed some labels
|
101 |
+
* Added auto-hide for message Options Updated after 10 sec
|
102 |
+
|
103 |
+
= 0.9.7 =
|
104 |
+
* Added Dashboard Widget Filtering functionality
|
105 |
+
|
106 |
+
= 0.9.6 =
|
107 |
+
* Fixed bug with Metabox initialization if installed plugin executes wp_remove_metabox function
|
108 |
+
|
109 |
+
= 0.9.5 =
|
110 |
+
* Added pre-defined set of capabilities - Administrator, Editor, Author, Contributor, Subscriber and Clear All
|
111 |
+
* Fixed bug with submenu rendered as custom WP page, for example themes.php?page=theme_options
|
112 |
+
* Fixed bug with Add New Post submenu. If it was selected then no edit.php page was accessible.
|
113 |
+
|
114 |
+
= 0.9.0 =
|
115 |
+
* Added Restore Default Settings functionality
|
116 |
+
* Fixed bug with Whole Branch checkbox
|
117 |
+
* Put tooltip on the center right position instead of center top
|
118 |
+
* Added activation and deactivation hooks
|
119 |
+
* Changed Tab Order on Role Manager Section
|
120 |
+
* Implemented on unsaved page leaving notification
|
121 |
+
|
122 |
+
= 0.8.1 =
|
123 |
+
* Fixed issue with edit.php
|
124 |
+
* Added to support box my twitter account
|
125 |
+
|
126 |
+
= 0.8 =
|
127 |
+
* First version
|
screenshot-1.jpg
ADDED
Binary file
|
screenshot-2.jpg
ADDED
Binary file
|
screenshot-3.jpg
ADDED
Binary file
|
templates/admin_options.html
ADDED
@@ -0,0 +1,286 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<div class="wrap">
|
2 |
+
<form action="" method="post" id="wp-access">
|
3 |
+
<div class="plugin-logo"></div>
|
4 |
+
<div class="plugin-title"><h2>Advanced Access Manager</h2></div>
|
5 |
+
<br class="clear" />
|
6 |
+
<div class="###message_class###">
|
7 |
+
<div class="ui-widget">
|
8 |
+
<div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
|
9 |
+
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
|
10 |
+
<span style="color:#006505;">Options updated successfully!</span></p>
|
11 |
+
</div>
|
12 |
+
</div>
|
13 |
+
</div>
|
14 |
+
<br class="clear" />
|
15 |
+
###nonce###
|
16 |
+
<input type="hidden" name="submited" value="1" />
|
17 |
+
<input type="hidden" name="current_role" id="current_role" value="###current_role_id###" />
|
18 |
+
<div class="postbox-container" style="width:70%;">
|
19 |
+
<div class="metabox-holder">
|
20 |
+
<div class="meta-box-sortables">
|
21 |
+
<!-- ###MAIN_OPTIONS_LIST### begin-->
|
22 |
+
<div id="tabs">
|
23 |
+
<ul>
|
24 |
+
<li><a href="#tabs-1">Main Menu</a></li>
|
25 |
+
<li><a href="#tabs-2">Metaboxes & Widgets</a></li>
|
26 |
+
<li><a href="#tabs-3">Capabilities</a></li>
|
27 |
+
</ul>
|
28 |
+
<div id="tabs-1">
|
29 |
+
<!-- ###MAIN_MENU_LIST### begin-->
|
30 |
+
<div id="main-menu-options">
|
31 |
+
<!-- ###MAIN_MENU_ITEM### begin-->
|
32 |
+
<div id="###id###">
|
33 |
+
<h4><a href="#" >###name###</a></h4>
|
34 |
+
<div>
|
35 |
+
<div class="mainmenu-subitem-whole">
|
36 |
+
<input type="checkbox" name="wpaccess[###role###][menu][###menu###][whole]" value="1" id="whole" ###whole_checked### />
|
37 |
+
Whole Branch
|
38 |
+
</div>
|
39 |
+
<!-- ###MAIN_MENU_SUBLIST### begin-->
|
40 |
+
<div class="postbox submenu-holder">
|
41 |
+
<!-- ###MAIN_MENU_SUBITEM### begin-->
|
42 |
+
<div class="mainmenu-subitem">
|
43 |
+
<input type="checkbox" name="wpaccess[###role###][menu][###menu###][sub][###value###]" value="1" ###checked### />
|
44 |
+
###submenu_name###
|
45 |
+
</div>
|
46 |
+
<!-- ###MAIN_MENU_SUBITEM### end-->
|
47 |
+
<br class="clear" />
|
48 |
+
</div>
|
49 |
+
<!-- ###MAIN_MENU_SUBLIST### end-->
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
<!-- ###MAIN_MENU_ITEM### end-->
|
53 |
+
</div>
|
54 |
+
<!-- ###MAIN_MENU_LIST### end-->
|
55 |
+
</div>
|
56 |
+
<div id="tabs-2">
|
57 |
+
<div id="initiate-message">
|
58 |
+
<p>To initiate list of metaboxes manually, copy and paste the URL to admin page on this site into text field and click "Initiate URL". List of all new metaboxes will be added automatically.</p>
|
59 |
+
<div style="float:left; width:80%;">
|
60 |
+
<div class="initiate-url-empty">Enter Correct URL</div>
|
61 |
+
<input type="text" id="initiateURL" class="initiate-url-text" value="" />
|
62 |
+
<a href="#" class="button initiate-url" >Initiate URL</a>
|
63 |
+
</div>
|
64 |
+
<div style="float:right;margin-top:8px;">
|
65 |
+
<a href="#" class="initiate-metaboxes button" >Refresh List</a>
|
66 |
+
</div>
|
67 |
+
<br class="clear" />
|
68 |
+
</div>
|
69 |
+
<div id="progressbar"></div>
|
70 |
+
<!-- ###METABOX_LIST### begin-->
|
71 |
+
<div id="metabox-list">
|
72 |
+
<!-- ###METABOX_LIST_ITEM### begin-->
|
73 |
+
<div>
|
74 |
+
<h4><a href="#" >###post_type_label###</a></h4>
|
75 |
+
<div>
|
76 |
+
<!-- ###POST_METABOXES_LIST### begin-->
|
77 |
+
<!-- ###POST_METABOXES_ITEM### begin-->
|
78 |
+
<div class="postbox metabox-item" >
|
79 |
+
<h3 style="cursor: default;"><span>###title###</span></h3>
|
80 |
+
<div class="inside">
|
81 |
+
<table class="metabox-description">
|
82 |
+
<tbody>
|
83 |
+
<tr>
|
84 |
+
<th>ID:</th>
|
85 |
+
<td>###id###</td>
|
86 |
+
</tr>
|
87 |
+
<tr>
|
88 |
+
<th>Priority:</th>
|
89 |
+
<td>###priority###</td>
|
90 |
+
</tr>
|
91 |
+
<tr>
|
92 |
+
<th>Position:</th>
|
93 |
+
<td>###position###</td>
|
94 |
+
</tr>
|
95 |
+
<tr>
|
96 |
+
<th>Restrict:</th>
|
97 |
+
<td><input type="checkbox" name="wpaccess[###role###][metabox][###internal_id###]" value="1" ###checked### /></td>
|
98 |
+
</tr>
|
99 |
+
</tbody>
|
100 |
+
</table>
|
101 |
+
</div>
|
102 |
+
</div>
|
103 |
+
|
104 |
+
<!-- ###POST_METABOXES_ITEM### end-->
|
105 |
+
<!-- ###POST_METABOXES_LIST### end-->
|
106 |
+
</div>
|
107 |
+
</div>
|
108 |
+
<!--
|
109 |
+
|
110 |
+
-->
|
111 |
+
<!-- ###METABOX_LIST_ITEM### end-->
|
112 |
+
<!-- ###METABOX_LIST_EMPTY### begin-->
|
113 |
+
<div class="ui-widget">
|
114 |
+
<div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
|
115 |
+
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
|
116 |
+
<span style="color:#D54E21;">List of Metaboxes is empty or not initialized. <a href="#" class="initiate-metaboxes" >Initiate the List</a></span></p>
|
117 |
+
</div>
|
118 |
+
</div>
|
119 |
+
<!-- ###METABOX_LIST_EMPTY### end-->
|
120 |
+
</div>
|
121 |
+
<!-- ###METABOX_LIST### end-->
|
122 |
+
</div>
|
123 |
+
<div id="tabs-3">
|
124 |
+
<!-- ###CAPABILITY_LIST### begin-->
|
125 |
+
<!-- ###CAPABILITY_ITEM### begin-->
|
126 |
+
<div class="capability-item">
|
127 |
+
<div class="capability-name">
|
128 |
+
<input type="checkbox" id="cap-###title###" name="wpaccess[###role###][advance][###title###]" value="1" ###checked### />
|
129 |
+
<label for="cap-###title###">###cap_name###</label>
|
130 |
+
</div>
|
131 |
+
<div class="info" title="Click for Tooltip"><div title="###description###" class="capability-description"></div></div>
|
132 |
+
<!-- ###CAPABILITY_DELETE### begin-->
|
133 |
+
<div class="capability-delete" onclick="mObj.deleteCapability('###title###', '###cap_name###');" title="Delete Capability"></div>
|
134 |
+
<!-- ###CAPABILITY_DELETE### end-->
|
135 |
+
<br class="clear" />
|
136 |
+
</div>
|
137 |
+
<!-- ###CAPABILITY_ITEM### end-->
|
138 |
+
<br class="clear" />
|
139 |
+
<!-- ###CAPABILITY_LIST### end-->
|
140 |
+
<div class="additional-panel">
|
141 |
+
<div class="new-capability">
|
142 |
+
<a href="#" id="new-capability" title="Add New Capability">Add New Cap</a>
|
143 |
+
</div>
|
144 |
+
<div class="default-roles">
|
145 |
+
<input type="radio" id="radio1" name="radio" onclick="mObj.changeCapabilities('radio1');" /><label for="radio1" title="Give Administrator's List of Capabilities">Administrator</label>
|
146 |
+
<input type="radio" id="radio2" name="radio" onclick="mObj.changeCapabilities('radio2');" /><label for="radio2" title="Give Editor's List of Capabilities">Editor</label>
|
147 |
+
<input type="radio" id="radio3" name="radio" onclick="mObj.changeCapabilities('radio3');" /><label for="radio3" title="Give Author's List of Capabilities">Author</label>
|
148 |
+
<input type="radio" id="radio4" name="radio" onclick="mObj.changeCapabilities('radio4');" /><label for="radio4" title="Give Contributor's List of Capabilities">Contributor</label>
|
149 |
+
<input type="radio" id="radio5" name="radio" onclick="mObj.changeCapabilities('radio5');" /><label for="radio5" title="Give Subscriber's List of Capabilities">Subscriber</label>
|
150 |
+
<input type="radio" id="radio6" name="radio" onclick="mObj.changeCapabilities('radio6');" /><label for="radio6" title="Clear all Capabilities">Clear All</label>
|
151 |
+
</div>
|
152 |
+
<br class="clear" />
|
153 |
+
</div>
|
154 |
+
</div>
|
155 |
+
</div>
|
156 |
+
<!-- ###MAIN_OPTIONS_LIST### end-->
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
</div>
|
160 |
+
<div class="postbox-container" style="width:20%;">
|
161 |
+
<div class="metabox-holder">
|
162 |
+
<div class="meta-box-sortables">
|
163 |
+
<div id="submitdiv" class="postbox">
|
164 |
+
<div class="handlediv" title="Click to toggle"><br /></div>
|
165 |
+
<h3 class="hndle"><span>General</span></h3>
|
166 |
+
<div class="inside">
|
167 |
+
<div class="submitbox" id="submitpost">
|
168 |
+
<div id="minor-publishing">
|
169 |
+
<div id="misc-publishing-actions">
|
170 |
+
<div class="misc-role-section"><label for="current_role">Current Role:</label>
|
171 |
+
<span id="current-role-display">###current_role###</span>
|
172 |
+
<a href="#" class="change-role hide-if-no-js" tabindex="4">Change</a>
|
173 |
+
|
174 |
+
<div id="role-select" class="hide-if-js">
|
175 |
+
<select name="role" id="role" tabindex="4">
|
176 |
+
<!-- ###ROLE_LIST### begin-->
|
177 |
+
<option value="###value###" ###selected### >###title###</option>
|
178 |
+
<!-- ###ROLE_LIST### end-->
|
179 |
+
</select>
|
180 |
+
<a href="#" class="hide-if-no-js button" id="role-ok">OK</a>
|
181 |
+
<a href="#" class="hide-if-no-js" id="role-cancel">Cancel</a>
|
182 |
+
</div>
|
183 |
+
</div>
|
184 |
+
</div>
|
185 |
+
</div>
|
186 |
+
<div id="major-publishing-actions">
|
187 |
+
<div id="delete-action">
|
188 |
+
<a class="submitdelete deletion" href="#" title="Restore Default Setting for Current Role">Restore Role</a>
|
189 |
+
</div>
|
190 |
+
<div id="publishing-action">
|
191 |
+
<img src="###site_url###/wp-admin/images/wpspin_light.gif" style="display:none;" id="ajax-loading" alt="Saving...">
|
192 |
+
<input name="save" id="save" class="button-primary" value="Save" tabindex="5" onclick="mObj.submitForm();" type="submit" />
|
193 |
+
</div>
|
194 |
+
<br class="clear" />
|
195 |
+
</div>
|
196 |
+
</div>
|
197 |
+
</div>
|
198 |
+
</div>
|
199 |
+
<div id="metabox-wpaccess-support" class="postbox" >
|
200 |
+
<div class="handlediv" title="Click to toggle"><br /></div>
|
201 |
+
<h3 class="hndle"><span>Role Manager</span></h3>
|
202 |
+
<div class="inside" style="width:100%; margin: 0px; padding: 0px;">
|
203 |
+
<div id="role-tabs" >
|
204 |
+
<ul>
|
205 |
+
<li><a href="#role_tab-1">Role List</a></li>
|
206 |
+
<li><a href="#role_tab-2">Add New</a></li>
|
207 |
+
</ul>
|
208 |
+
<div id="role_tab-1">
|
209 |
+
<!-- ###DELETE_ROLE_LIST### begin-->
|
210 |
+
<table class="delete-role-table">
|
211 |
+
<tbody>
|
212 |
+
<!-- ###DELETE_ROLE_ITEM### begin-->
|
213 |
+
<tr id="dl-row-###role_id###">
|
214 |
+
<td><b>###role_name###</b></td>
|
215 |
+
<td><i>(###count###)</i></td>
|
216 |
+
<td>
|
217 |
+
<!-- ###DELETE_ROLE_BUTTON### begin-->
|
218 |
+
<a href="javascript:void(0);" onclick="mObj.deleteRole('###role_id###');" style="color:#FF0000;">Delete</a>
|
219 |
+
<!-- ###DELETE_ROLE_BUTTON### end-->
|
220 |
+
</td>
|
221 |
+
</tr>
|
222 |
+
<!-- ###DELETE_ROLE_ITEM### end-->
|
223 |
+
</tbody>
|
224 |
+
</table>
|
225 |
+
<!-- ###DELETE_ROLE_LIST### end-->
|
226 |
+
</div>
|
227 |
+
<div id="role_tab-2">
|
228 |
+
<div class="new-role-name-empty">Enter New Role</div>
|
229 |
+
<input type="text" value="" id="new-role-name" />
|
230 |
+
<a href="#" class="hide-if-no-js button" id="new-role-ok">Add</a>
|
231 |
+
</div>
|
232 |
+
</div>
|
233 |
+
<div id="new-role-message-ok">
|
234 |
+
<div class="ui-widget">
|
235 |
+
<div class="ui-state-highlight ui-corner-all" style="margin-top:5px; padding: 0 .7em;">
|
236 |
+
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
|
237 |
+
<span style="color:#006505;">New Role Created successfully!</span></p>
|
238 |
+
</div>
|
239 |
+
</div>
|
240 |
+
</div>
|
241 |
+
<div id="new-role-message-error">
|
242 |
+
<div class="ui-widget">
|
243 |
+
<div class="ui-state-error ui-corner-all" style="margin-top:5px; padding: 0 .7em;">
|
244 |
+
<p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
|
245 |
+
<strong>Error:</strong> Role can't be created</p>
|
246 |
+
</div>
|
247 |
+
</div>
|
248 |
+
</div>
|
249 |
+
</div>
|
250 |
+
</div>
|
251 |
+
###metabox_general_info###
|
252 |
+
<div id="metabox-support" class="postbox">
|
253 |
+
<div class="handlediv" title="Click to toggle"><br /></div>
|
254 |
+
<h3 class="hndle"><span>Support</span></h3>
|
255 |
+
<div class="inside">
|
256 |
+
<div class="sexy-bookmarks">
|
257 |
+
<ul class="socials">
|
258 |
+
<li class="sexy-mail"><a href="mailto:admin@whimba.com" title="Send an Email">admin@whimba.com</a></li>
|
259 |
+
<li class="sexy-facebook"><a href="http://www.facebook.com/pages/Whimba/113734005389430" target="_blank" title="Find on Facebook Page">Whimba.com</a></li>
|
260 |
+
<li class="sexy-twitter"><a href="http://www.twitter.com/whimba" target="_blank" title="Follow on Twitter">Whimba</a></li>
|
261 |
+
<li class="sexy-linkedin"><a href="http://www.linkedin.com/pub/vasyl-martyniuk/26/654/930" target="_blank" title="LinkedIn">LinkedIn</a></li>
|
262 |
+
</ul>
|
263 |
+
</div>
|
264 |
+
<br class="clear" />
|
265 |
+
</div>
|
266 |
+
</div>
|
267 |
+
</div>
|
268 |
+
</div>
|
269 |
+
</div>
|
270 |
+
</form>
|
271 |
+
<div id="dialog-delete-confirm" class="dialog" title="Delete Role?">
|
272 |
+
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 5px 0;"></span>Please confirm deleting Role - <b><span id="delete-role-title"></span></b></p>
|
273 |
+
</div>
|
274 |
+
<div id="dialog-delete-capability" class="dialog" title="Delete Capability?">
|
275 |
+
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 5px 0;"></span>Please confirm deleting Capability - <b><span id="delete-capability-title"></span></b></p>
|
276 |
+
</div>
|
277 |
+
<div id="dialog-confirm" class="dialog" title="Restore Default Role Settings?">
|
278 |
+
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>All current settings will be lost. Are you sure?</p>
|
279 |
+
</div>
|
280 |
+
<div id="leave-confirm" class="dialog" title="Leave Without Saving?">
|
281 |
+
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>Some changed detected. Are you sure that you want to leave without saving</p>
|
282 |
+
</div>
|
283 |
+
<div id="capability-form" class="dialog" title="Add New Capability">
|
284 |
+
<input type="text" value="" id="new-cap" name="new-cap" />
|
285 |
+
</div>
|
286 |
+
</div>
|