Version Description
- Add setting to "no format" shortcode's content
- Update all modules
- Added manual height option to gallery modules
Download this release
Release Info
Developer | pasyuk |
Plugin | Gmedia Photo Gallery |
Version | 0.9.23 |
Comparing to | |
See all releases |
Code changes from version 0.8.6 to 0.9.23
- admin/addmedia.php +410 -291
- admin/admin.php +368 -174
- admin/ajax.php +816 -713
- admin/css/editor_plugin.css +0 -33
- admin/css/grand-media.css +277 -2049
- admin/css/jquery-ui-tabs.css +0 -325
- admin/css/jquery.fancybox.css +0 -443
- admin/css/meta-box.css +64 -267
- admin/functions.php +0 -616
- admin/galleries.php +727 -0
- admin/gmedia.php +493 -228
- admin/images/Folder.png +0 -0
- admin/images/Labels.png +0 -0
- admin/images/Order.png +0 -0
- admin/images/OrderBy.png +0 -0
- admin/images/User.png +0 -0
- admin/images/application_.png +0 -0
- admin/images/archive_.png +0 -0
- admin/images/audio_.png +0 -0
- admin/images/bg.png +0 -0
- admin/images/bg_act_bar.png +0 -0
- admin/images/bg_act_but.png +0 -0
- admin/images/bg_act_but2.png +0 -0
- admin/images/bg_search.png +0 -0
- admin/images/catalog.png +0 -0
- admin/images/close.png +0 -0
- admin/images/code_.png +0 -0
- admin/images/default_.png +0 -0
- admin/images/document_.png +0 -0
- admin/images/dropbut.png +0 -0
- admin/images/gray-grad.png +0 -0
- admin/images/icon_cancel.png +0 -0
- admin/images/icon_checked.png +0 -0
- admin/images/icon_delete.png +0 -0
- admin/images/icon_edit2.png +0 -0
- admin/images/icon_eye.png +0 -0
- admin/images/icon_listen.png +0 -0
- admin/images/icon_listen2.png +0 -0
- admin/images/icon_save.png +0 -0
- admin/images/icon_watch.png +0 -0
- admin/images/interactive_.png +0 -0
- admin/images/label0.png +0 -0
- admin/images/label1.png +0 -0
- admin/images/link.png +0 -0
- admin/images/logo.png +0 -0
- admin/images/navtabtop_bg.png +0 -0
- admin/images/ot-menu-bg.png +0 -0
- admin/images/ot-menu-top-bg.png +0 -0
- admin/images/sorting.png +0 -0
- admin/images/spreadsheet_.png +0 -0
- admin/images/text_.png +0 -0
- admin/images/video_.png +0 -0
- admin/import.php +392 -0
- admin/js/editor_plugin.js +0 -154
- admin/js/gmedia.global.back.js +6 -3
- admin/js/gmedia.global.front.js +0 -5
- admin/js/grand-media.js +269 -901
- admin/js/jquery.dataset.js +0 -167
- admin/js/jquery.fancybox.js +0 -1
- admin/js/jquery.quicksearch.js +0 -180
- admin/js/jquery.quicksearch_.js +0 -164
- admin/js/jscolor/arrow.gif +0 -0
- admin/js/jscolor/cross.gif +0 -0
- admin/js/jscolor/hs.png +0 -0
- admin/js/jscolor/hv.png +0 -0
- admin/js/jscolor/jscolor.js +0 -1078
- admin/js/meta-box.js +101 -257
- admin/js/plupload/i18n/cs.js +0 -14
- admin/js/plupload/i18n/da.js +0 -12
- admin/js/plupload/i18n/de.js +0 -24
- admin/js/plupload/i18n/el.js +0 -14
- admin/js/plupload/i18n/es.js +0 -25
- admin/js/plupload/i18n/et.js +0 -33
- admin/js/plupload/i18n/fa.js +0 -37
- admin/js/plupload/i18n/fi.js +0 -33
- admin/js/plupload/i18n/fr-ca.js +0 -35
- admin/js/plupload/i18n/fr.js +0 -25
- admin/js/plupload/i18n/hr.js +0 -25
- admin/js/plupload/i18n/hu.js +0 -33
- admin/js/plupload/i18n/it.js +0 -24
- admin/js/plupload/i18n/ja.js +0 -37
- admin/js/plupload/i18n/ko.js +0 -36
- admin/js/plupload/i18n/lv.js +0 -33
- admin/js/plupload/i18n/nl.js +0 -21
- admin/js/plupload/i18n/pl.js +0 -24
- admin/js/plupload/i18n/pt-br.js +0 -35
- admin/js/plupload/i18n/ro.js +0 -24
- admin/js/plupload/i18n/ru.js +0 -21
- admin/js/plupload/i18n/sk.js +0 -25
- admin/js/plupload/i18n/sr.js +0 -14
- admin/js/plupload/i18n/sv.js +0 -12
- admin/js/plupload/jquery.plupload.queue/jquery.plupload.queue.js +0 -1
- admin/js/plupload/jquery.ui.plupload/css/jquery.ui.plupload.css +0 -147
- admin/js/plupload/jquery.ui.plupload/img/plupload-bw.png +0 -0
- admin/js/plupload/jquery.ui.plupload/img/plupload.png +0 -0
- admin/js/plupload/jquery.ui.plupload/jquery.ui.plupload.js +0 -1
- admin/js/plupload/plupload.full.js +0 -2
- admin/js/plupload/plupload.gears.js +0 -1
- admin/js/qtip/LICENSE-GPL +0 -278
- admin/js/qtip/imagesloaded.min.js +0 -6
- admin/js/qtip/jquery.qtip.css +0 -641
- admin/js/qtip/jquery.qtip.min.js +0 -3
- admin/js/termbox.js +0 -136
- admin/labels.php +0 -218
- admin/library.php +0 -314
- admin/modules.php +157 -436
- admin/processor.php +635 -0
- admin/settings.php +71 -52
- admin/terms.php +626 -0
- admin/upload.php +188 -151
- admin/wpmedia.php +212 -168
- assets/bootstrap-datetimepicker/bootstrap-datetimepicker.css +204 -0
- assets/bootstrap-datetimepicker/bootstrap-datetimepicker.js +1160 -0
- assets/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css +5 -0
- assets/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js +29 -0
- assets/bootstrap-datetimepicker/moment.min.js +6 -0
- assets/bootstrap/css/bootstrap-theme.css +397 -0
- assets/bootstrap/css/bootstrap-theme.min.css +7 -0
- assets/bootstrap/css/bootstrap.css +3702 -0
admin/addmedia.php
CHANGED
@@ -1,355 +1,474 @@
|
|
1 |
<?php
|
2 |
-
if
|
3 |
-
die(
|
4 |
}
|
5 |
|
6 |
/**
|
7 |
-
*
|
8 |
*
|
9 |
* @return mixed content
|
10 |
*/
|
11 |
-
function
|
12 |
-
global $
|
13 |
-
$
|
14 |
-
$
|
15 |
?>
|
16 |
-
<div class="
|
17 |
-
<div class="
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
</div>
|
22 |
-
<div class="msg0"><span class="msg0_text"><?php
|
23 |
-
if($tab == 'upload')
|
24 |
-
_e( 'Add files to the upload queue and click the start button', 'gmLang' );
|
25 |
-
if($tab == 'import')
|
26 |
-
_e( 'Grab files from other sources', 'gmLang' );
|
27 |
-
?></span><span class="msg0_progress"></span></div>
|
28 |
-
</div>
|
29 |
-
<div class="gmAddMedia floatholdviz">
|
30 |
-
<?php
|
31 |
-
if($tab == 'upload')
|
32 |
-
gmedia_upload_files();
|
33 |
-
if($tab == 'import')
|
34 |
-
gmedia_import();
|
35 |
-
?>
|
36 |
-
<?php wp_original_referer_field( true, 'previous' ); ?>
|
37 |
</div>
|
38 |
-
|
39 |
}
|
40 |
|
41 |
|
42 |
-
function gmedia_upload_files()
|
43 |
-
global $
|
44 |
-
$gMediaURL = plugins_url( GRAND_FOLDER );
|
45 |
-
// link for the flash file
|
46 |
-
$swfUploadLink = $gMediaURL . '/admin/upload.php';
|
47 |
-
$swfUploadLink = wp_nonce_url( $swfUploadLink, 'grandMedia' );
|
48 |
-
//flash doesn't seem to like encoded ampersands, so convert them back here
|
49 |
-
$swfUploadLink = str_replace( '&', '&', $swfUploadLink );
|
50 |
-
$maxupsize = wp_max_upload_size();
|
51 |
-
$maxupsize = floor( $maxupsize * 0.99 / 1024 / 1024 );
|
52 |
-
// TODO choose runtime from page options
|
53 |
-
?>
|
54 |
-
<div class="optionsPanel">
|
55 |
-
<form method="post" action="" id="gmTerms" onsubmit="return false;">
|
56 |
-
<div class="info"><p><?php echo __( 'Maximum file size', 'gmLang' ) . ':' . $maxupsize . 'Mb'; ?></p></div>
|
57 |
-
<div class="params" id="termsdiv-gmedia_category">
|
58 |
-
<div id="gmedia_category" class="categorydiv">
|
59 |
-
<label for="tax-input-gmedia_category"><?php _e( 'Assign Category', 'gmLang' ); ?></label>
|
60 |
-
<select name="terms[gmedia_category]" id="tax-input-gmedia_category" class="the-category">
|
61 |
-
<option value=""><?php _e( 'Uncategorized', 'gmLang' ); ?></option>
|
62 |
-
<?php
|
63 |
-
$type = 'gmedia_category';
|
64 |
-
$gmedia_cats = $gMDb->get_terms( $type, array( 'hide_empty' => false ) );
|
65 |
-
$opt = '';
|
66 |
-
if ( count( $gmedia_cats ) ) {
|
67 |
-
$children = $gMDb->_get_term_hierarchy( $type );
|
68 |
-
$terms_hierarrhically = $grandCore->get_terms_hierarrhically( $type, $gmedia_cats, $children, $count = 0 );
|
69 |
-
foreach ( $terms_hierarrhically as $termitem ) {
|
70 |
-
$pad = str_repeat( '— ', max( 0, $termitem->level ) );
|
71 |
-
$opt .= '<option value="' . $termitem->term_id . '">' . $pad . $termitem->name . '</option>' . "\n";
|
72 |
-
}
|
73 |
-
echo $opt;
|
74 |
-
}
|
75 |
-
?>
|
76 |
-
</select>
|
77 |
-
</div>
|
78 |
-
</div>
|
79 |
-
<div class="params" id="termsdiv-gmedia_tag">
|
80 |
-
<div id="gmedia_tag" class="tagsdiv">
|
81 |
-
<div class="jaxtag">
|
82 |
-
<div class="nojs-tags hide-if-js">
|
83 |
-
<label for="tax-input-gmedia_tag"><?php _e( 'Add tags', 'gmLang' ); ?></label>
|
84 |
-
<textarea id="tax-input-gmedia_tag" class="the-tags" cols="20" rows="3" name="terms[gmedia_tag]"></textarea>
|
85 |
-
</div>
|
86 |
-
<div class="ajaxtag hide-if-no-js">
|
87 |
-
<label for="new-tag-gmedia_tag"><?php _e( 'Add Tags', 'gmLang' ); ?></label>
|
88 |
-
<input type="text" value="" autocomplete="off" size="16" class="newtag form-input-tip" id="new-tag-gmedia_tag">
|
89 |
-
<input type="button" value="<?php _e( 'Add', 'gmLang' ); ?>" class="button tagadd">
|
90 |
-
</div>
|
91 |
-
<div class="howto"><?php _e( 'Separate tags with commas', 'gmLang' ); ?></div>
|
92 |
-
</div>
|
93 |
-
<div class="tagchecklist"></div>
|
94 |
-
</div>
|
95 |
-
<?php $gmedia_tags = $gMDb->get_terms( 'gmedia_tag', array( 'fields' => 'names' ) );
|
96 |
-
if ( count( $gmedia_tags ) ) { ?>
|
97 |
-
<div class="hide-if-no-js">
|
98 |
-
<a id="link-gmedia_tag" class="tagcloud-link gmToggle" href="#tagcloud-gmedia_tag"><?php _e( 'Choose from early created tags', 'gmLang' ); ?></a>
|
99 |
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
<?php } ?>
|
104 |
-
</div>
|
105 |
-
</div>
|
106 |
-
<?php } ?>
|
107 |
-
</div>
|
108 |
-
</form>
|
109 |
-
</div>
|
110 |
-
<form method="post" action="" id="gmUpload">
|
111 |
-
<div id="pluploadUploader"><p><?php _e( "You browser doesn't have Flash or HTML5 support. Check also if page have no JavaScript errors.", 'gmLang' ); ?></p></div>
|
112 |
-
</form>
|
113 |
-
<script type="text/javascript">
|
114 |
-
// Convert divs to queue widgets when the DOM is ready
|
115 |
-
jQuery(function () {
|
116 |
-
jQuery("#pluploadUploader").pluploadQueue({
|
117 |
-
// General settings
|
118 |
-
runtimes : 'gears,html5,flash,html4',
|
119 |
-
url : '<?php echo $swfUploadLink; ?>',
|
120 |
-
multipart : true,
|
121 |
-
multipart_params : { postData: ''},
|
122 |
-
//max_file_size : '<?php echo $maxupsize; ?>Mb',
|
123 |
-
max_file_size : '2000Mb',
|
124 |
-
//chunk_size : '10Mb',
|
125 |
-
chunk_size : '<?php echo min(($maxupsize - 1), 8); ?>Mb',
|
126 |
-
unique_names : false,
|
127 |
-
rename : true,
|
128 |
-
//urlstream_upload : true,
|
129 |
|
130 |
-
|
131 |
-
//resize : {width : 150, height : 150, quality : 90},
|
132 |
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
flash_swf_url : '<?php echo $gMediaURL; ?>/admin/js/plupload/plupload.flash.swf',
|
138 |
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
}
|
|
|
|
|
|
|
144 |
|
145 |
-
|
146 |
-
|
147 |
-
|
|
|
148 |
|
149 |
-
|
150 |
-
|
151 |
-
|
|
|
152 |
}
|
153 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
//console.log('[Refresh]');
|
160 |
-
},
|
161 |
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
|
|
|
|
|
|
|
|
171 |
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
|
177 |
-
|
178 |
-
|
179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
var response = jQuery.parseJSON(info.response);
|
181 |
-
if
|
182 |
-
|
183 |
file.status = plupload.FAILED;
|
184 |
-
jQuery('<div/>').addClass('
|
185 |
console.log(response.error);
|
|
|
|
|
|
|
186 |
}
|
187 |
-
}
|
188 |
-
|
189 |
-
|
190 |
-
// Called when a file chunk has finished uploading
|
191 |
-
//console.log('[ChunkUploaded] File:', file, "Info:", info);
|
192 |
var response = jQuery.parseJSON(info.response);
|
193 |
-
if
|
194 |
-
{
|
195 |
-
up.stop();
|
196 |
file.status = plupload.FAILED;
|
197 |
-
jQuery('<div/>').addClass('
|
198 |
console.log(response.error);
|
199 |
-
up.trigger('QueueChanged'); // Line A
|
200 |
-
up.trigger('UploadProgress', file); // Line B
|
201 |
-
up.start();
|
202 |
}
|
203 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
},
|
210 |
-
|
211 |
-
UploadComplete: function(up, file) {
|
212 |
-
//console.log('[UploadComplete]');
|
213 |
-
jQuery(".plupload_buttons").css("display", "inline");
|
214 |
-
jQuery(".plupload_upload_status").css("display", "inline");
|
215 |
-
jQuery(".plupload_start").addClass("plupload_disabled");
|
216 |
-
jQuery("#grandMedia").one("mousedown", ".plupload_add", function () {
|
217 |
-
up.splice();
|
218 |
-
up.trigger('Refresh');
|
219 |
-
//up.refresh();
|
220 |
-
});
|
221 |
-
}
|
222 |
-
}
|
223 |
-
});
|
224 |
-
/*var uploader = jQuery('#pluploadUploader').pluploadQueue();
|
225 |
-
uploader.bind('Error', function (up, args) {
|
226 |
-
console.log('[error]', args);
|
227 |
-
});
|
228 |
-
uploader.bind('BeforeUpload', function (up, file) {
|
229 |
-
up.settings.multipart_params = { postData: jQuery('#gmTerms').serialize() }
|
230 |
-
});
|
231 |
-
uploader.bind('UploadComplete', function (up, file) {
|
232 |
-
if (up.total.uploaded == uploader.files.length) {
|
233 |
-
jQuery(".plupload_buttons").css("display", "inline");
|
234 |
-
jQuery(".plupload_upload_status").css("display", "inline");
|
235 |
-
jQuery(".plupload_start").addClass("plupload_disabled");
|
236 |
-
jQuery("#grandMedia").one("mousedown", ".plupload_add", function () {
|
237 |
-
uploader.splice();
|
238 |
-
uploader.refresh();
|
239 |
-
});
|
240 |
-
}
|
241 |
-
});*/
|
242 |
-
|
243 |
-
});
|
244 |
-
</script>
|
245 |
<?php
|
246 |
}
|
247 |
|
248 |
|
249 |
-
function gmedia_import()
|
250 |
-
global $
|
251 |
-
$
|
252 |
-
$url = $
|
253 |
-
$nonce = wp_create_nonce('grandMedia');
|
254 |
?>
|
255 |
-
<
|
256 |
-
<div class="
|
257 |
-
<
|
258 |
-
|
259 |
-
|
260 |
-
<
|
261 |
-
|
262 |
-
|
263 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
<?php } ?>
|
265 |
</ul>
|
266 |
-
<div class="
|
|
|
|
|
|
|
|
|
267 |
|
268 |
-
|
269 |
-
|
270 |
-
|
|
|
|
|
|
|
|
|
|
|
271 |
<script type="text/javascript">
|
272 |
/* <![CDATA[ */
|
273 |
-
jQuery(document).ready(function
|
274 |
jQuery("#file_browser").fileTree({
|
275 |
-
script: ajaxurl+"?action=gmedia_ftp_browser&_ajax_nonce=<?php echo wp_create_nonce( 'grandMedia' ) ;?>",
|
276 |
root: '/',
|
277 |
loadMessage: "<?php _e('loading...', 'gmLang'); ?>"
|
278 |
-
}, function(path)
|
279 |
jQuery("#folderpath").val(path);
|
280 |
});
|
281 |
});
|
282 |
/* ]]> */
|
283 |
</script>
|
284 |
-
|
285 |
-
<form name="import_folder_form" id="import_folder_form" method="POST" accept-charset="utf-8" >
|
286 |
-
<fieldset>
|
287 |
-
<input type="hidden" id="folderpath" name="folderpath" value="/" />
|
288 |
-
<div id="file_browser" class="file_browser"></div>
|
289 |
-
<label class="alignleft"><input type="checkbox" name="delete_source" value="1" /> <?php _e('delete source files after importing') ?></label>
|
290 |
-
<input class="alignright button-primary ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="<?php echo $nonce; ?>" data-form="#import_folder_form" data-task="gm-import-folder" type="submit" value="<?php _e('Import folder', 'gmLang'); ?>"/>
|
291 |
-
</fieldset>
|
292 |
-
</form>
|
293 |
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
<
|
301 |
-
<
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
</div>
|
312 |
-
<input class="alignright button-primary ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="<?php echo $nonce; ?>" data-form="#import_flagallery_form" data-task="gm-import-flagallery" type="submit" value="<?php _e('Import', 'gmLang'); ?>"/>
|
313 |
-
<?php } else { ?>
|
314 |
-
<p><?php _e('There are no created galleries in this plugin.', 'gmLang') ?></p>
|
315 |
<?php } ?>
|
316 |
-
</
|
317 |
-
</
|
318 |
-
|
319 |
-
|
320 |
-
|
|
|
|
|
|
|
|
|
321 |
<?php } ?>
|
322 |
|
323 |
-
<?php if(!empty($import['nextgen']))
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
<
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
<p><?php _e('There are no created galleries in this plugin.', 'gmLang') ?></p>
|
341 |
<?php } ?>
|
342 |
-
</
|
343 |
-
</
|
344 |
-
|
345 |
-
|
346 |
-
|
|
|
|
|
|
|
|
|
347 |
<?php } ?>
|
348 |
-
|
349 |
</div>
|
350 |
<div class="clear"></div>
|
351 |
</div>
|
352 |
-
</
|
353 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
<?php
|
355 |
}
|
1 |
<?php
|
2 |
+
if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])){
|
3 |
+
die('You are not allowed to call this page directly.');
|
4 |
}
|
5 |
|
6 |
/**
|
7 |
+
* gmedia_AddMedia()
|
8 |
*
|
9 |
* @return mixed content
|
10 |
*/
|
11 |
+
function gmedia_AddMedia(){
|
12 |
+
global $gmCore;
|
13 |
+
$tab = $gmCore->_get('tab', 'upload');
|
14 |
+
$extra_tools = (defined('GMEDIA_IFRAME') && GMEDIA_IFRAME)? false : true;
|
15 |
?>
|
16 |
+
<div class="panel panel-default">
|
17 |
+
<div class="panel-heading clearfix">
|
18 |
+
<?php if($extra_tools){ ?>
|
19 |
+
<div class="btn-toolbar pull-left">
|
20 |
+
<div class="btn-group">
|
21 |
+
<a class="btn btn<?php echo ($tab == 'upload')? '-primary active' : '-default'; ?>" href="<?php echo $gmCore->get_admin_url(array(), array('tab'));; ?>"><?php _e('Upload Files', 'gmLang'); ?></a>
|
22 |
+
<a class="btn btn<?php echo ($tab == 'import')? '-primary active' : '-default'; ?>" href="<?php echo $gmCore->get_admin_url(array('tab' => 'import')); ?>"><?php _e('Import', 'gmLang'); ?></a>
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
<?php } ?>
|
26 |
+
<div id="total-progress-info" class="progress pull-right">
|
27 |
+
<?php $msg = '';
|
28 |
+
if($tab == 'upload'){
|
29 |
+
$msg = __('Add files to the upload queue and click the start button', 'gmLang');
|
30 |
+
}
|
31 |
+
if($tab == 'import'){
|
32 |
+
$msg = __('Grab files from other sources', 'gmLang');
|
33 |
+
}
|
34 |
+
?>
|
35 |
+
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:0;">
|
36 |
+
<div style="padding: 2px 10px;"><?php echo $msg; ?></div>
|
37 |
+
</div>
|
38 |
+
<div style="padding: 2px 10px;"><?php echo $msg; ?></div>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
<div class="panel-body" id="gmedia-msg-panel"></div>
|
42 |
+
<div class="container-fluid gmAddMedia">
|
43 |
+
<?php
|
44 |
+
if($tab == 'upload'){
|
45 |
+
gmedia_upload_files();
|
46 |
+
}
|
47 |
+
if($tab == 'import'){
|
48 |
+
gmedia_import();
|
49 |
+
}
|
50 |
+
?>
|
51 |
+
<?php wp_original_referer_field(true, 'previous'); ?>
|
52 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
</div>
|
54 |
+
<?php
|
55 |
}
|
56 |
|
57 |
|
58 |
+
function gmedia_upload_files(){
|
59 |
+
global $gmCore, $gmDB, $gmProcessor, $gmGallery;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
+
$maxupsize = wp_max_upload_size();
|
62 |
+
$maxupsize = floor($maxupsize * 0.99);
|
63 |
+
$maxupsize_mb = floor($maxupsize / 1024 / 1024);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
+
$gm_screen_options = $gmProcessor->user_options();
|
|
|
66 |
|
67 |
+
?>
|
68 |
+
<form class="row" id="gmUpload" name="upload_form" method="POST" accept-charset="utf-8" onsubmit="return false;">
|
69 |
+
<div class="col-md-4" id="uploader_multipart_params">
|
70 |
+
<br/>
|
|
|
71 |
|
72 |
+
<p class="clearfix text-right">
|
73 |
+
<?php if ('false' == $gm_screen_options['uploader_chunking'] || ('html4' == $gm_screen_options['uploader_runtime'])){ ?>
|
74 |
+
<span class="label label-default"><?php echo __('Maximum file size', 'gmLang') . ": {$maxupsize_mb}Mb"; ?></span>
|
75 |
+
<?php } else{ ?>
|
76 |
+
<span class="label label-default"><?php echo __('Maximum $_POST size', 'gmLang') . ": {$maxupsize_mb}Mb"; ?></span>
|
77 |
+
<span class="label label-default hidden"><?php echo __('Chunk size', 'gmLang') . ': ' . min($maxupsize_mb, $gm_screen_options['uploader_chunk_size']) . 'Mb'; ?></span>
|
78 |
+
<?php } ?>
|
79 |
+
</p>
|
80 |
|
81 |
+
<div class="form-group">
|
82 |
+
<?php
|
83 |
+
$term_type = 'gmedia_category';
|
84 |
+
$gm_terms = $gmGallery->options['taxonomies'][$term_type];
|
85 |
|
86 |
+
$terms_category = '';
|
87 |
+
if(count($gm_terms)){
|
88 |
+
foreach($gm_terms as $term_name => $term_title){
|
89 |
+
$terms_category .= '<option value="' . $term_name . '">' . esc_html($term_title) . '</option>' . "\n";
|
90 |
}
|
91 |
+
}
|
92 |
+
?>
|
93 |
+
<label><?php _e('Assign Category', 'gmLang'); ?> <small><?php _e('(for images only)') ?></small></label>
|
94 |
+
<select id="gmedia_category" name="terms[gmedia_category]" class="form-control input-sm">
|
95 |
+
<option value=""><?php _e('Uncategorized', 'gmLang'); ?></option>
|
96 |
+
<?php echo $terms_category; ?>
|
97 |
+
</select>
|
98 |
+
</div>
|
99 |
|
100 |
+
<div class="form-group">
|
101 |
+
<?php
|
102 |
+
$term_type = 'gmedia_album';
|
103 |
+
$gm_terms = $gmDB->get_terms($term_type);
|
|
|
|
|
104 |
|
105 |
+
$terms_album = '';
|
106 |
+
if(count($gm_terms)){
|
107 |
+
foreach($gm_terms as $term){
|
108 |
+
$terms_album .= '<option value="' . esc_attr($term->name) . '">' . esc_html($term->name) . '</option>' . "\n";
|
109 |
+
}
|
110 |
+
}
|
111 |
+
?>
|
112 |
+
<label><?php _e('Add to Album', 'gmLang'); ?> </label>
|
113 |
+
<select id="combobox_gmedia_album" name="terms[gmedia_album]" class="form-control input-sm" placeholder="<?php _e('Album Name...', 'gmLang'); ?>">
|
114 |
+
<option value=""></option>
|
115 |
+
<?php echo $terms_album; ?>
|
116 |
+
</select>
|
117 |
+
</div>
|
118 |
|
119 |
+
<div class="form-group">
|
120 |
+
<?php
|
121 |
+
$term_type = 'gmedia_tag';
|
122 |
+
$gm_terms = $gmDB->get_terms($term_type, array('fields' => 'names'));
|
123 |
+
?>
|
124 |
+
<label><?php _e('Add Tags', 'gmLang'); ?> </label>
|
125 |
+
<input id="combobox_gmedia_tag" name="terms[gmedia_tag]" class="form-control input-sm" value="" placeholder="<?php _e('Add Tags...', 'gmLang'); ?>" />
|
126 |
+
</div>
|
127 |
|
128 |
+
<script type="text/javascript">
|
129 |
+
jQuery(function($){
|
130 |
+
$('#combobox_gmedia_album').selectize({
|
131 |
+
create: true,
|
132 |
+
createOnBlur: true,
|
133 |
+
persist: false
|
134 |
+
});
|
135 |
+
var gm_terms = <?php echo json_encode($gm_terms); ?>;
|
136 |
+
var items = gm_terms.map(function(x){
|
137 |
+
return { item: x };
|
138 |
+
});
|
139 |
+
$('#combobox_gmedia_tag').selectize({
|
140 |
+
delimiter: ',',
|
141 |
+
maxItems: null,
|
142 |
+
createOnBlur: true,
|
143 |
+
openOnFocus: false,
|
144 |
+
persist: false,
|
145 |
+
options: items,
|
146 |
+
labelField: 'item',
|
147 |
+
valueField: 'item',
|
148 |
+
hideSelected: true,
|
149 |
+
create: function(input){
|
150 |
+
return {
|
151 |
+
item: input
|
152 |
+
}
|
153 |
+
}
|
154 |
+
});
|
155 |
+
$('#uploader_runtime select').change(function(){
|
156 |
+
if('html4' == $(this).val()){
|
157 |
+
$('#uploader_chunking').addClass('hide');
|
158 |
+
$('#uploader_urlstream_upload').addClass('hide');
|
159 |
+
} else {
|
160 |
+
$('#uploader_chunking').removeClass('hide');
|
161 |
+
$('#uploader_urlstream_upload').removeClass('hide');
|
162 |
+
}
|
163 |
+
});
|
164 |
+
});
|
165 |
+
</script>
|
166 |
+
</div>
|
167 |
+
<div class="col-md-8" id="pluploadUploader">
|
168 |
+
<p><?php _e("You browser doesn't have Flash or HTML5 support. Check also if page have no JavaScript errors.", 'gmLang'); ?></p>
|
169 |
+
<script type="text/javascript">
|
170 |
+
// Convert divs to queue widgets when the DOM is ready
|
171 |
+
jQuery(function($){
|
172 |
+
$("#pluploadUploader").plupload({
|
173 |
+
<?php if('auto' != $gm_screen_options['uploader_runtime']){ ?>
|
174 |
+
runtimes: '<?php echo $gm_screen_options['uploader_runtime']; ?>',
|
175 |
+
<?php } ?>
|
176 |
+
url: '<?php echo wp_nonce_url($gmCore->gmedia_url . '/admin/upload.php', 'grandMedia' ); ?>',
|
177 |
+
<?php if(('true' == $gm_screen_options['uploader_urlstream_upload']) && ('html4' != $gm_screen_options['uploader_runtime'])){ ?>
|
178 |
+
urlstream_upload: true,
|
179 |
+
multipart: false,
|
180 |
+
<?php } else{ ?>
|
181 |
+
multipart: true,
|
182 |
+
<?php } ?>
|
183 |
+
multipart_params: { params: ''},
|
184 |
+
<?php if('true' == $gm_screen_options['uploader_chunking'] && ('html4' != $gm_screen_options['uploader_runtime'])){ ?>
|
185 |
+
max_file_size: '2000Mb',
|
186 |
+
chunk_size: 200000<?php //echo min($maxupsize, $gm_screen_options['uploader_chunk_size']*1024*1024); ?>,
|
187 |
+
<?php } else{ ?>
|
188 |
+
max_file_size: <?php echo $maxupsize; ?>,
|
189 |
+
<?php } ?>
|
190 |
+
max_retries: 2,
|
191 |
+
unique_names: false,
|
192 |
+
rename: true,
|
193 |
+
sortable: true,
|
194 |
+
dragdrop: true,
|
195 |
+
views: {
|
196 |
+
list: true,
|
197 |
+
thumbs: true,
|
198 |
+
active: 'thumbs'
|
199 |
+
},
|
200 |
+
filters: [
|
201 |
+
{title: "All files", extensions: "*"}
|
202 |
+
],
|
203 |
+
flash_swf_url: '<?php echo $gmCore->gmedia_url; ?>/assets/plupload/Moxie.swf',
|
204 |
+
silverlight_xap_url: '<?php echo $gmCore->gmedia_url; ?>/assets/plupload/Moxie.xap'
|
205 |
|
206 |
+
});
|
207 |
+
var closebtn = '<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>';
|
208 |
+
var uploader = $("#pluploadUploader").plupload('getUploader');
|
209 |
+
uploader.bind('StateChanged', function(up){
|
210 |
+
if(up.state == plupload.STARTED){
|
211 |
+
up.settings.multipart_params = { params: jQuery('#uploader_multipart_params :input').serialize() };
|
212 |
+
}
|
213 |
+
console.log('[StateChanged]', up.state, up.settings.multipart_params);
|
214 |
+
});
|
215 |
+
uploader.bind('ChunkUploaded', function(up, file, info){
|
216 |
+
console.log('[ChunkUploaded] File:', file, "Info:", info);
|
217 |
var response = jQuery.parseJSON(info.response);
|
218 |
+
if(response && response.error){
|
219 |
+
up.stop();
|
220 |
file.status = plupload.FAILED;
|
221 |
+
jQuery('<div/>').addClass('alert alert-danger alert-dismissable').html(closebtn + '<strong>' + response.id + ':</strong> ' + response.error.message).appendTo('#gmedia-msg-panel');
|
222 |
console.log(response.error);
|
223 |
+
up.trigger('QueueChanged StateChanged');
|
224 |
+
up.trigger('UploadProgress', file);
|
225 |
+
up.start();
|
226 |
}
|
227 |
+
});
|
228 |
+
uploader.bind('FileUploaded', function(up, file, info){
|
229 |
+
console.log('[FileUploaded] File:', file, "Info:", info);
|
|
|
|
|
230 |
var response = jQuery.parseJSON(info.response);
|
231 |
+
if(response && response.error){
|
|
|
|
|
232 |
file.status = plupload.FAILED;
|
233 |
+
jQuery('<div/>').addClass('alert alert-danger alert-dismissable').html(closebtn + '<strong>' + response.id + ':</strong> ' + response.error.message).appendTo('#gmedia-msg-panel');
|
234 |
console.log(response.error);
|
|
|
|
|
|
|
235 |
}
|
236 |
+
});
|
237 |
+
uploader.bind('UploadProgress', function(up, file){
|
238 |
+
var percent = uploader.total.percent;
|
239 |
+
$('#total-progress-info .progress-bar').css('width', percent + "%").attr('aria-valuenow', percent);
|
240 |
+
});
|
241 |
+
uploader.bind('Error', function(up, args){
|
242 |
+
console.log('[Error] ', args);
|
243 |
+
jQuery('<div/>').addClass('alert alert-danger alert-dismissable').html(closebtn + '<strong>' + args.file.name + ':</strong> ' + args.message + ' ' + args.status).appendTo('#gmedia-msg-panel');
|
244 |
+
});
|
245 |
+
uploader.bind('UploadComplete', function(up, files){
|
246 |
+
console.log('[UploadComplete]', files);
|
247 |
+
$('#total-progress-info .progress-bar').css('width', '0').attr('aria-valuenow', '0');
|
248 |
+
});
|
249 |
|
250 |
+
});
|
251 |
+
</script>
|
252 |
+
</div>
|
253 |
+
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
<?php
|
255 |
}
|
256 |
|
257 |
|
258 |
+
function gmedia_import(){
|
259 |
+
global $wpdb, $gmCore, $gmGallery, $gmDB;
|
260 |
+
$gmediaURL = plugins_url(GMEDIA_FOLDER);
|
261 |
+
$url = $gmCore->get_admin_url();
|
|
|
262 |
?>
|
263 |
+
<form class="row" id="import_form" name="import_form" target="import_window" action="<?php echo $gmCore->gmedia_url; ?>/admin/import.php" method="POST" accept-charset="utf-8" style="padding:20px 0 10px;">
|
264 |
+
<div class="col-md-4">
|
265 |
+
<fieldset id="import_params" class="import-params">
|
266 |
+
<?php wp_nonce_field('GmediaImport'); ?>
|
267 |
+
<input type="hidden" id="import-action" name="import" value=""/>
|
268 |
+
<div class="form-group">
|
269 |
+
<?php
|
270 |
+
$term_type = 'gmedia_category';
|
271 |
+
$gm_terms = $gmGallery->options['taxonomies'][$term_type];
|
272 |
+
|
273 |
+
$terms_category = '';
|
274 |
+
if(count($gm_terms)){
|
275 |
+
foreach($gm_terms as $term_name => $term_title){
|
276 |
+
$terms_category .= '<option value="' . $term_name . '">' . esc_html($term_title) . '</option>' . "\n";
|
277 |
+
}
|
278 |
+
}
|
279 |
+
?>
|
280 |
+
<label><?php _e('Assign Category', 'gmLang'); ?> <small><?php _e('(for images only)') ?></small></label>
|
281 |
+
<select id="gmedia_category" name="terms[gmedia_category]" class="form-control input-sm">
|
282 |
+
<option value=""><?php _e('Uncategorized', 'gmLang'); ?></option>
|
283 |
+
<?php echo $terms_category; ?>
|
284 |
+
</select>
|
285 |
+
</div>
|
286 |
+
|
287 |
+
<div class="form-group">
|
288 |
+
<?php
|
289 |
+
$term_type = 'gmedia_album';
|
290 |
+
$gm_terms = $gmDB->get_terms($term_type);
|
291 |
+
|
292 |
+
$terms_album = '';
|
293 |
+
if(count($gm_terms)){
|
294 |
+
foreach($gm_terms as $term){
|
295 |
+
$terms_album .= '<option value="' . esc_attr($term->name) . '">' . esc_html($term->name) . '</option>' . "\n";
|
296 |
+
}
|
297 |
+
}
|
298 |
+
?>
|
299 |
+
<label><?php _e('Add to Album', 'gmLang'); ?> </label>
|
300 |
+
<select id="combobox_gmedia_album" name="terms[gmedia_album]" class="form-control input-sm" placeholder="<?php _e('Album Name...', 'gmLang'); ?>">
|
301 |
+
<option value=""></option>
|
302 |
+
<?php echo $terms_album; ?>
|
303 |
+
</select>
|
304 |
+
</div>
|
305 |
+
|
306 |
+
<div class="form-group">
|
307 |
+
<?php
|
308 |
+
$term_type = 'gmedia_tag';
|
309 |
+
$gm_terms = $gmDB->get_terms($term_type, array('fields' => 'names'));
|
310 |
+
?>
|
311 |
+
<label><?php _e('Add Tags', 'gmLang'); ?> </label>
|
312 |
+
<input id="combobox_gmedia_tag" name="terms[gmedia_tag]" class="form-control input-sm" value="" placeholder="<?php _e('Add Tags...', 'gmLang'); ?>" />
|
313 |
+
</div>
|
314 |
+
|
315 |
+
<script type="text/javascript">
|
316 |
+
jQuery(function($){
|
317 |
+
$('#combobox_gmedia_album').selectize({
|
318 |
+
create: true,
|
319 |
+
createOnBlur: true,
|
320 |
+
persist: false
|
321 |
+
});
|
322 |
+
var gm_terms = <?php echo json_encode($gm_terms); ?>;
|
323 |
+
var items = gm_terms.map(function(x){
|
324 |
+
return { item: x };
|
325 |
+
});
|
326 |
+
$('#combobox_gmedia_tag').selectize({
|
327 |
+
delimiter: ',',
|
328 |
+
maxItems: null,
|
329 |
+
createOnBlur: true,
|
330 |
+
openOnFocus: false,
|
331 |
+
persist: false,
|
332 |
+
options: items,
|
333 |
+
labelField: 'item',
|
334 |
+
valueField: 'item',
|
335 |
+
hideSelected: true,
|
336 |
+
create: function(input){
|
337 |
+
return {
|
338 |
+
item: input
|
339 |
+
}
|
340 |
+
}
|
341 |
+
});
|
342 |
+
});
|
343 |
+
</script>
|
344 |
+
</fieldset>
|
345 |
+
</div>
|
346 |
+
|
347 |
+
<div class="col-md-8 tabable">
|
348 |
+
<ul class="nav nav-tabs" style="padding:0 10px;">
|
349 |
+
<li class="active"><a href="#import_folder" data-toggle="tab"><?php _e('Import Server Folder', 'gmLang'); ?></a></li>
|
350 |
+
<?php if($import['flagallery'] = $wpdb->get_var("show tables like '{$wpdb->prefix}flag_gallery'")){ ?>
|
351 |
+
<li><a href="#import_flagallery" data-toggle="tab"><?php _e('FlAGallery plugin', 'gmLang'); ?></a></li>
|
352 |
+
<?php
|
353 |
+
}
|
354 |
+
if($import['nextgen'] = $wpdb->get_var("show tables like '{$wpdb->prefix}ngg_gallery'")){
|
355 |
+
?>
|
356 |
+
<li><a href="#import_nextgen" data-toggle="tab"><?php _e('NextGen plugin', 'gmLang'); ?></a></li>
|
357 |
<?php } ?>
|
358 |
</ul>
|
359 |
+
<div class="tab-content">
|
360 |
+
<fieldset id="import_folder" class="tab-pane active">
|
361 |
+
<?php echo "<style type='text/css'>@import url('{$gmediaURL}/assets/jqueryFileTree/jqueryFileTree.css');</style>\n"; ?>
|
362 |
+
<?php echo "<script type='text/javascript' src='{$gmediaURL}/assets/jqueryFileTree/jqueryFileTree.js'></script>\n"; ?>
|
363 |
+
<input type="hidden" id="folderpath" name="path" value="/"/>
|
364 |
|
365 |
+
<div class="tab-inside">
|
366 |
+
<h5><?php _e('Sever folders') ?>:</h5>
|
367 |
+
<div id="file_browser"></div>
|
368 |
+
</div>
|
369 |
+
<div class="tab-footer">
|
370 |
+
<div class="checkbox pull-left"><label><input type="checkbox" name="delete_source" value="1"/> <?php _e('delete source files after importing') ?></label></div>
|
371 |
+
<button class="pull-right btn btn-info gmedia-import" type="button" name="import-folder"><?php _e('Import folder', 'gmLang'); ?></button>
|
372 |
+
</div>
|
373 |
<script type="text/javascript">
|
374 |
/* <![CDATA[ */
|
375 |
+
jQuery(document).ready(function(){
|
376 |
jQuery("#file_browser").fileTree({
|
377 |
+
script: ajaxurl + "?action=gmedia_ftp_browser&_ajax_nonce=<?php echo wp_create_nonce( 'grandMedia' ) ;?>",
|
378 |
root: '/',
|
379 |
loadMessage: "<?php _e('loading...', 'gmLang'); ?>"
|
380 |
+
}, function(path){
|
381 |
jQuery("#folderpath").val(path);
|
382 |
});
|
383 |
});
|
384 |
/* ]]> */
|
385 |
</script>
|
386 |
+
</fieldset>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
387 |
|
388 |
+
<?php if(!empty($import['flagallery'])){ ?>
|
389 |
+
<fieldset id="import_flagallery" class="tab-pane">
|
390 |
+
<?php
|
391 |
+
$import['flagallery'] = $wpdb->get_results("SELECT gid, title, galdesc FROM `{$wpdb->prefix}flag_gallery`");
|
392 |
+
if(!empty($import['flagallery'])){
|
393 |
+
?>
|
394 |
+
<div class="tab-inside">
|
395 |
+
<p><?php _e('If Album is not specified, then gallery name will be used as Album') ?></p>
|
396 |
+
<h5><?php _e('Flagallery Galleries') ?>: <small>(<a href="#toggle-flaggalery" class="gm-toggle-cb"><?php _e('Toggle checkboxes', 'gmLang') ?></a>)</small></h5>
|
397 |
+
<div id="toggle-flaggalery">
|
398 |
+
<?php foreach($import['flagallery'] as $gallery){ ?>
|
399 |
+
<div class="checkbox">
|
400 |
+
<label><input type="checkbox" name="gallery[]" value="<?php echo $gallery->gid ?>"/> <span><?php echo esc_html($gallery->title); ?></span></label>
|
401 |
+
<?php /* if(!empty($gallery->galdesc)){
|
402 |
+
echo '<div class="help-block"> ' . stripslashes($gallery->galdesc) . '</div>';
|
403 |
+
} */ ?>
|
404 |
+
</div>
|
|
|
|
|
|
|
|
|
405 |
<?php } ?>
|
406 |
+
</div>
|
407 |
+
</div>
|
408 |
+
<div class="tab-footer">
|
409 |
+
<button class="pull-right btn btn-info gmedia-import" type="button" name="import-flagallery"><?php _e('Import', 'gmLang'); ?></button>
|
410 |
+
</div>
|
411 |
+
<?php } else{ ?>
|
412 |
+
<p class="tab-inside"><?php _e('There are no created galleries in this plugin.', 'gmLang') ?></p>
|
413 |
+
<?php } ?>
|
414 |
+
</fieldset>
|
415 |
<?php } ?>
|
416 |
|
417 |
+
<?php if(!empty($import['nextgen'])){ ?>
|
418 |
+
<fieldset id="import_nextgen" class="tab-pane">
|
419 |
+
<?php
|
420 |
+
$import['nextgen'] = $wpdb->get_results("SELECT gid, title, galdesc FROM `{$wpdb->prefix}ngg_gallery`");
|
421 |
+
if(!empty($import['nextgen'])){
|
422 |
+
?>
|
423 |
+
<div class="tab-inside">
|
424 |
+
<p><?php _e('If Album is not specified, then gallery name will be used as Album') ?></p>
|
425 |
+
<h5><?php _e('Flagallery Galleries') ?>: <small>(<a href="#toggle-nextgen" class="gm-toggle-cb"><?php _e('Toggle checkboxes', 'gmLang') ?></a>)</small></h5>
|
426 |
+
<div id="toggle-nextgen">
|
427 |
+
<?php foreach($import['nextgen'] as $gallery){ ?>
|
428 |
+
<div class="checkbox">
|
429 |
+
<label><input type="checkbox" name="gallery[]" value="<?php echo $gallery->gid ?>"/> <span><?php echo esc_html($gallery->title); ?></span></label>
|
430 |
+
<?php /* if(!empty($gallery->galdesc)){
|
431 |
+
echo '<div class="help-block"> ' . stripslashes($gallery->galdesc) . '</div>';
|
432 |
+
} */ ?>
|
433 |
+
</div>
|
|
|
434 |
<?php } ?>
|
435 |
+
</div>
|
436 |
+
</div>
|
437 |
+
<div class="tab-footer">
|
438 |
+
<button class="pull-right btn btn-info gmedia-import" type="button" name="import-nextgen"><?php _e('Import', 'gmLang'); ?></button>
|
439 |
+
</div>
|
440 |
+
<?php } else{ ?>
|
441 |
+
<p class="tab-inside"><?php _e('There are no created galleries in this plugin.', 'gmLang') ?></p>
|
442 |
+
<?php } ?>
|
443 |
+
</fieldset>
|
444 |
<?php } ?>
|
|
|
445 |
</div>
|
446 |
<div class="clear"></div>
|
447 |
</div>
|
448 |
+
</form>
|
449 |
|
450 |
+
<div class="modal fade gmedia-modal" id="importModal" tabindex="-1" role="dialog" aria-hidden="true">
|
451 |
+
<div class="modal-dialog">
|
452 |
+
<div class="modal-content">
|
453 |
+
<div class="modal-header">
|
454 |
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
455 |
+
<h4 class="modal-title"><?php _e('Import'); ?></h4>
|
456 |
+
</div>
|
457 |
+
<div class="modal-body">
|
458 |
+
<script type="text/javascript">
|
459 |
+
function gmedia_import_done(){
|
460 |
+
if(jQuery('#importModal').is(':visible')){
|
461 |
+
jQuery('#import-done').button('complete').prop('disabled', false);
|
462 |
+
}
|
463 |
+
}
|
464 |
+
</script>
|
465 |
+
<iframe name="import_window" id="import_window" src="about:blank" width="100%" height="300" onload="gmedia_import_done()"></iframe>
|
466 |
+
</div>
|
467 |
+
<div class="modal-footer">
|
468 |
+
<button type="button" id="import-done" class="btn btn-primary" data-dismiss="modal" data-complete-text="<?php _e( 'Close', 'gmLang' ); ?>" disabled="disabled"><?php _e( 'Working...', 'gmLang' ); ?></button>
|
469 |
+
</div>
|
470 |
+
</div><!-- /.modal-content -->
|
471 |
+
</div>
|
472 |
+
</div>
|
473 |
<?php
|
474 |
}
|
admin/admin.php
CHANGED
@@ -1,258 +1,452 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
*/
|
6 |
-
class
|
|
|
7 |
|
8 |
// constructor
|
9 |
-
function
|
10 |
global $pagenow;
|
11 |
|
12 |
// Add the admin menu
|
13 |
add_action( 'admin_menu', array( &$this, 'add_menu' ) );
|
14 |
|
15 |
// Add the script and style files
|
16 |
-
add_action( 'admin_enqueue_scripts', array( &$this, 'load_styles' ) );
|
17 |
add_action( 'admin_enqueue_scripts', array( &$this, 'load_scripts' ) );
|
18 |
|
19 |
-
add_filter( '
|
20 |
-
add_filter( '
|
21 |
-
|
22 |
-
if ( '
|
23 |
-
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
}
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
// integrate the menu
|
29 |
function add_menu() {
|
30 |
-
$
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
38 |
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
// load the script for the defined page and load only this code
|
42 |
-
|
43 |
-
|
44 |
-
global $
|
45 |
|
46 |
// check for upgrade
|
47 |
-
if ( get_option( '
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
-
|
52 |
-
if ( empty( $grandLoad->options['installDate'] ) ) {
|
53 |
-
$grandLoad->options['installDate'] = time();
|
54 |
-
update_option( 'gmediaOptions', $grandLoad->options );
|
55 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
-
|
58 |
-
include_once ( dirname( __FILE__ ) . '/library.php' );
|
59 |
-
// Initate the Library page
|
60 |
-
$grandLoad->library = new grandLibrary();
|
61 |
|
62 |
-
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
break;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
function load_scripts( $hook ) {
|
69 |
-
global $
|
70 |
-
$gMediaURL = plugins_url( GRAND_FOLDER );
|
71 |
-
$upload = $grandCore->gm_upload_dir();
|
72 |
-
|
73 |
-
wp_register_script( 'grandMediaGlobalBackend', $gMediaURL . '/admin/js/gmedia.global.back.js', array( 'jquery' ), '1.0' );
|
74 |
-
wp_localize_script( 'grandMediaGlobalBackend', 'gMediaGlobalVar', array(
|
75 |
-
'nonce' => wp_create_nonce( 'grandMedia' ),
|
76 |
-
'loading' => $gMediaURL . '/admin/images/throbber.gif',
|
77 |
-
'uploadPath' => rtrim( $upload['url'], '/' ),
|
78 |
-
'pluginPath' => $gMediaURL
|
79 |
-
) );
|
80 |
-
//wp_enqueue_script('grandMediaGlobalBackend');
|
81 |
|
82 |
// no need to go on if it's not a plugin page
|
83 |
-
if ( 'admin.php' != $hook && strpos( $
|
84 |
return;
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
wp_enqueue_script( '
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
'download' => $grandCore->message(__( 'downloading...', 'gmLang' )),
|
93 |
-
'wait' => $grandCore->message(__( 'Working. Wait please.', 'gmLang' )),
|
94 |
-
'nonce' => wp_create_nonce( 'grandMedia' ),
|
95 |
-
) );
|
96 |
-
wp_enqueue_script( 'GrandMedia' );
|
97 |
-
|
98 |
-
//wp_enqueue_script('jquery.quicksearch', $gMediaURL.'/admin/js/jquery.quicksearch.js', array('jquery'), '10.09.28');
|
99 |
if ( isset( $_GET['page'] ) ) {
|
100 |
switch ( $_GET['page'] ) {
|
101 |
case "GrandMedia" :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
case "GrandMedia_WordpressLibrary" :
|
103 |
-
|
104 |
-
wp_enqueue_script(
|
105 |
-
wp_enqueue_script( 'easing', $gMediaURL . '/admin/js/jquery.easing.js', array( 'jquery' ), '1.3.0' );
|
106 |
-
wp_enqueue_script( 'mediaelement', $gMediaURL . '/inc/mediaelement/mediaelement-and-player.min.js', array( 'jquery' ), '2.13.0' );
|
107 |
break;
|
108 |
-
case "
|
109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
break;
|
111 |
case "GrandMedia_AddMedia" :
|
112 |
-
|
|
|
|
|
|
|
113 |
if($tab == 'upload') {
|
114 |
-
|
115 |
-
wp_enqueue_script(
|
116 |
-
|
117 |
-
wp_enqueue_script(
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
) );
|
123 |
-
wp_enqueue_script( 'suggest' );
|
124 |
-
} else if($tab == 'import') {
|
125 |
-
wp_enqueue_script( array( 'jquery-ui-tabs' ) );
|
126 |
}
|
127 |
break;
|
128 |
case "GrandMedia_Settings" :
|
129 |
-
//
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
133 |
}
|
134 |
-
wp_enqueue_script( array( 'jquery-ui-tabs' ) );
|
135 |
break;
|
136 |
}
|
137 |
}
|
138 |
|
139 |
-
|
|
|
140 |
|
141 |
-
function load_styles( $hook ) {
|
142 |
-
global $grandCore;
|
143 |
-
// no need to go on if it's not a plugin page
|
144 |
-
if ( 'admin.php' != $hook && strpos( $grandCore->_get( 'page' ), 'GrandMedia' ) === false )
|
145 |
-
return;
|
146 |
-
$gMediaURL = plugins_url( GRAND_FOLDER );
|
147 |
-
|
148 |
-
wp_enqueue_style( 'qtip', $gMediaURL . '/admin/js/qtip/jquery.qtip.css', array(), '2.1.1', 'screen' );
|
149 |
-
wp_enqueue_style( 'fancybox', $gMediaURL . '/admin/css/jquery.fancybox.css', array(), '1.3.4', 'screen' );
|
150 |
-
wp_enqueue_style( 'grand-media', $gMediaURL . '/admin/css/grand-media.css', array(), '3.6.0', 'screen' );
|
151 |
-
switch ( $_GET['page'] ) {
|
152 |
-
case "GrandMedia_AddMedia" :
|
153 |
-
$tab = $grandCore->_get('tab', 'upload');
|
154 |
-
if($tab == 'upload') {
|
155 |
-
wp_enqueue_style( 'jquery.plupload.queue', $gMediaURL . '/admin/js/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css', array(), '1.5.7', 'screen' );
|
156 |
-
} else if($tab == 'import') {
|
157 |
-
wp_enqueue_style( 'jquery-ui-tabs', $gMediaURL . '/admin/css/jquery-ui-tabs.css', array(), '1.0.0', 'screen' );
|
158 |
-
}
|
159 |
-
break;
|
160 |
-
case "GrandMedia_Settings" :
|
161 |
-
case "GrandMedia_Modules" :
|
162 |
-
wp_enqueue_style( 'jquery-ui-tabs', $gMediaURL . '/admin/css/jquery-ui-tabs.css', array(), '1.0.0', 'screen' );
|
163 |
-
break;
|
164 |
-
case "GrandMedia" :
|
165 |
-
case "GrandMedia_WordpressLibrary" :
|
166 |
-
wp_enqueue_style( 'mediaelement', $gMediaURL . '/inc/mediaelement/mediaelementplayer.min.css', array(), '2.13.0', 'screen' );
|
167 |
-
break;
|
168 |
-
}
|
169 |
}
|
170 |
|
171 |
-
function
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
$link = '';
|
176 |
switch ( $screen_id ) {
|
177 |
-
case
|
178 |
-
|
179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
break;
|
181 |
}
|
182 |
-
if ( ! empty( $link ) ) {
|
183 |
-
//$contextual_help = '<p>' . sprintf( __( "Support Forum: %s", 'gmLang' ), $link ) . '</p>';
|
184 |
-
$contextual_help = '<p>' . $link . '</p>';
|
185 |
-
/*
|
186 |
-
$temp = '<div class="metabox-prefs">'.$link.'</div>
|
187 |
-
<h5>'.__('More Help & Info', 'gmLang').'</h5>
|
188 |
-
<div class="metabox-prefs">
|
189 |
-
<a href="#" target="_blank">'.__('GRAND Media Video Tutorial', 'gmLang').'</a>
|
190 |
-
| <a href="#" target="_blank">'.__('GRAND Media FAQ', 'gmLang').'</a>
|
191 |
-
| <a href="#" target="_blank">'.__('GRAND Media Review', 'gmLang').'</a>
|
192 |
-
| <a href="#" target="_blank">'.__('Get your language pack', 'gmLang').'</a>
|
193 |
-
| <a href="#" target="_blank">'. __('Flash Modules for GRAND Media', 'gmLang').'</a>
|
194 |
-
</div>'."\n";
|
195 |
-
*/
|
196 |
-
}
|
197 |
-
return $contextual_help;
|
198 |
}
|
199 |
|
200 |
-
function
|
201 |
-
|
202 |
-
|
203 |
-
|
|
|
|
|
|
|
|
|
204 |
$button = get_submit_button( __( 'Apply', 'gmLang' ), 'button', 'screen-options-apply', false );
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
break;
|
215 |
-
case
|
216 |
-
$
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
break;
|
222 |
}
|
|
|
|
|
|
|
|
|
|
|
223 |
}
|
224 |
return $current;
|
225 |
}
|
226 |
|
227 |
-
function
|
228 |
global $user_ID;
|
229 |
if ( 'gm_screen_options' == $option ) {
|
230 |
-
|
|
|
231 |
foreach ( $_POST['gm_screen_options'] as $key => $val ) {
|
232 |
-
$
|
233 |
}
|
234 |
-
update_option( 'gmediaOptions', $
|
|
|
235 |
$gm_screen_options = get_user_meta($user_ID, 'gm_screen_options', true);
|
236 |
if(!is_array($gm_screen_options))
|
237 |
$gm_screen_options = array();
|
238 |
-
$value = array_merge($gm_screen_options,
|
|
|
239 |
}
|
240 |
|
241 |
-
return $
|
242 |
-
}
|
243 |
-
|
244 |
-
// redirect to original referer after update
|
245 |
-
function gm_redirect( $location ) {
|
246 |
-
global $pagenow;
|
247 |
-
if ( 'media.php' === $pagenow && isset( $_POST['_wp_original_http_referer'] ) ) {
|
248 |
-
if ( strpos( $_POST['_wp_original_http_referer'], 'GrandMedia' ) !== false ) {
|
249 |
-
return $_POST['_wp_original_http_referer'];
|
250 |
-
}
|
251 |
-
else {
|
252 |
-
return $location;
|
253 |
-
}
|
254 |
-
}
|
255 |
-
return $location;
|
256 |
}
|
257 |
|
258 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* GmediaAdmin - Admin Section for GRAND Media
|
4 |
*
|
5 |
*/
|
6 |
+
class GmediaAdmin {
|
7 |
+
var $pages = array();
|
8 |
|
9 |
// constructor
|
10 |
+
function __construct() {
|
11 |
global $pagenow;
|
12 |
|
13 |
// Add the admin menu
|
14 |
add_action( 'admin_menu', array( &$this, 'add_menu' ) );
|
15 |
|
16 |
// Add the script and style files
|
|
|
17 |
add_action( 'admin_enqueue_scripts', array( &$this, 'load_scripts' ) );
|
18 |
|
19 |
+
add_filter( 'screen_settings', array( &$this, 'screen_settings' ), 10, 2 );
|
20 |
+
add_filter( 'set-screen-option', array( &$this, 'screen_settings_save'), 11, 3);
|
21 |
+
|
22 |
+
if ( ('admin.php' == $pagenow)
|
23 |
+
&& isset($_GET['page'])
|
24 |
+
&& (false !== strpos( $_GET['page'], 'GrandMedia' ))
|
25 |
+
&& isset($_GET['gmediablank']) ) {
|
26 |
+
add_action( 'admin_init', array( &$this, 'gmedia_blank_page' ) );
|
27 |
}
|
28 |
|
29 |
}
|
30 |
|
31 |
+
// load gmedia pages in wpless interface
|
32 |
+
function gmedia_blank_page() {
|
33 |
+
set_current_screen('GrandMedia_Settings');
|
34 |
+
|
35 |
+
global $gmCore;
|
36 |
+
$gmediablank = $gmCore->_get('gmediablank', '');
|
37 |
+
/*
|
38 |
+
add_filter('admin_body_class', function(){
|
39 |
+
$gmediablank = isset($_GET['gmediablank'])? $_GET['gmediablank'] : '';
|
40 |
+
return "gmedia-blank $gmediablank"; });
|
41 |
+
*/
|
42 |
+
add_filter('admin_body_class', create_function( '', '$gmediablank = isset($_GET["gmediablank"])? $_GET["gmediablank"] : ""; return "gmedia-blank $gmediablank";' ));
|
43 |
+
define('IFRAME_REQUEST', true);
|
44 |
+
|
45 |
+
iframe_header('GmediaGallery');
|
46 |
+
|
47 |
+
switch($gmediablank){
|
48 |
+
case 'update_plugin':
|
49 |
+
require_once( dirname(dirname( __FILE__ )) . '/update.php' );
|
50 |
+
gmedia_do_update();
|
51 |
+
break;
|
52 |
+
case 'image_editor':
|
53 |
+
require_once( dirname(dirname( __FILE__ )) . '/inc/image-editor.php' );
|
54 |
+
gmedia_image_editor();
|
55 |
+
break;
|
56 |
+
}
|
57 |
+
|
58 |
+
iframe_footer();
|
59 |
+
exit;
|
60 |
+
}
|
61 |
+
function gmedia_blank_page_body_class(){
|
62 |
+
return 'gmedia-blank';
|
63 |
+
}
|
64 |
+
|
65 |
// integrate the menu
|
66 |
function add_menu() {
|
67 |
+
$gmediaURL = plugins_url( GMEDIA_FOLDER );
|
68 |
+
$this->pages = array(
|
69 |
+
add_object_page( __( 'Gmedia Library', 'gmLang' ), 'Gmedia Gallery', 'edit_pages', 'GrandMedia', array( &$this, 'shell' ), $gmediaURL . '/admin/images/gm-icon.png' ),
|
70 |
+
add_submenu_page( 'GrandMedia', __( 'Gmedia Library', 'gmLang' ), __( 'Gmedia Library', 'gmLang' ), 'edit_pages', 'GrandMedia', array( &$this, 'shell' ) ),
|
71 |
+
add_submenu_page( 'GrandMedia', __( 'Add Media Files', 'gmLang' ), __( 'Add/Import Files', 'gmLang' ), 'edit_pages', 'GrandMedia_AddMedia', array( &$this, 'shell' ) ),
|
72 |
+
add_submenu_page( 'GrandMedia', __( 'Albums, Tags...', 'gmLang' ), __( 'Albums, Tags...', 'gmLang' ), 'edit_pages', 'GrandMedia_Terms', array( &$this, 'shell' ) ),
|
73 |
+
add_submenu_page( 'GrandMedia', __( 'Gmedia Galleries', 'gmLang' ), __( 'Create/Manage Galleries...', 'gmLang' ), 'edit_pages', 'GrandMedia_Galleries', array( &$this, 'shell' ) ),
|
74 |
+
add_submenu_page( 'GrandMedia', __( 'Modules', 'gmLang' ), __( 'Modules', 'gmLang' ), 'edit_pages', 'GrandMedia_Modules', array( &$this, 'shell' ) ),
|
75 |
+
add_submenu_page( 'GrandMedia', __( 'Gmedia Settings', 'gmLang' ), __( 'Settings', 'gmLang' ), 'edit_pages', 'GrandMedia_Settings', array( &$this, 'shell' ) ),
|
76 |
+
add_submenu_page( 'GrandMedia', __( 'Wordpress Media Library', 'gmLang' ), __( 'WP Media Library', 'gmLang' ), 'edit_pages', 'GrandMedia_WordpressLibrary', array( &$this, 'shell' ) )
|
77 |
+
);
|
78 |
|
79 |
+
foreach($this->pages as $page){
|
80 |
+
add_action("load-$page", array( &$this, 'screen_help' ));
|
81 |
+
}
|
82 |
}
|
83 |
|
84 |
// load the script for the defined page and load only this code
|
85 |
+
// Display shell of plugin
|
86 |
+
function shell() {
|
87 |
+
global $gmProcessor;
|
88 |
|
89 |
// check for upgrade
|
90 |
+
if ( get_option( 'gmediaDbVersion' ) != GMEDIA_DBVERSION ) {
|
91 |
+
if(isset($_GET['do_update']) && ('gmedia' == $_GET['do_update'])){
|
92 |
+
$update_frame = '<iframe name="gmedia_update" id="gmedia_update" width="100%" height="500" src="'.admin_url('admin.php?page=GrandMedia&gmediablank=update_plugin').'"></iframe>';
|
93 |
+
$gmProcessor->page = 'GrandMedia_Update';
|
94 |
+
} else{
|
95 |
+
return;
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
$sideLinks = $this->sideLinks();
|
100 |
+
|
101 |
+
if(isset($update_frame)){
|
102 |
+
$sideLinks['grandTitle'] = __('Updating GmediaGallery Plugin', 'gmLang');
|
103 |
}
|
104 |
+
?>
|
105 |
+
<div id="gmedia-container">
|
106 |
+
<div id="gmedia-header" class="clearfix">
|
107 |
+
<div id="gmedia-logo">Gmedia<small> by CodEasily.com </small></div>
|
108 |
+
<h2><?php echo $sideLinks['grandTitle']; ?></h2>
|
109 |
+
</div>
|
110 |
+
<div id="gm-message"></div>
|
111 |
+
<div class="container-fluid">
|
112 |
+
<div class="row row-fx180-fl">
|
113 |
+
<div class="col-sm-2 hidden-xs" id="sidebar" role="navigation">
|
114 |
+
<?php echo $sideLinks['sideLinks']; ?>
|
115 |
+
</div>
|
116 |
+
<div class="col-sm-10 col-xs-12">
|
117 |
+
<?php
|
118 |
+
echo $gmProcessor->alert('success', $gmProcessor->msg);
|
119 |
+
echo $gmProcessor->alert('danger', $gmProcessor->error);
|
120 |
+
|
121 |
+
if(isset($update_frame)){ ?>
|
122 |
+
<div class="panel panel-default">
|
123 |
+
<div class="panel-body"><?php echo $update_frame; ?></div>
|
124 |
+
</div>
|
125 |
+
<?php
|
126 |
+
} else{
|
127 |
+
$this->controller();
|
128 |
+
}
|
129 |
+
?>
|
130 |
+
</div>
|
131 |
+
</div>
|
132 |
+
</div>
|
133 |
+
</div>
|
134 |
+
<?php
|
135 |
+
}
|
136 |
+
|
137 |
+
function sideLinks() {
|
138 |
+
global $submenu, $gmCore, $gmProcessor;
|
139 |
+
$content['sideLinks'] = '
|
140 |
+
<div id="gmedia-navbar">
|
141 |
+
<div class="row">
|
142 |
+
<ul class="list-group">';
|
143 |
+
foreach ( $submenu['GrandMedia'] as $menuKey => $menuItem ) {
|
144 |
+
if ( $submenu['GrandMedia'][$menuKey][2] == $gmProcessor->page ) {
|
145 |
+
$iscur = ' active';
|
146 |
+
$content['grandTitle'] = $submenu['GrandMedia'][$menuKey][3];
|
147 |
+
}
|
148 |
+
else {
|
149 |
+
$iscur = '';
|
150 |
+
}
|
151 |
|
152 |
+
$content['sideLinks'] .= "\n".'<a class="list-group-item' . $iscur . '" href="' . admin_url( 'admin.php?page=' . $submenu['GrandMedia'][$menuKey][2] ) . '">' . $submenu['GrandMedia'][$menuKey][0] . '</a>';
|
|
|
|
|
|
|
153 |
}
|
154 |
+
$content['sideLinks'] .= '
|
155 |
+
</ul>
|
156 |
+
</div>
|
157 |
+
</div>';
|
158 |
+
|
159 |
+
return $content;
|
160 |
+
}
|
161 |
|
162 |
+
function controller() {
|
|
|
|
|
|
|
163 |
|
164 |
+
global $gmProcessor;
|
165 |
+
switch ( $gmProcessor->page ) {
|
166 |
+
case 'GrandMedia_AddMedia':
|
167 |
+
include_once ( dirname( __FILE__ ) . '/addmedia.php' );
|
168 |
+
gmedia_AddMedia();
|
169 |
+
break;
|
170 |
+
case 'GrandMedia_Terms':
|
171 |
+
include_once(dirname(__FILE__) . '/terms.php');
|
172 |
+
if ( isset( $_GET['edit_album'] ) ) {
|
173 |
+
gmediaAlbumEdit();
|
174 |
+
} else{
|
175 |
+
gmediaTerms();
|
176 |
+
}
|
177 |
+
break;
|
178 |
+
case 'GrandMedia_Galleries':
|
179 |
+
include_once(dirname(__FILE__) . '/galleries.php');
|
180 |
+
if(isset($_GET['gallery_module']) || isset($_GET['edit_gallery'])){
|
181 |
+
gmediaGalleryEdit();
|
182 |
+
} else{
|
183 |
+
gmediaGalleries();
|
184 |
+
}
|
185 |
+
break;
|
186 |
+
case 'GrandMedia_Modules':
|
187 |
+
include_once(dirname(__FILE__) . '/modules.php');
|
188 |
+
gmediaModules();
|
189 |
+
break;
|
190 |
+
case 'GrandMedia_Settings':
|
191 |
+
include_once ( dirname( __FILE__ ) . '/settings.php' );
|
192 |
+
gmSettings();
|
193 |
+
break;
|
194 |
+
case 'GrandMedia_WordpressLibrary':
|
195 |
+
include_once ( dirname( __FILE__ ) . '/wpmedia.php' );
|
196 |
+
grandWPMedia();
|
197 |
+
break;
|
198 |
+
case 'GrandMedia':
|
199 |
+
default:
|
200 |
+
include_once ( dirname( __FILE__ ) . '/gmedia.php' );
|
201 |
+
gmediaLib();
|
202 |
break;
|
203 |
}
|
204 |
}
|
205 |
|
206 |
function load_scripts( $hook ) {
|
207 |
+
global $gmCore, $gmProcessor;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
|
209 |
// no need to go on if it's not a plugin page
|
210 |
+
if ( 'admin.php' != $hook && strpos( $gmCore->_get( 'page' ), 'GrandMedia' ) === false )
|
211 |
return;
|
212 |
|
213 |
+
wp_enqueue_style( 'gmedia-bootstrap' );
|
214 |
+
//wp_enqueue_style( 'gmedia-bootstrap-theme' );
|
215 |
+
wp_enqueue_script( 'gmedia-bootstrap' );
|
216 |
+
|
217 |
+
//wp_enqueue_script( 'outside-events' );
|
218 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
if ( isset( $_GET['page'] ) ) {
|
220 |
switch ( $_GET['page'] ) {
|
221 |
case "GrandMedia" :
|
222 |
+
if($gmCore->_get('gmediablank') == 'image_editor'){
|
223 |
+
wp_enqueue_script('camanjs', $gmCore->gmedia_url . '/assets/image-editor/camanjs/caman.full.min.js', array(), '4.1.1');
|
224 |
+
|
225 |
+
wp_enqueue_style('nouislider', $gmCore->gmedia_url . '/assets/image-editor/js/jquery.nouislider.css', array('gmedia-bootstrap'), '6.1.0');
|
226 |
+
wp_enqueue_script('nouislider', $gmCore->gmedia_url . '/assets/image-editor/js/jquery.nouislider.min.js', array('jquery'), '6.1.0');
|
227 |
+
|
228 |
+
wp_enqueue_style('gmedia-image-editor', $gmCore->gmedia_url . '/assets/image-editor/style.css', array('gmedia-bootstrap'), '0.9.16', 'screen');
|
229 |
+
wp_enqueue_script('gmedia-image-editor', $gmCore->gmedia_url . '/assets/image-editor/image-editor.js', array('jquery','camanjs'), '0.9.16');
|
230 |
+
break;
|
231 |
+
}
|
232 |
+
wp_enqueue_style('selectize', $gmCore->gmedia_url . '/assets/selectize/selectize.bootstrap3.css', array('gmedia-bootstrap'), '0.8.5', 'screen');
|
233 |
+
wp_enqueue_script('selectize', $gmCore->gmedia_url . '/assets/selectize/selectize.min.js', array('jquery'), '0.8.5');
|
234 |
+
|
235 |
+
if($gmProcessor->mode){
|
236 |
+
wp_enqueue_script( 'alphanum', $gmCore->gmedia_url . '/assets/jq-plugins/jquery.alphanum.js', array( 'jquery' ), '1.0.16' );
|
237 |
+
|
238 |
+
wp_enqueue_script( 'moment', $gmCore->gmedia_url . '/assets/bootstrap-datetimepicker/moment.min.js', array( 'jquery' ), '2.5.1' );
|
239 |
+
wp_enqueue_style( 'datetimepicker', $gmCore->gmedia_url . '/assets/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css', array('gmedia-bootstrap'), '2.1.32' );
|
240 |
+
wp_enqueue_script( 'datetimepicker', $gmCore->gmedia_url . '/assets/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js', array( 'jquery', 'moment', 'gmedia-bootstrap' ), '2.1.32' );
|
241 |
+
|
242 |
+
//wp_enqueue_style( 'thickbox' );
|
243 |
+
//wp_enqueue_script( 'thickbox' );
|
244 |
+
}
|
245 |
+
//wp_enqueue_style( 'mediaelement' );
|
246 |
+
//wp_enqueue_script( 'mediaelement' );
|
247 |
+
break;
|
248 |
case "GrandMedia_WordpressLibrary" :
|
249 |
+
wp_enqueue_style( 'selectize', $gmCore->gmedia_url . '/assets/selectize/selectize.bootstrap3.css', array('gmedia-bootstrap'), '0.8.5', 'screen' );
|
250 |
+
wp_enqueue_script('selectize', $gmCore->gmedia_url . '/assets/selectize/selectize.min.js', array('jquery'), '0.8.5');
|
|
|
|
|
251 |
break;
|
252 |
+
case "GrandMedia_Terms" :
|
253 |
+
if($gmCore->_get('edit_album')){
|
254 |
+
wp_enqueue_style('jquery-ui-smoothness', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/smoothness/jquery-ui.min.css', array(), '1.10.2', 'screen');
|
255 |
+
wp_enqueue_script('jquery-ui-full', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js', array(), '1.10.2');
|
256 |
+
|
257 |
+
wp_enqueue_script('tinysort', $gmCore->gmedia_url . '/assets/jq-plugins/jquery.tinysort.js', array('jquery'), '1.5.6');
|
258 |
+
}
|
259 |
+
|
260 |
break;
|
261 |
case "GrandMedia_AddMedia" :
|
262 |
+
wp_enqueue_style( 'selectize', $gmCore->gmedia_url . '/assets/selectize/selectize.bootstrap3.css', array('gmedia-bootstrap'), '0.8.5', 'screen' );
|
263 |
+
wp_enqueue_script('selectize', $gmCore->gmedia_url . '/assets/selectize/selectize.min.js', array('jquery'), '0.8.5');
|
264 |
+
|
265 |
+
$tab = $gmCore->_get('tab', 'upload');
|
266 |
if($tab == 'upload') {
|
267 |
+
wp_enqueue_style('jquery-ui-smoothness', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/smoothness/jquery-ui.min.css', array(), '1.10.2', 'screen');
|
268 |
+
wp_enqueue_script('jquery-ui-full', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js', array(), '1.10.2');
|
269 |
+
|
270 |
+
wp_enqueue_script('gmedia-plupload', $gmCore->gmedia_url . '/assets/plupload/plupload.full.min.js', array('jquery', 'jquery-ui-full'), '2.1.1');
|
271 |
+
|
272 |
+
wp_enqueue_style( 'jquery.ui.plupload', $gmCore->gmedia_url . '/assets/plupload/jquery.ui.plupload/css/jquery.ui.plupload.css', array( 'jquery-ui-smoothness' ), '2.1.1', 'screen' );
|
273 |
+
wp_enqueue_script( 'jquery.ui.plupload', $gmCore->gmedia_url . '/assets/plupload/jquery.ui.plupload/jquery.ui.plupload.min.js', array( 'gmedia-plupload', 'jquery-ui-full' ), '2.1.1' );
|
274 |
+
|
|
|
|
|
|
|
|
|
275 |
}
|
276 |
break;
|
277 |
case "GrandMedia_Settings" :
|
278 |
+
// enqueue jscolor
|
279 |
+
break;
|
280 |
+
case "GrandMedia_Galleries" :
|
281 |
+
if(isset($_GET['gallery_module']) || isset($_GET['edit_gallery'])){
|
282 |
+
wp_enqueue_style( 'selectize', $gmCore->gmedia_url . '/assets/selectize/selectize.bootstrap3.css', array('gmedia-bootstrap'), '0.8.5', 'screen' );
|
283 |
+
wp_enqueue_script('selectize', $gmCore->gmedia_url . '/assets/selectize/selectize.min.js', array('jquery','jquery-ui-sortable'), '0.8.5');
|
284 |
+
|
285 |
+
wp_enqueue_style( 'jquery.minicolors', $gmCore->gmedia_url . '/assets/minicolors/jquery.minicolors.css', array('gmedia-bootstrap'), '0.9.13');
|
286 |
+
wp_enqueue_script( 'jquery.minicolors', $gmCore->gmedia_url . '/assets/minicolors/jquery.minicolors.js', array('jquery'), '0.9.13');
|
287 |
}
|
|
|
288 |
break;
|
289 |
}
|
290 |
}
|
291 |
|
292 |
+
wp_enqueue_style( 'grand-media' );
|
293 |
+
wp_enqueue_script( 'grand-media' );
|
294 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
}
|
296 |
|
297 |
+
function screen_help() {
|
298 |
+
$screen = get_current_screen();
|
299 |
+
$screen_id = explode('page_', $screen->id, 2);
|
300 |
+
|
|
|
301 |
switch ( $screen_id ) {
|
302 |
+
case 'GrandMedia' :
|
303 |
+
//$link = '<a href="http://codeasily.com/community/forum/gmedia-gallery-wordpress-plugin/" target="_blank">'.__( 'Support Forum', 'gmLang' ).'</a>';
|
304 |
+
//$contextual_help = '<p>' . sprintf( __( "Support Forum: %s", 'gmLang' ), $link ) . '</p>';
|
305 |
+
/*
|
306 |
+
$temp = '<div class="metabox-prefs">'.$link.'</div>
|
307 |
+
<h5>'.__('More Help & Info', 'gmLang').'</h5>
|
308 |
+
<div class="metabox-prefs">
|
309 |
+
<a href="#" target="_blank">'.__('GRAND Media Video Tutorial', 'gmLang').'</a>
|
310 |
+
| <a href="#" target="_blank">'.__('GRAND Media FAQ', 'gmLang').'</a>
|
311 |
+
| <a href="#" target="_blank">'.__('GRAND Media Review', 'gmLang').'</a>
|
312 |
+
| <a href="#" target="_blank">'.__('Get your language pack', 'gmLang').'</a>
|
313 |
+
| <a href="#" target="_blank">'. __('Flash Modules for GRAND Media', 'gmLang').'</a>
|
314 |
+
</div>'."\n";
|
315 |
+
*/
|
316 |
+
$screen->add_help_tab( array(
|
317 |
+
'id' => 'my_help_tab',
|
318 |
+
'title' => __('My Help Tab'),
|
319 |
+
'content' => '<p>' . __( 'Descriptive content that will show in My Help Tab-body goes here.' ) . '</p>',
|
320 |
+
) );
|
321 |
+
break;
|
322 |
+
case 'GrandMedia_Settings' :
|
323 |
break;
|
324 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
}
|
326 |
|
327 |
+
function screen_settings( $current, $screen ) {
|
328 |
+
global $user_ID, $gmGallery, $gmProcessor, $gmCore;
|
329 |
+
if ( in_array( $screen->id, $this->pages ) ) {
|
330 |
+
|
331 |
+
$gm_screen_options = $gmProcessor->user_options();
|
332 |
+
|
333 |
+
$title = '<h5><strong>' . __( 'Settings', 'gmLang' ) . '</strong></h5>';
|
334 |
+
$wp_screen_options = '<input type="hidden" name="wp_screen_options[option]" value="gm_screen_options" /><input type="hidden" name="wp_screen_options[value]" value="'.$screen->id.'" />';
|
335 |
$button = get_submit_button( __( 'Apply', 'gmLang' ), 'button', 'screen-options-apply', false );
|
336 |
+
|
337 |
+
$settings = false;
|
338 |
+
|
339 |
+
$screen_id = explode('page_', $screen->id, 2);
|
340 |
+
|
341 |
+
switch ( $screen_id[1] ) {
|
342 |
+
case 'GrandMedia' :
|
343 |
+
$settings = '
|
344 |
+
<div class="form-inline pull-left">
|
345 |
+
<div class="form-group">
|
346 |
+
<input type="number" max="999" min="0" step="5" size="3" name="gm_screen_options[per_page_gmedia]" class="form-control input-sm" style="width: auto;" value="'.$gm_screen_options['per_page_gmedia'].'" /> <span>'.__( 'items per page', 'gmLang' ).'</span>
|
347 |
+
</div>
|
348 |
+
<div class="form-group">
|
349 |
+
<select name="gm_screen_options[orderby_gmedia]" class="form-control input-sm">
|
350 |
+
<option'.selected($gm_screen_options['orderby_gmedia'], 'ID', false).' value="ID">'.__('ID','gmLang').'</option>
|
351 |
+
<option'.selected($gm_screen_options['orderby_gmedia'], 'title', false).' value="title">'.__('Title','gmLang').'</option>
|
352 |
+
<option'.selected($gm_screen_options['orderby_gmedia'], 'date', false).' value="date">'.__('Date','gmLang').'</option>
|
353 |
+
<option'.selected($gm_screen_options['orderby_gmedia'], 'modified', false).' value="modified">'.__('Last Modified','gmLang').'</option>
|
354 |
+
<option'.selected($gm_screen_options['orderby_gmedia'], 'mime_type', false).' value="mime_type">'.__('MIME Type','gmLang').'</option>
|
355 |
+
<option'.selected($gm_screen_options['orderby_gmedia'], 'author', false).' value="author">'.__('Author','gmLang').'</option>
|
356 |
+
</select> <span>'.__( 'order items', 'gmLang' ).'</span>
|
357 |
+
</div>
|
358 |
+
<div class="form-group">
|
359 |
+
<select name="gm_screen_options[sortorder_gmedia]" class="form-control input-sm">
|
360 |
+
<option'.selected($gm_screen_options['sortorder_gmedia'], 'DESC', false).' value="DESC">'.__('DESC','gmLang').'</option>
|
361 |
+
<option'.selected($gm_screen_options['sortorder_gmedia'], 'ASC', false).' value="ASC">'.__('ASC','gmLang').'</option>
|
362 |
+
</select> <span>'.__( 'sort order', 'gmLang' ).'</span>
|
363 |
+
</div>
|
364 |
+
</div>
|
365 |
+
';
|
366 |
+
break;
|
367 |
+
case 'GrandMedia_WordpressLibrary' :
|
368 |
+
$settings = '<p>'.__('Set query options for this page to be loaded by default.', 'gmLang').'</p>
|
369 |
+
<div class="form-inline pull-left">
|
370 |
+
<div class="form-group">
|
371 |
+
<input type="number" max="999" min="0" step="5" size="3" name="gm_screen_options[per_page_wpmedia]" class="form-control input-sm" style="width: auto;" value="' . $gm_screen_options['per_page_wpmedia'] . '" /> <span>' . __('items per page', 'gmLang') . '</span>
|
372 |
+
</div>
|
373 |
+
<div class="form-group">
|
374 |
+
<select name="gm_screen_options[orderby_wpmedia]" class="form-control input-sm">
|
375 |
+
<option' . selected($gm_screen_options['orderby_wpmedia'], 'ID', false) . ' value="ID">' . __('ID', 'gmLang') . '</option>
|
376 |
+
<option' . selected($gm_screen_options['orderby_wpmedia'], 'title', false) . ' value="title">' . __('Title', 'gmLang') . '</option>
|
377 |
+
<option' . selected($gm_screen_options['orderby_wpmedia'], 'date', false) . ' value="date">' . __('Date', 'gmLang') . '</option>
|
378 |
+
<option' . selected($gm_screen_options['orderby_wpmedia'], 'modified', false) . ' value="modified">' . __('Last Modified', 'gmLang') . '</option>
|
379 |
+
<option' . selected($gm_screen_options['orderby_wpmedia'], 'mime_type', false) . ' value="mime_type">' . __('MIME Type', 'gmLang') . '</option>
|
380 |
+
<option' . selected($gm_screen_options['orderby_wpmedia'], 'author', false) . ' value="author">' . __('Author', 'gmLang') . '</option>
|
381 |
+
</select> <span>' . __('order items', 'gmLang') . '</span>
|
382 |
+
</div>
|
383 |
+
<div class="form-group">
|
384 |
+
<select name="gm_screen_options[sortorder_wpmedia]" class="form-control input-sm">
|
385 |
+
<option' . selected($gm_screen_options['sortorder_wpmedia'], 'DESC', false) . ' value="DESC">' . __('DESC', 'gmLang') . '</option>
|
386 |
+
<option' . selected($gm_screen_options['sortorder_wpmedia'], 'ASC', false) . ' value="ASC">' . __('ASC', 'gmLang') . '</option>
|
387 |
+
</select> <span>' . __('sort order', 'gmLang') . '</span>
|
388 |
+
</div>
|
389 |
+
</div>
|
390 |
+
';
|
391 |
break;
|
392 |
+
case 'GrandMedia_AddMedia' :
|
393 |
+
$tab = $gmCore->_get('tab', 'upload');
|
394 |
+
if('upload' == $tab){
|
395 |
+
$html4_hide = ('html4' == $gm_screen_options['uploader_runtime'])? ' hide' : '';
|
396 |
+
$settings = '
|
397 |
+
<div class="form-inline pull-left">
|
398 |
+
<div id="uploader_runtime" class="form-group"><span>' . __('Uploader runtime:', 'gmLang') . ' </span>
|
399 |
+
<select name="gm_screen_options[uploader_runtime]" class="form-control input-sm">
|
400 |
+
<option' . selected($gm_screen_options['uploader_runtime'], 'auto', false) . ' value="auto">' . __('Auto', 'gmLang') . '</option>
|
401 |
+
<option' . selected($gm_screen_options['uploader_runtime'], 'html5', false) . ' value="html5">' . __('HTML5 Uploader', 'gmLang') . '</option>
|
402 |
+
<option' . selected($gm_screen_options['uploader_runtime'], 'flash', false) . ' value="flash">' . __('Flash Uploader', 'gmLang') . '</option>
|
403 |
+
<option' . selected($gm_screen_options['uploader_runtime'], 'html4', false) . ' value="html4">' . __('HTML4 Uploader', 'gmLang') . '</option>
|
404 |
+
</select>
|
405 |
+
</div>
|
406 |
+
<div id="uploader_chunking" class="form-group' . $html4_hide . '"><span>' . __('Chunking:', 'gmLang') . ' </span>
|
407 |
+
<select name="gm_screen_options[uploader_chunking]" class="form-control input-sm">
|
408 |
+
<option' . selected($gm_screen_options['uploader_chunking'], 'true', false) . ' value="true">' . __('TRUE', 'gmLang') . '</option>
|
409 |
+
<option' . selected($gm_screen_options['uploader_chunking'], 'false', false) . ' value="false">' . __('FALSE', 'gmLang') . '</option>
|
410 |
+
</select>
|
411 |
+
</div>
|
412 |
+
<div id="uploader_urlstream_upload" class="form-group' . $html4_hide . '"><span>' . __('URL streem upload:', 'gmLang') . ' </span>
|
413 |
+
<select name="gm_screen_options[uploader_urlstream_upload]" class="form-control input-sm">
|
414 |
+
<option' . selected($gm_screen_options['uploader_urlstream_upload'], 'true', false) . ' value="true">' . __('TRUE', 'gmLang') . '</option>
|
415 |
+
<option' . selected($gm_screen_options['uploader_urlstream_upload'], 'false', false) . ' value="false">' . __('FALSE', 'gmLang') . '</option>
|
416 |
+
</select>
|
417 |
+
</div>
|
418 |
+
</div>
|
419 |
+
';
|
420 |
+
}
|
421 |
break;
|
422 |
}
|
423 |
+
|
424 |
+
if($settings){
|
425 |
+
$current = $title.$settings.$wp_screen_options.$button;
|
426 |
+
}
|
427 |
+
|
428 |
}
|
429 |
return $current;
|
430 |
}
|
431 |
|
432 |
+
function screen_settings_save( $status, $option, $value) {
|
433 |
global $user_ID;
|
434 |
if ( 'gm_screen_options' == $option ) {
|
435 |
+
/*
|
436 |
+
global $gmGallery;
|
437 |
foreach ( $_POST['gm_screen_options'] as $key => $val ) {
|
438 |
+
$gmGallery->options['gm_screen_options'][$key] = $val;
|
439 |
}
|
440 |
+
update_option( 'gmediaOptions', $gmGallery->options );
|
441 |
+
*/
|
442 |
$gm_screen_options = get_user_meta($user_ID, 'gm_screen_options', true);
|
443 |
if(!is_array($gm_screen_options))
|
444 |
$gm_screen_options = array();
|
445 |
+
$value = array_merge($gm_screen_options, $_POST['gm_screen_options']);
|
446 |
+
return $value;
|
447 |
}
|
448 |
|
449 |
+
return $status;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
450 |
}
|
451 |
|
452 |
}
|
admin/ajax.php
CHANGED
@@ -1,800 +1,904 @@
|
|
1 |
<?php
|
2 |
-
add_action( '
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
* @return void
|
7 |
-
*/
|
8 |
-
function gmDoAjax() {
|
9 |
-
/** @var $wpdb wpdb */
|
10 |
-
global $wpdb, $grandCore, $grandAdmin, $gMDb;
|
11 |
-
|
12 |
-
check_ajax_referer( "grandMedia" );
|
13 |
-
|
14 |
-
// check for correct capability
|
15 |
if ( ! current_user_can( 'edit_posts' ) )
|
16 |
die( '-1' );
|
17 |
|
18 |
-
|
19 |
-
if ( false === strpos( $referer, 'GrandMedia' ) )
|
20 |
-
die( '0' );
|
21 |
-
}
|
22 |
-
else {
|
23 |
-
die( '0' );
|
24 |
-
}
|
25 |
-
*/
|
26 |
-
$_GET = stripslashes_deep( $_GET );
|
27 |
-
$_POST = stripslashes_deep( $_POST );
|
28 |
-
|
29 |
-
$task = isset( $_REQUEST['task'] ) ? $_REQUEST['task'] : false;
|
30 |
-
if ( ! $task )
|
31 |
-
die( '0' );
|
32 |
-
|
33 |
-
if ( isset( $_POST['form'] ) )
|
34 |
-
parse_str( $_POST['form'] );
|
35 |
-
if ( isset( $_POST['post'] ) )
|
36 |
-
parse_str( $_POST['post'] );
|
37 |
-
|
38 |
-
if ( isset( $gmSelected ) )
|
39 |
-
$gmSelected = explode( ',', $gmSelected );
|
40 |
-
|
41 |
-
$update = $grandCore->message( __( 'Loading...', 'gmLang' ), 'wait' );
|
42 |
-
|
43 |
-
/** @var $gmID
|
44 |
-
* @var $gmTitle
|
45 |
-
* @var $gmDescription
|
46 |
-
* @var $gmSelected
|
47 |
-
*/
|
48 |
-
switch ( $task ) {
|
49 |
-
|
50 |
-
case 'gmedia-edit':
|
51 |
-
$media_id = (int) $_REQUEST['gmedia_id'];
|
52 |
-
//include_once(dirname(__FILE__).'/functions.php');
|
53 |
-
$result = $grandAdmin->gmEditRow( $media_id, 'gmedia' );
|
54 |
-
echo $result;
|
55 |
-
die();
|
56 |
-
break;
|
57 |
|
58 |
-
|
59 |
-
if ( ! empty( $gmedia['ID'] ) ) {
|
60 |
-
$gmedia['modified'] = current_time( 'mysql' );
|
61 |
-
$id = $gMDb->insert_gmedia( $gmedia );
|
62 |
-
if ( ! is_wp_error( $id ) ) {
|
63 |
-
// Meta Stuff
|
64 |
-
if ( isset($gmedia['meta']) && is_array($gmedia['meta']) ) {
|
65 |
-
foreach ( $gmedia['meta'] as $key => $value ) {
|
66 |
-
$gMDb->update_metadata( 'gmedia', $id, $key, $value );
|
67 |
-
}
|
68 |
-
}
|
69 |
-
$item = $gMDb->get_gmedia( $id );
|
70 |
-
//include_once(dirname(__FILE__).'/functions.php');
|
71 |
-
ob_start();
|
72 |
-
$grandAdmin->gMediaRow( $item );
|
73 |
-
$tr = ob_get_contents();
|
74 |
-
ob_end_clean();
|
75 |
-
$result = array( 'stat' => 'OK', 'message' => $grandCore->message( sprintf( __( 'gmedia #%s updated successfully', 'gmLang' ), $id ), 'info' ), 'content' => $tr );
|
76 |
-
}
|
77 |
-
else {
|
78 |
-
$result = array( 'stat' => 'KO', 'message' => $grandCore->message( sprintf( __( "Can't update gmedia #%s", 'gmLang' ) . '. ' . __( 'Contact plugin author to solve this problem. Describe your problem and give temporary access to Wordpress Dashboard and to FTP plugins folder.' ) . ' (<a href="mailto:gmediafolder+support@gmail.com?subject=Gmedia Support" target="_blank">Gmedia Support</a>)', $gmID ), 'error' ), 'error' => $id );
|
79 |
-
}
|
80 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
81 |
-
echo json_encode( $result );
|
82 |
-
}
|
83 |
-
die();
|
84 |
-
break;
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
$update = $grandCore->message( __( 'Deleting...', 'gmLang' ), 'wait' );
|
89 |
-
$mID = absint( $_REQUEST['gmedia_id'] );
|
90 |
-
if ( ! $mID )
|
91 |
-
die( '0' );
|
92 |
-
if ( ! current_user_can( 'delete_posts' ) )
|
93 |
-
wp_die( __( 'You are not allowed to delete this post.' ) );
|
94 |
-
if ( ! $gMDb->delete_gmedia( $mID ) )
|
95 |
-
wp_die( __( 'Error in deleting...' ) );
|
96 |
-
$result = array( 'stat' => 'OK', 'postmsg' => sprintf( __( 'gmedia #%s was deleted', 'gmLang' ), $mID ), 'message' => $update );
|
97 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
98 |
-
echo json_encode( $result );
|
99 |
-
}
|
100 |
-
die();
|
101 |
-
break;
|
102 |
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
foreach ( (array) $gmSelected as $mID ) {
|
107 |
-
if ( ! current_user_can( 'delete_posts' ) )
|
108 |
-
wp_die( __( 'You are not allowed to delete this post.' ) );
|
109 |
|
110 |
-
|
111 |
-
wp_die( __( 'Error in deleting...' ) );
|
112 |
-
}
|
113 |
-
$result = array( 'stat' => 'OK', 'postmsg' => sprintf( __( '%s gmedia(s) was deleted', 'gmLang' ), count( $gmSelected ) ), 'message' => $update );
|
114 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
115 |
-
echo json_encode( $result );
|
116 |
-
}
|
117 |
-
die();
|
118 |
-
break;
|
119 |
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
$
|
125 |
-
|
126 |
-
die( '0' );
|
127 |
-
/* TODO current_user_can() assign terms
|
128 |
-
if ( ! current_user_can( 'assign_terms' ) )
|
129 |
-
die( '-1' );
|
130 |
-
*/
|
131 |
}
|
132 |
-
|
133 |
-
|
134 |
}
|
|
|
135 |
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
|
|
|
|
141 |
}
|
142 |
-
$
|
143 |
-
|
144 |
-
|
|
|
|
|
|
|
|
|
|
|
145 |
|
146 |
-
|
|
|
147 |
|
148 |
-
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
151 |
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
/* TODO current_user_can() edit terms
|
160 |
-
if ( ! current_user_can( 'edit_terms' ) )
|
161 |
-
die( '-1' );
|
162 |
-
*/
|
163 |
-
}
|
164 |
-
else {
|
165 |
-
die( '0' );
|
166 |
-
}
|
167 |
-
//include_once(dirname(__FILE__).'/functions.php');
|
168 |
-
$result = $grandAdmin->gmEditRow( $term_id, $taxonomy );
|
169 |
-
echo $result;
|
170 |
-
die();
|
171 |
-
break;
|
172 |
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
/* TODO current_user_can() delete terms
|
181 |
-
if ( ! current_user_can( 'assign_terms' ) )
|
182 |
-
die( '-1' );
|
183 |
-
*/
|
184 |
-
}
|
185 |
-
else {
|
186 |
-
die( '0' );
|
187 |
-
}
|
188 |
-
$result = $gMDb->delete_term( $term_id, $taxonomy );
|
189 |
-
if ( is_wp_error( $result ) || ! $result ) {
|
190 |
-
$result = array( 'stat' => 'KO', 'message' => $grandCore->message( sprintf( __( "Can't delete term #%s", 'gmLang' ), $term_id ), 'error' ) );
|
191 |
-
}
|
192 |
-
else {
|
193 |
-
$result = array( 'stat' => 'OK', 'postmsg' => sprintf( __( "Term #%s deleted", 'gmLang' ), $term_id ), 'message' => $update );
|
194 |
-
}
|
195 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
196 |
-
echo json_encode( $result );
|
197 |
-
die();
|
198 |
-
break;
|
199 |
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
$gmOptions = get_option( 'gmediaOptions' );
|
205 |
-
if ( ! isset( $gmOptions['taxonomies'][$taxonomy] ) || ! count( $term_ids ) )
|
206 |
-
die( '0' );
|
207 |
-
/* TODO current_user_can() delete terms
|
208 |
-
if ( ! current_user_can( 'assign_terms' ) )
|
209 |
-
die( '-1' );
|
210 |
-
*/
|
211 |
-
}
|
212 |
-
else {
|
213 |
-
die( '0' );
|
214 |
-
}
|
215 |
-
$count = count( $gmSelected );
|
216 |
-
foreach ( $term_ids as $term_id ) {
|
217 |
-
$result = $gMDb->delete_term( $term_id, $taxonomy );
|
218 |
-
if ( is_wp_error( $result ) || ! $result ) {
|
219 |
-
$count = $count - 1;
|
220 |
-
}
|
221 |
-
}
|
222 |
-
$result = array( 'stat' => 'OK', 'postmsg' => sprintf( __( "%s terms deleted", 'gmLang' ), $count ), 'message' => $update );
|
223 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
224 |
-
echo json_encode( $result );
|
225 |
-
die();
|
226 |
-
break;
|
227 |
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
}
|
240 |
-
}
|
241 |
-
$result = array( 'stat' => 'OK', 'postmsg' => sprintf( __( "%s gmedias was updated with new category", 'gmLang' ), $count ), 'message' => $update, 'error' => $error );
|
242 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
243 |
-
echo json_encode( $result );
|
244 |
-
}
|
245 |
-
die();
|
246 |
-
break;
|
247 |
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
$label = array_filter( array_map( 'trim', explode( ',', $label ) ) );
|
257 |
-
else
|
258 |
-
$label = array_map( 'intval', $label );
|
259 |
-
$count = count( $gmSelected );
|
260 |
-
$error = '';
|
261 |
-
foreach ( (array) $gmSelected as $mID ) {
|
262 |
-
$result = $gMDb->set_gmedia_terms( $mID, $label, 'gmedia_tag', $append );
|
263 |
-
if ( is_wp_error( $result ) || ! $result ) {
|
264 |
-
$error[] = $result;
|
265 |
-
$count --;
|
266 |
}
|
|
|
|
|
267 |
}
|
268 |
-
$result = array( 'stat' => 'OK', 'postmsg' => sprintf( __( "Label(s) updated for %s gmedias", 'gmLang' ), $count ), 'message' => $update, 'error' => $error );
|
269 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
270 |
-
echo json_encode( $result );
|
271 |
}
|
272 |
-
die();
|
273 |
-
break;
|
274 |
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
$
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
288 |
-
echo json_encode( $result );
|
289 |
-
die();
|
290 |
}
|
291 |
|
292 |
-
$
|
293 |
-
|
294 |
-
$
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
|
|
|
|
300 |
}
|
301 |
-
// TODO replace with unzip_file() function
|
302 |
-
if ( class_exists( 'ZipArchive' ) ) {
|
303 |
-
$zip = new ZipArchive;
|
304 |
-
$open = $zip->open( $mzip );
|
305 |
-
if($open === true){
|
306 |
-
$zip->extractTo( $modules_dir );
|
307 |
-
$zip->close();
|
308 |
-
} else {
|
309 |
-
$result = array( 'stat' => 'KO', 'message' => $grandCore->message("ERROR : Can't open archive. Error code: {$open}", 'error') );
|
310 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
311 |
-
echo json_encode( $result );
|
312 |
-
die();
|
313 |
-
/*
|
314 |
-
ZIPARCHIVE::ER_EXISTS - 10: 'File already exists'
|
315 |
-
ZIPARCHIVE::ER_INCONS - 21: 'Zip archive inconsistent'
|
316 |
-
ZIPARCHIVE::ER_INVAL - 18: 'Invalid argument'
|
317 |
-
ZIPARCHIVE::ER_MEMORY - 14: 'Malloc failure'
|
318 |
-
ZIPARCHIVE::ER_NOENT - 9: 'No such file'
|
319 |
-
ZIPARCHIVE::ER_NOZIP - 19: 'Not a zip archive'
|
320 |
-
ZIPARCHIVE::ER_OPEN - 11: 'Can't open file'
|
321 |
-
ZIPARCHIVE::ER_READ - 5: 'Read error'
|
322 |
-
ZIPARCHIVE::ER_SEEK - 4: 'Seek error'
|
323 |
-
*/
|
324 |
-
}
|
325 |
-
}
|
326 |
-
else {
|
327 |
-
require_once( ABSPATH . 'wp-admin/includes/class-pclzip.php' );
|
328 |
-
$archive = new PclZip( $mzip );
|
329 |
-
$list = $archive->extract( $modules_dir );
|
330 |
-
if ( $list == 0 ) {
|
331 |
-
$result = array( 'stat' => 'KO', 'message' => $grandCore->message("ERROR : '" . $archive->errorInfo( true ) . "'", 'error') );
|
332 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
333 |
-
echo json_encode( $result );
|
334 |
-
die();
|
335 |
-
}
|
336 |
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
341 |
-
echo json_encode( $result );
|
342 |
-
}
|
343 |
}
|
344 |
-
die();
|
345 |
-
break;
|
346 |
|
347 |
-
|
348 |
-
|
349 |
-
$
|
350 |
-
$
|
351 |
-
|
352 |
-
$module_dir = $upload['path'] . $gmOptions['folder']['module'] . '/' . $module;
|
353 |
-
if ( $grandCore->delete_folder( $module_dir ) ) {
|
354 |
-
$result = array( 'stat' => 'OK', 'postmsg' => sprintf( __( "'%s' module deleted successfully", 'gmLang' ), $module ), 'message' => $update );
|
355 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
356 |
-
echo json_encode( $result );
|
357 |
}
|
358 |
}
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
case 'hideMedia':
|
363 |
-
foreach ( $gmSelected as $mID ) {
|
364 |
-
update_post_meta( $mID, '_gmedia_hidden', '1' );
|
365 |
}
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
case 'unhideMedia':
|
373 |
-
foreach ( $gmSelected as $mID ) {
|
374 |
-
delete_post_meta( $mID, '_gmedia_hidden' );
|
375 |
}
|
376 |
-
$result = array( 'stat' => 'KO', 'postmsg' => sprintf( __( '%s posts was unblocked', 'gmLang' ), count( $gmSelected ) ), 'message' => $update );
|
377 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
378 |
-
echo json_encode( $result );
|
379 |
-
die();
|
380 |
-
break;
|
381 |
|
382 |
-
|
383 |
-
foreach ( (array) $gmSelected as $mID ) {
|
384 |
-
if ( ! current_user_can( 'delete_post', $mID ) )
|
385 |
-
wp_die( __( 'You are not allowed to delete this post.' ) );
|
386 |
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
$
|
391 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
392 |
-
echo json_encode( $result );
|
393 |
-
die();
|
394 |
-
break;
|
395 |
|
396 |
-
|
397 |
-
$post['ID'] = $gmID;
|
398 |
-
$post['post_title'] = $gmTitle;
|
399 |
-
$post['post_content'] = $gmDescription;
|
400 |
-
if ( wp_update_post( $post ) ) {
|
401 |
-
$gmObject = get_post( $gmID );
|
402 |
-
//include_once(dirname(__FILE__).'/functions.php');
|
403 |
-
ob_start();
|
404 |
-
$grandAdmin->wpMediaRow( $gmObject );
|
405 |
-
$tr = ob_get_contents();
|
406 |
-
ob_end_clean();
|
407 |
-
$result = array( 'stat' => 'OK', 'message' => $grandCore->message( sprintf( __( 'post #%s updated successfully', 'gmLang' ), $gmID ), 'info' ), 'content' => $tr );
|
408 |
-
}
|
409 |
-
else {
|
410 |
-
$result = array( 'stat' => 'KO', 'message' => $grandCore->message( sprintf( __( "Can't update post #%s", 'gmLang' ) . '. ' . __( 'Contact plugin author to solve this problem. Describe your problem and give temporary access to Wordpress Dashboard and to FTP plugins folder.' ) . ' (<a href="mailto:gmediafolder+support@gmail.com?subject=Gmedia Support" target="_blank">Gmedia Support</a>)', $gmID ), 'error' ) );
|
411 |
-
}
|
412 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
413 |
-
echo json_encode( $result );
|
414 |
-
die();
|
415 |
-
break;
|
416 |
|
417 |
-
|
418 |
-
|
419 |
-
if ( ! current_user_can( 'edit_post', $media_id ) )
|
420 |
-
die( '-1' );
|
421 |
-
//include_once(dirname(__FILE__).'/functions.php');
|
422 |
-
$result = $grandAdmin->gmEditRow( $media_id, 'wpmedia' );
|
423 |
-
echo $result;
|
424 |
-
die();
|
425 |
-
break;
|
426 |
|
|
|
|
|
|
|
|
|
|
|
427 |
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
$grandAdmin->gm_build_query_tab( $query_args );
|
432 |
-
update_option( 'gmediaTemp', $query_args );
|
433 |
-
die();
|
434 |
-
break;
|
435 |
|
436 |
-
|
437 |
-
|
438 |
-
$query_args = reset( $gMediaQuery );
|
439 |
-
$tab = key( $gMediaQuery );
|
440 |
-
if ( is_array( $query_args ) ) {
|
441 |
-
$query_args['nopaging'] = true;
|
442 |
-
$gMediaLib = $gMDb->get_gmedias( $query_args );
|
443 |
-
$gmediaCount = $gMDb->gmediaCount;
|
444 |
-
$content = '';
|
445 |
-
if ( ! empty( $gMediaLib ) ) {
|
446 |
-
$gmOptions = get_option( 'gmediaOptions' );
|
447 |
-
$uploads = $grandCore->gm_upload_dir();
|
448 |
-
foreach ( $gMediaLib as $item ) {
|
449 |
-
$type = explode( '/', $item->mime_type );
|
450 |
-
$item_url = $uploads['url'] . $gmOptions['folder'][$type[0]] . '/' . $item->gmuid;
|
451 |
-
$image = $grandCore->gm_get_media_image( $item, 'thumb', array( 'width' => 48, 'height' => 48 ) );
|
452 |
-
$content .= '<a class="grandbox" title="' . trim( esc_attr( strip_tags( $item->title ) ) ) . '" rel="querybuilder__' . $tab . '" href="' . $item_url . '">' . $image . '</a> ';
|
453 |
-
}
|
454 |
-
}
|
455 |
-
else {
|
456 |
-
$content .= '<div style="height:48px; text-align: center; line-height: 48px;">' . __( 'Change filter options or click refresh icon.', 'gmLang' ) . '</div>';
|
457 |
-
}
|
458 |
-
$result = array( 'stat' => 'OK', 'gmediaCount' => $gmediaCount, 'gMediaLib' => $content );
|
459 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
460 |
-
echo json_encode( $result );
|
461 |
-
}
|
462 |
-
die();
|
463 |
-
break;
|
464 |
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
*/
|
471 |
-
$delete_source = (isset($delete_source) && (int) $delete_source) ? 1 : 0;
|
472 |
-
if(isset($folderpath)){
|
473 |
-
$folderpath = trim(urldecode($folderpath),'/');
|
474 |
-
if(!empty($folderpath)) {
|
475 |
-
$root = trailingslashit ( ABSPATH );
|
476 |
-
$path = $root.trailingslashit ( $folderpath );
|
477 |
-
$files = glob($path.'*.*', GLOB_NOSORT);
|
478 |
-
if(!empty($files)) {
|
479 |
-
$result = array( 'stat' => 'OK', 'message' => $grandCore->message( sprintf( __( '%s files in the folder. Wait please. Crunching', 'gmLang' ), count($files) ) . ' <span class="crunch_file">' . basename($files[0]) . '</span>', 'info', false ), 'message2' => $grandCore->message( __( 'Import operation is finished', 'gmLang' ), 'info' ), 'files' => $files, 'delete_source' => $delete_source );
|
480 |
-
} else {
|
481 |
-
$result = array( 'stat' => 'KO', 'message' => $grandCore->message( '"'.$path.'" '.__( 'folder is empty', 'gmLang' ), 'error' ) );
|
482 |
-
}
|
483 |
-
} else {
|
484 |
-
$result = array( 'stat' => 'KO', 'message' => $grandCore->message( __( 'Choose folder', 'gmLang' ), 'error' ) );
|
485 |
-
}
|
486 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
487 |
-
echo json_encode( $result );
|
488 |
-
die();
|
489 |
-
} elseif(isset($file)) {
|
490 |
-
$result = $grandCore->import($file, $file_data = array(), $delete_source);
|
491 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
492 |
-
echo json_encode( $result );
|
493 |
-
die();
|
494 |
-
}
|
495 |
-
die();
|
496 |
-
break;
|
497 |
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
*/
|
506 |
-
$result = array( 'stat' => 'KO', 'message' => $grandCore->message( __( 'Choose gallery', 'gmLang' ), 'error' ) );
|
507 |
-
if(isset($gallery) && is_array($gallery) && !empty($gallery)){
|
508 |
-
$files = array();
|
509 |
-
foreach($gallery as $gid){
|
510 |
-
$flag_gallery = $wpdb->get_row($wpdb->prepare("SELECT gid, path, title, galdesc FROM `{$wpdb->prefix}flag_gallery` WHERE gid = %d", $gid), ARRAY_A);
|
511 |
-
if(empty($flag_gallery))
|
512 |
-
continue;
|
513 |
-
|
514 |
-
if( !$term = $gMDb->term_exists($flag_gallery['title'], 'gmedia_category') ) {
|
515 |
-
$term = $gMDb->insert_term( $flag_gallery['title'], 'gmedia_category', array('description' => htmlspecialchars_decode(stripslashes( $flag_gallery['galdesc'] ))) );
|
516 |
-
if(is_wp_error($term)){
|
517 |
-
$term['term_id'] = '';
|
518 |
-
}
|
519 |
-
}
|
520 |
|
521 |
-
|
522 |
-
|
523 |
|
524 |
-
|
525 |
-
if(empty($flag_pictures))
|
526 |
-
continue;
|
527 |
|
528 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
529 |
}
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
|
|
|
|
|
|
534 |
}
|
535 |
-
|
536 |
-
$
|
537 |
-
if(
|
538 |
-
$
|
539 |
-
|
540 |
-
,'description' => $description
|
541 |
-
,'terms' => array('gmedia_category' => $term_id, 'gmedia_tag' => 'flagallery')
|
542 |
-
);
|
543 |
-
$result = $grandCore->import($file, $file_data);
|
544 |
-
} else {
|
545 |
-
$result = array( "error" => array( "code" => 100, "message" => __( "File not exist", 'gmLang' ) ), "id" => $file );
|
546 |
}
|
|
|
|
|
|
|
|
|
547 |
}
|
548 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
549 |
-
echo json_encode( $result );
|
550 |
-
die();
|
551 |
-
break;
|
552 |
|
553 |
-
|
554 |
-
/**
|
555 |
-
* @var $gallery array
|
556 |
-
* @var $pid int
|
557 |
-
* @var $file string
|
558 |
-
* @var $title string
|
559 |
-
* @var $description string
|
560 |
-
* @var $term_id int
|
561 |
-
*/
|
562 |
-
$result = array( 'stat' => 'KO', 'message' => $grandCore->message( __( 'Choose gallery', 'gmLang' ), 'error' ) );
|
563 |
-
if(isset($gallery) && is_array($gallery) && !empty($gallery)){
|
564 |
-
$files = array();
|
565 |
-
foreach($gallery as $gid){
|
566 |
-
$ngg_gallery = $wpdb->get_row($wpdb->prepare("SELECT gid, path, title, galdesc FROM `{$wpdb->prefix}ngg_gallery` WHERE gid = %d", $gid), ARRAY_A);
|
567 |
-
if(empty($ngg_gallery))
|
568 |
-
continue;
|
569 |
-
|
570 |
-
if(!$term = $gMDb->term_exists($ngg_gallery['title'], 'gmedia_category')) {
|
571 |
-
$term = $gMDb->insert_term( $ngg_gallery['title'], 'gmedia_category', array('description' => htmlspecialchars_decode(stripslashes( $ngg_gallery['galdesc'] ))) );
|
572 |
-
if(is_wp_error($term)){
|
573 |
-
$term['term_id'] = '';
|
574 |
-
}
|
575 |
-
}
|
576 |
|
577 |
-
|
578 |
-
|
|
|
|
|
579 |
|
580 |
-
|
581 |
-
if(empty($ngg_pictures))
|
582 |
-
continue;
|
583 |
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
598 |
} else {
|
599 |
-
$
|
600 |
}
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
616 |
|
|
|
|
|
|
|
617 |
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
$per_page = 20;
|
622 |
-
$s = trim( $grandCore->_get('search') );
|
623 |
-
if ( $s && strlen( $s ) > 2 ) {
|
624 |
-
$post_tags = array();
|
625 |
-
} else {
|
626 |
-
$s = '';
|
627 |
-
}
|
628 |
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
}
|
647 |
|
648 |
-
|
|
|
649 |
|
650 |
-
|
651 |
-
$relative = 0;
|
652 |
-
$paged = 1;
|
653 |
-
$content .= '<li class="emptydb">' . __( 'No items related by tags.', 'gmLang' ) . '</li>'."\n";
|
654 |
-
}
|
655 |
|
656 |
-
|
657 |
-
$tag__not_in = $wpdb->get_col( "
|
658 |
-
SELECT term_id
|
659 |
-
FROM {$wpdb->prefix}gmedia_term
|
660 |
-
WHERE taxonomy = 'gmedia_tag'
|
661 |
-
AND name IN ({$tag__not_in})
|
662 |
-
" );
|
663 |
-
|
664 |
-
$arg = array(
|
665 |
-
'mime_type' => 'image/*'
|
666 |
-
, 'orderby' => 'ID'
|
667 |
-
, 'order' => 'DESC'
|
668 |
-
, 'per_page' => $per_page
|
669 |
-
, 'page' => $paged
|
670 |
-
, 'tag__not_in' => $tag__not_in
|
671 |
-
);
|
672 |
-
$gMediaLib = $gMDb->get_gmedias( $arg );
|
673 |
-
}
|
674 |
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
$src = $upload['url'] . 'image/' . $item->gmuid;
|
679 |
|
680 |
-
|
681 |
-
|
|
|
|
|
|
|
682 |
|
683 |
-
|
684 |
-
|
685 |
-
|
|
|
|
|
|
|
|
|
686 |
|
687 |
-
|
688 |
-
|
689 |
-
$continue = false;
|
690 |
-
}
|
691 |
-
}
|
692 |
-
else {
|
693 |
-
if($s){
|
694 |
-
$content .= '<li class="emptydb">' . __( 'No items matching the search query.', 'gmLang' ) . '</li>'."\n";
|
695 |
-
} else {
|
696 |
-
$content .= '<li class="emptydb">' . __( 'Gmedia Library is empty.', 'gmLang' ) . '</li>'."\n";
|
697 |
-
}
|
698 |
-
$continue = false;
|
699 |
-
}
|
700 |
-
$result = array( 'paged' => $paged, 'rel' => $relative, 'continue' => $continue, 'content' => $content );
|
701 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
702 |
-
echo json_encode( $result );
|
703 |
|
704 |
-
|
705 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
706 |
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
$response = wp_remote_post( 'http://codeasily.com/rest/gmedia-key.php', array(
|
714 |
-
'body' => array( 'key' => $set['gmedia_key'], 'site' => site_url() ),
|
715 |
-
'headers' => array(
|
716 |
-
'Content-Type' => 'application/x-www-form-urlencoded; ' .
|
717 |
-
'charset=' . get_option( 'blog_charset' ),
|
718 |
-
'Host' => 'codeasily.com',
|
719 |
-
'User-Agent' => $gmedia_ua
|
720 |
-
),
|
721 |
-
'httpversion' => '1.0',
|
722 |
-
'timeout' => 45,
|
723 |
-
)
|
724 |
-
);
|
725 |
-
|
726 |
-
if ( is_wp_error( $response ) ) {
|
727 |
-
$error_message = $response->get_error_message();
|
728 |
-
$result = array( "error" => array( "code" => 102, "message" => $grandCore->message(__( "Something went wrong:", 'gmLang' ).' '.$error_message, 'error') ) );
|
729 |
-
} else {
|
730 |
-
$gmOptions = get_option( 'gmediaOptions' );
|
731 |
-
$result = json_decode($response['body']);
|
732 |
-
if($result->error->code == 200){
|
733 |
-
$gmOptions['gmedia_key'] = $result->key;
|
734 |
-
$gmOptions['gmedia_key2'] = $result->key2;
|
735 |
-
$gmOptions['product_name'] = $result->content;
|
736 |
-
$result->message = $grandCore->message(__('License Key activated successfully', 'gmLang'));
|
737 |
-
} else {
|
738 |
-
$gmOptions['gmedia_key'] = '';
|
739 |
-
$gmOptions['gmedia_key2'] = '';
|
740 |
-
$gmOptions['product_name'] = '';
|
741 |
-
$result->message = $grandCore->message(__('Error', 'gmLang').': '.$result->error->message, 'error');
|
742 |
-
}
|
743 |
-
update_option( 'gmediaOptions', $gmOptions );
|
744 |
-
}
|
745 |
-
} else {
|
746 |
-
$result = array( "error" => array( "code" => 101, "message" => $grandCore->message(__( "Empty License Key", 'gmLang' ), 'error') ) );
|
747 |
-
}
|
748 |
-
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
749 |
-
echo json_encode( $result );
|
750 |
-
//echo '<pre>'; print_r($result); echo '</pre>';;
|
751 |
die();
|
752 |
-
|
|
|
|
|
|
|
|
|
|
|
753 |
|
|
|
754 |
|
755 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
756 |
die();
|
757 |
}
|
758 |
|
759 |
-
add_action( '
|
760 |
/**
|
761 |
-
*
|
762 |
*
|
763 |
* @return void
|
764 |
*/
|
765 |
-
function
|
766 |
-
|
|
|
767 |
|
768 |
-
|
769 |
-
if ( ! $task )
|
770 |
-
die( '0' );
|
771 |
|
772 |
-
|
773 |
-
|
|
|
774 |
|
775 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
776 |
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
781 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
782 |
}
|
783 |
-
die();
|
784 |
-
}
|
785 |
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
797 |
die();
|
|
|
798 |
}
|
799 |
|
800 |
add_action( 'wp_ajax_gmedia_ftp_browser', 'gmedia_ftp_browser' );
|
@@ -806,7 +910,7 @@ add_action( 'wp_ajax_gmedia_ftp_browser', 'gmedia_ftp_browser' );
|
|
806 |
* @return string folder content
|
807 |
*/
|
808 |
function gmedia_ftp_browser() {
|
809 |
-
global $
|
810 |
if ( !current_user_can('upload_files') )
|
811 |
die('No access');
|
812 |
|
@@ -827,12 +931,11 @@ function gmedia_ftp_browser() {
|
|
827 |
echo "<ul class=\"jqueryDirTree\" style=\"display: none;\">";
|
828 |
// return only directories
|
829 |
foreach( $files as $file ) {
|
830 |
-
|
831 |
-
if ( in_array( $file, array('wp-admin', 'wp-includes', GRAND_FOLDER, 'plugins', 'themes', 'thumb') ) )
|
832 |
continue;
|
833 |
|
834 |
if ( file_exists($root . $dir . $file) && $file != '.' && $file != '..' && is_dir($root . $dir . $file) ) {
|
835 |
-
echo "<li class=\"directory collapsed\"><a href=\"#\" rel=\"" .
|
836 |
}
|
837 |
}
|
838 |
echo "</ul>";
|
1 |
<?php
|
2 |
+
add_action( 'wp_ajax_gmedia_update_data', 'gmedia_update_data' );
|
3 |
+
function gmedia_update_data(){
|
4 |
+
global $gmDB, $gmCore, $gmGallery;
|
5 |
+
check_ajax_referer( "GmediaGallery" );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
if ( ! current_user_can( 'edit_posts' ) )
|
7 |
die( '-1' );
|
8 |
|
9 |
+
$data = $gmCore->_post('data');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
+
wp_parse_str($data, $gmedia);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
+
if ( ! empty( $gmedia['ID'] ) ) {
|
14 |
+
$item = $gmDB->get_gmedia( $gmedia['ID'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
+
$gmedia['modified'] = current_time( 'mysql' );
|
17 |
+
$gmedia['mime_type'] = $item->mime_type;
|
18 |
+
$gmedia['gmuid'] = $item->gmuid;
|
|
|
|
|
|
|
19 |
|
20 |
+
$gmuid = pathinfo($item->gmuid);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
+
$gmedia['filename'] = preg_replace( '/[^a-z0-9_\.-]+/i', '_', $gmedia['filename'] );
|
23 |
+
if($gmedia['filename'] != $gmuid['filename']){
|
24 |
+
$fileinfo = $gmCore->fileinfo($gmedia['filename'].'.'.$gmuid['extension']);
|
25 |
+
if ( 'image' == $fileinfo['dirname'] && file_is_displayable_image( $fileinfo['dirpath'].'/'.$item->gmuid ) ) {
|
26 |
+
@rename($fileinfo['dirpath_original'].'/'.$item->gmuid, $fileinfo['filepath_original']);
|
27 |
+
@rename($fileinfo['dirpath_thumb'].'/'.$item->gmuid, $fileinfo['filepath_thumb']);
|
|
|
|
|
|
|
|
|
|
|
28 |
}
|
29 |
+
if(@rename($fileinfo['dirpath'].'/'.$item->gmuid, $fileinfo['filepath'])){
|
30 |
+
$gmedia['gmuid'] = $fileinfo['basename'];
|
31 |
}
|
32 |
+
}
|
33 |
|
34 |
+
$id = $gmDB->insert_gmedia( $gmedia );
|
35 |
+
if ( ! is_wp_error( $id ) ) {
|
36 |
+
// Meta Stuff
|
37 |
+
if ( isset($gmedia['meta']) && is_array($gmedia['meta']) ) {
|
38 |
+
foreach ( $gmedia['meta'] as $key => $value ) {
|
39 |
+
$gmDB->update_metadata( 'gmedia', $id, $key, $value );
|
40 |
+
}
|
41 |
}
|
42 |
+
$result = $gmDB->get_gmedia( $id );
|
43 |
+
}
|
44 |
+
else {
|
45 |
+
$result = $gmDB->get_gmedia( $id );
|
46 |
+
}
|
47 |
+
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
48 |
+
echo json_encode( $result );
|
49 |
+
}
|
50 |
|
51 |
+
die();
|
52 |
+
}
|
53 |
|
54 |
+
add_action( 'wp_ajax_gmedit_save', 'gmedit_save' );
|
55 |
+
function gmedit_save(){
|
56 |
+
global $gmDB, $gmCore, $gmGallery, $gmProcessor;
|
57 |
+
check_ajax_referer( "gmedit-save" );
|
58 |
+
if ( ! current_user_can( 'edit_posts' ) )
|
59 |
+
die( '-1' );
|
60 |
|
61 |
+
$gmedia = array();
|
62 |
+
$fail = '';
|
63 |
+
$success = '';
|
64 |
+
$backup = true;
|
65 |
+
$gmid = $gmCore->_post('id');
|
66 |
+
$image = $gmCore->_post('image');
|
67 |
+
$applyto = $gmCore->_post('applyto', 'web');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
+
$item = $gmDB->get_gmedia( $gmid );
|
70 |
+
if (!empty($item)){
|
71 |
+
$meta = $gmDB->get_metadata('gmedia', $item->ID, '_metadata', true);
|
72 |
+
$gmedia['ID'] = $gmid;
|
73 |
+
$gmedia['date'] = $item->date;
|
74 |
+
$gmedia['modified'] = current_time( 'mysql' );
|
75 |
+
$gmedia['author'] = $item->author;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
+
$webimg = $gmGallery->options['image'];
|
78 |
+
$thumbimg = $gmGallery->options['thumb'];
|
79 |
+
|
80 |
+
$image = $gmCore->process_gmedit_image($image);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
+
$fileinfo = $gmCore->fileinfo($item->gmuid, false);
|
83 |
+
|
84 |
+
if(!file_exists($fileinfo['filepath_original'].'_backup')){
|
85 |
+
@copy($fileinfo['filepath_original'], $fileinfo['filepath_original'].'_backup');
|
86 |
+
}
|
87 |
+
rename($fileinfo['filepath_original'], $fileinfo['filepath_original'].'.tmp');
|
88 |
+
file_put_contents($fileinfo['filepath_original'], $image['data']);
|
89 |
+
$size = @getimagesize($fileinfo['filepath_original']);
|
90 |
+
|
91 |
+
do{
|
92 |
+
$editor = wp_get_image_editor($fileinfo['filepath_original']);
|
93 |
+
if(is_wp_error($editor)){
|
94 |
+
@unlink($fileinfo['filepath_original']);
|
95 |
+
rename($fileinfo['filepath_original'].'.tmp', $fileinfo['filepath_original']);
|
96 |
+
$fail = $fileinfo['basename']. " (wp_get_image_editor): ". $editor->get_error_message();
|
97 |
+
break;
|
98 |
+
}
|
99 |
+
$crop = 0;
|
100 |
+
|
101 |
+
// Web-image
|
102 |
+
if( 'web' == $applyto || 'original' == $applyto ) {
|
103 |
+
$webimg['resize'] = (($webimg['width'] < $size[0]) || ($webimg['height'] < $size[1]))? true : false;
|
104 |
+
if($webimg['resize']){
|
105 |
+
$editor->set_quality($webimg['quality']);
|
106 |
+
$resized = $editor->resize($webimg['width'], $webimg['height'], $webimg['crop']);
|
107 |
+
if(is_wp_error($resized)){
|
108 |
+
@unlink($fileinfo['filepath_original']);
|
109 |
+
rename($fileinfo['filepath_original'].'.tmp', $fileinfo['filepath_original']);
|
110 |
+
$fail = $fileinfo['basename']. " (".$resized->get_error_code()." | editor->resize->webimage({$webimg['width']}, {$webimg['height']}, {$webimg['crop']})): ". $resized->get_error_message();
|
111 |
+
break;
|
112 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
|
114 |
+
rename($fileinfo['filepath'], $fileinfo['filepath'].'.tmp');
|
115 |
+
$saved = $editor->save($fileinfo['filepath']);
|
116 |
+
if(is_wp_error($saved)){
|
117 |
+
@unlink($fileinfo['filepath_original']);
|
118 |
+
rename($fileinfo['filepath_original'].'.tmp', $fileinfo['filepath_original']);
|
119 |
+
rename($fileinfo['filepath'].'.tmp', $fileinfo['filepath']);
|
120 |
+
$fail = $fileinfo['basename']. " (".$saved->get_error_code()." | editor->save->webimage): ". $saved->get_error_message();
|
121 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
}
|
123 |
+
} else{
|
124 |
+
@copy($fileinfo['filepath_original'], $fileinfo['filepath']);
|
125 |
}
|
|
|
|
|
|
|
126 |
}
|
|
|
|
|
127 |
|
128 |
+
// Thumbnail
|
129 |
+
$thumbimg['resize'] = (($thumbimg['width'] < $size[0]) || ($thumbimg['height'] < $size[1]))? true : false;
|
130 |
+
if($thumbimg['resize']){
|
131 |
+
$editor->set_quality($thumbimg['quality']);
|
132 |
+
$resized = $editor->resize($thumbimg['width'], $thumbimg['height'], $thumbimg['crop']);
|
133 |
+
if(is_wp_error($resized)){
|
134 |
+
@unlink($fileinfo['filepath_original']);
|
135 |
+
rename($fileinfo['filepath_original'].'.tmp', $fileinfo['filepath_original']);
|
136 |
+
@unlink($fileinfo['filepath']);
|
137 |
+
rename($fileinfo['filepath'].'.tmp', $fileinfo['filepath']);
|
138 |
+
$fail = $fileinfo['basename']. " (".$resized->get_error_code()." | editor->resize->thumb({$thumbimg['width']}, {$thumbimg['height']}, {$thumbimg['crop']})): ". $resized->get_error_message();
|
139 |
+
break;
|
|
|
|
|
|
|
140 |
}
|
141 |
|
142 |
+
rename($fileinfo['filepath_thumb'], $fileinfo['filepath_thumb'].'.tmp');
|
143 |
+
$saved = $editor->save($fileinfo['filepath_thumb']);
|
144 |
+
if(is_wp_error($saved)){
|
145 |
+
@unlink($fileinfo['filepath_original']);
|
146 |
+
rename($fileinfo['filepath_original'].'.tmp', $fileinfo['filepath_original']);
|
147 |
+
@unlink($fileinfo['filepath']);
|
148 |
+
rename($fileinfo['filepath'].'.tmp', $fileinfo['filepath']);
|
149 |
+
rename($fileinfo['filepath_thumb'].'.tmp', $fileinfo['filepath_thumb']);
|
150 |
+
$fail = $fileinfo['basename'] . " (".$saved->get_error_code()." | editor->save->thumb): ". $saved->get_error_message();
|
151 |
+
break;
|
152 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
+
} else{
|
155 |
+
@copy($fileinfo['filepath_original'], $fileinfo['filepath']);
|
156 |
+
@copy($fileinfo['filepath_original'], $fileinfo['filepath_thumb']);
|
|
|
|
|
|
|
157 |
}
|
|
|
|
|
158 |
|
159 |
+
if( 'original' !== $applyto ){
|
160 |
+
@unlink($fileinfo['filepath_original']);
|
161 |
+
rename($fileinfo['filepath_original'].'.tmp', $fileinfo['filepath_original']);
|
162 |
+
if(filesize($fileinfo['filepath_original']) === filesize($fileinfo['filepath_original'].'_backup')){
|
163 |
+
@unlink($fileinfo['filepath_original'].'_backup');
|
|
|
|
|
|
|
|
|
|
|
164 |
}
|
165 |
}
|
166 |
+
if(file_exists($fileinfo['filepath'].'.tmp')){
|
167 |
+
@unlink($fileinfo['filepath'].'.tmp');
|
|
|
|
|
|
|
|
|
168 |
}
|
169 |
+
if(file_exists($fileinfo['filepath_original'].'.tmp')){
|
170 |
+
@unlink($fileinfo['filepath_original'].'.tmp');
|
171 |
+
}
|
172 |
+
if(file_exists($fileinfo['filepath_thumb'].'.tmp')){
|
173 |
+
@unlink($fileinfo['filepath_thumb'].'.tmp');
|
|
|
|
|
|
|
|
|
174 |
}
|
|
|
|
|
|
|
|
|
|
|
175 |
|
176 |
+
$id = $gmDB->insert_gmedia( $gmedia );
|
|
|
|
|
|
|
177 |
|
178 |
+
$metadata = $gmDB->generate_gmedia_metadata($id, $fileinfo);
|
179 |
+
$meta['web'] = $metadata['web'];
|
180 |
+
$meta['original'] = $metadata['original'];
|
181 |
+
$meta['thumb'] = $metadata['thumb'];
|
|
|
|
|
|
|
|
|
182 |
|
183 |
+
$gmDB->update_metadata($meta_type = 'gmedia', $id, $meta_key = '_metadata', $meta);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
|
185 |
+
$success = sprintf(__('Image "%d" updated', 'gmLang'), $id);
|
186 |
+
} while(0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
|
188 |
+
if(empty($fail)){
|
189 |
+
$out = array('msg' => $gmProcessor->alert('info', $success), 'modified' => $gmedia['modified']);
|
190 |
+
} else{
|
191 |
+
$out = array('error' => $gmProcessor->alert('danger', $fail));
|
192 |
+
}
|
193 |
|
194 |
+
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
195 |
+
echo json_encode( $out );
|
196 |
+
}
|
|
|
|
|
|
|
|
|
197 |
|
198 |
+
die();
|
199 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
|
201 |
+
add_action( 'wp_ajax_gmedit_restore', 'gmedit_restore' );
|
202 |
+
function gmedit_restore(){
|
203 |
+
global $gmDB, $gmCore, $gmGallery, $gmProcessor;
|
204 |
+
check_ajax_referer( "gmedit-save" );
|
205 |
+
if ( ! current_user_can( 'edit_posts' ) )
|
206 |
+
die( '-1' );
|
207 |
|
208 |
+
$gmedia = array();
|
209 |
+
$fail = '';
|
210 |
+
$success = '';
|
211 |
+
$gmid = $gmCore->_post('id');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
|
213 |
+
$item = $gmDB->get_gmedia( $gmid );
|
214 |
+
if (!empty($item)){
|
215 |
+
$meta = $gmDB->get_metadata('gmedia', $item->ID, '_metadata', true);
|
216 |
+
$gmedia['ID'] = $gmid;
|
217 |
+
$gmedia['date'] = $item->date;
|
218 |
+
$gmedia['modified'] = current_time( 'mysql' );
|
219 |
+
$gmedia['author'] = $item->author;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
|
221 |
+
$webimg = $gmGallery->options['image'];
|
222 |
+
$thumbimg = $gmGallery->options['thumb'];
|
223 |
|
224 |
+
$fileinfo = $gmCore->fileinfo($item->gmuid, false);
|
|
|
|
|
225 |
|
226 |
+
if(file_exists($fileinfo['filepath_original'].'_backup')){
|
227 |
+
rename($fileinfo['filepath_original'].'_backup', $fileinfo['filepath_original']);
|
228 |
+
}
|
229 |
+
$size = @getimagesize($fileinfo['filepath_original']);
|
230 |
+
|
231 |
+
do{
|
232 |
+
$editor = wp_get_image_editor($fileinfo['filepath_original']);
|
233 |
+
if(is_wp_error($editor)){
|
234 |
+
$fail = $fileinfo['basename']. " (wp_get_image_editor): ". $editor->get_error_message();
|
235 |
+
break;
|
236 |
+
}
|
237 |
+
$crop = 0;
|
238 |
+
|
239 |
+
$thumbimg['resize'] = (($thumbimg['width'] < $size[0]) || ($thumbimg['height'] < $size[1]))? true : false;
|
240 |
+
if($thumbimg['resize']){
|
241 |
+
|
242 |
+
$webimg['resize'] = (($webimg['width'] < $size[0]) || ($webimg['height'] < $size[1]))? true : false;
|
243 |
+
if($webimg['resize']){
|
244 |
+
// Web-image
|
245 |
+
$editor->set_quality($webimg['quality']);
|
246 |
+
$resized = $editor->resize($webimg['width'], $webimg['height'], $webimg['crop']);
|
247 |
+
if(is_wp_error($resized)){
|
248 |
+
$fail = $fileinfo['basename']. " (".$resized->get_error_code()." | editor->resize->webimage({$webimg['width']}, {$webimg['height']}, {$webimg['crop']})): ". $resized->get_error_message();
|
249 |
+
break;
|
250 |
+
}
|
251 |
+
|
252 |
+
$saved = $editor->save($fileinfo['filepath']);
|
253 |
+
if(is_wp_error($saved)){
|
254 |
+
$fail = $fileinfo['basename']. " (".$saved->get_error_code()." | editor->save->webimage): ". $saved->get_error_message();
|
255 |
+
break;
|
256 |
+
}
|
257 |
+
} else{
|
258 |
+
@copy($fileinfo['filepath_original'], $fileinfo['filepath']);
|
259 |
}
|
260 |
+
|
261 |
+
// Thumbnail
|
262 |
+
$editor->set_quality($thumbimg['quality']);
|
263 |
+
$resized = $editor->resize($thumbimg['width'], $thumbimg['height'], $thumbimg['crop']);
|
264 |
+
if(is_wp_error($resized)){
|
265 |
+
$fail = $fileinfo['basename']. " (".$resized->get_error_code()." | editor->resize->thumb({$thumbimg['width']}, {$thumbimg['height']}, {$thumbimg['crop']})): ". $resized->get_error_message();
|
266 |
+
break;
|
267 |
}
|
268 |
+
|
269 |
+
$saved = $editor->save($fileinfo['filepath_thumb']);
|
270 |
+
if(is_wp_error($saved)){
|
271 |
+
$fail = $fileinfo['basename'] . " (".$saved->get_error_code()." | editor->save->thumb): ". $saved->get_error_message();
|
272 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
}
|
274 |
+
|
275 |
+
} else{
|
276 |
+
@copy($fileinfo['filepath_original'], $fileinfo['filepath']);
|
277 |
+
@copy($fileinfo['filepath_original'], $fileinfo['filepath_thumb']);
|
278 |
}
|
|
|
|
|
|
|
|
|
279 |
|
280 |
+
$id = $gmDB->insert_gmedia( $gmedia );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
|
282 |
+
$metadata = $gmDB->generate_gmedia_metadata($id, $fileinfo);
|
283 |
+
$meta['web'] = $metadata['web'];
|
284 |
+
$meta['original'] = $metadata['original'];
|
285 |
+
$meta['thumb'] = $metadata['thumb'];
|
286 |
|
287 |
+
$gmDB->update_metadata($meta_type = 'gmedia', $id, $meta_key = '_metadata', $meta);
|
|
|
|
|
288 |
|
289 |
+
$success = sprintf(__('Image "%d" restored from backup and saved', 'gmLang'), $id);
|
290 |
+
} while(0);
|
291 |
+
|
292 |
+
if(empty($fail)){
|
293 |
+
$out = array('msg' => $gmProcessor->alert('info', $success), 'modified' => $gmedia['modified']);
|
294 |
+
} else{
|
295 |
+
$out = array('error' => $gmProcessor->alert('danger', $fail));
|
296 |
+
}
|
297 |
+
|
298 |
+
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
299 |
+
echo json_encode( $out );
|
300 |
+
}
|
301 |
+
|
302 |
+
die();
|
303 |
+
}
|
304 |
+
|
305 |
+
add_action( 'wp_ajax_gmedia_terms_modal', 'gmedia_terms_modal' );
|
306 |
+
function gmedia_terms_modal(){
|
307 |
+
global $gmDB, $gmCore, $gmGallery;
|
308 |
+
check_ajax_referer( "GmediaGallery" );
|
309 |
+
if ( ! current_user_can( 'edit_posts' ) )
|
310 |
+
die( '-1' );
|
311 |
+
|
312 |
+
$button_class = 'btn-primary';
|
313 |
+
$gm_terms = array();
|
314 |
+
$modal = $gmCore->_post('modal');
|
315 |
+
switch ( $modal ) {
|
316 |
+
case 'quick_gallery':
|
317 |
+
$modal_title = __( 'Quick Gallery from selected items', 'gmLang' );
|
318 |
+
$modal_button = __( 'Create Quick Gallery', 'gmLang' );
|
319 |
+
break;
|
320 |
+
case 'filter_categories':
|
321 |
+
$modal_title = __( 'Show Images from Categories', 'gmLang' );
|
322 |
+
$modal_button = __( 'Show Selected', 'gmLang' );
|
323 |
+
break;
|
324 |
+
case 'assign_category':
|
325 |
+
$modal_title = __('Assign Category for Selected Images', 'gmLang');
|
326 |
+
$modal_button = __('Assign Category', 'gmLang');
|
327 |
+
break;
|
328 |
+
case 'filter_albums':
|
329 |
+
$modal_title = __( 'Filter Albums', 'gmLang' );
|
330 |
+
$modal_button = __( 'Show Selected', 'gmLang' );
|
331 |
+
break;
|
332 |
+
case 'assign_album':
|
333 |
+
$modal_title = __( 'Assign Album for Selected Items', 'gmLang' );
|
334 |
+
$modal_button = __( 'Assign Album', 'gmLang' );
|
335 |
+
break;
|
336 |
+
case 'filter_tags':
|
337 |
+
$modal_title = __( 'Filter by Tags', 'gmLang' );
|
338 |
+
$modal_button = __( 'Show Selected', 'gmLang' );
|
339 |
+
break;
|
340 |
+
case 'add_tags':
|
341 |
+
$modal_title = __( 'Add Tags to Selected Items', 'gmLang' );
|
342 |
+
$modal_button = __( 'Add Tags', 'gmLang' );
|
343 |
+
break;
|
344 |
+
case 'delete_tags':
|
345 |
+
$button_class = 'btn-danger';
|
346 |
+
$modal_title = __( 'Delete Tags from Selected Items', 'gmLang' );
|
347 |
+
$modal_button = __( 'Delete Tags', 'gmLang' );
|
348 |
+
break;
|
349 |
+
default:
|
350 |
+
$modal_title = ' ';
|
351 |
+
$modal_button = false;
|
352 |
+
break;
|
353 |
+
}
|
354 |
+
?>
|
355 |
+
<form class="modal-content" autocomplete="off" method="post">
|
356 |
+
<div class="modal-header">
|
357 |
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
358 |
+
<h4 class="modal-title"><?php echo $modal_title; ?></h4>
|
359 |
+
</div>
|
360 |
+
<div class="modal-body">
|
361 |
+
<?php
|
362 |
+
switch ( $modal ) {
|
363 |
+
case 'quick_gallery':
|
364 |
+
global $user_ID;
|
365 |
+
$ckey = "gmedia_u{$user_ID}_library";
|
366 |
+
$selected = isset($_COOKIE[$ckey])? $_COOKIE[$ckey] : '';
|
367 |
+
if(empty($selected)){
|
368 |
+
_e('No selected Gmedia. Select at least one item in library.', 'gmLang');
|
369 |
+
break;
|
370 |
+
}
|
371 |
+
$modules = array();
|
372 |
+
if($plugin_modules = glob(GMEDIA_ABSPATH . 'module/*', GLOB_ONLYDIR | GLOB_NOSORT)){
|
373 |
+
foreach($plugin_modules as $path){
|
374 |
+
$mfold = basename($path);
|
375 |
+
$modules[$mfold] = array(
|
376 |
+
'place' => 'plugin',
|
377 |
+
'module_name' => $mfold,
|
378 |
+
'module_url' => "{$gmCore->gmedia_url}/module/{$mfold}",
|
379 |
+
'module_path' => $path
|
380 |
+
);
|
381 |
+
}
|
382 |
+
}
|
383 |
+
if($upload_modules = glob($gmCore->upload['path'].'/'.$gmGallery->options['folder']['module'].'/*', GLOB_ONLYDIR | GLOB_NOSORT)){
|
384 |
+
foreach($upload_modules as $path){
|
385 |
+
$mfold = basename($path);
|
386 |
+
$modules[$mfold] = array(
|
387 |
+
'place' => 'upload',
|
388 |
+
'module_name' => $mfold,
|
389 |
+
'module_url' => "{$gmCore->upload['url']}/{$gmGallery->options['folder']['module']}/{$mfold}",
|
390 |
+
'module_path' => $path
|
391 |
+
);
|
392 |
+
}
|
393 |
+
}
|
394 |
+
?>
|
395 |
+
<div class="form-group">
|
396 |
+
<label><?php _e('Gallery Name', 'gmLang'); ?></label>
|
397 |
+
<input type="text" class="form-control input-sm" name="gallery[name]" placeholder="<?php echo esc_attr(__('Gallery Name', 'gmLang')); ?>" value="" required="required" />
|
398 |
+
</div>
|
399 |
+
<div class="form-group">
|
400 |
+
<label><?php _e('Modue', 'gmLang'); ?></label>
|
401 |
+
<select class="form-control input-sm" name="gallery[module]">
|
402 |
+
<?php
|
403 |
+
if(!empty($modules)){
|
404 |
+
foreach($modules as $m){
|
405 |
+
/**
|
406 |
+
* @var $module_name
|
407 |
+
* @var $module_url
|
408 |
+
* @var $module_path
|
409 |
+
*/
|
410 |
+
extract($m);
|
411 |
+
if(!file_exists($module_path . '/index.php')){
|
412 |
+
continue;
|
413 |
+
}
|
414 |
+
$module_info = array();
|
415 |
+
include($module_path . '/index.php');
|
416 |
+
if(empty($module_info)){
|
417 |
+
continue;
|
418 |
+
}
|
419 |
+
?>
|
420 |
+
<option value="<?php echo $module_name; ?>"><?php echo $module_info['title']; ?></option>
|
421 |
+
<?php
|
422 |
+
}
|
423 |
+
}
|
424 |
+
?>
|
425 |
+
</select>
|
426 |
+
</div>
|
427 |
+
<div class="form-group">
|
428 |
+
<label><?php _e('Selected IDs', 'gmLang'); ?></label>
|
429 |
+
<input type="text" name="gallery[query][gmedia__in][]" class="form-control input-sm" value="<?php echo $selected; ?>" required="required" />
|
430 |
+
</div>
|
431 |
+
<?php
|
432 |
+
break;
|
433 |
+
case 'filter_categories':
|
434 |
+
$gm_terms = $gmDB->get_terms( 'gmedia_category' );
|
435 |
+
?>
|
436 |
+
<div class="checkbox"><label><input type="checkbox" name="cat[]" value="0"> <?php _e( 'Uncategorized', 'gmLang' ); ?></label></div>
|
437 |
+
<?php if ( count( $gm_terms ) ) {
|
438 |
+
foreach ($gm_terms as $term ) {
|
439 |
+
if($term->count){ ?>
|
440 |
+
<div class="checkbox">
|
441 |
+
<label><input type="checkbox" name="cat[]" value="<?php echo $term->term_id; ?>"> <?php echo esc_html($term->name); ?></label>
|
442 |
+
<span class="badge pull-right"><?php echo $term->count; ?></span>
|
443 |
+
</div>
|
444 |
+
<?php }
|
445 |
+
}
|
446 |
+
}
|
447 |
+
break;
|
448 |
+
case 'assign_category':
|
449 |
+
$term_type = 'gmedia_category';
|
450 |
+
$gm_terms = $gmGallery->options['taxonomies'][$term_type];
|
451 |
+
?>
|
452 |
+
<div class="radio"><label><input type="radio" name="cat" value="0"> <?php _e('Uncategorized', 'gmLang'); ?></label></div>
|
453 |
+
<?php if ( count( $gm_terms ) ) {
|
454 |
+
foreach ($gm_terms as $term_name => $term_title ) {
|
455 |
+
echo '<div class="radio"><label><input type="radio" name="cat" value="' . $term_name . '"> ' . esc_html($term_title) . '</label></div>';
|
456 |
+
}
|
457 |
+
}
|
458 |
+
break;
|
459 |
+
case 'filter_albums':
|
460 |
+
$gm_terms = $gmDB->get_terms( 'gmedia_album' );
|
461 |
+
?>
|
462 |
+
<div class="checkbox"><label><input type="checkbox" name="alb[]" value="0"> <?php _e( 'No Album', 'gmLang' ); ?></label></div>
|
463 |
+
<?php if ( count( $gm_terms ) ) {
|
464 |
+
foreach ($gm_terms as $term ) { ?>
|
465 |
+
<div class="checkbox">
|
466 |
+
<label><input type="checkbox" name="alb[]" value="<?php echo $term->term_id; ?>"> <?php echo esc_html($term->name); ?></label>
|
467 |
+
<span class="badge pull-right"><?php echo $term->count; ?></span>
|
468 |
+
</div>
|
469 |
+
<?php }
|
470 |
} else {
|
471 |
+
$modal_button = false;
|
472 |
}
|
473 |
+
break;
|
474 |
+
case 'assign_album':
|
475 |
+
$gm_terms = $gmDB->get_terms( 'gmedia_album' );
|
476 |
+
?>
|
477 |
+
<div class="radio">
|
478 |
+
<label><input type="radio" name="alb"> <?php _e( 'Create Album', 'gmLang' ); ?></label>
|
479 |
+
<input type="text" class="form-control input-sm" name="alb" value="" />
|
480 |
+
</div>
|
481 |
+
<div class="radio"><label><input type="radio" name="alb" value="0"> <?php _e( 'No Album', 'gmLang' ); ?></label></div>
|
482 |
+
<?php if ( count( $gm_terms ) ) {
|
483 |
+
foreach ($gm_terms as $term ) { ?>
|
484 |
+
<div class="radio">
|
485 |
+
<label><input type="radio" name="alb" value="<?php echo $term->term_id; ?>"> <?php echo esc_html($term->name); ?></label>
|
486 |
+
<span class="badge pull-right"><?php echo $term->count; ?></span></div>
|
487 |
+
<?php }
|
488 |
+
}
|
489 |
+
break;
|
490 |
+
case 'filter_tags':
|
491 |
+
$gm_terms = $gmDB->get_terms( 'gmedia_tag', array('fields' => 'names_count') );
|
492 |
+
$gm_terms = array_values($gm_terms);
|
493 |
+
if ( count( $gm_terms ) ) { ?>
|
494 |
+
<div class="form-group"><input id="combobox_gmedia_tag" name="tag_ids" class="form-control input-sm" value="" placeholder="<?php _e('Filter Tags...', 'gmLang'); ?>" /></div>
|
495 |
+
<script type="text/javascript">
|
496 |
+
jQuery(function($){
|
497 |
+
var gm_terms = <?php echo json_encode($gm_terms); ?>;
|
498 |
+
var items = gm_terms.map(function(x){
|
499 |
+
return { id: x.term_id, name: x.name, count: x.count };
|
500 |
+
});
|
501 |
+
$('#combobox_gmedia_tag').selectize({
|
502 |
+
delimiter: ',',
|
503 |
+
maxItems: null,
|
504 |
+
openOnFocus: false,
|
505 |
+
labelField: 'name',
|
506 |
+
hideSelected: true,
|
507 |
+
options: items,
|
508 |
+
searchField: ['name'],
|
509 |
+
valueField: 'id',
|
510 |
+
create: false,
|
511 |
+
render: {
|
512 |
+
item: function(item, escape) {
|
513 |
+
return '<div>' + escape(item.name) + '</div>';
|
514 |
+
},
|
515 |
+
option: function(item, escape) {
|
516 |
+
return '<div>' + escape(item.name) + ' <span class="badge">' + escape(item.count) + '</span></div>';
|
517 |
+
}
|
518 |
+
}
|
519 |
+
});
|
520 |
+
});
|
521 |
+
</script>
|
522 |
+
<?php } else {
|
523 |
+
$modal_button = false; ?>
|
524 |
+
<p class="notags"><?php _e( 'No tags', 'gmLang' ); ?></p>
|
525 |
+
<?php
|
526 |
+
}
|
527 |
+
break;
|
528 |
+
case 'add_tags':
|
529 |
+
$gm_terms = $gmDB->get_terms( 'gmedia_tag', array('fields' => 'names_count') );
|
530 |
+
$gm_terms = array_values($gm_terms);
|
531 |
+
if ( count( $gm_terms ) ) { ?>
|
532 |
+
<div class="form-group"><input id="combobox_gmedia_tag" name="tag_names" class="form-control input-sm" value="" placeholder="<?php _e('Add Tags...', 'gmLang'); ?>" /></div>
|
533 |
+
<script type="text/javascript">
|
534 |
+
jQuery(function($){
|
535 |
+
var gm_terms = <?php echo json_encode($gm_terms); ?>;
|
536 |
+
var items = gm_terms.map(function(x){
|
537 |
+
return { id: x.term_id, name: x.name, count: x.count };
|
538 |
+
});
|
539 |
+
$('#combobox_gmedia_tag').selectize({
|
540 |
+
delimiter: ',',
|
541 |
+
maxItems: null,
|
542 |
+
openOnFocus: false,
|
543 |
+
labelField: 'name',
|
544 |
+
hideSelected: true,
|
545 |
+
options: items,
|
546 |
+
searchField: ['name'],
|
547 |
+
valueField: 'name',
|
548 |
+
createOnBlur: true,
|
549 |
+
persist: false,
|
550 |
+
create: function(input){
|
551 |
+
return {
|
552 |
+
name: input
|
553 |
+
}
|
554 |
+
},
|
555 |
+
render: {
|
556 |
+
item: function(item, escape) {
|
557 |
+
return '<div>' + escape(item.name) + '</div>';
|
558 |
+
},
|
559 |
+
option: function(item, escape) {
|
560 |
+
return '<div>' + escape(item.name) + ' <span class="badge">' + escape(item.count) + '</span></div>';
|
561 |
+
}
|
562 |
+
}
|
563 |
+
});
|
564 |
+
});
|
565 |
+
</script>
|
566 |
+
<?php } else {
|
567 |
+
$modal_button = false; ?>
|
568 |
+
<p class="notags"><?php _e( 'No tags', 'gmLang' ); ?></p>
|
569 |
+
<?php
|
570 |
+
}
|
571 |
+
break;
|
572 |
+
case 'delete_tags':
|
573 |
+
global $gmProcessor;
|
574 |
+
$modal_content = '';
|
575 |
+
if(!empty($gmProcessor->selected_items)){
|
576 |
+
$gm_terms = $gmDB->get_gmedia_terms($gmProcessor->selected_items, 'gmedia_tag');
|
577 |
+
}
|
578 |
+
if ( count( $gm_terms ) ) {
|
579 |
+
foreach ( $gm_terms as $term ) { ?>
|
580 |
+
<div class="checkbox">
|
581 |
+
<label><input type="checkbox" name="tag_id[]" value="<?php echo $term->term_id; ?>"> <?php echo esc_html($term->name); ?></label>
|
582 |
+
<span class="badge pull-right"><?php echo $term->count; ?></span>
|
583 |
+
</div>
|
584 |
+
<?php }
|
585 |
+
} else {
|
586 |
+
$modal_button = false; ?>
|
587 |
+
<p class="notags"><?php _e( 'No tags', 'gmLang' ); ?></p>
|
588 |
+
<?php
|
589 |
+
}
|
590 |
+
break;
|
591 |
+
default:
|
592 |
+
_e('Ops! Something wrong.', 'gmLang');
|
593 |
+
break;
|
594 |
+
}
|
595 |
+
?>
|
596 |
+
</div>
|
597 |
+
<div class="modal-footer">
|
598 |
+
<button type="button" class="btn btn-default" data-dismiss="modal"><?php _e( 'Cancel', 'gmLang' ); ?></button>
|
599 |
+
<?php if($modal_button){ ?>
|
600 |
+
<button type="submit" name="<?php echo $modal; ?>" class="btn <?php echo $button_class; ?>"><?php echo $modal_button; ?></button>
|
601 |
+
<?php } ?>
|
602 |
+
</div>
|
603 |
+
</form><!-- /.modal-content -->
|
604 |
+
<?php
|
605 |
+
die();
|
606 |
+
}
|
607 |
|
608 |
+
add_action( 'wp_ajax_gmedia_tag_edit', 'gmedia_tag_edit' );
|
609 |
+
function gmedia_tag_edit(){
|
610 |
+
global $gmCore, $gmDB;
|
611 |
|
612 |
+
check_ajax_referer( 'GmediaTerms' );
|
613 |
+
if ( ! current_user_can( 'edit_posts' ) )
|
614 |
+
die( '-1' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
615 |
|
616 |
+
$term = array('taxonomy' => 'gmedia_tag');
|
617 |
+
$term['name'] = trim($gmCore->_post('tag_name', ''));
|
618 |
+
$term['term_id'] = intval($gmCore->_post('tag_id', 0));
|
619 |
+
if( $term['name'] && !$gmCore->is_digit($term['name']) ){
|
620 |
+
if ( $term_id = $gmDB->term_exists( $term['term_id'], $term['taxonomy'] ) ) {
|
621 |
+
$term_id = $gmDB->update_term( $term['term_id'], $term['taxonomy'], $term );
|
622 |
+
if ( is_wp_error( $term_id ) ) {
|
623 |
+
$out['error'] = $term_id->get_error_message();
|
624 |
+
} else{
|
625 |
+
$out['msg'] = sprintf( __( "Tag %d successfuly updated", 'gmLang' ), $term_id );
|
626 |
+
}
|
627 |
+
} else{
|
628 |
+
$out['error'] = __( "A term with the id provided do not exists.", 'gmLang' );
|
629 |
+
}
|
630 |
+
} else{
|
631 |
+
$out['error'] = __( "Term name can't be only digits or empty", 'gmLang' );
|
632 |
+
}
|
|
|
633 |
|
634 |
+
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
635 |
+
echo json_encode( $out );
|
636 |
|
637 |
+
die();
|
|
|
|
|
|
|
|
|
638 |
|
639 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
640 |
|
641 |
+
add_action( 'wp_ajax_gmedia_module_install', 'gmedia_module_install' );
|
642 |
+
function gmedia_module_install(){
|
643 |
+
global $gmCore, $gmProcessor, $gmGallery;
|
|
|
644 |
|
645 |
+
check_ajax_referer( 'GmediaModule' );
|
646 |
+
if ( ! current_user_can( 'edit_posts' ) ){
|
647 |
+
echo $gmProcessor->alert('danger', __('You are not allowed to install modules'));
|
648 |
+
die();
|
649 |
+
}
|
650 |
|
651 |
+
if($download = $gmCore->_post('download')){
|
652 |
+
$module = $gmCore->_post('module');
|
653 |
+
$mzip = download_url( $download );
|
654 |
+
if(is_wp_error($mzip)){
|
655 |
+
echo $gmProcessor->alert('danger', $mzip->get_error_message());
|
656 |
+
die();
|
657 |
+
}
|
658 |
|
659 |
+
$mzip = str_replace( "\\", "/", $mzip );
|
660 |
+
$to_folder = $gmCore->upload['path'] . '/' . $gmGallery->options['folder']['module'] . '/';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
661 |
|
662 |
+
global $wp_filesystem;
|
663 |
+
// Is a filesystem accessor setup?
|
664 |
+
if(!$wp_filesystem || !is_object($wp_filesystem)){
|
665 |
+
require_once(ABSPATH . 'wp-admin/includes/file.php');
|
666 |
+
WP_Filesystem();
|
667 |
+
}
|
668 |
+
if(!is_object($wp_filesystem)){
|
669 |
+
$result = new WP_Error('fs_unavailable', __('Could not access filesystem.', 'flag'));
|
670 |
+
} elseif($wp_filesystem->errors->get_error_code()){
|
671 |
+
$result = new WP_Error('fs_error', __('Filesystem error', 'flag'), $wp_filesystem->errors);
|
672 |
+
} else{
|
673 |
+
$result = unzip_file($mzip, $to_folder);
|
674 |
+
}
|
675 |
|
676 |
+
// Once extracted, delete the package
|
677 |
+
unlink($mzip);
|
678 |
+
|
679 |
+
if(is_wp_error($result)){
|
680 |
+
echo $gmProcessor->alert('danger', $result->get_error_message());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
681 |
die();
|
682 |
+
} else{
|
683 |
+
echo $gmProcessor->alert('success', sprintf(__("The `%s` module successfuly installed", 'flag'), $module));
|
684 |
+
}
|
685 |
+
} else{
|
686 |
+
echo $gmProcessor->alert('danger', __('No file specified', 'gmLang'));
|
687 |
+
}
|
688 |
|
689 |
+
die();
|
690 |
|
691 |
+
}
|
692 |
+
|
693 |
+
|
694 |
+
add_action( 'wp_ajax_gmedia_import_modal', 'gmedia_import_modal' );
|
695 |
+
function gmedia_import_modal(){
|
696 |
+
global $user_ID, $gmDB, $gmCore, $gmGallery;
|
697 |
+
|
698 |
+
check_ajax_referer( 'GmediaGallery' );
|
699 |
+
if ( ! current_user_can( 'edit_posts' ) )
|
700 |
+
die( '-1' );
|
701 |
+
|
702 |
+
?>
|
703 |
+
<div class="modal-content">
|
704 |
+
<div class="modal-header">
|
705 |
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
706 |
+
<h4 class="modal-title"><?php _e('Import from WP Media Library'); ?></h4>
|
707 |
+
</div>
|
708 |
+
<div class="modal-body" style="position:relative;">
|
709 |
+
<form id="import_form" name="import_form" target="import_window" action="<?php echo $gmCore->gmedia_url; ?>/admin/import.php" method="POST" accept-charset="utf-8">
|
710 |
+
<?php wp_nonce_field('GmediaImport'); ?>
|
711 |
+
<input type="hidden" id="import-action" name="import" value="<?php echo esc_attr($gmCore->_post('modal','')); ?>"/>
|
712 |
+
<input type="hidden" name="selected" value="<?php $ckey = "gmedia_u{$user_ID}_wpmedia"; if(isset($_COOKIE[$ckey])){ echo $_COOKIE[$ckey]; } ?>"/>
|
713 |
+
<div class="form-group">
|
714 |
+
<?php
|
715 |
+
$term_type = 'gmedia_category';
|
716 |
+
$gm_terms = $gmGallery->options['taxonomies'][$term_type];
|
717 |
+
|
718 |
+
$terms_category = '';
|
719 |
+
if(count($gm_terms)){
|
720 |
+
foreach($gm_terms as $term_name => $term_title){
|
721 |
+
$terms_category .= '<option value="' . $term_name . '">' . esc_html($term_title) . '</option>' . "\n";
|
722 |
+
}
|
723 |
+
}
|
724 |
+
?>
|
725 |
+
<label><?php _e('Assign Category', 'gmLang'); ?> <small><?php _e('(for images only)') ?></small></label>
|
726 |
+
<select id="gmedia_category" name="terms[gmedia_category]" class="form-control input-sm">
|
727 |
+
<option value=""><?php _e('Uncategorized', 'gmLang'); ?></option>
|
728 |
+
<?php echo $terms_category; ?>
|
729 |
+
</select>
|
730 |
+
</div>
|
731 |
+
|
732 |
+
<div class="form-group">
|
733 |
+
<?php
|
734 |
+
$term_type = 'gmedia_album';
|
735 |
+
$gm_terms = $gmDB->get_terms($term_type);
|
736 |
+
|
737 |
+
$terms_album = '';
|
738 |
+
if(count($gm_terms)){
|
739 |
+
foreach($gm_terms as $term){
|
740 |
+
$terms_album .= '<option value="' . esc_attr($term->name) . '">' . esc_html($term->name) . '</option>' . "\n";
|
741 |
+
}
|
742 |
+
}
|
743 |
+
?>
|
744 |
+
<label><?php _e('Add to Album', 'gmLang'); ?> </label>
|
745 |
+
<select id="combobox_gmedia_album" name="terms[gmedia_album]" class="form-control input-sm" placeholder="<?php _e('Album Name...', 'gmLang'); ?>">
|
746 |
+
<option value=""></option>
|
747 |
+
<?php echo $terms_album; ?>
|
748 |
+
</select>
|
749 |
+
</div>
|
750 |
+
|
751 |
+
<div class="form-group">
|
752 |
+
<?php
|
753 |
+
$term_type = 'gmedia_tag';
|
754 |
+
$gm_terms = $gmDB->get_terms($term_type, array('fields' => 'names'));
|
755 |
+
?>
|
756 |
+
<label><?php _e('Add Tags', 'gmLang'); ?> </label>
|
757 |
+
<input id="combobox_gmedia_tag" name="terms[gmedia_tag]" class="form-control input-sm" value="" placeholder="<?php _e('Add Tags...', 'gmLang'); ?>" />
|
758 |
+
</div>
|
759 |
+
|
760 |
+
<script type="text/javascript">
|
761 |
+
jQuery(function($){
|
762 |
+
$('#combobox_gmedia_album').selectize({
|
763 |
+
create: true,
|
764 |
+
persist: false
|
765 |
+
});
|
766 |
+
var gm_terms = <?php echo json_encode($gm_terms); ?>,
|
767 |
+
items = gm_terms.map(function(x){
|
768 |
+
return { item: x };
|
769 |
+
});
|
770 |
+
$('#combobox_gmedia_tag').selectize({
|
771 |
+
delimiter: ',',
|
772 |
+
maxItems: null,
|
773 |
+
persist: false,
|
774 |
+
options: items,
|
775 |
+
labelField: 'item',
|
776 |
+
valueField: 'item',
|
777 |
+
create: function(input){
|
778 |
+
return {
|
779 |
+
item: input
|
780 |
+
}
|
781 |
+
}
|
782 |
+
});
|
783 |
+
|
784 |
+
$('#import-done').one('click', function(e){
|
785 |
+
$('#import_form').submit();
|
786 |
+
$(this).button('loading').prop('disabled', true);
|
787 |
+
$('#import_window').show();
|
788 |
+
$(this).one('click', function(e){ $('#importModal').modal('hide'); });
|
789 |
+
});
|
790 |
+
|
791 |
+
});
|
792 |
+
</script>
|
793 |
+
</form>
|
794 |
+
<iframe name="import_window" id="import_window" src="about:blank" style="display:none; position:absolute; left:0; top:0; width:100%; height:100%; z-index:1000; background-color:#ffffff; padding:20px 20px 0 20px;" onload="gmedia_import_done()"></iframe>
|
795 |
+
</div>
|
796 |
+
<div class="modal-footer">
|
797 |
+
<button type="button" class="btn btn-default" data-dismiss="modal"><?php _e( 'Cancel', 'gmLang' ); ?></button>
|
798 |
+
<button type="button" id="import-done" class="btn btn-primary" data-complete-text="<?php _e( 'Close', 'gmLang' ); ?>" data-loading-text="<?php _e( 'Working...', 'gmLang' ); ?>"><?php _e( 'Import', 'gmLang' ); ?></button>
|
799 |
+
</div>
|
800 |
+
</div><!-- /.modal-content -->
|
801 |
+
<?php
|
802 |
die();
|
803 |
}
|
804 |
|
805 |
+
add_action( 'wp_ajax_gmedia_relimage', 'gmedia_relimage' );
|
806 |
/**
|
807 |
+
* Do Actions via Ajax
|
808 |
*
|
809 |
* @return void
|
810 |
*/
|
811 |
+
function gmedia_relimage() {
|
812 |
+
/** @var $wpdb wpdb */
|
813 |
+
global $wpdb, $gmCore, $gmDB;
|
814 |
|
815 |
+
check_ajax_referer( "grandMedia" );
|
|
|
|
|
816 |
|
817 |
+
// check for correct capability
|
818 |
+
if ( ! current_user_can( 'edit_posts' ) )
|
819 |
+
die( '-1' );
|
820 |
|
821 |
+
$post_tags = array_filter(array_map( 'trim', explode(',', stripslashes(urldecode($gmCore->_get('tags', '')))) ));
|
822 |
+
$paged = (int) $gmCore->_get('paged', 1);
|
823 |
+
$per_page = 20;
|
824 |
+
$s = trim( stripslashes(urldecode($gmCore->_get('search'))) );
|
825 |
+
if ( $s && strlen( $s ) > 2 ) {
|
826 |
+
$post_tags = array();
|
827 |
+
} else {
|
828 |
+
$s = '';
|
829 |
+
}
|
830 |
|
831 |
+
$gmediaLib = array();
|
832 |
+
$relative = (int) $gmCore->_get('rel', 1);
|
833 |
+
$continue = true;
|
834 |
+
$content = '';
|
835 |
+
|
836 |
+
if($relative == 1){
|
837 |
+
$arg = array(
|
838 |
+
'mime_type' => 'image/*'
|
839 |
+
, 'orderby' => 'ID'
|
840 |
+
, 'order' => 'DESC'
|
841 |
+
, 'per_page' => $per_page
|
842 |
+
, 'page' => $paged
|
843 |
+
, 's' => $s
|
844 |
+
, 'tag_name__in' => $post_tags
|
845 |
+
, 'null_tags' => true
|
846 |
+
);
|
847 |
+
$gmediaLib = $gmDB->get_gmedias( $arg );
|
848 |
+
}
|
849 |
+
|
850 |
+
if( empty( $gmediaLib ) && count($post_tags) ) {
|
851 |
+
|
852 |
+
if($relative == 1){
|
853 |
+
$relative = 0;
|
854 |
+
$paged = 1;
|
855 |
+
$content .= '<li class="emptydb">' . __( 'No items related by tags.', 'gmLang' ) . '</li>'."\n";
|
856 |
+
}
|
857 |
|
858 |
+
$tag__not_in = "'" . implode( "','", array_map( 'esc_sql', array_unique( (array) $post_tags ) ) ) . "'";
|
859 |
+
$tag__not_in = $wpdb->get_col( "
|
860 |
+
SELECT term_id
|
861 |
+
FROM {$wpdb->prefix}gmedia_term
|
862 |
+
WHERE taxonomy = 'gmedia_tag'
|
863 |
+
AND name IN ({$tag__not_in})
|
864 |
+
" );
|
865 |
+
|
866 |
+
$arg = array(
|
867 |
+
'mime_type' => 'image/*'
|
868 |
+
, 'orderby' => 'ID'
|
869 |
+
, 'order' => 'DESC'
|
870 |
+
, 'per_page' => $per_page
|
871 |
+
, 'page' => $paged
|
872 |
+
, 'tag__not_in' => $tag__not_in
|
873 |
+
);
|
874 |
+
$gmediaLib = $gmDB->get_gmedias( $arg );
|
875 |
}
|
|
|
|
|
876 |
|
877 |
+
if( $count = count( $gmediaLib ) ) {
|
878 |
+
foreach ( $gmediaLib as $item ) {
|
879 |
+
$content .= "<li class='gmedia-image-li' id='gm-img-{$item->ID}'>\n";
|
880 |
+
$content .= " <a target='_blank' class='gm-img' data-gmid='{$item->ID}' href='".$gmCore->gm_get_media_image($item)."'><img src='".$gmCore->gm_get_media_image( $item, 'thumb' )."' height='50' style='width:auto;' alt='' title='".esc_attr($item->title)."' /></a>\n";
|
881 |
+
$content .= " <div style='display: none;' class='gm-img-description'>".esc_html($item->description)."</div>\n";
|
882 |
+
$content .= "</li>\n";
|
883 |
+
}
|
884 |
+
if(($count < $per_page) && ($relative == 0 || !empty($s))){
|
885 |
+
$continue = false;
|
886 |
+
}
|
887 |
+
}
|
888 |
+
else {
|
889 |
+
if($s){
|
890 |
+
$content .= '<li class="emptydb">' . __( 'No items matching the search query.', 'gmLang' ) . '</li>'."\n";
|
891 |
+
} else {
|
892 |
+
$content .= '<li class="emptydb">' . __( 'No items to show', 'gmLang' ) . '</li>'."\n";
|
893 |
+
}
|
894 |
+
$continue = false;
|
895 |
+
}
|
896 |
+
$result = array( 'paged' => $paged, 'rel' => $relative, 'continue' => $continue, 'content' => $content, 'data' => $post_tags );
|
897 |
+
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
898 |
+
echo json_encode( $result );
|
899 |
+
|
900 |
die();
|
901 |
+
|
902 |
}
|
903 |
|
904 |
add_action( 'wp_ajax_gmedia_ftp_browser', 'gmedia_ftp_browser' );
|
910 |
* @return string folder content
|
911 |
*/
|
912 |
function gmedia_ftp_browser() {
|
913 |
+
global $gmCore;
|
914 |
if ( !current_user_can('upload_files') )
|
915 |
die('No access');
|
916 |
|
931 |
echo "<ul class=\"jqueryDirTree\" style=\"display: none;\">";
|
932 |
// return only directories
|
933 |
foreach( $files as $file ) {
|
934 |
+
if ( in_array( $file, array('wp-admin', 'wp-includes', 'plugins', 'themes', 'thumb', 'thumbs') ) )
|
|
|
935 |
continue;
|
936 |
|
937 |
if ( file_exists($root . $dir . $file) && $file != '.' && $file != '..' && is_dir($root . $dir . $file) ) {
|
938 |
+
echo "<li class=\"directory collapsed\"><a href=\"#\" rel=\"" . esc_attr($dir . $file) . "/\">" . esc_html($file) . "</a></li>";
|
939 |
}
|
940 |
}
|
941 |
echo "</ul>";
|
admin/css/editor_plugin.css
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
ins.mceGMgallery {
|
2 |
-
display: inline-block;
|
3 |
-
position: relative;
|
4 |
-
height: 75px;
|
5 |
-
width: 300px;
|
6 |
-
border: none;
|
7 |
-
background: #193251 url(../images/logo.png) 10px 10px no-repeat;
|
8 |
-
border: 1px solid #21759B;
|
9 |
-
padding: 0;
|
10 |
-
overflow: hidden;
|
11 |
-
margin: 0;
|
12 |
-
vertical-align: bottom;
|
13 |
-
z-index: 2;
|
14 |
-
text-indent: -100em;
|
15 |
-
}
|
16 |
-
|
17 |
-
ins.mceGMgallery.selected {
|
18 |
-
border-color: #F06D65;
|
19 |
-
}
|
20 |
-
|
21 |
-
ins.mceGMgallery:before {
|
22 |
-
content: attr(title);
|
23 |
-
display: block;
|
24 |
-
position: absolute;
|
25 |
-
right: 10px;
|
26 |
-
top: 10px;
|
27 |
-
padding: 0;
|
28 |
-
margin: 0;
|
29 |
-
font: 24px/120% Arial;
|
30 |
-
text-align: right;
|
31 |
-
z-index: 1;
|
32 |
-
color: yellowgreen;
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/css/grand-media.css
CHANGED
@@ -1,2083 +1,311 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
}
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
input.button::-moz-focus-inner {
|
32 |
-
border: 0;
|
33 |
-
padding: 0;
|
34 |
-
margin: 0;
|
35 |
-
}
|
36 |
-
|
37 |
-
input.button:focus {
|
38 |
-
border-color: #666666;
|
39 |
-
color: #000000;
|
40 |
-
}
|
41 |
-
|
42 |
-
select::-moz-focus-inner {
|
43 |
-
border: 0;
|
44 |
-
padding: 0;
|
45 |
-
margin: 0;
|
46 |
-
}
|
47 |
-
|
48 |
-
select:focus {
|
49 |
-
border-color: #BBBBBB;
|
50 |
-
outline: none;
|
51 |
-
}
|
52 |
-
|
53 |
-
body.gmDoingAjax div#grandMedia,
|
54 |
-
body.gmDoingAjax div#grandMedia * {
|
55 |
-
cursor: progress !important;
|
56 |
-
}
|
57 |
-
|
58 |
-
#wpwrap {
|
59 |
-
background: #abb1bc url(../images/bg.png) 0 0 repeat-x;
|
60 |
-
}
|
61 |
-
|
62 |
-
#adminmenu #toplevel_page_GrandMedia .wp-menu-image img {opacity:.9;filter:alpha(opacity=90)}
|
63 |
-
#adminmenu #toplevel_page_GrandMedia .wp-not-current-submenu .wp-menu-arrow div {
|
64 |
-
border: none;
|
65 |
-
}
|
66 |
-
|
67 |
-
div#wpcontent div#adminmenu li.wp-menu-separator {
|
68 |
-
background-position: 0 -2px;
|
69 |
-
height: 7px;
|
70 |
-
overflow: hidden;
|
71 |
-
margin: 7px 0;
|
72 |
-
border: 0 hidden;
|
73 |
-
-moz-border-radius: 3px;
|
74 |
-
-webkit-border-radius: 3px;
|
75 |
-
-khtml-border-radius: 3px;
|
76 |
-
border-radius: 3px;
|
77 |
-
}
|
78 |
-
|
79 |
-
.folded div#wpcontent #adminmenu li.wp-menu-separator {
|
80 |
-
background-position: 100% -41px;
|
81 |
-
}
|
82 |
-
|
83 |
-
div#adminmenuback {
|
84 |
-
z-index: 10;
|
85 |
-
}
|
86 |
-
|
87 |
-
div#adminmenuwrap {
|
88 |
-
z-index: 15;
|
89 |
-
}
|
90 |
-
|
91 |
-
div#wpbody-content {
|
92 |
-
/*color: red;*/
|
93 |
-
}
|
94 |
-
|
95 |
-
body.branch-3-2 div#wphead,
|
96 |
-
body.branch-3-3 div#wphead {
|
97 |
-
background-color: #fff;
|
98 |
-
border-bottom-color: #183151;
|
99 |
-
margin: 0 0 0 -20px;
|
100 |
-
padding: 0 20px 0 22px;
|
101 |
-
}
|
102 |
-
|
103 |
-
body.branch-3-2 div#footer,
|
104 |
-
body.branch-3-3 div#footer {
|
105 |
-
background-color: #fff;
|
106 |
-
border-bottom-color: #183151;
|
107 |
-
margin: 0 0 0 145px;
|
108 |
-
padding-right: 20px;
|
109 |
-
padding-left: 20px;
|
110 |
-
}
|
111 |
-
|
112 |
-
body.branch-3-2.js.folded div#footer,
|
113 |
-
body.branch-3-3.js.folded div#footer {
|
114 |
-
margin: 0 0 0 32px;
|
115 |
-
padding-right: 20px;
|
116 |
-
padding-left: 20px;
|
117 |
-
}
|
118 |
-
|
119 |
-
body.branch-3-2 div#contextual-help-wrap,
|
120 |
-
body.branch-3-2 div#screen-options-wrap,
|
121 |
-
body.branch-3-3 div#contextual-help-wrap,
|
122 |
-
body.branch-3-3 div#screen-options-wrap {
|
123 |
-
-moz-border-radius: 0 0 4px 4px;
|
124 |
-
-webkit-border-bottom-left-radius: 4px;
|
125 |
-
-webkit-border-bottom-right-radius: 4px;
|
126 |
-
-khtml-border-bottom-left-radius: 4px;
|
127 |
-
-khtml-border-bottom-right-radius: 4px;
|
128 |
-
border-bottom-left-radius: 4px;
|
129 |
-
border-bottom-right-radius: 4px;
|
130 |
-
}
|
131 |
-
|
132 |
-
#screen-meta-links {
|
133 |
-
position: relative;
|
134 |
-
z-index: 2;
|
135 |
-
}
|
136 |
-
|
137 |
-
.wp-core-ui .button-green {
|
138 |
-
background-color: #219B24;
|
139 |
-
background-image: -webkit-gradient(linear, left top, left bottom, from(#29C52E), to(#219B24));
|
140 |
-
background-image: -webkit-linear-gradient(top, #29C52E, #219B24);
|
141 |
-
background-image: -moz-linear-gradient(top, #29C52E, #219B24);
|
142 |
-
background-image: -ms-linear-gradient(top, #29C52E, #219B24);
|
143 |
-
background-image: -o-linear-gradient(top, #29C52E, #219B24);
|
144 |
-
background-image: linear-gradient(to bottom, #29C52E, #219B24);
|
145 |
-
border-color: #219B24;
|
146 |
-
border-bottom-color: #1F8D21;
|
147 |
-
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
|
148 |
-
box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
|
149 |
-
color: #fff;
|
150 |
-
text-decoration: none;
|
151 |
-
text-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
152 |
-
}
|
153 |
-
|
154 |
-
.wp-core-ui .button-green.hover,
|
155 |
-
.wp-core-ui .button-green:hover,
|
156 |
-
.wp-core-ui .button-green.focus,
|
157 |
-
.wp-core-ui .button-green:focus {
|
158 |
-
background-color: #26B729;
|
159 |
-
background-image: -webkit-gradient(linear, left top, left bottom, from(#2ED230), to(#219B24));
|
160 |
-
background-image: -webkit-linear-gradient(top, #2ED230, #219B24);
|
161 |
-
background-image: -moz-linear-gradient(top, #2ED230, #219B24);
|
162 |
-
background-image: -ms-linear-gradient(top, #2ED230, #219B24);
|
163 |
-
background-image: -o-linear-gradient(top, #2ED230, #219B24);
|
164 |
-
background-image: linear-gradient(to bottom, #2ED230, #219B24);
|
165 |
-
border-color: #1C7F1F;
|
166 |
-
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
|
167 |
-
box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
|
168 |
-
color: #fff;
|
169 |
-
text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
|
170 |
-
}
|
171 |
-
|
172 |
-
.wp-core-ui .button-green.focus,
|
173 |
-
.wp-core-ui .button-green:focus {
|
174 |
-
border-color: #0F500E;
|
175 |
-
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4);
|
176 |
-
box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4);
|
177 |
-
}
|
178 |
-
|
179 |
-
.wp-core-ui .button-green.active,
|
180 |
-
.wp-core-ui .button-green.active:hover,
|
181 |
-
.wp-core-ui .button-green.active:focus,
|
182 |
-
.wp-core-ui .button-green:active {
|
183 |
-
background: #1C7F1F;
|
184 |
-
background-image: -webkit-gradient(linear, left top, left bottom, from(#219B24), to(#26B729));
|
185 |
-
background-image: -webkit-linear-gradient(top, #219B24, #26B729);
|
186 |
-
background-image: -moz-linear-gradient(top, #219B24, #26B729);
|
187 |
-
background-image: -ms-linear-gradient(top, #219B24, #26B729);
|
188 |
-
background-image: -o-linear-gradient(top, #219B24, #26B729);
|
189 |
-
background-image: linear-gradient(to bottom, #219B24, #26B729);
|
190 |
-
border-color: #136012 #24AE26 #24AE26 #24AE26;
|
191 |
-
color: rgba(255,255,255,0.95);
|
192 |
-
-webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
|
193 |
-
box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
|
194 |
-
text-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
195 |
-
}
|
196 |
-
|
197 |
-
.wp-core-ui .button-green[disabled],
|
198 |
-
.wp-core-ui .button-green:disabled,
|
199 |
-
.wp-core-ui .button-green-disabled {
|
200 |
-
color: #E79496 !important;
|
201 |
-
background: #BA292B !important;
|
202 |
-
border-color: #7F1C1F !important;
|
203 |
-
-webkit-box-shadow: none !important;
|
204 |
-
box-shadow: none !important;
|
205 |
-
text-shadow: 0 -1px 0 rgba(0,0,0,0.1) !important;
|
206 |
-
cursor: default;
|
207 |
-
}
|
208 |
-
|
209 |
-
.wp-core-ui .button-red {
|
210 |
-
background-color: #9B2124;
|
211 |
-
background-image: -webkit-gradient(linear, left top, left bottom, from(#C5292E), to(#9B2124));
|
212 |
-
background-image: -webkit-linear-gradient(top, #C5292E, #9B2124);
|
213 |
-
background-image: -moz-linear-gradient(top, #C5292E, #9B2124);
|
214 |
-
background-image: -ms-linear-gradient(top, #C5292E, #9B2124);
|
215 |
-
background-image: -o-linear-gradient(top, #C5292E, #9B2124);
|
216 |
-
background-image: linear-gradient(to bottom, #C5292E, #9B2124);
|
217 |
-
border-color: #9B2124;
|
218 |
-
border-bottom-color: #8D1F21;
|
219 |
-
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
|
220 |
-
box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
|
221 |
-
color: #fff;
|
222 |
-
text-decoration: none;
|
223 |
-
text-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
224 |
-
}
|
225 |
-
|
226 |
-
.wp-core-ui .button-red.hover,
|
227 |
-
.wp-core-ui .button-red:hover,
|
228 |
-
.wp-core-ui .button-red.focus,
|
229 |
-
.wp-core-ui .button-red:focus {
|
230 |
-
background-color: #B72629;
|
231 |
-
background-image: -webkit-gradient(linear, left top, left bottom, from(#D22E30), to(#9B2124));
|
232 |
-
background-image: -webkit-linear-gradient(top, #D22E30, #9B2124);
|
233 |
-
background-image: -moz-linear-gradient(top, #D22E30, #9B2124);
|
234 |
-
background-image: -ms-linear-gradient(top, #D22E30, #9B2124);
|
235 |
-
background-image: -o-linear-gradient(top, #D22E30, #9B2124);
|
236 |
-
background-image: linear-gradient(to bottom, #D22E30, #9B2124);
|
237 |
-
border-color: #7F1C1F;
|
238 |
-
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
|
239 |
-
box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
|
240 |
-
color: #fff;
|
241 |
-
text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
|
242 |
-
}
|
243 |
-
|
244 |
-
.wp-core-ui .button-red.focus,
|
245 |
-
.wp-core-ui .button-red:focus {
|
246 |
-
border-color: #500F0E;
|
247 |
-
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4);
|
248 |
-
box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4);
|
249 |
-
}
|
250 |
-
|
251 |
-
.wp-core-ui .button-red.active,
|
252 |
-
.wp-core-ui .button-red.active:hover,
|
253 |
-
.wp-core-ui .button-red.active:focus,
|
254 |
-
.wp-core-ui .button-red:active {
|
255 |
-
background: #7F1C1F;
|
256 |
-
background-image: -webkit-gradient(linear, left top, left bottom, from(#9B2124), to(#B72629));
|
257 |
-
background-image: -webkit-linear-gradient(top, #9B2124, #B72629);
|
258 |
-
background-image: -moz-linear-gradient(top, #9B2124, #B72629);
|
259 |
-
background-image: -ms-linear-gradient(top, #9B2124, #B72629);
|
260 |
-
background-image: -o-linear-gradient(top, #9B2124, #B72629);
|
261 |
-
background-image: linear-gradient(to bottom, #9B2124, #B72629);
|
262 |
-
border-color: #601312 #AE2426 #AE2426 #AE2426;
|
263 |
-
color: rgba(255,255,255,0.95);
|
264 |
-
-webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
|
265 |
-
box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
|
266 |
-
text-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
267 |
-
}
|
268 |
-
|
269 |
-
.wp-core-ui .button-red[disabled],
|
270 |
-
.wp-core-ui .button-red:disabled,
|
271 |
-
.wp-core-ui .button-red-disabled {
|
272 |
-
color: #E79496 !important;
|
273 |
-
background: #BA292B !important;
|
274 |
-
border-color: #7F1C1F !important;
|
275 |
-
-webkit-box-shadow: none !important;
|
276 |
-
box-shadow: none !important;
|
277 |
-
text-shadow: 0 -1px 0 rgba(0,0,0,0.1) !important;
|
278 |
-
cursor: default;
|
279 |
-
}
|
280 |
-
|
281 |
-
input[type=search] {
|
282 |
-
background: #FFFFFF url(../images/bg_search.png) 100% 50% no-repeat;
|
283 |
-
padding-right: 15px;
|
284 |
-
-webkit-appearance: none;
|
285 |
-
-webkit-box-sizing: content-box;
|
286 |
-
outline: none;
|
287 |
-
}
|
288 |
-
|
289 |
-
input[type="search"]::-webkit-search-decoration,
|
290 |
-
input[type="search"]::-webkit-search-cancel-button,
|
291 |
-
input[type="search"]::-webkit-search-results-button,
|
292 |
-
input[type="search"]::-webkit-search-results-decoration {
|
293 |
-
display: none;
|
294 |
-
}
|
295 |
-
|
296 |
-
input[type=search].val {
|
297 |
-
background-image: none;
|
298 |
-
}
|
299 |
-
|
300 |
-
.resetSearch {
|
301 |
-
background: url(../images/close.png) -30px 0 no-repeat;
|
302 |
-
display: block;
|
303 |
-
width: 15px;
|
304 |
-
height: 15px;
|
305 |
-
position: absolute;
|
306 |
-
right: 2px;
|
307 |
-
top: 5px;
|
308 |
-
overflow: hidden;
|
309 |
-
text-indent: -100em;
|
310 |
-
cursor: pointer;
|
311 |
-
}
|
312 |
-
|
313 |
-
div#grandMedia {
|
314 |
-
margin: 10px 20px 10px 0;
|
315 |
-
position: relative;
|
316 |
-
z-index: 1;
|
317 |
-
}
|
318 |
-
|
319 |
-
div.grandmedia {
|
320 |
-
color: #ffffff;
|
321 |
-
}
|
322 |
-
|
323 |
-
.grandHeader {
|
324 |
-
position: relative;
|
325 |
-
height: 80px;
|
326 |
-
padding: 1px;
|
327 |
-
}
|
328 |
-
|
329 |
-
.grandHeader .grandLogo {
|
330 |
-
position: absolute;
|
331 |
-
left: 15px;
|
332 |
-
top: 10px;
|
333 |
-
width: 150px;
|
334 |
-
height: 55px;
|
335 |
-
font-size: 40px;
|
336 |
-
font-family: Verdana, serif;
|
337 |
-
color: #ffffff;
|
338 |
-
background: url(../images/logo.png) 0 0 no-repeat;
|
339 |
-
overflow: hidden;
|
340 |
-
text-indent: -100em;
|
341 |
-
}
|
342 |
-
|
343 |
-
.grandHeader h2 {
|
344 |
-
margin: 16px 0 0 180px;
|
345 |
-
font: italic 24px/35px Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
|
346 |
-
}
|
347 |
-
|
348 |
-
div.sideLinks {
|
349 |
-
position: relative;
|
350 |
-
width: 180px;
|
351 |
-
float: left;
|
352 |
-
}
|
353 |
-
|
354 |
-
div.grandLibrary {
|
355 |
-
position: relative;
|
356 |
-
margin-left: 180px;
|
357 |
-
min-width: 740px;
|
358 |
-
}
|
359 |
-
|
360 |
-
.sideLinks .gm-bufer {
|
361 |
-
padding: 7px 0 7px 15px;
|
362 |
-
}
|
363 |
-
|
364 |
-
.grandmedia div#gm-message {
|
365 |
-
margin-top: -30px;
|
366 |
-
min-height: 24px;
|
367 |
-
max-height: 90px;
|
368 |
-
overflow: auto;
|
369 |
-
padding-bottom: 6px;
|
370 |
-
position: relative;
|
371 |
-
z-index: 200;
|
372 |
-
}
|
373 |
-
|
374 |
-
div#wpadminbar div#gm-message {
|
375 |
-
position: absolute;
|
376 |
-
width: auto;
|
377 |
-
left: 165px;
|
378 |
-
right: 20px;
|
379 |
-
top: 100%;
|
380 |
-
min-height: 0;
|
381 |
-
max-height: 1px;
|
382 |
-
}
|
383 |
-
|
384 |
-
body.folded div#wpadminbar div#gm-message {
|
385 |
-
position: absolute;
|
386 |
-
left: 52px;
|
387 |
-
}
|
388 |
-
|
389 |
-
div#gm-message .gm-message {
|
390 |
-
position: relative;
|
391 |
-
width: 100%;
|
392 |
-
text-align: center;
|
393 |
-
margin-bottom: 3px;
|
394 |
-
}
|
395 |
-
|
396 |
-
div#gm-message .gm-message > span {
|
397 |
-
display: inline-block;
|
398 |
-
vertical-align: top;
|
399 |
-
height: 15px;
|
400 |
-
margin: 0 auto;
|
401 |
-
padding: 0 10px;
|
402 |
-
background-color: #FFFFE0;
|
403 |
-
border: 3px solid #FFFFE0;
|
404 |
-
font-size: 12px;
|
405 |
-
font-weight: bold;
|
406 |
-
line-height: 15px;
|
407 |
-
color: #000000;
|
408 |
-
text-shadow: none;
|
409 |
-
-webkit-border-radius: 3px;
|
410 |
-
-khtml-border-radius: 3px;
|
411 |
-
-moz-border-radius: 3px;
|
412 |
-
border-radius: 3px;
|
413 |
-
}
|
414 |
-
|
415 |
-
div#gm-message .gm-message .gm-close {
|
416 |
-
display: inline-block;
|
417 |
-
vertical-align: top;
|
418 |
-
position: relative;
|
419 |
-
width: 11px;
|
420 |
-
height: 15px;
|
421 |
-
margin-left: -8px;
|
422 |
-
cursor: pointer;
|
423 |
-
background: #FFFFE0 url(../images/close.png) -17px -15px no-repeat;
|
424 |
-
border: 3px solid #FFFFE0;
|
425 |
-
font-size: 12px;
|
426 |
-
font-weight: bold;
|
427 |
-
line-height: 120%;
|
428 |
-
overflow: hidden;
|
429 |
-
text-indent: -100em;
|
430 |
-
-moz-border-radius: 0 3px 3px 0;
|
431 |
-
-webkit-border-bottom-right-radius: 3px;
|
432 |
-
-webkit-border-top-right-radius: 3px;
|
433 |
-
border-bottom-right-radius: 3px;
|
434 |
-
border-top-right-radius: 3px;
|
435 |
-
}
|
436 |
-
|
437 |
-
div#gm-message .gm-message.gm-error > span {
|
438 |
-
background-color: #cc0000;
|
439 |
-
border-color: #cc0000;
|
440 |
-
color: #ffffff;
|
441 |
-
}
|
442 |
-
|
443 |
-
div#gm-message .gm-message.gm-error .gm-close {
|
444 |
-
background-color: #cc0000;
|
445 |
-
background-position: -2px 0;
|
446 |
-
border-color: #cc0000;
|
447 |
-
}
|
448 |
-
|
449 |
-
.sideLinks ul {
|
450 |
-
list-style: none;
|
451 |
-
margin: 5px 0;
|
452 |
-
padding: 0;
|
453 |
-
}
|
454 |
-
|
455 |
-
.sideLinks ul li {
|
456 |
-
display: block;
|
457 |
-
margin: 0;
|
458 |
-
padding: 0 4px 0 8px;
|
459 |
-
line-height: 18px;
|
460 |
-
}
|
461 |
-
|
462 |
-
.sideLinks ul li:hover {
|
463 |
-
background: #636E82 none;
|
464 |
-
color: #313438;
|
465 |
-
}
|
466 |
-
|
467 |
-
.sideLinks ul li a {
|
468 |
-
display: block;
|
469 |
-
color: #ffffff;
|
470 |
-
padding: 3px 0 2px 17px;
|
471 |
-
text-decoration: none;
|
472 |
-
}
|
473 |
-
|
474 |
-
.sideLinks ul li:hover a {
|
475 |
-
color: #ffffff;
|
476 |
-
}
|
477 |
-
|
478 |
-
.sideLinks ul li a:hover {
|
479 |
-
text-decoration: none;
|
480 |
-
}
|
481 |
-
|
482 |
-
.sideLinks ul li.current {
|
483 |
-
background: #D2D6DC url(../images/navtabtop_bg.png) 0 -5px no-repeat;
|
484 |
-
color: #313438;
|
485 |
-
}
|
486 |
-
|
487 |
-
.sideLinks ul li.current:hover {
|
488 |
-
background: #D2D6DC url(../images/navtabtop_bg.png) 0 -5px no-repeat;
|
489 |
-
color: #313438;
|
490 |
-
}
|
491 |
-
|
492 |
-
.sideLinks ul li.current a {
|
493 |
-
color: #313438;
|
494 |
-
font-weight: bold;
|
495 |
-
}
|
496 |
-
|
497 |
-
.sideLinks ul li.current:hover a {
|
498 |
-
color: #313438;
|
499 |
-
}
|
500 |
-
|
501 |
-
div#gMediaLibTable {
|
502 |
-
/*height: 450px; overflow: auto;*/
|
503 |
-
min-height: 156px;
|
504 |
-
position: relative;
|
505 |
-
background-color: #ffffff;
|
506 |
-
color: #000000;
|
507 |
-
}
|
508 |
-
|
509 |
-
div#gMediaLibTable p {
|
510 |
-
margin: 5px 0 2px;
|
511 |
-
}
|
512 |
-
|
513 |
-
div.gMediaLibActions {
|
514 |
-
border: 1px solid #dedede;
|
515 |
-
padding: 5px 22px 3px 7px;
|
516 |
-
background: #ffffff url(../images/bg_act_bar.png) 0 100% repeat-x;
|
517 |
-
white-space: nowrap;
|
518 |
-
font: 12px/16px Arial;
|
519 |
-
color: #000000;
|
520 |
-
position: relative;
|
521 |
-
min-height: 26px;
|
522 |
-
-moz-border-radius: 4px 4px 0 0;
|
523 |
-
-webkit-border-top-left-radius: 4px;
|
524 |
-
-webkit-border-top-right-radius: 4px;
|
525 |
-
border-top-left-radius: 4px;
|
526 |
-
border-top-right-radius: 4px;
|
527 |
-
}
|
528 |
-
|
529 |
-
input[type="checkbox"], input[type="checkbox"]:focus {
|
530 |
-
-moz-outline: none;
|
531 |
-
outline: none;
|
532 |
-
}
|
533 |
-
|
534 |
-
div.gMediaLibActions .dropbut {
|
535 |
-
padding: 3px 18px 3px 8px;
|
536 |
-
height: 16px;
|
537 |
-
background: url(../images/dropbut.png) 100% 50% no-repeat;
|
538 |
-
}
|
539 |
-
|
540 |
-
div.gMediaLibActions .cb .dropbut {
|
541 |
-
padding-left: 6px;
|
542 |
-
}
|
543 |
-
|
544 |
-
div.gMediaLibActions .abut {
|
545 |
-
display: inline-block;
|
546 |
-
border: 1px solid #a0a0a0;
|
547 |
-
margin: 0 8px 2px 0;
|
548 |
-
background: #e3e3e3 url(../images/bg_act_but.png) 0 0 repeat-x;
|
549 |
-
vertical-align: middle;
|
550 |
-
cursor: default;
|
551 |
-
position: relative;
|
552 |
-
z-index: 1;
|
553 |
-
-webkit-border-radius: 4px;
|
554 |
-
-khtml-border-radius: 4px;
|
555 |
-
-moz-border-radius: 4px;
|
556 |
-
border-radius: 4px;
|
557 |
-
}
|
558 |
-
|
559 |
-
div.gMediaLibActions .abut:hover {
|
560 |
-
border-color: #000000;
|
561 |
-
}
|
562 |
-
|
563 |
-
div.gMediaLibActions .abuts {
|
564 |
-
display: inline-block;
|
565 |
-
margin: 0 8px 2px 0;
|
566 |
-
background: #e3e3e3 url(../images/bg_act_but.png) 0 0 repeat-x;
|
567 |
-
overflow: hidden;
|
568 |
-
vertical-align: middle;
|
569 |
-
-webkit-border-radius: 4px;
|
570 |
-
-khtml-border-radius: 4px;
|
571 |
-
-moz-border-radius: 4px;
|
572 |
-
border-radius: 4px;
|
573 |
-
}
|
574 |
-
|
575 |
-
div.gMediaLibActions .abuts > span {
|
576 |
-
float: left;
|
577 |
-
border: 1px solid #a0a0a0;
|
578 |
-
padding: 3px 8px;
|
579 |
-
border-left: none;
|
580 |
-
color: #000000;
|
581 |
-
text-decoration: none;
|
582 |
-
cursor: default;
|
583 |
-
margin: 0;
|
584 |
-
}
|
585 |
-
|
586 |
-
div.gMediaLibActions .abuts > a {
|
587 |
-
float: left;
|
588 |
-
border: 1px solid #a0a0a0;
|
589 |
-
border-left: none;
|
590 |
-
color: #000000;
|
591 |
-
text-decoration: none;
|
592 |
-
cursor: default;
|
593 |
-
margin: 0;
|
594 |
-
}
|
595 |
-
|
596 |
-
div.gMediaLibActions .abuts .active {
|
597 |
-
background: #989898 url(../images/bg_act_but2.png) 0 0 repeat-x;
|
598 |
-
color: #ffffff;
|
599 |
-
}
|
600 |
-
|
601 |
-
div.gMediaLibActions .abuts a {
|
602 |
-
padding: 3px 8px;
|
603 |
-
height: 16px;
|
604 |
-
overflow: hidden;
|
605 |
-
}
|
606 |
-
|
607 |
-
div.gMediaLibActions .abuts span {
|
608 |
-
height: 16px;
|
609 |
-
overflow: hidden;
|
610 |
-
}
|
611 |
-
|
612 |
-
div.gMediaLibActions .abuts > a.gm_action_back b {
|
613 |
-
position: relative;
|
614 |
-
display: inline-block;
|
615 |
-
top: -2px;
|
616 |
-
vertical-align: middle;
|
617 |
-
}
|
618 |
-
|
619 |
-
div.gMediaLibActions .abuts > a.gm_action_button {
|
620 |
-
background-color: InactiveCaption;
|
621 |
-
}
|
622 |
-
|
623 |
-
div.gMediaLibActions .abuts > span.gm_action_button {
|
624 |
-
height: 22px;
|
625 |
-
padding: 0;
|
626 |
-
background-color: InactiveCaption;
|
627 |
-
}
|
628 |
-
|
629 |
-
div.gMediaLibActions .abuts > span.gm_action_submit {
|
630 |
-
height: 22px;
|
631 |
-
padding: 0;
|
632 |
-
background-color: #21759b;
|
633 |
-
}
|
634 |
-
|
635 |
-
div.gMediaLibActions .abuts > span.gm_action_button input {
|
636 |
-
height: 20px;
|
637 |
-
padding: 0 8px;
|
638 |
-
margin: 0;
|
639 |
-
border: none;
|
640 |
-
background: none;
|
641 |
-
border-radius: 0;
|
642 |
-
font: 12px/15px Arial;
|
643 |
-
color: #000;
|
644 |
-
}
|
645 |
-
|
646 |
-
div.gMediaLibActions .abuts > span.gm_action_submit input {
|
647 |
-
color: #ffffff;
|
648 |
-
font-weight: bold;
|
649 |
-
}
|
650 |
-
|
651 |
-
div.gMediaLibActions .abuts a i.qty {
|
652 |
-
font-style: normal;
|
653 |
-
font-size: 10px;
|
654 |
-
vertical-align: text-bottom;
|
655 |
-
}
|
656 |
-
|
657 |
-
div.gMediaLibActions .abuts a i .page {
|
658 |
-
display: none;
|
659 |
-
}
|
660 |
-
|
661 |
-
div.gMediaLibActions .abuts a i b {
|
662 |
-
display: none;
|
663 |
-
}
|
664 |
-
|
665 |
-
div.gMediaLibActions .abuts .delete {
|
666 |
-
font-weight: bold;
|
667 |
-
}
|
668 |
-
|
669 |
-
div.gMediaLibActions .abuts > :first-child {
|
670 |
-
border-left: 1px solid #a0a0a0;
|
671 |
-
-moz-border-radius-topleft: 4px;
|
672 |
-
-moz-border-radius-bottomleft: 4px;
|
673 |
-
-webkit-border-top-left-radius: 4px;
|
674 |
-
-webkit-border-bottom-left-radius: 4px;
|
675 |
-
border-top-left-radius: 4px;
|
676 |
-
border-bottom-left-radius: 4px;
|
677 |
-
}
|
678 |
-
|
679 |
-
div.gMediaLibActions .abuts > :last-child {
|
680 |
-
-moz-border-radius-topright: 4px;
|
681 |
-
-moz-border-radius-bottomright: 4px;
|
682 |
-
-webkit-border-top-right-radius: 4px;
|
683 |
-
-webkit-border-bottom-right-radius: 4px;
|
684 |
-
border-top-right-radius: 4px;
|
685 |
-
border-bottom-right-radius: 4px;
|
686 |
-
}
|
687 |
-
|
688 |
-
div.gMediaLibActions .abuts > *:hover {
|
689 |
-
border: 1px solid #000000;
|
690 |
-
margin-left: -1px;
|
691 |
-
}
|
692 |
-
|
693 |
-
div.gMediaLibActions .abuts .delete:hover {
|
694 |
-
color: #990000;
|
695 |
-
}
|
696 |
-
|
697 |
-
div.gMediaLibActions .abuts > :first-child:hover {
|
698 |
-
margin-left: 0;
|
699 |
-
}
|
700 |
-
|
701 |
-
div.gMediaLibActions .abuts .disabled {
|
702 |
-
color: #888888
|
703 |
-
}
|
704 |
-
|
705 |
-
div.gMediaLibActions .abuts .disabled:hover {
|
706 |
-
border: 1px solid #a0a0a0;
|
707 |
-
}
|
708 |
-
|
709 |
-
div.gMediaLibActions .dropbox {
|
710 |
-
display: none;
|
711 |
-
position: absolute;
|
712 |
-
top: 20px;
|
713 |
-
left: 0;
|
714 |
-
background-color: #f7f7f7;
|
715 |
-
padding: 5px;
|
716 |
-
-moz-box-shadow: 0 4px 10px #8B8B8B;
|
717 |
-
-webkit-box-shadow: 0 4px 10px #8B8B8B;
|
718 |
-
box-shadow: 0 4px 10px #8B8B8B;
|
719 |
-
}
|
720 |
-
|
721 |
-
div.gMediaLibActions .abut.active {
|
722 |
-
z-index: 102;
|
723 |
-
background: #989898 url(../images/bg_act_but2.png) 0 0 repeat-x;
|
724 |
-
border-color: #000000;
|
725 |
-
}
|
726 |
-
|
727 |
-
div.gMediaLibActions .abut.active .dropbut {
|
728 |
-
color: #ffffff;
|
729 |
-
}
|
730 |
-
|
731 |
-
div.gMediaLibActions .abut.active .dropbox {
|
732 |
-
display: block;
|
733 |
-
}
|
734 |
-
|
735 |
-
div.gMediaLibActions .dropbox > span,
|
736 |
-
div.gMediaLibActions .dropbox > a {
|
737 |
-
display: block;
|
738 |
-
padding: 2px 20px 2px 2px;
|
739 |
-
text-decoration: none;
|
740 |
-
color: #000;
|
741 |
-
}
|
742 |
-
|
743 |
-
div.gMediaLibActions .dropbox > span:hover,
|
744 |
-
div.gMediaLibActions .dropbox > a:hover {
|
745 |
-
display: block;
|
746 |
-
padding: 2px 20px 2px 2px;
|
747 |
-
background-color: #ffffcc;
|
748 |
-
text-decoration: none;
|
749 |
-
color: #000;
|
750 |
-
cursor: default;
|
751 |
-
}
|
752 |
-
|
753 |
-
div.gMediaLibActions .dropbox a.hidden_media {
|
754 |
-
background: url(../images/icon_checked.png) no-repeat 100% -100px;
|
755 |
-
}
|
756 |
-
|
757 |
-
div.gMediaLibActions .dropbox a.hidden_media.active {
|
758 |
-
background: #FFFFCC 100% 50%;
|
759 |
-
font-weight: bold;
|
760 |
-
}
|
761 |
-
|
762 |
-
div.gMediaLibActions .dropbox a.hidden_media i.qty {
|
763 |
-
font-style: normal;
|
764 |
-
font-size: 10px;
|
765 |
-
vertical-align: text-bottom;
|
766 |
-
}
|
767 |
-
|
768 |
-
div.gMediaLibActions .dropbox a.hidden_media i.qty span {
|
769 |
-
display: inline;
|
770 |
-
padding: 0;
|
771 |
-
}
|
772 |
-
|
773 |
-
div.gMediaLibActions .dropbox .label {
|
774 |
-
margin: 0;
|
775 |
-
padding: 0 0 2px 2px;
|
776 |
-
color: #444444;
|
777 |
-
font-size: 95%;
|
778 |
-
display: block;
|
779 |
-
cursor: default;
|
780 |
-
font-weight: normal;
|
781 |
-
}
|
782 |
-
|
783 |
-
div.gMediaLibActions .dropbox .term_list {
|
784 |
-
margin: 0;
|
785 |
-
padding: 0;
|
786 |
-
max-height: 200px;
|
787 |
-
overflow: auto;
|
788 |
-
overflow-x: hidden;
|
789 |
-
}
|
790 |
-
|
791 |
-
div.gMediaLibActions .dropbox .term_list .item {
|
792 |
-
white-space: nowrap;
|
793 |
-
position: relative;
|
794 |
-
}
|
795 |
-
|
796 |
-
div.gMediaLibActions .dropbox .term_list .item:hover {
|
797 |
-
background-color: #ffffcc;
|
798 |
-
}
|
799 |
-
|
800 |
-
div.gMediaLibActions .dropbox .term_list .item span {
|
801 |
-
display: block;
|
802 |
-
padding: 2px 40px 2px 2px;
|
803 |
-
color: #000;
|
804 |
-
}
|
805 |
-
|
806 |
-
div.gMediaLibActions .dropbox .term_list .item a {
|
807 |
-
position: absolute;
|
808 |
-
right: 3px;
|
809 |
-
top: 1px;
|
810 |
-
display: block;
|
811 |
-
width: 16px;
|
812 |
-
height: 16px;
|
813 |
-
overflow: hidden;
|
814 |
-
text-indent: -100em;
|
815 |
-
background: url(../images/link.png) no-repeat 0 0;
|
816 |
-
}
|
817 |
-
|
818 |
-
div.gMediaLibActions .dropbox .buttons {
|
819 |
-
margin-top: 10px;
|
820 |
-
}
|
821 |
-
|
822 |
-
div.gMediaLibActions .msg, div.gMediaLibActions .msg0 {
|
823 |
-
display: inline-block;
|
824 |
-
position: relative;
|
825 |
-
z-index: 100;
|
826 |
-
background-color: #006600;
|
827 |
-
padding: 2px 5px;
|
828 |
-
color: #ffffff;
|
829 |
-
opacity: 0.8;
|
830 |
-
-webkit-border-radius: 4px;
|
831 |
-
-khtml-border-radius: 4px;
|
832 |
-
-moz-border-radius: 4px;
|
833 |
-
border-radius: 4px;
|
834 |
-
-webkit-touch-callout: none;
|
835 |
-
-webkit-user-select: none;
|
836 |
-
-khtml-user-select: none;
|
837 |
-
-moz-user-select: none;
|
838 |
-
-ms-user-select: none;
|
839 |
-
user-select: none;
|
840 |
-
}
|
841 |
-
|
842 |
-
div.gMediaLibActions .msg.reload {
|
843 |
-
padding-right: 20px;
|
844 |
-
background-image: url(../images/reload.png);
|
845 |
-
background-position: 100% 1px;
|
846 |
-
background-repeat: no-repeat;
|
847 |
-
cursor: pointer;
|
848 |
-
}
|
849 |
-
|
850 |
-
div.gMediaLibActions .msg0 {
|
851 |
-
background-color: #142f4f;
|
852 |
-
position: absolute;
|
853 |
-
right: 5px;
|
854 |
-
top: 5px;
|
855 |
-
}
|
856 |
-
|
857 |
-
div.gMediaLibActions .msg0 .msg0_text {
|
858 |
-
position: relative;
|
859 |
-
z-index: 2;
|
860 |
-
}
|
861 |
-
|
862 |
-
div.gMediaLibActions .msg0 .msg0_progress {
|
863 |
-
background-color: #006600;
|
864 |
-
position: absolute;
|
865 |
-
z-index: 1;
|
866 |
-
left: 0;
|
867 |
-
top: 0;
|
868 |
-
bottom:0;
|
869 |
-
width:0;
|
870 |
-
-webkit-border-radius: 4px;
|
871 |
-
-khtml-border-radius: 4px;
|
872 |
-
-moz-border-radius: 4px;
|
873 |
-
border-radius: 4px;
|
874 |
-
}
|
875 |
-
|
876 |
-
div.gMediaLibActions .msg .more {
|
877 |
-
display: none;
|
878 |
-
font-weight: bold;
|
879 |
-
margin-left: 5px;
|
880 |
-
font-size: 14px;
|
881 |
-
line-height: 12px;
|
882 |
-
cursor: pointer;
|
883 |
-
}
|
884 |
-
|
885 |
-
div.gMediaLibActions .msg.showmore .more {
|
886 |
-
display: inline;
|
887 |
-
}
|
888 |
-
|
889 |
-
div.gMediaLibActions .msg .actions {
|
890 |
-
display: none;
|
891 |
-
position: absolute;
|
892 |
-
left: 0;
|
893 |
-
top: 14px;
|
894 |
-
background-color: #006600;
|
895 |
-
padding: 6px 2px 2px;
|
896 |
-
color: #ffffff;
|
897 |
-
-webkit-border-radius: 4px;
|
898 |
-
-khtml-border-radius: 4px;
|
899 |
-
-moz-border-radius: 4px;
|
900 |
-
border-radius: 4px;
|
901 |
-
}
|
902 |
-
|
903 |
-
div.gMediaLibActions .msg .actions span {
|
904 |
-
display: block;
|
905 |
-
padding: 3px 3px;
|
906 |
-
cursor: pointer;
|
907 |
-
}
|
908 |
-
|
909 |
-
div.gMediaLibActions .msg .actions span:hover {
|
910 |
-
background-color: #21759B;
|
911 |
-
}
|
912 |
-
|
913 |
-
div.gMediaLibActions .gmSearch {
|
914 |
-
display: inline-block;
|
915 |
-
position: absolute;
|
916 |
-
right: 5px;
|
917 |
-
top: 5px;
|
918 |
-
}
|
919 |
-
|
920 |
-
div.gMediaLibActions .gmSearch .loading {
|
921 |
-
display: none;
|
922 |
-
}
|
923 |
-
|
924 |
-
div.gMediaLibActions .gmSearch input#gMediaSearch {
|
925 |
-
width: 136px;
|
926 |
-
margin: 0;
|
927 |
-
padding: 4px 14px 3px 3px;
|
928 |
-
background: #ffffff url(../images/bg_search.png) 100% 60% no-repeat;
|
929 |
-
}
|
930 |
-
|
931 |
-
div.block-query_vis div.gMediaLibActions {
|
932 |
-
border: 1px solid #d1d1d1;
|
933 |
-
padding: 5px 22px 3px 7px;
|
934 |
-
background: linear-gradient(to top, #E5E5E5, #F4F4F4) repeat scroll 0 0 #EEEEEE;
|
935 |
-
}
|
936 |
-
|
937 |
-
div.block-query_vis div.gMediaLibActions .abuts {
|
938 |
-
background: linear-gradient(to top, #FFFFFF, #EEEEEE) repeat scroll 0 0 #EEEEEE
|
939 |
-
}
|
940 |
-
|
941 |
-
div.block-query_vis div.gMediaLibActions .abuts > span {
|
942 |
-
padding: 2px 2px 2px 20px;
|
943 |
-
height: 18px;
|
944 |
-
}
|
945 |
-
|
946 |
-
div.block-query_vis div.gMediaLibActions .abuts > span.gm-ui-folder {
|
947 |
-
background: url(../images/Folder.png) 3px 3px no-repeat;
|
948 |
-
}
|
949 |
-
|
950 |
-
div.block-query_vis div.gMediaLibActions .abuts > span.gm-ui-author {
|
951 |
-
background: url(../images/User.png) 3px 3px no-repeat;
|
952 |
-
}
|
953 |
-
|
954 |
-
div.block-query_vis div.gMediaLibActions .abuts > span.gm-ui-orderby {
|
955 |
-
background: url(../images/OrderBy.png) 3px 3px no-repeat;
|
956 |
-
}
|
957 |
-
|
958 |
-
div.block-query_vis div.gMediaLibActions .abuts > span.gm-ui-order {
|
959 |
-
background: url(../images/Order.png) 3px 3px no-repeat;
|
960 |
-
}
|
961 |
-
|
962 |
-
div.block-query_vis div.gMediaLibActions .abuts span select {
|
963 |
-
border: none;
|
964 |
-
background: transparent;
|
965 |
-
height: 18px;
|
966 |
-
margin: 0;
|
967 |
-
padding: 0;
|
968 |
-
}
|
969 |
-
|
970 |
-
div.block-query_vis div.gMediaLibActions .abuts span select option {
|
971 |
-
background: #ffffff;
|
972 |
-
}
|
973 |
-
|
974 |
-
div.block-query_vis div.gMediaLibActions .gmedia-ui-multiselect {
|
975 |
-
width: 100px;
|
976 |
-
}
|
977 |
-
|
978 |
-
div.query_media_vis {
|
979 |
-
border: 1px solid #d1d1d1;
|
980 |
-
border-top: none;
|
981 |
-
padding: 5px;
|
982 |
-
overflow: auto;
|
983 |
-
}
|
984 |
-
|
985 |
-
div.query_media_vis a { width: 48px; height: 48px; margin-bottom: 12px; text-decoration: none; position: relative; display: inline-block; color: black; }
|
986 |
-
div.query_media_vis a span { display: none; white-space: nowrap; font-size: 10px; position: absolute; left: 0; top: 100%; }
|
987 |
-
div.query_media_vis a:hover { text-decoration: none; color: black; }
|
988 |
-
div.query_media_vis a:hover span { display: block; }
|
989 |
-
|
990 |
-
div.query_media_vis > :last-child {
|
991 |
-
margin-right: 5px;
|
992 |
-
}
|
993 |
-
|
994 |
-
.tabqueryblock {
|
995 |
-
position: relative;
|
996 |
-
padding-top: 10px;
|
997 |
-
}
|
998 |
-
|
999 |
-
.gm_query_tabname {
|
1000 |
-
margin-bottom: 7px;
|
1001 |
-
margin-top: 10px;
|
1002 |
-
}
|
1003 |
-
|
1004 |
-
.gm_query_tabname label {
|
1005 |
-
font-weight: bold;
|
1006 |
-
}
|
1007 |
-
|
1008 |
-
.gm_query_tabname input.query_tabname {
|
1009 |
-
width: 200px !important;
|
1010 |
-
}
|
1011 |
-
|
1012 |
-
.gmAddTab {
|
1013 |
-
background-color: #8fbc8f;
|
1014 |
-
margin: 3px 0;
|
1015 |
-
padding: 5px;
|
1016 |
-
font: bold 14px Arial;
|
1017 |
-
color: #505050;
|
1018 |
-
text-align: center;
|
1019 |
-
opacity: 0.6;
|
1020 |
-
cursor: pointer;
|
1021 |
-
}
|
1022 |
-
|
1023 |
-
.gmAddTab:hover {
|
1024 |
-
color: #000000;
|
1025 |
-
opacity: 1;
|
1026 |
-
}
|
1027 |
-
|
1028 |
-
.gmDelTab {
|
1029 |
-
position: absolute;
|
1030 |
-
right: 10px;
|
1031 |
-
top: 10px;
|
1032 |
-
color: #D95252;
|
1033 |
-
}
|
1034 |
-
|
1035 |
-
.gmDelTab:hover {
|
1036 |
-
color: #CC3333;
|
1037 |
-
}
|
1038 |
-
|
1039 |
-
div#gMediaQuery .tabqueryblock:only-child .gmDelTab {
|
1040 |
-
display: none
|
1041 |
-
}
|
1042 |
-
|
1043 |
-
.grandPager {
|
1044 |
-
display: block;
|
1045 |
-
position: absolute;
|
1046 |
-
right: 160px;
|
1047 |
-
top: 7px;
|
1048 |
-
font-size: 11px;
|
1049 |
-
line-height: 16px;
|
1050 |
-
}
|
1051 |
-
|
1052 |
-
.grandPager * {
|
1053 |
-
display: inline-block;
|
1054 |
-
vertical-align: middle;
|
1055 |
-
}
|
1056 |
-
|
1057 |
-
.grandPager .pager_total_items {
|
1058 |
-
font: italic 12px Georgia;
|
1059 |
-
margin-right: 10px;
|
1060 |
-
color: #777777;
|
1061 |
-
}
|
1062 |
-
|
1063 |
-
.grandPager .pager_first, .grandPager .pager_prev, .grandPager .pager_next, .grandPager .pager_last {
|
1064 |
-
display: inline-block;
|
1065 |
-
background: #e3e3e3 url(../images/bg_act_but.png) 0 0 repeat-x;
|
1066 |
-
color: #21759b;
|
1067 |
-
border: 1px solid #a0a0a0;
|
1068 |
-
padding: 1px 6px;
|
1069 |
-
text-decoration: none;
|
1070 |
-
font: bold 12px "Lucida Grande", Verdana;
|
1071 |
-
margin: 0 2px;
|
1072 |
-
height: 16px;
|
1073 |
-
-webkit-border-radius: 4px;
|
1074 |
-
-khtml-border-radius: 4px;
|
1075 |
-
-moz-border-radius: 4px;
|
1076 |
-
border-radius: 4px;
|
1077 |
-
}
|
1078 |
-
|
1079 |
-
.grandPager span.pager_first, .grandPager span.pager_prev, .grandPager span.pager_next, .grandPager span.pager_last {
|
1080 |
-
color: #aaaaaa;
|
1081 |
-
}
|
1082 |
-
|
1083 |
-
.grandPager .pager_pages {
|
1084 |
-
display: inline-block;
|
1085 |
-
margin: 0 5px;
|
1086 |
-
}
|
1087 |
-
|
1088 |
-
.grandPager .pager_pages .pager_current_page {
|
1089 |
-
width: 30px;
|
1090 |
-
margin: 0 3px 0 0;
|
1091 |
-
padding: 1px 3px;
|
1092 |
-
text-align: center;
|
1093 |
-
font-size: 11px;
|
1094 |
-
}
|
1095 |
-
|
1096 |
-
.gmedia-content {
|
1097 |
-
background-color: #ffffff;
|
1098 |
-
padding: 20px;
|
1099 |
-
color: #444444;
|
1100 |
-
}
|
1101 |
-
|
1102 |
-
table.gMediaLibTable {
|
1103 |
-
width: 100%;
|
1104 |
-
border-spacing: 0;
|
1105 |
-
border: 1px solid #cccccc;
|
1106 |
-
border-top: none;
|
1107 |
-
border-collapse: collapse;
|
1108 |
-
font-size: 12px;
|
1109 |
-
}
|
1110 |
-
|
1111 |
-
table.gMediaLibTable tr {
|
1112 |
-
background-color: #f7f7f7;
|
1113 |
-
color: #000000;
|
1114 |
-
}
|
1115 |
-
|
1116 |
-
table.gMediaLibTable tbody tr:hover {
|
1117 |
-
background-color: #fcfcff;
|
1118 |
-
}
|
1119 |
-
|
1120 |
-
table.gMediaLibTable th {
|
1121 |
-
vertical-align: top;
|
1122 |
-
padding: 4px 3px;
|
1123 |
-
border-bottom: 1px solid #dedede;
|
1124 |
-
font-weight: bold;
|
1125 |
-
text-align: left;
|
1126 |
-
background: #dfdfdf url(../images/gray-grad.png) 0 0 repeat-x;
|
1127 |
-
color: #333333;
|
1128 |
-
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
|
1129 |
-
}
|
1130 |
-
|
1131 |
-
table.gMediaLibTable th.bufer {
|
1132 |
-
}
|
1133 |
-
|
1134 |
-
table.gMediaLibTable th.cb {
|
1135 |
-
}
|
1136 |
-
|
1137 |
-
table.gMediaLibTable th a {
|
1138 |
-
display: inline-block;
|
1139 |
-
padding-right: 12px;
|
1140 |
-
background: url(../images/sorting.png) 100% -2px no-repeat;
|
1141 |
-
text-decoration: none;
|
1142 |
-
color: #333333;
|
1143 |
-
}
|
1144 |
-
|
1145 |
-
table.gMediaLibTable th.ASC a {
|
1146 |
-
background-position: 100% -22px;
|
1147 |
-
}
|
1148 |
-
|
1149 |
-
table.gMediaLibTable th.DESC a {
|
1150 |
-
background-position: 100% -42px;
|
1151 |
-
}
|
1152 |
-
|
1153 |
-
table.gMediaLibTable td {
|
1154 |
-
vertical-align: top;
|
1155 |
-
padding: 4px 3px;
|
1156 |
-
border-bottom: 1px solid #dedede;
|
1157 |
-
line-height: 14px;
|
1158 |
-
}
|
1159 |
-
|
1160 |
-
table.gMediaLibTable tr.noitems {
|
1161 |
-
display: none;
|
1162 |
-
}
|
1163 |
-
|
1164 |
-
table.gMediaLibTable tr.noitems td {
|
1165 |
-
padding: 60px 0;
|
1166 |
-
text-align: center;
|
1167 |
-
font-weight: bold;
|
1168 |
-
}
|
1169 |
-
|
1170 |
-
table.gMediaLibTable tr.emptydb td {
|
1171 |
-
padding: 60px 0;
|
1172 |
-
text-align: center;
|
1173 |
-
font-weight: bold;
|
1174 |
-
}
|
1175 |
-
|
1176 |
-
table.gMediaLibTable .bufer {
|
1177 |
-
width: 5px;
|
1178 |
-
}
|
1179 |
-
|
1180 |
-
table.gMediaLibTable tr.gmedia_hidden .bufer span {
|
1181 |
-
background-color: #CC3333;
|
1182 |
-
}
|
1183 |
-
|
1184 |
-
table.gMediaLibTable tr.hideMedia .bufer span {
|
1185 |
-
background-color: #CC3333;
|
1186 |
-
}
|
1187 |
-
|
1188 |
-
table.gMediaLibTable tr.gmedia_hidden.unhideMedia .bufer span {
|
1189 |
-
background-color: #009900;
|
1190 |
-
}
|
1191 |
-
|
1192 |
-
table.gMediaLibTable .cb {
|
1193 |
-
width: 20px;
|
1194 |
-
}
|
1195 |
-
|
1196 |
-
table.gMediaLibTable .id {
|
1197 |
-
font-weight: bold;
|
1198 |
-
width: 50px;
|
1199 |
-
white-space: nowrap;
|
1200 |
-
}
|
1201 |
-
|
1202 |
-
table.gMediaLibTable .module_preview {
|
1203 |
-
width: 110px; overflow: hidden;
|
1204 |
-
}
|
1205 |
-
|
1206 |
-
table.gMediaLibTable .file {
|
1207 |
-
width: 50px;
|
1208 |
-
}
|
1209 |
-
|
1210 |
-
table.gMediaLibTable .name {
|
1211 |
-
width: 250px;
|
1212 |
-
}
|
1213 |
-
|
1214 |
-
.gmedia_module table.gMediaLibTable td.name span {
|
1215 |
-
display: block;
|
1216 |
-
font-size: 16px;
|
1217 |
-
line-height: 120%;
|
1218 |
-
}
|
1219 |
-
|
1220 |
-
table.gMediaLibTable td.file {
|
1221 |
-
padding: 2px 3px;
|
1222 |
-
}
|
1223 |
-
|
1224 |
-
table.gMediaLibTable .file span {
|
1225 |
-
display: block;
|
1226 |
-
position: relative;
|
1227 |
-
width: 38px;
|
1228 |
-
height: 20px;
|
1229 |
-
}
|
1230 |
-
|
1231 |
-
table.gMediaLibTable .file img {
|
1232 |
-
position: absolute;
|
1233 |
-
left: 0;
|
1234 |
-
top: 0;
|
1235 |
-
clip: rect(0px, 36px, 20px, 0px);
|
1236 |
-
height: auto;
|
1237 |
-
}
|
1238 |
-
|
1239 |
-
table.gMediaLibTable .type {
|
1240 |
-
width: 50px;
|
1241 |
-
}
|
1242 |
-
|
1243 |
-
table.gMediaLibTable .count {
|
1244 |
-
width: 70px;
|
1245 |
-
}
|
1246 |
-
|
1247 |
-
table.gMediaLibTable .title {
|
1248 |
-
width: 250px;
|
1249 |
-
}
|
1250 |
-
|
1251 |
-
table.gMediaLibTable .title span {
|
1252 |
-
display: block;
|
1253 |
-
overflow: hidden;
|
1254 |
-
height: 15px;
|
1255 |
-
}
|
1256 |
-
|
1257 |
-
table.gMediaLibTable .descr div {
|
1258 |
-
overflow: hidden;
|
1259 |
-
height: 15px;
|
1260 |
-
}
|
1261 |
-
|
1262 |
-
table.gMediaLibTable .descr div * {
|
1263 |
-
margin: 0;
|
1264 |
-
padding: 0;
|
1265 |
-
display: inline;
|
1266 |
-
}
|
1267 |
-
|
1268 |
-
table.gMediaLibTable .last_edited {
|
1269 |
-
width: 80px;
|
1270 |
-
}
|
1271 |
-
|
1272 |
-
table.gMediaLibTable .actions {
|
1273 |
-
width: 60px;
|
1274 |
-
white-space: nowrap;
|
1275 |
-
}
|
1276 |
-
|
1277 |
-
table.gMediaLibTable td.actions {
|
1278 |
-
padding-bottom: 0;
|
1279 |
-
padding-right: 0;
|
1280 |
-
}
|
1281 |
-
|
1282 |
-
table.gMediaLibTable td.actions span,
|
1283 |
-
table.gMediaLibTable .actions a {
|
1284 |
-
text-indent: -100em;
|
1285 |
-
overflow: hidden;
|
1286 |
-
display: inline-block;
|
1287 |
-
width: 16px;
|
1288 |
-
height: 16px;
|
1289 |
-
}
|
1290 |
-
|
1291 |
-
table.gMediaLibTable td.actions .pad { margin-right: 5px; }
|
1292 |
-
table.gMediaLibTable .actions .fancy-view {
|
1293 |
-
background: url(../images/icon_eye.png) 0 0 no-repeat;
|
1294 |
-
margin-right: 5px;
|
1295 |
-
}
|
1296 |
-
|
1297 |
-
table.gMediaLibTable .actions .fancy-listen {
|
1298 |
-
background: url(../images/icon_listen.png) 0 0 no-repeat;
|
1299 |
-
margin-right: 5px;
|
1300 |
-
}
|
1301 |
-
|
1302 |
-
table.gMediaLibTable .actions .fancy-watch {
|
1303 |
-
background: url(../images/icon_watch.png) 0 0 no-repeat;
|
1304 |
-
margin-right: 5px;
|
1305 |
-
}
|
1306 |
-
|
1307 |
-
table.gMediaLibTable .actions .fancy-app {
|
1308 |
-
background: url(../images/gm-icon.png) 0 0 no-repeat;
|
1309 |
-
margin-right: 5px;
|
1310 |
-
}
|
1311 |
-
|
1312 |
-
table.gMediaLibTable .actions .edit {
|
1313 |
-
background: url(../images/icon_edit.png) 0 0 no-repeat;
|
1314 |
-
margin-right: 5px;
|
1315 |
}
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1320 |
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
padding-right: 4px;
|
1326 |
-
color: #000000;
|
1327 |
-
font-size: 11px;
|
1328 |
-
text-decoration: none;
|
1329 |
-
height: 16px;
|
1330 |
-
line-height: 16px;
|
1331 |
-
margin-right: 7px;
|
1332 |
-
}
|
1333 |
|
1334 |
-
|
1335 |
display: inline-block;
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
line-height:
|
1344 |
-
|
1345 |
-
|
1346 |
-
opacity: 0.8;
|
1347 |
-
}
|
1348 |
-
|
1349 |
-
table.gMediaLibTable a.tag:hover {
|
1350 |
-
opacity: 1;
|
1351 |
-
}
|
1352 |
-
|
1353 |
-
table.gMediaLibTable a.tag:after {
|
1354 |
-
content: "";
|
1355 |
-
position: absolute;
|
1356 |
-
right: 0;
|
1357 |
-
top: 0;
|
1358 |
-
height: 15px;
|
1359 |
-
width: 5px;
|
1360 |
-
display: block;
|
1361 |
-
background: #ffffff url(../images/label1.png) 0 0 no-repeat;
|
1362 |
-
}
|
1363 |
-
|
1364 |
-
tr.gmedia-edit-row {
|
1365 |
-
background-color: #fcffff !important;
|
1366 |
-
}
|
1367 |
-
|
1368 |
-
.gmedia-edit-row fieldset {
|
1369 |
-
border: 1px solid #888888;
|
1370 |
-
padding: 10px;
|
1371 |
-
overflow: hidden;
|
1372 |
-
position: relative;
|
1373 |
-
min-height: 68px;
|
1374 |
-
-webkit-border-radius: 4px;
|
1375 |
-
-khtml-border-radius: 4px;
|
1376 |
-
-moz-border-radius: 4px;
|
1377 |
border-radius: 4px;
|
1378 |
}
|
1379 |
-
|
1380 |
-
.
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
.
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
}
|
1398 |
-
|
1399 |
-
.
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
}
|
1404 |
-
|
1405 |
-
.gmedia-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
}
|
1411 |
-
|
1412 |
-
.gmedia-edit-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
.
|
1449 |
-
|
1450 |
-
}
|
1451 |
-
|
1452 |
-
.
|
1453 |
-
|
1454 |
-
}
|
1455 |
-
|
1456 |
-
.gmedia-edit-row fieldset .row span {
|
1457 |
-
display: inline-block;
|
1458 |
-
vertical-align: top;
|
1459 |
-
}
|
1460 |
-
|
1461 |
-
.gmedia-edit-row fieldset .row .label {
|
1462 |
-
width: 100px;
|
1463 |
-
text-align: right;
|
1464 |
-
color: #888888;
|
1465 |
-
padding-right: 10px;
|
1466 |
-
}
|
1467 |
-
|
1468 |
-
.gmedia-edit-row fieldset .row.va-b .label {
|
1469 |
-
padding-top: 5px;
|
1470 |
-
}
|
1471 |
-
|
1472 |
-
.gmedia-edit-row fieldset .row input,
|
1473 |
-
.gmedia-edit-row fieldset .row select,
|
1474 |
-
.gmedia-edit-row fieldset .row textarea {
|
1475 |
-
margin-left: -5px;
|
1476 |
-
width: 220px;
|
1477 |
-
vertical-align: top;
|
1478 |
-
}
|
1479 |
-
|
1480 |
-
.gmedia-edit-row fieldset .gmPreview.row input {
|
1481 |
-
width: 190px;
|
1482 |
-
}
|
1483 |
-
|
1484 |
-
.gmedia-edit-row fieldset .gmPreview .metabox-preview {
|
1485 |
-
display: inline-block;
|
1486 |
-
width: 25px;
|
1487 |
-
height: 23px;
|
1488 |
-
-moz-box-sizing: border-box;
|
1489 |
-
-webkit-box-sizing: border-box;
|
1490 |
-
-ms-box-sizing: border-box;
|
1491 |
-
box-sizing: border-box;
|
1492 |
-
overflow: hidden;
|
1493 |
-
line-height: 24px;
|
1494 |
-
text-align: center;
|
1495 |
-
text-indent: -100em;
|
1496 |
-
background: #fff url(../images/metabox.png) no-repeat 0px -223px;
|
1497 |
-
border: 1px solid #cccccc;
|
1498 |
-
border-radius: 3px;
|
1499 |
-
margin-top: 1px;
|
1500 |
-
}
|
1501 |
-
|
1502 |
-
.gmedia-edit-row fieldset .gmPreview .metabox-preview.active {
|
1503 |
-
background-color: #f9f9f9;
|
1504 |
-
width: 40px;
|
1505 |
-
}
|
1506 |
-
|
1507 |
-
.gmedia-edit-row fieldset .gmPreview .clear-preview {
|
1508 |
-
font-size: 18px;
|
1509 |
-
font-weight: bold;
|
1510 |
-
color: darkred;
|
1511 |
-
margin: 0px 0 0 -20px;
|
1512 |
-
display: inline-block;
|
1513 |
-
width: 20px;
|
1514 |
-
overflow: hidden;
|
1515 |
-
height: 24px;
|
1516 |
-
line-height: 24px;
|
1517 |
-
text-align: center;
|
1518 |
-
cursor: pointer;
|
1519 |
-
}
|
1520 |
-
|
1521 |
-
.gmedia-edit-row fieldset .gmDescription {
|
1522 |
-
position: absolute;
|
1523 |
-
left: 510px;
|
1524 |
-
top: 31px;
|
1525 |
-
right: 66px;
|
1526 |
-
bottom: 11px;
|
1527 |
-
}
|
1528 |
-
|
1529 |
-
.gmedia-edit-row fieldset .gmDescription .label {
|
1530 |
-
display: block;
|
1531 |
-
position: absolute;
|
1532 |
-
right: 0;
|
1533 |
-
top: -21px;
|
1534 |
-
color: #888888;
|
1535 |
-
}
|
1536 |
-
|
1537 |
-
.gmedia-edit-row fieldset .gmDescription textarea {
|
1538 |
-
width: 100%;
|
1539 |
-
height: 100%;
|
1540 |
-
resize: none;
|
1541 |
-
}
|
1542 |
-
|
1543 |
-
.gmedia-edit-row fieldset .buttons {
|
1544 |
-
position: absolute;
|
1545 |
-
right: 13px;
|
1546 |
-
bottom: 10px;
|
1547 |
-
}
|
1548 |
-
|
1549 |
-
.gmedia-edit-row fieldset .buttons input {
|
1550 |
-
display: block;
|
1551 |
-
width: 36px;
|
1552 |
-
height: 20px;
|
1553 |
-
padding: 0;
|
1554 |
-
margin: 10px 0 0 0;
|
1555 |
-
color: transparent;
|
1556 |
-
border: none;
|
1557 |
-
line-height: 0;
|
1558 |
-
overflow: hidden;
|
1559 |
-
cursor: pointer;
|
1560 |
-
text-indent: -999em;
|
1561 |
-
}
|
1562 |
-
|
1563 |
-
.gmedia-edit-row fieldset .save {
|
1564 |
-
background: url(../images/icon_save.png) 50% 50% no-repeat;
|
1565 |
-
}
|
1566 |
-
|
1567 |
-
.gmedia-edit-row fieldset .cancel {
|
1568 |
-
background: url(../images/icon_cancel.png) 50% 50% no-repeat;
|
1569 |
-
}
|
1570 |
-
|
1571 |
-
.gmedia-edit-row fieldset .set.gmName {
|
1572 |
-
display: block;
|
1573 |
-
width: 240px;
|
1574 |
-
margin-left: 78px;
|
1575 |
-
vertical-align: top;
|
1576 |
-
}
|
1577 |
-
|
1578 |
-
.gmedia-edit-row fieldset .set.gmName input,
|
1579 |
-
.gmedia-edit-row fieldset .set.gmName select {
|
1580 |
-
width: 100%;
|
1581 |
-
}
|
1582 |
-
|
1583 |
-
.gmedia-edit-row fieldset .set label {
|
1584 |
-
display: block;
|
1585 |
-
color: #888888;
|
1586 |
-
padding: 0 4px 3px;
|
1587 |
-
}
|
1588 |
-
|
1589 |
-
.gmedia-edit-row fieldset .set.gmDescription {
|
1590 |
-
left: 345px;
|
1591 |
-
top: 27px;
|
1592 |
-
}
|
1593 |
-
|
1594 |
-
.gmedia-edit-row fieldset .set.gmDescription label {
|
1595 |
-
position: absolute;
|
1596 |
-
left: 0;
|
1597 |
-
top: -17px;
|
1598 |
-
}
|
1599 |
-
|
1600 |
-
/** MetaBox */
|
1601 |
-
.gMedia-MetaBox {
|
1602 |
-
position: absolute;
|
1603 |
-
left: 510px;
|
1604 |
-
top: 2px;
|
1605 |
-
right: 66px;
|
1606 |
-
bottom: 11px;
|
1607 |
-
z-index: 10;
|
1608 |
display: none;
|
1609 |
}
|
1610 |
|
1611 |
-
.
|
1612 |
-
|
1613 |
-
padding: 0;
|
1614 |
-
font-size: 11px;
|
1615 |
-
line-height: 15px;
|
1616 |
-
text-decoration: none;
|
1617 |
-
}
|
1618 |
-
|
1619 |
-
.gMedia-control {
|
1620 |
-
position: absolute;
|
1621 |
-
width: 240px;
|
1622 |
-
right: 0;
|
1623 |
-
top: 0;
|
1624 |
-
padding: 0 6px;
|
1625 |
-
background: #a1a1a1 url(../images/metabox.png) repeat-x 0 -145px;
|
1626 |
-
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
|
1627 |
-
height: 28px;
|
1628 |
-
border-top: 1px solid rgba(250, 250, 250, 0.8);
|
1629 |
-
border-bottom: 1px solid rgba(24, 24, 24, 0.2);
|
1630 |
-
z-index: 5;
|
1631 |
-
overflow: hidden;
|
1632 |
-
}
|
1633 |
-
|
1634 |
-
.gMedia-control .gMedia-control-update {
|
1635 |
-
cursor: pointer;
|
1636 |
-
position: absolute;
|
1637 |
-
right: 3px;
|
1638 |
-
top: 4px;
|
1639 |
-
padding: 0 2px 0 3px;
|
1640 |
-
height: 17px;
|
1641 |
-
overflow: hidden;
|
1642 |
-
border: 1px solid transparent;
|
1643 |
-
border-radius: 3px;
|
1644 |
-
}
|
1645 |
-
|
1646 |
-
.gMedia-control .gMedia-control-update:hover {
|
1647 |
-
border-color: #c2c2c2;
|
1648 |
-
background-color: #eee;
|
1649 |
-
}
|
1650 |
-
|
1651 |
-
.gMedia-control-update span.gMedia-update-text {
|
1652 |
-
background: url(../images/metabox.png) no-repeat right -206px;
|
1653 |
-
line-height: 9px;
|
1654 |
-
padding: 4px 17px 6px 0;
|
1655 |
display: block;
|
1656 |
-
color: #7fb900;
|
1657 |
-
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
|
1658 |
-
text-transform: capitalize;
|
1659 |
-
font-size: 11px;
|
1660 |
-
font-weight: bold;
|
1661 |
-
}
|
1662 |
-
|
1663 |
-
.gMedia-control .gMedia-refine-field {
|
1664 |
-
margin: 1px 0 0 0;
|
1665 |
-
float: left;
|
1666 |
-
}
|
1667 |
-
|
1668 |
-
.gMedia-control .gMedia-refine-field input.gMedia-refine-input {
|
1669 |
-
width: 134px;
|
1670 |
-
font-size: 12px;
|
1671 |
-
}
|
1672 |
-
|
1673 |
-
.gMedia-images-wrap {
|
1674 |
-
background: #f9f9f9;
|
1675 |
-
box-shadow: 0 0 6px #999 inset;
|
1676 |
-
border-radius: 4px;
|
1677 |
-
overflow: hidden;
|
1678 |
-
overflow-y: scroll;
|
1679 |
-
position: absolute;
|
1680 |
-
left: 0;
|
1681 |
-
top: 30px;
|
1682 |
-
bottom: 0;
|
1683 |
-
right: 0;
|
1684 |
-
z-index: 1;
|
1685 |
-
}
|
1686 |
-
|
1687 |
-
.gMedia-images-wrap ul.gMedia-images-thumbnails {
|
1688 |
-
padding: 6px 0 0 6px;
|
1689 |
-
position: absolute;
|
1690 |
-
width: 100%;
|
1691 |
-
top: 0;
|
1692 |
-
left: 0;
|
1693 |
-
}
|
1694 |
-
|
1695 |
-
.gMedia-images-wrap ul.gMedia-images-thumbnails .gMedia-image-li {
|
1696 |
-
padding: 2px;
|
1697 |
-
cursor: pointer;
|
1698 |
-
width: 50px;
|
1699 |
-
height: 50px;
|
1700 |
-
float: left;
|
1701 |
-
margin: 0 6px 6px 0;
|
1702 |
-
border: 1px solid #bbb;
|
1703 |
-
position: relative;
|
1704 |
-
background: #fff;
|
1705 |
-
border-radius: 3px;
|
1706 |
-
box-shadow: 0 0 4px #CCC;
|
1707 |
-
transition-property: border-color;
|
1708 |
-
transition-duration: .33s;
|
1709 |
-
}
|
1710 |
-
|
1711 |
-
.gMedia-images-wrap ul.gMedia-images-thumbnails .gMedia-image-li:hover,
|
1712 |
-
.gMedia-images-wrap ul.gMedia-images-thumbnails .gMedia-image-li.active {
|
1713 |
-
border-color: #777;
|
1714 |
-
}
|
1715 |
-
.gMedia-images-wrap ul.gMedia-images-thumbnails .gMedia-image-li.active {
|
1716 |
-
background-color: yellowgreen;
|
1717 |
}
|
1718 |
|
1719 |
-
.
|
1720 |
-
|
1721 |
-
font-weight: bold;
|
1722 |
-
padding: 6px 0 10px;
|
1723 |
-
clear: both;
|
1724 |
float: none;
|
1725 |
}
|
1726 |
|
1727 |
-
|
1728 |
-
.
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
.plupload_wrapper .plupload_container {
|
1733 |
-
padding: 0;
|
1734 |
-
}
|
1735 |
-
|
1736 |
-
.plupload_header {
|
1737 |
-
display: none;
|
1738 |
-
}
|
1739 |
-
|
1740 |
-
.plupload_content .plupload_filelist_header,
|
1741 |
-
.plupload_content .plupload_filelist_footer {
|
1742 |
-
font-weight: bold;
|
1743 |
-
background-color: #cfcfcf;
|
1744 |
-
}
|
1745 |
-
|
1746 |
-
div#pluploadUploader .plupload_scroll .plupload_filelist {
|
1747 |
-
height: 250px;
|
1748 |
-
}
|
1749 |
-
|
1750 |
-
.plupload_filelist li {
|
1751 |
-
padding: 7px 8px;
|
1752 |
-
margin-bottom: 0;
|
1753 |
-
}
|
1754 |
-
|
1755 |
-
.plupload .plupload_filelist .plupload_file_name {
|
1756 |
-
width: auto;
|
1757 |
-
margin-right: 200px;
|
1758 |
-
}
|
1759 |
-
|
1760 |
-
.gmAddMedia div#pluploadUploader {
|
1761 |
-
margin-left: 258px;
|
1762 |
-
}
|
1763 |
-
a.plupload_disabled:focus { color: #737373; }
|
1764 |
-
|
1765 |
-
/** end plupload */
|
1766 |
-
|
1767 |
-
.gmAddMedia {
|
1768 |
-
position: relative;
|
1769 |
-
background-color: #ffffff;
|
1770 |
-
color: #000000;
|
1771 |
-
}
|
1772 |
-
|
1773 |
-
.gmAddMedia .optionsPanel {
|
1774 |
-
width: 240px;
|
1775 |
-
padding: 2px 5px;
|
1776 |
-
float: left;
|
1777 |
-
margin: 3px;
|
1778 |
-
border: 1px solid #ccc;
|
1779 |
-
min-height: 311px;
|
1780 |
-
}
|
1781 |
-
|
1782 |
-
.gmAddMedia .optionsPanel .info {
|
1783 |
-
border-bottom: 1px solid #ccc;
|
1784 |
-
font-size: 10px;
|
1785 |
-
font-weight: bold;
|
1786 |
-
margin-bottom: 10px;
|
1787 |
-
}
|
1788 |
-
|
1789 |
-
.gmAddMedia .optionsPanel .params {
|
1790 |
-
overflow: hidden;
|
1791 |
-
margin-bottom: 10px;
|
1792 |
-
}
|
1793 |
-
|
1794 |
-
.gmAddMedia .optionsPanel .params .tagsdiv .the-tags {
|
1795 |
-
margin-left: 0;
|
1796 |
-
width: 226px;
|
1797 |
-
}
|
1798 |
-
|
1799 |
-
.gmAddMedia .optionsPanel .params .categorydiv .the-category {
|
1800 |
-
margin-left: 0;
|
1801 |
-
width: 226px;
|
1802 |
-
}
|
1803 |
-
|
1804 |
-
.gmAddMedia .optionsPanel label {
|
1805 |
-
display: block;
|
1806 |
-
}
|
1807 |
-
|
1808 |
-
.gmAddMedia .optionsPanel .howto {
|
1809 |
-
font-size: 11px;
|
1810 |
-
margin-bottom: 5px;
|
1811 |
-
}
|
1812 |
-
|
1813 |
-
.gmAddMedia .optionsPanel .params .tagchecklist {
|
1814 |
-
min-height: 20px;
|
1815 |
-
}
|
1816 |
-
|
1817 |
-
.gmAddMedia .optionsPanel .params .tagchecklist span {
|
1818 |
-
margin-right: 20px;
|
1819 |
-
}
|
1820 |
-
|
1821 |
-
.gmAddMedia .optionsPanel .the-tagcloud {
|
1822 |
-
border: 1px solid #cccccc;
|
1823 |
-
border-radius: 5px;
|
1824 |
-
padding: 5px;
|
1825 |
-
margin: 5px 0;
|
1826 |
-
font-size: 11px;
|
1827 |
-
}
|
1828 |
-
|
1829 |
-
.gmAddMedia .optionsPanel .the-tagcloud span {
|
1830 |
-
border-radius: 3px;
|
1831 |
-
background: green;
|
1832 |
-
color: #fff;
|
1833 |
-
margin-right: 5px;
|
1834 |
-
padding: 1px 7px;
|
1835 |
-
white-space: nowrap;
|
1836 |
-
cursor: pointer;
|
1837 |
-
}
|
1838 |
-
|
1839 |
-
.gm_toggle_checklist {
|
1840 |
-
cursor: pointer;
|
1841 |
-
padding-left: 5px;
|
1842 |
-
font-size: 12px;
|
1843 |
-
font-weight: bold;
|
1844 |
-
-webkit-touch-callout: none;
|
1845 |
-
-webkit-user-select: none;
|
1846 |
-
-khtml-user-select: none;
|
1847 |
-
-moz-user-select: none;
|
1848 |
-
-ms-user-select: none;
|
1849 |
-
user-select: none;
|
1850 |
-
}
|
1851 |
-
.gm_checklist {
|
1852 |
-
max-height: 400px;
|
1853 |
-
overflow: auto;
|
1854 |
-
border-bottom: 1px solid #cccccc;
|
1855 |
-
border-top: 1px solid #cccccc;
|
1856 |
-
margin: 5px 0 20px;
|
1857 |
-
padding: 10px 0;
|
1858 |
-
position:relative;
|
1859 |
-
display: table;
|
1860 |
-
width: 100%;
|
1861 |
-
}
|
1862 |
-
.gm_checklist .row {
|
1863 |
-
padding: 3px 0;
|
1864 |
-
display: block;
|
1865 |
-
width: 100%;
|
1866 |
-
}
|
1867 |
-
.gm_checklist .row:hover {
|
1868 |
-
background-color: rgb(255, 255, 204);
|
1869 |
-
background-color: rgba(255, 255, 153, 0.3);
|
1870 |
-
}
|
1871 |
-
.gm_checklist .row label {
|
1872 |
-
display: table-cell;
|
1873 |
-
vertical-align: top;
|
1874 |
-
white-space: nowrap;
|
1875 |
-
padding-left: 5px;
|
1876 |
-
}
|
1877 |
-
.gm_checklist .row .descr {
|
1878 |
-
display: table-cell;
|
1879 |
-
font-size: 85%;
|
1880 |
-
padding-left: 20px;
|
1881 |
-
}
|
1882 |
-
|
1883 |
-
.gmediaModules {
|
1884 |
-
position: relative;
|
1885 |
-
background-color: #ffffff;
|
1886 |
-
color: #000000;
|
1887 |
-
padding: 5px 0;
|
1888 |
-
-moz-border-radius: 0 0 4px 4px;
|
1889 |
-
-webkit-border-bottom-left-radius: 4px;
|
1890 |
-
-webkit-border-bottom-right-radius: 4px;
|
1891 |
-
border-bottom-left-radius: 4px;
|
1892 |
-
border-bottom-right-radius: 4px;
|
1893 |
-
}
|
1894 |
-
|
1895 |
-
.gmediaModules h2 {
|
1896 |
-
padding: 10px 20px;
|
1897 |
-
margin: 0;
|
1898 |
-
}
|
1899 |
-
|
1900 |
-
.gmediaModules .added-modules {
|
1901 |
-
padding: 5px 0;
|
1902 |
-
}
|
1903 |
-
|
1904 |
-
.gmediaModules .module {
|
1905 |
-
position: relative;
|
1906 |
-
overflow: hidden;
|
1907 |
-
padding: 10px 20px;
|
1908 |
-
}
|
1909 |
-
|
1910 |
-
.gmediaModules .module:hover {
|
1911 |
-
background-color: #E4EFFA;
|
1912 |
-
}
|
1913 |
-
.gmediaModules .module.module_update,
|
1914 |
-
.gmediaModules .module.module_update:hover {
|
1915 |
-
background-color: antiquewhite;
|
1916 |
}
|
1917 |
|
1918 |
-
.
|
1919 |
float: left;
|
1920 |
-
margin-right:
|
1921 |
-
|
1922 |
-
|
1923 |
-
.gmediaModules .module .content {
|
1924 |
-
overflow: hidden;
|
1925 |
-
}
|
1926 |
-
|
1927 |
-
.gmediaModules .module .content h3 {
|
1928 |
-
margin: 0;
|
1929 |
-
padding: 5px 0px;
|
1930 |
-
}
|
1931 |
-
|
1932 |
-
.gmediaModules .module .content .version {
|
1933 |
-
font-size: 90%;
|
1934 |
-
}
|
1935 |
-
|
1936 |
-
.gmediaModules .module .content .description {
|
1937 |
-
padding: 7px 0;
|
1938 |
-
}
|
1939 |
-
|
1940 |
-
.gmediaSettings {
|
1941 |
-
position: relative;
|
1942 |
-
}
|
1943 |
-
|
1944 |
-
#gmAddTerms {
|
1945 |
-
overflow: hidden;
|
1946 |
}
|
1947 |
|
1948 |
-
|
1949 |
-
|
1950 |
-
border:
|
1951 |
-
|
1952 |
-
|
1953 |
-
background: #fff;
|
1954 |
-
-moz-border-radius: 4px;
|
1955 |
-
-webkit-border-radius: 4px;
|
1956 |
-
border-radius: 4px;
|
1957 |
-
}
|
1958 |
-
|
1959 |
-
#gmAddTerms fieldset legend {
|
1960 |
-
padding: 12px 10px 2px;
|
1961 |
-
font-weight: normal;
|
1962 |
-
font-size: 16px;
|
1963 |
-
position: relative;
|
1964 |
-
}
|
1965 |
-
|
1966 |
-
#gmAddTerms fieldset legend .howto {
|
1967 |
-
font-size: 11px;
|
1968 |
-
position: absolute;;
|
1969 |
-
display: block;
|
1970 |
-
left: 100%;
|
1971 |
-
bottom: 0;
|
1972 |
-
white-space: nowrap;
|
1973 |
-
}
|
1974 |
-
|
1975 |
-
#gmAddTerms fieldset .the-tags {
|
1976 |
-
width: 70%;
|
1977 |
-
height: 60px;
|
1978 |
-
vertical-align: bottom;
|
1979 |
-
background-color: #FFFFEF;
|
1980 |
-
}
|
1981 |
-
|
1982 |
-
.categoryform .set {
|
1983 |
-
display: inline-block;
|
1984 |
-
margin-right: 20px;
|
1985 |
-
vertical-align: top;
|
1986 |
-
}
|
1987 |
-
|
1988 |
-
.categoryform .liq {
|
1989 |
-
width: 40%;
|
1990 |
-
}
|
1991 |
-
|
1992 |
-
.categoryform label {
|
1993 |
-
color: #888888;
|
1994 |
-
display: block;
|
1995 |
-
padding-left: 4px;
|
1996 |
-
}
|
1997 |
-
|
1998 |
-
.categoryform .the-category {
|
1999 |
-
width: 240px;
|
2000 |
-
}
|
2001 |
-
|
2002 |
-
.categoryform .the-category-global {
|
2003 |
-
width: 248px;
|
2004 |
-
}
|
2005 |
-
|
2006 |
-
.categoryform .the-category-description {
|
2007 |
-
width: 100%;
|
2008 |
-
height: 75px;
|
2009 |
-
display: block;
|
2010 |
}
|
2011 |
|
2012 |
-
.
|
2013 |
-
|
|
|
2014 |
}
|
2015 |
|
2016 |
-
.
|
2017 |
-
|
|
|
|
|
|
|
2018 |
}
|
2019 |
|
2020 |
-
.
|
2021 |
-
|
|
|
|
|
2022 |
}
|
2023 |
|
2024 |
-
.
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
.spacer {
|
2031 |
-
margin: 0;
|
2032 |
-
padding: 0;
|
2033 |
-
height: 10px;
|
2034 |
-
border: none;
|
2035 |
-
background: transparent none;
|
2036 |
}
|
2037 |
|
2038 |
-
.
|
2039 |
-
|
|
|
2040 |
}
|
2041 |
|
2042 |
-
.
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
visibility: hidden;
|
2048 |
}
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
1 |
+
html { background:#708090; }
|
2 |
+
#adminmenu #toplevel_page_GrandMedia ul.wp-submenu { display:none; }
|
3 |
+
#wpfooter { color:#ffffff; }
|
4 |
+
#wpfooter a { color:lightblue; }
|
5 |
+
#TB_caption { height:auto; }
|
6 |
+
a { color:#0074a2; }
|
7 |
+
input[type="checkbox"] { margin-top:2px; margin-right:2px }
|
8 |
+
form {margin:0;}
|
9 |
+
body.gmedia-busy { cursor:wait !important; }
|
10 |
+
iframe, iframe html { background-color:#ffffff; }
|
11 |
+
body.gmedia-blank { background-color:#ffffff; height:auto; min-height:100%; padding:0 0 1px; box-sizing: border-box; }
|
12 |
+
body.gmedia-blank pre { margin:0;padding:0; border:none; }
|
13 |
+
.gmedia-body div#gm-message {
|
14 |
+
position:absolute;
|
15 |
+
right:5px; top:5px;
|
16 |
+
overflow:visible;
|
17 |
+
z-index:200;
|
18 |
+
}
|
19 |
+
.gmedia-body div#gm-message .gm-message {
|
20 |
+
text-align:right;
|
21 |
+
}
|
22 |
+
|
23 |
+
|
24 |
+
div#gmedia-container {
|
25 |
+
font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;
|
26 |
+
margin:30px 5px 10px 0;
|
27 |
+
position:relative;
|
28 |
+
z-index:1;
|
29 |
+
direction:ltr;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
}
|
31 |
+
div#gmedia-header {
|
32 |
+
position:relative;
|
33 |
+
padding:1px 1px 10px 1px;
|
34 |
}
|
35 |
+
/*noinspection CssInvalidElement*/
|
36 |
+
div#gmedia-logo {
|
37 |
+
position:relative;
|
38 |
+
margin:0 30px 0 15px;
|
39 |
+
font-size:48px;
|
40 |
+
text-shadow:1px 1px 4px #000000;
|
41 |
+
font-family:Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
|
42 |
+
color:#ffffff;
|
43 |
+
float:left;
|
44 |
+
-webkit-text-stroke-width:0.7px;
|
45 |
+
-webkit-text-stroke-color:#ffffff;
|
46 |
+
-webkit-font-smoothing:antialiased;
|
47 |
+
-webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none;
|
48 |
+
cursor:default;
|
49 |
+
}
|
50 |
+
div#gmedia-logo small {
|
51 |
+
display:block;
|
52 |
+
font-size:10px;
|
53 |
+
margin-top:7px;
|
54 |
+
text-align:right;
|
55 |
+
-webkit-text-stroke-width:0;
|
56 |
+
}
|
57 |
+
div#gmedia-header h2 {
|
58 |
+
margin:0;
|
59 |
+
font:italic 24px/35px Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
|
60 |
+
color:#ffffff;
|
61 |
+
}
|
62 |
+
|
63 |
+
div#gmedia-navbar { font-size:14px; }
|
64 |
+
|
65 |
+
form.gmedia-search-form {
|
66 |
+
float:right;
|
67 |
+
margin-left:10px;
|
68 |
+
margin-bottom:4px;
|
69 |
+
white-space:nowrap;
|
70 |
+
}
|
71 |
+
form.gmedia-search-form .form-group { margin:0; display:inline-block; }
|
72 |
+
|
73 |
+
.gmedia-pager { margin-bottom:4px; }
|
74 |
+
form#gmedia-pager { float:left; width:150px; }
|
75 |
+
input.pager_current_page {
|
76 |
+
padding-left:0;
|
77 |
+
padding-right:0;
|
78 |
+
text-align:center;
|
79 |
+
}
|
80 |
+
|
81 |
+
.txt-lg { font-size:120%; line-height:50%; }
|
82 |
+
|
83 |
+
.btn > input[type="checkbox"] { margin-top:0; width:16px; height:16px; }
|
84 |
+
|
85 |
+
.gm-checkgroup { margin-right:20px; }
|
86 |
+
|
87 |
+
.gm-backfade { background-color:rgba(0, 0, 0, 0.1); }
|
88 |
+
|
89 |
+
div#gm-list-table { font-size:13px; }
|
90 |
+
.list-group-item.row { position:relative; margin-left:0; margin-right:0; padding-left:0; padding-right:0; }
|
91 |
+
.list-group-item.d-row { position:relative; }
|
92 |
+
div.list-group-item.d-row:hover { background-color:#fafafa; }
|
93 |
+
form.list-group-item.d-row:hover { background-color:#fcfcfc; }
|
94 |
+
.list-group-item.d-row.active { background-color:rgb(250, 255, 245); box-shadow:inset -1px 0 0 2px rgb(250, 255, 245), inset 7px 0 0 0 #1e8cbe; }
|
95 |
+
.list-group-item.d-row.active:hover { background-color:rgb(245, 255, 240); box-shadow:inset -1px 0 0 2px rgb(245, 255, 240), inset 7px 0 0 0 #1e8cbe; }
|
96 |
+
|
97 |
+
label.cb_media-object { margin-right:15px; float:left; width:310px; max-width: 100%; }
|
98 |
+
.d-row .thumbnail { margin-bottom:0; }
|
99 |
+
.active .thumbnail { border-color:#428bca; }
|
100 |
+
.thumbnail { position:relative; display:inline-block; max-width:100%; }
|
101 |
+
.thumbnail .gmedia-typethumb { position:absolute; right:5px; bottom:7px; height:75px; max-height:60%; width:auto; }
|
102 |
+
|
103 |
+
.media-title { font-weight:bold; }
|
104 |
+
.media-meta { width:100%; overflow:hidden; text-overflow:ellipsis; /*white-space:nowrap;*/ }
|
105 |
+
.media-meta .label-default { background-color:#eeeeee; color:#444444; }
|
106 |
+
|
107 |
+
.gmedia_id, .term_id { position:absolute; right:10px; top:10px; display:none; }
|
108 |
+
.term_id { position:absolute; right:0; top:0; padding: 10px 10px 0 0px; background-color:#fff; display:none; height:100%; box-shadow: -10px 0 5px -2px #fff; z-index:100; }
|
109 |
+
#gm-list-table .list-group-item:hover .gmedia_id,
|
110 |
+
#gm-list-table .list-group-item:hover .term_id { display:block; }
|
111 |
+
|
112 |
+
#gm-list-table .hidden { display:none !important; visibility:hidden !important; }
|
113 |
+
|
114 |
+
form#adv-settings .form-inline .form-group { margin-right:20px; }
|
115 |
+
|
116 |
+
form.changed { }
|
117 |
+
form.changed.saved { }
|
118 |
+
form.changed .gm-last-edited { text-decoration:line-through; }
|
119 |
+
|
120 |
+
.rel-selected-hide { display:none; }
|
121 |
+
|
122 |
+
div#pluploadUploader { padding:0; }
|
123 |
+
div#pluploadUploader * { box-sizing:content-box; }
|
124 |
+
.plupload_container { padding:0; }
|
125 |
+
div#pluploadUploader_container { border-bottom-right-radius: 4px; }
|
126 |
+
div#pluploadUploader_container .plupload_filelist_footer { border-bottom-right-radius: 4px; }
|
127 |
+
div.panel-body, div#gmedia-msg-panel { -webkit-transition:all .2s ease-in-out; transition:all .2s ease-in-out; }
|
128 |
+
div.panel-body:empty, div#gmedia-msg-panel:empty { padding:0; }
|
129 |
+
div#gmedia-msg-panel .alert { padding:2px 35px 2px 12px; margin-bottom:5px; }
|
130 |
+
.plupload_content li { margin-bottom:0; }
|
131 |
+
.progress { position:relative; white-space:nowrap; font-size:12px; line-height:20px; }
|
132 |
+
.progress-bar { position:absolute; overflow:hidden; }
|
133 |
+
|
134 |
+
.tab-inside { padding: 10px; position:relative; }
|
135 |
+
.tab-footer { border-top: 1px solid #ddd; padding:20px 10px 0; }
|
136 |
+
|
137 |
+
.selectize-control.input-sm .selectize-input { min-height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.9; border-radius: 3px; }
|
138 |
+
.selectize-control.input-sm .selectize-input input { font-size: 12px; }
|
139 |
+
.selectize-control.input-sm .selectize-input:after { right: 10px; }
|
140 |
+
|
141 |
+
.term-list-item {padding-top:0; padding-bottom:0;}
|
142 |
+
.term-list-item .checkbox input {margin-top:0; margin-right:15px;}
|
143 |
+
.term-list-item .term-description {padding:1px 0 4px; white-space:nowrap; overflow:hidden;}
|
144 |
+
.term-list-item .term-description:empty {padding:0;}
|
145 |
+
.term-list-item .term-images {padding-top:5px; padding-bottom:2px; overflow:hidden; white-space:nowrap;}
|
146 |
+
.term-list-item .term-images img {position:relative; height:30px; width:auto; background-color:#ffffff;}
|
147 |
+
.term-list-item .term-images img:hover {z-index:100 !important;}
|
148 |
|
149 |
+
.edit_tag_form {display:inline-block; margin-left:-5px;}
|
150 |
+
.edit_tag_form input.edit_tag_input {padding:0 5px;border-width:0 0 1px 0;margin:0;}
|
151 |
+
a.edit_tag_save.btn {padding-top:0;padding-bottom:0;}
|
152 |
+
a.edit_tag_save.btn-link:hover {text-decoration:none;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
+
.gm-img-thumbnail {
|
155 |
display: inline-block;
|
156 |
+
float:left;
|
157 |
+
position:relative;
|
158 |
+
margin-right:5px;
|
159 |
+
margin-bottom:5px;
|
160 |
+
max-width: 100%;
|
161 |
+
height: auto;
|
162 |
+
padding: 4px;
|
163 |
+
line-height: 1.428571429;
|
164 |
+
background-color: #fff;
|
165 |
+
border: 1px solid #ddd;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
border-radius: 4px;
|
167 |
}
|
168 |
+
.gm-img-thumbnail input {display:block; position:absolute; right:-1px; top:-1px; width:42px; padding:0 2px; text-align:center; border-radius: 4px; opacity:0.9;}
|
169 |
+
.gm-img-thumbnail input:focus {opacity:1;}
|
170 |
+
.gm-img-thumbnail .label {position:absolute;left:0;bottom:0;font-weight:normal;pointer-events:none;}
|
171 |
+
.ui-highlight-placeholder {
|
172 |
+
border: 1px solid #0074a2;
|
173 |
+
}
|
174 |
+
.termItems { position:relative; }
|
175 |
+
|
176 |
+
.choose-module {padding:10px;cursor:pointer;}
|
177 |
+
.choose-module:hover {background-color:#d0e9c6;}
|
178 |
+
.choose-module .thumbnail {margin-bottom:0;}
|
179 |
+
|
180 |
+
|
181 |
+
body#media-upload { height:100%; overflow:auto; margin:0; padding:0 }
|
182 |
+
body#media-upload .panel {position:relative; height:100%; overflow:auto; margin:0; border-top-left-radius: 0; border-top-right-radius: 0; border-top:none;}
|
183 |
+
body#media-upload .panel-heaading {position:relative; z-index:100;}
|
184 |
+
body#media-upload .panel-body {position:absolute; top:55px; bottom:0; width:100%; overflow:hidden; z-index:50; padding-top:0; padding-bottom:0;}
|
185 |
+
body#media-upload .panel-body .row {height:100%;}
|
186 |
+
body#media-upload .panel-body .row > div {height:100%; overflow:auto; padding-top:15px; padding-bottom:15px;}
|
187 |
+
body#media-upload .media-upload-sidebar {border-left:1px solid #cccccc; background-color:#eeeeee; padding-bottom:55px;position:relative;}
|
188 |
+
body#media-upload .media-upload-sidebar .panel-footer {position:absolute; left:0; bottom:0; right:0;}
|
189 |
+
body#media-upload .thumbnail {margin:0 5px 5px 0; position:relative; display:inline-block;}
|
190 |
+
body#media-upload .thumbnail.active {background-color:lightblue;border-color:cadetblue;}
|
191 |
+
body#media-upload .thumbnail .glyphicon {display:none; position:absolute; right:-3px; top:-7px; font-size:30px;}
|
192 |
+
body#media-upload .thumbnail.active .glyphicon {display:inline-block;}
|
193 |
+
|
194 |
+
body.gmedia-blank.image_editor { height:100%; overflow:auto; margin:0; padding:0 }
|
195 |
+
body.gmedia-blank.image_editor .panel {position:relative; height:100%; overflow:auto; margin:0;}
|
196 |
+
body.gmedia-blank .panel-heaading {position:relative; z-index:100;}
|
197 |
+
body.gmedia-blank.image_editor .panel-body {position:absolute; top:55px; bottom:0; width:100%; overflow:hidden; z-index:50; padding-top:0; padding-bottom:0;}
|
198 |
+
body.gmedia-blank.image_editor .panel-body .row {height:100%;}
|
199 |
+
body.gmedia-blank.image_editor .panel-body .row > div {height:100%; overflow:auto; padding-top:15px; padding-bottom:15px;}
|
200 |
+
body.gmedia-blank .media-edit-sidebar {border-left:1px solid #cccccc; background-color:#eeeeee; padding:0 0 55px 0 !important; position:relative;}
|
201 |
+
body.gmedia-blank #media-edit-form-container { height:100%; overflow:auto; padding:15px;}
|
202 |
+
body.gmedia-blank .media-edit-sidebar .panel-footer {position:absolute; left:0; bottom:0; right:0;}
|
203 |
+
|
204 |
+
#gallery_preview_ {width:200%; height:800px; margin-bottom:-400px; overflow:auto;
|
205 |
+
-moz-transform: scale(0.5, 0.5);
|
206 |
+
-webkit-transform: scale(0.5, 0.5);
|
207 |
+
-o-transform: scale(0.5, 0.5);
|
208 |
+
-ms-transform: scale(0.5, 0.5);
|
209 |
+
transform: scale(0.5, 0.5);
|
210 |
+
-moz-transform-origin: top left;
|
211 |
+
-webkit-transform-origin: top left;
|
212 |
+
-o-transform-origin: top left;
|
213 |
+
-ms-transform-origin: top left;
|
214 |
+
transform-origin: top left;
|
215 |
+
border: solid #ccc 2px;
|
216 |
+
}
|
217 |
+
#gallery_preview {width:100%; height:600px; border: solid #ccc 1px; overflow:auto;}
|
218 |
+
|
219 |
+
@media (min-width:782px) {
|
220 |
+
div.modal { top:32px; }
|
221 |
+
|
222 |
+
div#termsModal .modal-dialog {
|
223 |
+
width:350px;
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
@media screen and (max-width:782px) {
|
228 |
+
div#wpwrap { background:#708090; }
|
229 |
+
div#wpbody select.input-sm {height: 30px;font-size:12px;}
|
230 |
+
#adminmenu #toplevel_page_GrandMedia ul.wp-submenu { display:block; }
|
231 |
+
}
|
232 |
+
|
233 |
+
|
234 |
+
/* custom inclusion of right, left tabs */
|
235 |
+
|
236 |
+
.tabs-right > .nav-tabs,
|
237 |
+
.tabs-left > .nav-tabs {
|
238 |
+
border-bottom: 0;
|
239 |
+
}
|
240 |
+
|
241 |
+
.tab-content > .tab-pane,
|
242 |
+
.pill-content > .pill-pane {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
display: none;
|
244 |
}
|
245 |
|
246 |
+
.tab-content > .active,
|
247 |
+
.pill-content > .active {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
display: block;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
}
|
250 |
|
251 |
+
.tabs-left > .nav-tabs > li,
|
252 |
+
.tabs-right > .nav-tabs > li {
|
|
|
|
|
|
|
253 |
float: none;
|
254 |
}
|
255 |
|
256 |
+
.tabs-left > .nav-tabs > li > a,
|
257 |
+
.tabs-right > .nav-tabs > li > a {
|
258 |
+
min-width: 74px;
|
259 |
+
margin-right: 0;
|
260 |
+
margin-bottom: 3px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
}
|
262 |
|
263 |
+
.tabs-left > .nav-tabs {
|
264 |
float: left;
|
265 |
+
margin-right: 19px;
|
266 |
+
border-right: 1px solid #ddd;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
}
|
268 |
|
269 |
+
.tabs-left > .nav-tabs > li > a {
|
270 |
+
margin-right: -1px;
|
271 |
+
-webkit-border-radius: 4px 0 0 4px;
|
272 |
+
-moz-border-radius: 4px 0 0 4px;
|
273 |
+
border-radius: 4px 0 0 4px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
}
|
275 |
|
276 |
+
.tabs-left > .nav-tabs > li > a:hover,
|
277 |
+
.tabs-left > .nav-tabs > li > a:focus {
|
278 |
+
border-color: #eeeeee #dddddd #eeeeee #eeeeee;
|
279 |
}
|
280 |
|
281 |
+
.tabs-left > .nav-tabs .active > a,
|
282 |
+
.tabs-left > .nav-tabs .active > a:hover,
|
283 |
+
.tabs-left > .nav-tabs .active > a:focus {
|
284 |
+
border-color: #ddd transparent #ddd #ddd;
|
285 |
+
*border-right-color: #ffffff;
|
286 |
}
|
287 |
|
288 |
+
.tabs-right > .nav-tabs {
|
289 |
+
float: right;
|
290 |
+
margin-left: 19px;
|
291 |
+
border-left: 1px solid #ddd;
|
292 |
}
|
293 |
|
294 |
+
.tabs-right > .nav-tabs > li > a {
|
295 |
+
margin-left: -1px;
|
296 |
+
-webkit-border-radius: 0 4px 4px 0;
|
297 |
+
-moz-border-radius: 0 4px 4px 0;
|
298 |
+
border-radius: 0 4px 4px 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
}
|
300 |
|
301 |
+
.tabs-right > .nav-tabs > li > a:hover,
|
302 |
+
.tabs-right > .nav-tabs > li > a:focus {
|
303 |
+
border-color: #eeeeee #eeeeee #eeeeee #dddddd;
|
304 |
}
|
305 |
|
306 |
+
.tabs-right > .nav-tabs .active > a,
|
307 |
+
.tabs-right > .nav-tabs .active > a:hover,
|
308 |
+
.tabs-right > .nav-tabs .active > a:focus {
|
309 |
+
border-color: #ddd #ddd #ddd transparent;
|
310 |
+
*border-left-color: #ffffff;
|
|
|
311 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/css/jquery-ui-tabs.css
DELETED
@@ -1,325 +0,0 @@
|
|
1 |
-
/* --------------------------------------------------
|
2 |
-
:: OptionTree Wrappers
|
3 |
-
---------------------------------------------------*/
|
4 |
-
.gm-metabox-wrapper .postbox .inside {
|
5 |
-
font-size: 13px;
|
6 |
-
line-height: 1.3em;
|
7 |
-
}
|
8 |
-
|
9 |
-
div.gm-metabox-wrapper {
|
10 |
-
color: #333;
|
11 |
-
}
|
12 |
-
|
13 |
-
.gm-metabox-wrapper .metabox-holder {
|
14 |
-
overflow: hidden;
|
15 |
-
}
|
16 |
-
|
17 |
-
.gm-metabox-wrapper .postbox {
|
18 |
-
background: #fff;
|
19 |
-
border: none;
|
20 |
-
margin: 0 20px;
|
21 |
-
padding: 0 0 10px;
|
22 |
-
}
|
23 |
-
|
24 |
-
.gm-metabox-wrapper .inside {
|
25 |
-
margin: 0px !important;
|
26 |
-
padding: 0px !important;
|
27 |
-
}
|
28 |
-
|
29 |
-
.gm-metabox-wrapper .ui-tabs {
|
30 |
-
background: #fff url(../images/ot-menu-bg.png) repeat-y 0 0;
|
31 |
-
border: 1px solid #ccc;
|
32 |
-
border-top: none;
|
33 |
-
margin: 0px;
|
34 |
-
min-width: 533px;
|
35 |
-
padding-bottom: 5px;
|
36 |
-
position: relative;
|
37 |
-
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
38 |
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
39 |
-
-webkit-border-bottom-right-radius: 3px;
|
40 |
-
-webkit-border-bottom-left-radius: 4px;
|
41 |
-
-moz-border-radius-bottomright: 4px;
|
42 |
-
-moz-border-radius-bottomleft: 4px;
|
43 |
-
border-bottom-right-radius: 4px;
|
44 |
-
border-bottom-left-radius: 4px;
|
45 |
-
}
|
46 |
-
|
47 |
-
/* --------------------------------------------------
|
48 |
-
:: Tabs
|
49 |
-
---------------------------------------------------*/
|
50 |
-
.gm-metabox-wrapper .ui-tabs-nav {
|
51 |
-
background: url(../images/ot-menu-top-bg.png) no-repeat right top;
|
52 |
-
float: left;
|
53 |
-
list-style: none;
|
54 |
-
margin: 0 0 0 -4px;
|
55 |
-
padding: 1em 0;
|
56 |
-
width: 151px;
|
57 |
-
}
|
58 |
-
|
59 |
-
.gm-metabox-wrapper .ui-tabs-nav li {
|
60 |
-
border: 1px solid transparent;
|
61 |
-
border-right-width: 0px;
|
62 |
-
display: block;
|
63 |
-
border-top-color: white;
|
64 |
-
border-bottom-color: #ddd;
|
65 |
-
margin: 0 1px 0 4px;
|
66 |
-
}
|
67 |
-
|
68 |
-
.gm-metabox-wrapper .ui-tabs-nav li.ui-state-active {
|
69 |
-
background: #fff;
|
70 |
-
border-color: #ccc;
|
71 |
-
color: #000;
|
72 |
-
margin-left: 0;
|
73 |
-
margin-top: -1px;
|
74 |
-
border-top: 1px solid #ddd !important;
|
75 |
-
}
|
76 |
-
|
77 |
-
.gm-metabox-wrapper .ui-tabs-nav li:first-child {
|
78 |
-
border-top: 0px !important;
|
79 |
-
}
|
80 |
-
|
81 |
-
.gm-metabox-wrapper .ui-tabs-nav li:hover {
|
82 |
-
background: white;
|
83 |
-
}
|
84 |
-
|
85 |
-
.gm-metabox-wrapper .ui-tabs-nav li a {
|
86 |
-
color: #21759b;
|
87 |
-
display: block;
|
88 |
-
line-height: 18px;
|
89 |
-
padding: 5px 5px 5px 12px;
|
90 |
-
text-decoration: none;
|
91 |
-
}
|
92 |
-
|
93 |
-
.gm-metabox-wrapper .ui-tabs-nav li.button_holder {
|
94 |
-
border-bottom: none;
|
95 |
-
}
|
96 |
-
|
97 |
-
.gm-metabox-wrapper .ui-tabs-nav li.button_holder:hover {
|
98 |
-
background: none transparent;
|
99 |
-
}
|
100 |
-
|
101 |
-
.gm-metabox-wrapper .ui-tabs-nav li.button_holder:last-child {
|
102 |
-
border-top: none;
|
103 |
-
}
|
104 |
-
|
105 |
-
.gm-metabox-wrapper .ui-tabs-nav li.button_holder span {
|
106 |
-
display: block;
|
107 |
-
line-height: 18px;
|
108 |
-
padding: 20px 0 0;
|
109 |
-
text-align: center;
|
110 |
-
}
|
111 |
-
|
112 |
-
.gm-metabox-wrapper .ui-tabs-nav li.button_holder:last-child span {
|
113 |
-
padding-top: 10px;
|
114 |
-
}
|
115 |
-
|
116 |
-
.gm-metabox-wrapper .ui-tabs-nav li.button_holder input {
|
117 |
-
margin: 0 auto;
|
118 |
-
}
|
119 |
-
|
120 |
-
.gm-metabox-wrapper .ui-tabs-nav li a:hover,
|
121 |
-
.gm-metabox-wrapper .ui-tabs-nav li.ui-state-active a {
|
122 |
-
color: #000;
|
123 |
-
}
|
124 |
-
|
125 |
-
.gm-metabox-wrapper .ui-tabs-panel {
|
126 |
-
clear: both;
|
127 |
-
}
|
128 |
-
|
129 |
-
/* --------------------------------------------------
|
130 |
-
:: Format Settings
|
131 |
-
---------------------------------------------------*/
|
132 |
-
.format-settings {
|
133 |
-
border-bottom: 1px dashed #ddd;
|
134 |
-
padding: 7px;
|
135 |
-
position: relative;
|
136 |
-
}
|
137 |
-
|
138 |
-
.format-settings.block-hidden {
|
139 |
-
display: none;
|
140 |
-
}
|
141 |
-
.format-settings.block-success {
|
142 |
-
background-color: rgba(0,255,0,0.1);
|
143 |
-
}
|
144 |
-
.format-settings.block-error {
|
145 |
-
background-color: rgba(255,0,0,0.1);
|
146 |
-
}
|
147 |
-
|
148 |
-
/* --------------------------------------------------
|
149 |
-
:: Format Setting Label
|
150 |
-
---------------------------------------------------*/
|
151 |
-
.format-setting-label {
|
152 |
-
margin: 0 0 2px 0;
|
153 |
-
padding: 1px 0px 1px 0px;
|
154 |
-
width: 100%;
|
155 |
-
display: block;
|
156 |
-
}
|
157 |
-
|
158 |
-
.gm-metabox-wrapper .description h3,
|
159 |
-
.metabox-holder .format-setting-label .label,
|
160 |
-
.metabox-holder label.format-setting-label {
|
161 |
-
background: none;
|
162 |
-
border: none;
|
163 |
-
color: #333;
|
164 |
-
cursor: text;
|
165 |
-
font-family: sans-serif !important;
|
166 |
-
font-size: 13px !important;
|
167 |
-
font-weight: bold !important;
|
168 |
-
letter-spacing: 0;
|
169 |
-
padding: 4px 0 0 !important;
|
170 |
-
-webkit-user-select: text;
|
171 |
-
text-shadow: none;
|
172 |
-
}
|
173 |
-
|
174 |
-
/* --------------------------------------------------
|
175 |
-
:: Format Setting
|
176 |
-
---------------------------------------------------*/
|
177 |
-
.format-setting {
|
178 |
-
overflow: hidden;
|
179 |
-
position: relative;
|
180 |
-
width: 100%;
|
181 |
-
white-space: nowrap;
|
182 |
-
}
|
183 |
-
|
184 |
-
.format-setting .format-setting-inner {
|
185 |
-
display: inline-block;
|
186 |
-
vertical-align: top;
|
187 |
-
padding-right: 30px;
|
188 |
-
width: 30%;
|
189 |
-
-moz-box-sizing: border-box;
|
190 |
-
-webkit-box-sizing: border-box;
|
191 |
-
-ms-box-sizing: border-box;
|
192 |
-
box-sizing: border-box;
|
193 |
-
}
|
194 |
-
|
195 |
-
.format-setting.fill-area {
|
196 |
-
white-space: normal;
|
197 |
-
}
|
198 |
-
|
199 |
-
.format-setting.fill-area .format-setting-inner {
|
200 |
-
width: 100%;
|
201 |
-
padding: 0;
|
202 |
-
}
|
203 |
-
|
204 |
-
.format-setting .description {
|
205 |
-
display: inline-block;
|
206 |
-
vertical-align: top;
|
207 |
-
padding-top: 3px;
|
208 |
-
white-space: normal;
|
209 |
-
width: 70%;
|
210 |
-
}
|
211 |
-
|
212 |
-
.format-setting .button {
|
213 |
-
display: inline-block;
|
214 |
-
}
|
215 |
-
|
216 |
-
.format-setting.wide-desc .description {
|
217 |
-
width: 100%;
|
218 |
-
display: block;
|
219 |
-
padding-top: 10px;
|
220 |
-
}
|
221 |
-
|
222 |
-
.list-item-description {
|
223 |
-
padding-top: 10px;
|
224 |
-
}
|
225 |
-
|
226 |
-
.gm-metabox-wrapper h4 {
|
227 |
-
color: #333;
|
228 |
-
font-size: 1.12em;
|
229 |
-
font-weight: bold;
|
230 |
-
margin: 1em 0 0.5em 0;
|
231 |
-
padding: 0;
|
232 |
-
}
|
233 |
-
|
234 |
-
.gm-metabox-wrapper h5 {
|
235 |
-
color: #444;
|
236 |
-
font-size: 1em;
|
237 |
-
font-weight: bold;
|
238 |
-
margin: 1em 0 0.5em 0;
|
239 |
-
padding: 0;
|
240 |
-
}
|
241 |
-
|
242 |
-
.gm-metabox-wrapper p {
|
243 |
-
margin: 0 !important;
|
244 |
-
padding: 2px 0;
|
245 |
-
}
|
246 |
-
|
247 |
-
.warning {
|
248 |
-
color: #b94029;
|
249 |
-
}
|
250 |
-
|
251 |
-
.gm-metabox-wrapper blockquote {
|
252 |
-
font-style: italic;
|
253 |
-
padding-left: 15px;
|
254 |
-
position: relative;
|
255 |
-
}
|
256 |
-
|
257 |
-
.gm-metabox-wrapper blockquote:before {
|
258 |
-
color: #ccc;
|
259 |
-
content: "\201C";
|
260 |
-
display: block;
|
261 |
-
font-size: 400%;
|
262 |
-
font-style: normal;
|
263 |
-
left: -10px;
|
264 |
-
position: absolute;
|
265 |
-
top: 10px;
|
266 |
-
}
|
267 |
-
|
268 |
-
.type-textblock.titled {
|
269 |
-
font-size: 16px;
|
270 |
-
line-height: 1.5em;
|
271 |
-
}
|
272 |
-
|
273 |
-
.gmedia-ui-checkbox + label {
|
274 |
-
margin-left: 10px;
|
275 |
-
}
|
276 |
-
|
277 |
-
.admin_page_GrandMedia_Modules .postbox input,
|
278 |
-
.admin_page_GrandMedia_Modules .postbox textarea {
|
279 |
-
background: -moz-linear-gradient(center top, #FFFFFF, #EEEEEE 1px, #FFFFFF 25px) repeat scroll 0 0 transparent;
|
280 |
-
background: -webkit-gradient(linear, center top, center bottom, from(#EEE), to(#FFF)) repeat scroll 0 0 transparent;
|
281 |
-
font: 12px/100% Arial, Tahoma, sans-serif;
|
282 |
-
outline: 0 none;
|
283 |
-
}
|
284 |
-
|
285 |
-
.admin_page_GrandMedia_Modules .postbox input:focus,
|
286 |
-
.admin_page_GrandMedia_Modules .postbox textarea:focus {
|
287 |
-
border: 1px solid #64bff4 !important;
|
288 |
-
box-shadow: 0 0 4px #b9e5ff;
|
289 |
-
background: -moz-linear-gradient(center top, #FFFFFF, #f0f8fc 1px, #FFFFFF 25px) repeat scroll 0 0 transparent;
|
290 |
-
background: -webkit-gradient(linear, center top, center bottom, from(#f0f8fc), to(#FFF)) repeat scroll 0 0 transparent;
|
291 |
-
}
|
292 |
-
|
293 |
-
.gm-metabox-wrapper textarea,
|
294 |
-
.gm-metabox-wrapper input[type="text"],
|
295 |
-
.gm-metabox-wrapper input[type="password"],
|
296 |
-
.gm-metabox-wrapper input[type="file"],
|
297 |
-
.gm-metabox-wrapper input[type="email"],
|
298 |
-
.gm-metabox-wrapper input[type="number"],
|
299 |
-
.gm-metabox-wrapper input[type="search"],
|
300 |
-
.gm-metabox-wrapper input[type="tel"],
|
301 |
-
.gm-metabox-wrapper input[type="url"],
|
302 |
-
.gm-metabox-wrapper select {
|
303 |
-
width: 100%;
|
304 |
-
}
|
305 |
-
|
306 |
-
.gmedia-ui-button {
|
307 |
-
height: 28px;
|
308 |
-
line-height: 27px;
|
309 |
-
margin: 5px;
|
310 |
-
padding: 3px 14px;
|
311 |
-
}
|
312 |
-
|
313 |
-
.admin_page_GrandMedia_Modules .wrap h2, .subtitle {
|
314 |
-
font-weight: bold;
|
315 |
-
color: white;
|
316 |
-
text-shadow: 1px 1px 0px #111;
|
317 |
-
}
|
318 |
-
|
319 |
-
.admin_page_GrandMedia_Modules #akismet-warning {
|
320 |
-
display: none;
|
321 |
-
}
|
322 |
-
|
323 |
-
options .updated {
|
324 |
-
display: none;
|
325 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/css/jquery.fancybox.css
DELETED
@@ -1,443 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* FancyBox - jQuery Plugin
|
3 |
-
* Simple and fancy lightbox alternative
|
4 |
-
*
|
5 |
-
* Examples and documentation at: http://fancybox.net
|
6 |
-
*
|
7 |
-
* Copyright (c) 2008 - 2010 Janis Skarnelis
|
8 |
-
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
|
9 |
-
*
|
10 |
-
* Version: 1.3.4 (11/11/2010)
|
11 |
-
* Requires: jQuery v1.3+
|
12 |
-
*
|
13 |
-
* Dual licensed under the MIT and GPL licenses:
|
14 |
-
* http://www.opensource.org/licenses/mit-license.php
|
15 |
-
* http://www.gnu.org/licenses/gpl.html
|
16 |
-
*/
|
17 |
-
|
18 |
-
#fancybox-loading {
|
19 |
-
position: fixed;
|
20 |
-
top: 50%;
|
21 |
-
left: 50%;
|
22 |
-
width: 40px;
|
23 |
-
height: 40px;
|
24 |
-
margin-top: -20px;
|
25 |
-
margin-left: -20px;
|
26 |
-
cursor: pointer;
|
27 |
-
overflow: hidden;
|
28 |
-
z-index: 1104;
|
29 |
-
display: none;
|
30 |
-
}
|
31 |
-
|
32 |
-
#fancybox-loading div {
|
33 |
-
position: absolute;
|
34 |
-
top: 0;
|
35 |
-
left: 0;
|
36 |
-
width: 40px;
|
37 |
-
height: 480px;
|
38 |
-
background-image: url('../images/fancybox/fancybox.png');
|
39 |
-
}
|
40 |
-
|
41 |
-
#fancybox-overlay {
|
42 |
-
position: absolute;
|
43 |
-
top: 0;
|
44 |
-
left: 0;
|
45 |
-
width: 100%;
|
46 |
-
z-index: 1100;
|
47 |
-
display: none;
|
48 |
-
}
|
49 |
-
|
50 |
-
#fancybox-tmp {
|
51 |
-
padding: 0;
|
52 |
-
margin: 0;
|
53 |
-
border: 0;
|
54 |
-
overflow: auto;
|
55 |
-
display: none;
|
56 |
-
}
|
57 |
-
|
58 |
-
#fancybox-wrap {
|
59 |
-
position: absolute;
|
60 |
-
top: 0;
|
61 |
-
left: 0;
|
62 |
-
padding: 20px;
|
63 |
-
z-index: 1101;
|
64 |
-
outline: none;
|
65 |
-
display: none;
|
66 |
-
}
|
67 |
-
|
68 |
-
#fancybox-outer {
|
69 |
-
position: relative;
|
70 |
-
width: 100%;
|
71 |
-
height: 100%;
|
72 |
-
background: #fff;
|
73 |
-
}
|
74 |
-
|
75 |
-
#fancybox-content {
|
76 |
-
width: 0;
|
77 |
-
height: 0;
|
78 |
-
padding: 0;
|
79 |
-
outline: none;
|
80 |
-
position: relative;
|
81 |
-
overflow: hidden;
|
82 |
-
z-index: 1102;
|
83 |
-
border: 0 solid #fff;
|
84 |
-
}
|
85 |
-
|
86 |
-
#fancybox-hide-sel-frame {
|
87 |
-
position: absolute;
|
88 |
-
top: 0;
|
89 |
-
left: 0;
|
90 |
-
width: 100%;
|
91 |
-
height: 100%;
|
92 |
-
background: transparent;
|
93 |
-
z-index: 1101;
|
94 |
-
}
|
95 |
-
|
96 |
-
#fancybox-close {
|
97 |
-
position: absolute;
|
98 |
-
top: -15px;
|
99 |
-
right: -15px;
|
100 |
-
width: 30px;
|
101 |
-
height: 30px;
|
102 |
-
background: transparent url('../images/fancybox/fancybox.png') -40px 0;
|
103 |
-
cursor: pointer;
|
104 |
-
z-index: 1103;
|
105 |
-
display: none;
|
106 |
-
border: none;
|
107 |
-
padding: 0;
|
108 |
-
margin: 0;
|
109 |
-
}
|
110 |
-
|
111 |
-
#fancybox-error {
|
112 |
-
color: #444;
|
113 |
-
font: normal 12px/20px Arial;
|
114 |
-
padding: 14px;
|
115 |
-
margin: 0;
|
116 |
-
}
|
117 |
-
|
118 |
-
#fancybox-img {
|
119 |
-
width: 100%;
|
120 |
-
height: 100%;
|
121 |
-
padding: 0;
|
122 |
-
margin: 0;
|
123 |
-
border: none;
|
124 |
-
outline: none;
|
125 |
-
line-height: 0;
|
126 |
-
vertical-align: top;
|
127 |
-
}
|
128 |
-
|
129 |
-
#fancybox-frame {
|
130 |
-
width: 100%;
|
131 |
-
height: 100%;
|
132 |
-
border: none;
|
133 |
-
display: block;
|
134 |
-
}
|
135 |
-
|
136 |
-
#fancybox-left, #fancybox-right {
|
137 |
-
position: absolute;
|
138 |
-
bottom: 15%;
|
139 |
-
height: 70%;
|
140 |
-
width: 100px;
|
141 |
-
cursor: pointer;
|
142 |
-
outline: none;
|
143 |
-
background: transparent url('../images/blank.gif');
|
144 |
-
z-index: 1102;
|
145 |
-
display: block;
|
146 |
-
overflow: visible;
|
147 |
-
}
|
148 |
-
|
149 |
-
#fancybox-left {
|
150 |
-
left: -25px;
|
151 |
-
}
|
152 |
-
|
153 |
-
#fancybox-right {
|
154 |
-
right: -25px;
|
155 |
-
}
|
156 |
-
|
157 |
-
#fancybox-left-ico {
|
158 |
-
position: absolute;
|
159 |
-
top: 50%;
|
160 |
-
right: auto;
|
161 |
-
left: 10px;
|
162 |
-
width: 30px;
|
163 |
-
height: 30px;
|
164 |
-
margin-top: -15px;
|
165 |
-
cursor: pointer;
|
166 |
-
z-index: 1102;
|
167 |
-
display: block;
|
168 |
-
visibility: hidden;
|
169 |
-
}
|
170 |
-
|
171 |
-
#fancybox-right-ico {
|
172 |
-
position: absolute;
|
173 |
-
top: 50%;
|
174 |
-
left: auto;
|
175 |
-
right: 10px;
|
176 |
-
width: 30px;
|
177 |
-
height: 30px;
|
178 |
-
margin-top: -15px;
|
179 |
-
cursor: pointer;
|
180 |
-
z-index: 1102;
|
181 |
-
display: block;
|
182 |
-
visibility: hidden;
|
183 |
-
}
|
184 |
-
|
185 |
-
#fancybox-left-ico {
|
186 |
-
background: url('../images/fancybox/fancybox.png') -40px -30px;
|
187 |
-
}
|
188 |
-
|
189 |
-
#fancybox-right-ico {
|
190 |
-
background: url('../images/fancybox/fancybox.png') -40px -60px;
|
191 |
-
}
|
192 |
-
|
193 |
-
#fancybox-left:hover, #fancybox-right:hover {
|
194 |
-
visibility: visible; /* IE6 */
|
195 |
-
}
|
196 |
-
|
197 |
-
#fancybox-left:hover #fancybox-left-ico, #fancybox-right:hover #fancybox-right-ico {
|
198 |
-
visibility: visible; /* IE6 */
|
199 |
-
}
|
200 |
-
|
201 |
-
#fancybox-left:hover span {
|
202 |
-
left: 10px;
|
203 |
-
}
|
204 |
-
|
205 |
-
#fancybox-right:hover span {
|
206 |
-
left: auto;
|
207 |
-
right: 10px;
|
208 |
-
}
|
209 |
-
|
210 |
-
.fancybox-bg {
|
211 |
-
position: absolute;
|
212 |
-
padding: 0;
|
213 |
-
margin: 0;
|
214 |
-
border: 0;
|
215 |
-
width: 20px;
|
216 |
-
height: 20px;
|
217 |
-
z-index: 1001;
|
218 |
-
}
|
219 |
-
|
220 |
-
#fancybox-bg-n {
|
221 |
-
top: -20px;
|
222 |
-
left: 0;
|
223 |
-
width: 100%;
|
224 |
-
background-image: url('../images/fancybox/fancybox-x.png');
|
225 |
-
}
|
226 |
-
|
227 |
-
#fancybox-bg-ne {
|
228 |
-
top: -20px;
|
229 |
-
right: -20px;
|
230 |
-
background: url('../images/fancybox/fancybox.png') -40px -162px;
|
231 |
-
}
|
232 |
-
|
233 |
-
#fancybox-bg-e {
|
234 |
-
top: 0;
|
235 |
-
right: -20px;
|
236 |
-
height: 100%;
|
237 |
-
background: url('../images/fancybox/fancybox-y.png') -20px 0;
|
238 |
-
}
|
239 |
-
|
240 |
-
#fancybox-bg-se {
|
241 |
-
bottom: -20px;
|
242 |
-
right: -20px;
|
243 |
-
background: url('../images/fancybox/fancybox.png') -40px -182px;
|
244 |
-
}
|
245 |
-
|
246 |
-
#fancybox-bg-s {
|
247 |
-
bottom: -20px;
|
248 |
-
left: 0;
|
249 |
-
width: 100%;
|
250 |
-
background: url('../images/fancybox/fancybox-x.png') 0 -20px;
|
251 |
-
}
|
252 |
-
|
253 |
-
#fancybox-bg-sw {
|
254 |
-
bottom: -20px;
|
255 |
-
left: -20px;
|
256 |
-
background: url('../images/fancybox/fancybox.png') -40px -142px;
|
257 |
-
}
|
258 |
-
|
259 |
-
#fancybox-bg-w {
|
260 |
-
top: 0;
|
261 |
-
left: -20px;
|
262 |
-
height: 100%;
|
263 |
-
background-image: url('../images/fancybox/fancybox-y.png');
|
264 |
-
}
|
265 |
-
|
266 |
-
#fancybox-bg-nw {
|
267 |
-
top: -20px;
|
268 |
-
left: -20px;
|
269 |
-
background: url('../images/fancybox/fancybox.png') -40px -122px;
|
270 |
-
}
|
271 |
-
|
272 |
-
#fancybox-title {
|
273 |
-
font-family: Helvetica, serif;
|
274 |
-
font-size: 12px;
|
275 |
-
z-index: 1102;
|
276 |
-
}
|
277 |
-
|
278 |
-
.fancybox-title-inside {
|
279 |
-
padding-bottom: 10px;
|
280 |
-
text-align: center;
|
281 |
-
color: #333;
|
282 |
-
background: #fff;
|
283 |
-
position: relative;
|
284 |
-
}
|
285 |
-
|
286 |
-
.fancybox-title-outside {
|
287 |
-
padding-top: 10px;
|
288 |
-
color: #fff;
|
289 |
-
}
|
290 |
-
|
291 |
-
.fancybox-title-over {
|
292 |
-
position: absolute;
|
293 |
-
bottom: 0;
|
294 |
-
left: 0;
|
295 |
-
color: #FFF;
|
296 |
-
text-align: left;
|
297 |
-
display: none;
|
298 |
-
}
|
299 |
-
|
300 |
-
#fancybox-title-over {
|
301 |
-
padding: 10px;
|
302 |
-
background-image: url('../images/fancybox/fancy_title_over.png');
|
303 |
-
display: block;
|
304 |
-
}
|
305 |
-
|
306 |
-
.fancybox-title-float {
|
307 |
-
position: absolute;
|
308 |
-
left: 0;
|
309 |
-
bottom: -20px;
|
310 |
-
height: 32px;
|
311 |
-
}
|
312 |
-
|
313 |
-
#fancybox-title-float-wrap {
|
314 |
-
border: none;
|
315 |
-
border-collapse: collapse;
|
316 |
-
width: auto;
|
317 |
-
}
|
318 |
-
|
319 |
-
#fancybox-title-float-wrap td {
|
320 |
-
border: none;
|
321 |
-
white-space: nowrap;
|
322 |
-
}
|
323 |
-
|
324 |
-
#fancybox-title-float-left {
|
325 |
-
padding: 0 0 0 15px;
|
326 |
-
background: url('../images/fancybox/fancybox.png') -40px -90px no-repeat;
|
327 |
-
}
|
328 |
-
|
329 |
-
#fancybox-title-float-main {
|
330 |
-
color: #FFF;
|
331 |
-
line-height: 29px;
|
332 |
-
font-weight: bold;
|
333 |
-
padding: 0 0 3px 0;
|
334 |
-
background: url('../images/fancybox/fancybox-x.png') 0 -40px;
|
335 |
-
}
|
336 |
-
|
337 |
-
#fancybox-title-float-right {
|
338 |
-
padding: 0 0 0 15px;
|
339 |
-
background: url('../images/fancybox/fancybox.png') -55px -90px no-repeat;
|
340 |
-
}
|
341 |
-
|
342 |
-
/* IE6 */
|
343 |
-
.fancybox-ie6 #fancybox-close {
|
344 |
-
background: transparent;
|
345 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_close.png', sizingMethod = 'scale');
|
346 |
-
}
|
347 |
-
|
348 |
-
.fancybox-ie6 #fancybox-left-ico {
|
349 |
-
background: transparent;
|
350 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_nav_left.png', sizingMethod = 'scale');
|
351 |
-
}
|
352 |
-
|
353 |
-
.fancybox-ie6 #fancybox-right-ico {
|
354 |
-
background: transparent;
|
355 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_nav_right.png', sizingMethod = 'scale');
|
356 |
-
}
|
357 |
-
|
358 |
-
.fancybox-ie6 #fancybox-title-over {
|
359 |
-
background: transparent;
|
360 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_title_over.png', sizingMethod = 'scale');
|
361 |
-
zoom: 1;
|
362 |
-
}
|
363 |
-
|
364 |
-
.fancybox-ie6 #fancybox-title-float-left {
|
365 |
-
background: transparent;
|
366 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_title_left.png', sizingMethod = 'scale');
|
367 |
-
}
|
368 |
-
|
369 |
-
.fancybox-ie6 #fancybox-title-float-main {
|
370 |
-
background: transparent;
|
371 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_title_main.png', sizingMethod = 'scale');
|
372 |
-
}
|
373 |
-
|
374 |
-
.fancybox-ie6 #fancybox-title-float-right {
|
375 |
-
background: transparent;
|
376 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_title_right.png', sizingMethod = 'scale');
|
377 |
-
}
|
378 |
-
|
379 |
-
.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
|
380 |
-
height: expression(this.parentNode.clientHeight + "px");
|
381 |
-
}
|
382 |
-
|
383 |
-
#fancybox-loading.fancybox-ie6 {
|
384 |
-
position: absolute;
|
385 |
-
margin-top: 0;
|
386 |
-
top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
|
387 |
-
}
|
388 |
-
|
389 |
-
#fancybox-loading.fancybox-ie6 div {
|
390 |
-
background: transparent;
|
391 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_loading.png', sizingMethod = 'scale');
|
392 |
-
}
|
393 |
-
|
394 |
-
/* IE6, IE7, IE8 */
|
395 |
-
.fancybox-ie .fancybox-bg {
|
396 |
-
background: transparent !important;
|
397 |
-
}
|
398 |
-
|
399 |
-
.fancybox-ie #fancybox-bg-n {
|
400 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_shadow_n.png', sizingMethod = 'scale');
|
401 |
-
}
|
402 |
-
|
403 |
-
.fancybox-ie #fancybox-bg-ne {
|
404 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_shadow_ne.png', sizingMethod = 'scale');
|
405 |
-
}
|
406 |
-
|
407 |
-
.fancybox-ie #fancybox-bg-e {
|
408 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_shadow_e.png', sizingMethod = 'scale');
|
409 |
-
}
|
410 |
-
|
411 |
-
.fancybox-ie #fancybox-bg-se {
|
412 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_shadow_se.png', sizingMethod = 'scale');
|
413 |
-
}
|
414 |
-
|
415 |
-
.fancybox-ie #fancybox-bg-s {
|
416 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_shadow_s.png', sizingMethod = 'scale');
|
417 |
-
}
|
418 |
-
|
419 |
-
.fancybox-ie #fancybox-bg-sw {
|
420 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_shadow_sw.png', sizingMethod = 'scale');
|
421 |
-
}
|
422 |
-
|
423 |
-
.fancybox-ie #fancybox-bg-w {
|
424 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_shadow_w.png', sizingMethod = 'scale');
|
425 |
-
}
|
426 |
-
|
427 |
-
.fancybox-ie #fancybox-bg-nw {
|
428 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '../images/fancybox/fancy_shadow_nw.png', sizingMethod = 'scale');
|
429 |
-
}
|
430 |
-
|
431 |
-
#fancybox-title-over em {
|
432 |
-
font-size: 11px;
|
433 |
-
}
|
434 |
-
|
435 |
-
#fancybox-title-over .title {
|
436 |
-
font-size: 14px;
|
437 |
-
}
|
438 |
-
|
439 |
-
#fancybox-title-over .descr {
|
440 |
-
font-size: 12px;
|
441 |
-
display: block;
|
442 |
-
margin-top: 4px;
|
443 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/css/meta-box.css
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
@charset "utf-8";
|
2 |
-
div#
|
3 |
margin: 0;
|
4 |
padding: 0;
|
5 |
}
|
6 |
|
7 |
-
div#
|
8 |
background: #f9f9f9;
|
9 |
position: relative;
|
10 |
border: 1px solid #ccc;
|
@@ -13,16 +13,16 @@ div#gMedia-wraper {
|
|
13 |
box-sizing: border-box;
|
14 |
}
|
15 |
|
16 |
-
div#
|
17 |
-
body > div#
|
18 |
-
body > div#
|
19 |
|
20 |
-
div#
|
21 |
-
div#
|
22 |
border-radius: 0 0 4px 4px;
|
23 |
}
|
24 |
|
25 |
-
div#
|
26 |
margin: 0;
|
27 |
padding: 0;
|
28 |
font-size: 11px;
|
@@ -30,244 +30,29 @@ div#gMedia-wraper * {
|
|
30 |
text-decoration: none;
|
31 |
}
|
32 |
|
33 |
-
div#
|
34 |
-
background: transparent url(../images/metabox.png) no-repeat right -12px;
|
35 |
-
padding-left: .3em;
|
36 |
-
}
|
37 |
-
|
38 |
-
div#gMedia-head {
|
39 |
-
position: relative;
|
40 |
-
padding: 0 6px;
|
41 |
-
background: #a1a1a1 url(../images/metabox.png) repeat-x 0 -25px;
|
42 |
-
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
|
43 |
-
height: 30px;
|
44 |
-
line-height: 30px;
|
45 |
-
z-index: 6;
|
46 |
-
background-position: 0 0;
|
47 |
-
border-top: 1px solid #f7f7f7;
|
48 |
-
border-bottom: 1px solid #b8b9ba;
|
49 |
-
}
|
50 |
-
|
51 |
-
div#gMedia-head .gMedia-source {
|
52 |
-
float: left;
|
53 |
-
position: relative;
|
54 |
-
top: 3px;
|
55 |
-
line-height: 30px;
|
56 |
-
border-top-right-radius: 4px;
|
57 |
-
border-top-left-radius: 4px;
|
58 |
-
border: 1px solid #AAA;
|
59 |
-
border-bottom: 0;
|
60 |
-
height: 27px;
|
61 |
-
color: #666;
|
62 |
-
}
|
63 |
-
|
64 |
-
div#gMedia-head .current {
|
65 |
-
font-weight: bold;
|
66 |
-
text-transform: capitalize;
|
67 |
-
z-index: 5;
|
68 |
-
overflow: hidden;
|
69 |
-
}
|
70 |
-
|
71 |
-
div#gMedia-head .gMedia-source a {
|
72 |
-
display: block;
|
73 |
-
cursor: pointer;
|
74 |
-
border-top-right-radius: 4px;
|
75 |
-
border-top-left-radius: 4px;
|
76 |
-
padding: 9px 6px 0;
|
77 |
-
height: 16px;
|
78 |
-
line-height: 10px;
|
79 |
-
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
|
80 |
-
color: #666;
|
81 |
-
border: 1px solid transparent;
|
82 |
-
border-bottom: 0;
|
83 |
-
background-color: #e1e1e1;
|
84 |
-
}
|
85 |
-
|
86 |
-
div#gMedia-head .current a,
|
87 |
-
div#gMedia-head .current:hover a {
|
88 |
-
background-color: #EBEBEB;
|
89 |
-
border-color: #FFFFFF;
|
90 |
-
color: #333333;
|
91 |
-
text-align: center;
|
92 |
-
height: 17px;
|
93 |
-
}
|
94 |
-
|
95 |
-
div#gMedia-control {
|
96 |
-
position: relative;
|
97 |
-
padding: 0 6px;
|
98 |
-
background: #a1a1a1 url(../images/metabox.png) repeat-x 0 -145px;
|
99 |
-
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
|
100 |
-
height: 28px;
|
101 |
-
border-top: 1px solid rgba(250, 250, 250, 0.8);
|
102 |
-
border-bottom: 1px solid rgba(24, 24, 24, 0.2);
|
103 |
-
z-index: 5;
|
104 |
-
overflow: hidden;
|
105 |
-
}
|
106 |
-
|
107 |
-
div#gMedia-control div#gMedia-control-update {
|
108 |
-
cursor: pointer;
|
109 |
-
position: absolute;
|
110 |
-
right: 3px;
|
111 |
-
top: 4px;
|
112 |
-
padding: 0 2px 0 3px;
|
113 |
-
height: 17px;
|
114 |
-
overflow: hidden;
|
115 |
-
border: 1px solid transparent;
|
116 |
-
border-radius: 3px;
|
117 |
-
}
|
118 |
-
|
119 |
-
div#gMedia-control div#gMedia-control-update:hover {
|
120 |
-
border-color: #c2c2c2;
|
121 |
-
background-color: #eee;
|
122 |
-
}
|
123 |
-
|
124 |
-
div#gMedia-control-update span.gMedia-update-text {
|
125 |
-
background: url(../images/metabox.png) no-repeat right -206px;
|
126 |
-
line-height: 9px;
|
127 |
-
padding: 4px 17px 6px 0;
|
128 |
-
display: block;
|
129 |
-
color: #7fb900;
|
130 |
-
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
|
131 |
-
text-transform: capitalize;
|
132 |
-
font-size: 11px;
|
133 |
-
font-weight: bold;
|
134 |
-
}
|
135 |
-
|
136 |
-
div#gMedia-control div#gMedia-refine div#gMedia-refine-box {
|
137 |
-
display: block;
|
138 |
-
background: 0;
|
139 |
-
padding: 2px;
|
140 |
-
width: auto;
|
141 |
-
}
|
142 |
-
|
143 |
-
div#gMedia-control div#gMedia-refine div#gMedia-refine-box div#gMedia-refine-field {
|
144 |
-
margin: 1px 0 0 0;
|
145 |
-
float: left;
|
146 |
-
border: 1px solid #bbb;
|
147 |
-
border-radius: 2px;
|
148 |
-
box-shadow: 0 1px 0 0 #eee;
|
149 |
-
}
|
150 |
-
|
151 |
-
div#gMedia-control div#gMedia-refine div#gMedia-refine-box div#gMedia-refine-field * {
|
152 |
-
display: block;
|
153 |
-
float: left;
|
154 |
-
line-height: 15px;
|
155 |
-
box-sizing: content-box;
|
156 |
-
}
|
157 |
-
|
158 |
-
div#gMedia-control div#gMedia-refine div#gMedia-refine-box div#gMedia-refine-field input#gMedia-refine-input {
|
159 |
-
border: 0;
|
160 |
-
width: 134px;
|
161 |
-
font-size: 12px;
|
162 |
-
padding: 3px 0 2px 21px;
|
163 |
-
background: #fff url(../images/metabox.png) no-repeat 0px -222px;
|
164 |
-
border: 0;
|
165 |
-
border-radius: 2px;
|
166 |
-
box-shadow: inset 0 1px 2px 0 #ddd;
|
167 |
-
}
|
168 |
-
|
169 |
-
div#gMedia-message {
|
170 |
background: #a1a1a1 url(../images/metabox.png) 0 -25px;
|
171 |
position: relative;
|
172 |
z-index: 20;
|
173 |
border-bottom: 1px solid #ccc;
|
174 |
padding: 0 6px 0 8px;
|
175 |
}
|
176 |
-
div#
|
177 |
-
div#
|
178 |
-
div#
|
179 |
|
180 |
-
|
181 |
-
height: 185px;
|
182 |
-
position: relative;
|
183 |
-
z-index: 2;
|
184 |
-
background: #f9f9f9;
|
185 |
-
}
|
186 |
-
|
187 |
-
div#gMedia-wraper.ui-draggable h2 { cursor: move; }
|
188 |
-
div#gMedia-images h2 {
|
189 |
-
position: relative;
|
190 |
-
padding: 0 6px;
|
191 |
-
background: #a1a1a1 url(../images/metabox.png) repeat-x 0 -25px;
|
192 |
-
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
|
193 |
-
height: 25px;
|
194 |
-
line-height: 27px;
|
195 |
-
border-top: 1px solid rgba(250, 250, 250, 0.8);
|
196 |
-
border-bottom: 1px solid rgba(24, 24, 24, 0.2);
|
197 |
-
}
|
198 |
-
|
199 |
-
div#gMedia-images h2 span.gMedia-images-title {
|
200 |
position: absolute;
|
201 |
-
|
202 |
-
top:
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
div#gMedia-images div#gMedia-images-wrap {
|
208 |
-
box-shadow: 0 0 6px #999 inset;
|
209 |
-
overflow: hidden;
|
210 |
-
overflow-y: scroll;
|
211 |
-
position: absolute;
|
212 |
-
left: 0;
|
213 |
-
top: 57px;
|
214 |
-
bottom: 0;
|
215 |
-
right: 0;
|
216 |
-
z-index: 1;
|
217 |
-
}
|
218 |
-
|
219 |
-
div#gMedia-images ul#gMedia-images-thumbnails {
|
220 |
-
padding: 6px 0 0 6px;
|
221 |
-
}
|
222 |
-
|
223 |
-
div#gMedia-images ul#gMedia-images-thumbnails .gMedia-image-li {
|
224 |
-
padding: 2px;
|
225 |
-
cursor: pointer;
|
226 |
-
width: 50px;
|
227 |
-
height: 50px;
|
228 |
-
float: left;
|
229 |
-
margin: 0 6px 6px 0;
|
230 |
-
border: 1px solid #bbb;
|
231 |
-
position: relative;
|
232 |
-
background: #fff;
|
233 |
-
border-radius: 3px;
|
234 |
-
box-shadow: 0 0 4px #CCC;
|
235 |
-
transition-property: border-color;
|
236 |
-
transition-duration: .33s;
|
237 |
-
}
|
238 |
-
|
239 |
-
div#gMedia-images ul#gMedia-images-thumbnails .gMedia-image-li:hover {
|
240 |
-
border-color: #777;
|
241 |
-
}
|
242 |
-
|
243 |
-
div#gMedia-images ul#gMedia-images-thumbnails .gMedia-image-li .gMedia-selector {
|
244 |
-
z-index: 2;
|
245 |
-
position: absolute;
|
246 |
-
left: 0;
|
247 |
-
top: 0;
|
248 |
-
width: 100%;
|
249 |
-
height: 100%;
|
250 |
-
display: none;
|
251 |
-
}
|
252 |
-
|
253 |
-
div#gMedia-images .ui-resizable-s {
|
254 |
-
left: 0;
|
255 |
-
bottom: -10px;
|
256 |
-
margin: 0;
|
257 |
-
height: 10px;
|
258 |
-
width: 100%;
|
259 |
-
background: url(../images/metabox.png) no-repeat 50% -244px;
|
260 |
}
|
261 |
|
262 |
-
div#gMedia-images .emptydb {
|
263 |
-
text-align: center;
|
264 |
-
font-weight: bold;
|
265 |
-
padding: 6px 0 10px;
|
266 |
-
clear: both;
|
267 |
-
float: none;
|
268 |
-
}
|
269 |
|
270 |
-
div#
|
|
|
271 |
height: 227px;
|
272 |
position: relative;
|
273 |
z-index: 1;
|
@@ -275,7 +60,7 @@ div#gMedia-galleries {
|
|
275 |
border-radius: 0 0 4px 4px;
|
276 |
}
|
277 |
|
278 |
-
div#
|
279 |
position: relative;
|
280 |
padding: 0 7px;
|
281 |
background: #a1a1a1 url(../images/metabox.png) repeat-x 0 -25px;
|
@@ -286,13 +71,13 @@ div#gMedia-galleries h2 {
|
|
286 |
border-bottom: 1px solid rgba(24, 24, 24, 0.2);
|
287 |
}
|
288 |
|
289 |
-
div#
|
290 |
position: relative;
|
291 |
display: block;
|
292 |
margin-top: 7px;
|
293 |
}
|
294 |
|
295 |
-
div#
|
296 |
box-shadow: 0 0 6px #999 inset;
|
297 |
overflow: hidden;
|
298 |
overflow-y: scroll;
|
@@ -304,21 +89,21 @@ div#gMedia-galleries div#gMedia-galleries-wrap {
|
|
304 |
z-index: 1;
|
305 |
}
|
306 |
|
307 |
-
div#
|
308 |
padding: 5px 0 0;
|
309 |
}
|
310 |
|
311 |
-
div#
|
312 |
font-size: 120%;
|
313 |
line-height: 40px;
|
314 |
text-align: center;
|
315 |
}
|
316 |
|
317 |
-
div#
|
318 |
font-size: 100%;
|
319 |
}
|
320 |
|
321 |
-
div#
|
322 |
margin: 0 6px 5px;
|
323 |
padding: 2px;
|
324 |
border: 1px solid #bbb;
|
@@ -331,37 +116,37 @@ div#gMedia-galleries ul#gMedia-galleries-list .gMedia-gallery-li {
|
|
331 |
height: 38px;
|
332 |
}
|
333 |
|
334 |
-
div#
|
335 |
border: 1px solid #F18F00;
|
336 |
transition-property: border-color;
|
337 |
transition-duration: .33s;
|
338 |
}
|
339 |
|
340 |
-
div#
|
341 |
padding-right: 6px;
|
342 |
display: block;
|
343 |
overflow: hidden;
|
344 |
}
|
345 |
|
346 |
-
div#
|
347 |
display: inline-block;
|
348 |
vertical-align: top;
|
349 |
margin-right: 7px;
|
350 |
white-space: nowrap;
|
351 |
}
|
352 |
|
353 |
-
div#
|
354 |
line-height: 0;
|
355 |
height: 43px;
|
356 |
overflow: hidden;
|
357 |
}
|
358 |
|
359 |
-
div#
|
360 |
width: 50px;
|
361 |
height: auto;
|
362 |
}
|
363 |
|
364 |
-
div#
|
365 |
position: absolute;
|
366 |
left: 59px;
|
367 |
bottom: 5px;
|
@@ -369,7 +154,7 @@ div#gMedia-galleries ul#gMedia-galleries-list .gMedia-gallery-li p.gMedia-galler
|
|
369 |
z-index: 1;
|
370 |
}
|
371 |
|
372 |
-
div#
|
373 |
color: #999;
|
374 |
position: absolute;
|
375 |
left: 0;
|
@@ -378,7 +163,7 @@ div#gMedia-galleries ul#gMedia-galleries-list .gMedia-gallery-li p.gMedia-galler
|
|
378 |
height: 12px;
|
379 |
}
|
380 |
|
381 |
-
div#
|
382 |
color: #666;
|
383 |
display: block;
|
384 |
overflow: hidden;
|
@@ -394,7 +179,7 @@ div#gMedia-galleries ul#gMedia-galleries-list .gMedia-gallery-li .gMedia-gallery
|
|
394 |
background: url(../images/metabox.png) 0 -258px no-repeat;
|
395 |
}
|
396 |
|
397 |
-
div#
|
398 |
z-index: 2;
|
399 |
position: absolute;
|
400 |
left: 0;
|
@@ -405,19 +190,19 @@ div#gMedia-galleries ul#gMedia-galleries-list .gMedia-gallery-li .gMedia-selecto
|
|
405 |
background: url(../images/clicked.png) 100% 0 no-repeat;
|
406 |
}
|
407 |
|
408 |
-
div#
|
409 |
display: block;
|
410 |
}
|
411 |
|
412 |
-
div#
|
413 |
border-color: #777;
|
414 |
}
|
415 |
|
416 |
-
div#
|
417 |
border-color: #F18F00;
|
418 |
}
|
419 |
|
420 |
-
div#
|
421 |
z-index: 2;
|
422 |
position: absolute;
|
423 |
left: 0;
|
@@ -427,11 +212,21 @@ div#gMedia-galleries ul#gMedia-galleries-list .gMedia-gallery-li .gMedia-insert
|
|
427 |
visibility: hidden;
|
428 |
}
|
429 |
|
430 |
-
div#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
visibility: visible;
|
432 |
}
|
433 |
|
434 |
-
div#
|
435 |
position: absolute;
|
436 |
left: 0;
|
437 |
top: 0;
|
@@ -447,29 +242,29 @@ div#gMedia-galleries ul#gMedia-galleries-list .gMedia-gallery-li .gMedia-insert
|
|
447 |
filter: progid:DXImageTransform.Microsoft.gradient(GradientType = 0, startColorstr = '#4c000000', endColorstr = '#4c000000');
|
448 |
}
|
449 |
|
450 |
-
div#
|
451 |
height: 50%;
|
452 |
width: 1px;
|
453 |
vertical-align: bottom;
|
454 |
}
|
455 |
|
456 |
-
div#
|
457 |
display: block;
|
458 |
}
|
459 |
|
460 |
-
div#
|
461 |
display: none;
|
462 |
}
|
463 |
|
464 |
-
div#
|
465 |
display: none;
|
466 |
}
|
467 |
|
468 |
-
div#
|
469 |
display: block;
|
470 |
}
|
471 |
|
472 |
-
div#
|
473 |
left: 0;
|
474 |
bottom: 0;
|
475 |
height: 10px;
|
@@ -480,7 +275,7 @@ div#gMedia-galleries .ui-resizable-s {
|
|
480 |
margin-left: -1px;
|
481 |
}
|
482 |
|
483 |
-
#
|
484 |
z-index: 3;
|
485 |
background: #2e6286;
|
486 |
padding: 5px 0;
|
@@ -491,7 +286,7 @@ div#gMedia-galleries .ui-resizable-s {
|
|
491 |
margin-left: -1px;
|
492 |
}
|
493 |
|
494 |
-
#
|
495 |
padding: 0 0 0 19px;
|
496 |
margin: 0 auto;
|
497 |
font-size: 11px;
|
@@ -501,7 +296,7 @@ div#gMedia-galleries .ui-resizable-s {
|
|
501 |
background: transparent url(../images/social-footer.png) -7px -196px no-repeat;
|
502 |
}
|
503 |
|
504 |
-
#
|
505 |
color: #fff;
|
506 |
text-decoration: none;
|
507 |
}
|
@@ -510,4 +305,6 @@ div#gMedia-galleries .ui-resizable-s {
|
|
510 |
.wp-media-buttons .gmedia_button.hidden { display: inline-block !important; }
|
511 |
.wp-media-buttons .gmedia_button span.wp-media-buttons-icon {
|
512 |
background: url(../images/gm-icon.png) no-repeat top left;
|
513 |
-
}
|
|
|
|
1 |
@charset "utf-8";
|
2 |
+
div#gmedia-MetaBox .inside {
|
3 |
margin: 0;
|
4 |
padding: 0;
|
5 |
}
|
6 |
|
7 |
+
div#gmedia-wraper {
|
8 |
background: #f9f9f9;
|
9 |
position: relative;
|
10 |
border: 1px solid #ccc;
|
13 |
box-sizing: border-box;
|
14 |
}
|
15 |
|
16 |
+
div#gmedia-MetaBox div#gmedia-wraper { min-width: 100%; max-width: 100%; }
|
17 |
+
body > div#gmedia-wraper { box-shadow: 0px 2px 3px #222; }
|
18 |
+
body > div#gmedia-wraper:before { content: ''; position: absolute; z-index: -1; left: 20px; top: 20px; width: 100%; height: 100%; }
|
19 |
|
20 |
+
div#gmedia-wraper div#gmedia-source,
|
21 |
+
div#gmedia-wraper div#gmedia-source .pane {
|
22 |
border-radius: 0 0 4px 4px;
|
23 |
}
|
24 |
|
25 |
+
div#gmedia-wraper * {
|
26 |
margin: 0;
|
27 |
padding: 0;
|
28 |
font-size: 11px;
|
30 |
text-decoration: none;
|
31 |
}
|
32 |
|
33 |
+
div#gmedia-message {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
background: #a1a1a1 url(../images/metabox.png) 0 -25px;
|
35 |
position: relative;
|
36 |
z-index: 20;
|
37 |
border-bottom: 1px solid #ccc;
|
38 |
padding: 0 6px 0 8px;
|
39 |
}
|
40 |
+
div#gmedia-message span { display: block; }
|
41 |
+
div#gmedia-message .info-init { color: blue; }
|
42 |
+
div#gmedia-message .info-textarea { color: red; }
|
43 |
|
44 |
+
#gmedia-source .title-bar .gm-add-button {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
position: absolute;
|
46 |
+
display: block;
|
47 |
+
right: 5px; top: 5px;
|
48 |
+
line-height: 100%;
|
49 |
+
height: auto;
|
50 |
+
padding: 2px 4px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
+
div#gmedia-wraper.ui-draggable .title-bar { cursor: move; }
|
55 |
+
div#gmedia-galleries {
|
56 |
height: 227px;
|
57 |
position: relative;
|
58 |
z-index: 1;
|
60 |
border-radius: 0 0 4px 4px;
|
61 |
}
|
62 |
|
63 |
+
div#gmedia-galleries .title-bar {
|
64 |
position: relative;
|
65 |
padding: 0 7px;
|
66 |
background: #a1a1a1 url(../images/metabox.png) repeat-x 0 -25px;
|
71 |
border-bottom: 1px solid rgba(24, 24, 24, 0.2);
|
72 |
}
|
73 |
|
74 |
+
div#gmedia-galleries .title-bar span.gmedia-galleries-title {
|
75 |
position: relative;
|
76 |
display: block;
|
77 |
margin-top: 7px;
|
78 |
}
|
79 |
|
80 |
+
div#gmedia-galleries div#gmedia-galleries-wrap {
|
81 |
box-shadow: 0 0 6px #999 inset;
|
82 |
overflow: hidden;
|
83 |
overflow-y: scroll;
|
89 |
z-index: 1;
|
90 |
}
|
91 |
|
92 |
+
div#gmedia-galleries ul#gmedia-galleries-list {
|
93 |
padding: 5px 0 0;
|
94 |
}
|
95 |
|
96 |
+
div#gmedia-galleries ul#gmedia-galleries-list .emptydb {
|
97 |
font-size: 120%;
|
98 |
line-height: 40px;
|
99 |
text-align: center;
|
100 |
}
|
101 |
|
102 |
+
div#gmedia-galleries ul#gmedia-galleries-list .emptydb a {
|
103 |
font-size: 100%;
|
104 |
}
|
105 |
|
106 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li {
|
107 |
margin: 0 6px 5px;
|
108 |
padding: 2px;
|
109 |
border: 1px solid #bbb;
|
116 |
height: 38px;
|
117 |
}
|
118 |
|
119 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li.gmedia-selected {
|
120 |
border: 1px solid #F18F00;
|
121 |
transition-property: border-color;
|
122 |
transition-duration: .33s;
|
123 |
}
|
124 |
|
125 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li p.gmedia-gallery-title {
|
126 |
padding-right: 6px;
|
127 |
display: block;
|
128 |
overflow: hidden;
|
129 |
}
|
130 |
|
131 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li p.gmedia-gallery-title span {
|
132 |
display: inline-block;
|
133 |
vertical-align: top;
|
134 |
margin-right: 7px;
|
135 |
white-space: nowrap;
|
136 |
}
|
137 |
|
138 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li p.gmedia-gallery-title span.gmedia-gallery-preview {
|
139 |
line-height: 0;
|
140 |
height: 43px;
|
141 |
overflow: hidden;
|
142 |
}
|
143 |
|
144 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li p.gmedia-gallery-title span.gmedia-gallery-preview img {
|
145 |
width: 50px;
|
146 |
height: auto;
|
147 |
}
|
148 |
|
149 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li p.gmedia-gallery-source {
|
150 |
position: absolute;
|
151 |
left: 59px;
|
152 |
bottom: 5px;
|
154 |
z-index: 1;
|
155 |
}
|
156 |
|
157 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li p.gmedia-gallery-source span.gmedia-gallery-module {
|
158 |
color: #999;
|
159 |
position: absolute;
|
160 |
left: 0;
|
163 |
height: 12px;
|
164 |
}
|
165 |
|
166 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li .gmedia-gallery-gear {
|
167 |
color: #666;
|
168 |
display: block;
|
169 |
overflow: hidden;
|
179 |
background: url(../images/metabox.png) 0 -258px no-repeat;
|
180 |
}
|
181 |
|
182 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li .gmedia-selector {
|
183 |
z-index: 2;
|
184 |
position: absolute;
|
185 |
left: 0;
|
190 |
background: url(../images/clicked.png) 100% 0 no-repeat;
|
191 |
}
|
192 |
|
193 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li.gmedia-selected .gmedia-selector {
|
194 |
display: block;
|
195 |
}
|
196 |
|
197 |
+
div#gmedia-galleries ul#gmedia-galleries-list li.gmedia-gallery-li:hover {
|
198 |
border-color: #777;
|
199 |
}
|
200 |
|
201 |
+
div#gmedia-galleries ul#gmedia-galleries-list li.gmedia-gallery-li.gmedia-selected:hover {
|
202 |
border-color: #F18F00;
|
203 |
}
|
204 |
|
205 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li .gmedia-insert {
|
206 |
z-index: 2;
|
207 |
position: absolute;
|
208 |
left: 0;
|
212 |
visibility: hidden;
|
213 |
}
|
214 |
|
215 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li .gmedia-insert:after {
|
216 |
+
content: '';
|
217 |
+
z-index: 2;
|
218 |
+
position: absolute;
|
219 |
+
left: 0;
|
220 |
+
top: 0;
|
221 |
+
width: 100%;
|
222 |
+
height: 100%;
|
223 |
+
}
|
224 |
+
|
225 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li:hover .gmedia-insert {
|
226 |
visibility: visible;
|
227 |
}
|
228 |
|
229 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li .gmedia-insert div {
|
230 |
position: absolute;
|
231 |
left: 0;
|
232 |
top: 0;
|
242 |
filter: progid:DXImageTransform.Microsoft.gradient(GradientType = 0, startColorstr = '#4c000000', endColorstr = '#4c000000');
|
243 |
}
|
244 |
|
245 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li .gmedia-insert div img {
|
246 |
height: 50%;
|
247 |
width: 1px;
|
248 |
vertical-align: bottom;
|
249 |
}
|
250 |
|
251 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li .gmedia-insert div.gmedia-insert-button {
|
252 |
display: block;
|
253 |
}
|
254 |
|
255 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li .gmedia-insert div.gmedia-remove-button {
|
256 |
display: none;
|
257 |
}
|
258 |
|
259 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li.gmedia-selected .gmedia-insert div.gmedia-insert-button {
|
260 |
display: none;
|
261 |
}
|
262 |
|
263 |
+
div#gmedia-galleries ul#gmedia-galleries-list .gmedia-gallery-li.gmedia-selected .gmedia-insert div.gmedia-remove-button {
|
264 |
display: block;
|
265 |
}
|
266 |
|
267 |
+
div#gmedia-galleries .ui-resizable-s {
|
268 |
left: 0;
|
269 |
bottom: 0;
|
270 |
height: 10px;
|
275 |
margin-left: -1px;
|
276 |
}
|
277 |
|
278 |
+
#gmedia-wraper #gmedia-social {
|
279 |
z-index: 3;
|
280 |
background: #2e6286;
|
281 |
padding: 5px 0;
|
286 |
margin-left: -1px;
|
287 |
}
|
288 |
|
289 |
+
#gmedia-wraper #gmedia-social p {
|
290 |
padding: 0 0 0 19px;
|
291 |
margin: 0 auto;
|
292 |
font-size: 11px;
|
296 |
background: transparent url(../images/social-footer.png) -7px -196px no-repeat;
|
297 |
}
|
298 |
|
299 |
+
#gmedia-wraper #gmedia-social p a {
|
300 |
color: #fff;
|
301 |
text-decoration: none;
|
302 |
}
|
305 |
.wp-media-buttons .gmedia_button.hidden { display: inline-block !important; }
|
306 |
.wp-media-buttons .gmedia_button span.wp-media-buttons-icon {
|
307 |
background: url(../images/gm-icon.png) no-repeat top left;
|
308 |
+
}
|
309 |
+
|
310 |
+
.ui-dialog.gmedia-tool-dialog .ui-dialog-content { overflow: hidden !important; }
|
admin/functions.php
DELETED
@@ -1,616 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) ) {
|
4 |
-
die( 'You are not allowed to call this page directly.' );
|
5 |
-
}
|
6 |
-
|
7 |
-
/**
|
8 |
-
* gmAdmin - Class for admin operation
|
9 |
-
*/
|
10 |
-
class gmAdmin {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* wpMediaRow
|
14 |
-
*
|
15 |
-
* @param object $item
|
16 |
-
*
|
17 |
-
* @return string
|
18 |
-
*/
|
19 |
-
function wpMediaRow( $item ) {
|
20 |
-
$gMediaURL = plugins_url( GRAND_FOLDER );
|
21 |
-
$nonce = wp_create_nonce( 'grandMedia' );
|
22 |
-
$selected_items = isset( $_COOKIE['gmedia_wp_selected_items'] ) ? explode( ',', $_COOKIE['gmedia_wp_selected_items'] ) : array();
|
23 |
-
$checked = in_array( $item->ID, $selected_items ) ? ' checked="checked"' : '';
|
24 |
-
$type = explode( '/', $item->post_mime_type );
|
25 |
-
$image = wp_get_attachment_image( $item->ID, array( 36, 36 ), false );
|
26 |
-
$item_url = wp_get_attachment_url( $item->ID );
|
27 |
-
if ( ! $image ) {
|
28 |
-
if ( $src = wp_mime_type_icon( $item->ID ) ) {
|
29 |
-
$icon_dir_url = $gMediaURL . '/admin/images';
|
30 |
-
$src_file = $icon_dir_url . '/' . wp_basename( $src );
|
31 |
-
$image = '<img src="' . $src_file . '" width="36" height="20" alt="icon" title="' . $item->post_title . '" />';
|
32 |
-
}
|
33 |
-
}
|
34 |
-
$file = '<a class="grandbox" href="' . $item_url . '">' . $image . '</a>';
|
35 |
-
$file_info = pathinfo( $item_url );
|
36 |
-
switch ( $type[0] ) {
|
37 |
-
case 'image':
|
38 |
-
$actions = '<a class="fancy-view" rel="image" href="' . $item_url . '" title="' . __( "View", "gmLang" ) . '">' . __( "View", "gmLang" ) . '</a>';
|
39 |
-
break;
|
40 |
-
case 'audio':
|
41 |
-
$actions = '<a class="fancy-listen" rel="audio" href="' . $item_url . '" title="' . __( "Listen", "gmLang" ) . '">' . __( "Listen", "gmLang" ) . '</a>';
|
42 |
-
break;
|
43 |
-
case 'video':
|
44 |
-
$actions = '<a class="fancy-watch" rel="video" href="' . $item_url . '" title="' . __( "Watch", "gmLang" ) . '">' . __( "Watch", "gmLang" ) . '</a>';
|
45 |
-
break;
|
46 |
-
default:
|
47 |
-
$actions = '<a class="fancy-app" rel="application" href="' . $item_url . '" title="' . __( "Application", "gmLang" ) . '">' . __( "Application", "gmLang" ) . '</a>';
|
48 |
-
break;
|
49 |
-
}
|
50 |
-
$actions .= '<a class="edit ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="' . $nonce . '" data-media_id="' . $item->ID . '" data-task="wpmedia-edit" href="' . admin_url( 'gmedia.php?attachment_id=' . $item->ID . '&action=edit' ) . '" title="' . __( "Edit", "gmLang" ) . '">' . __( "Edit", "gmLang" ) . '</a>';
|
51 |
-
$actions .= '<a class="delete confirm" data-txt="' . __( "You are about to permanently delete the selected items.\n\r'Cancel' to stop, 'OK' to delete.", "gmLang" ) . '" href="' . wp_nonce_url( "post.php?action=delete&post=" . $item->ID, 'delete-attachment_' . $item->ID ) . '" title="' . __( "Delete Permanently", "gmLang" ) . '">' . __( "Delete Permanently", "gmLang" ) . '</a>';
|
52 |
-
$meta = '';
|
53 |
-
if ( get_post_meta( $item->ID, '_gmedia_hidden', true ) ) {
|
54 |
-
$meta = ' gmedia_hidden';
|
55 |
-
$tip = ' title="' . __( 'Hidden media', 'gmLang' ) . '"';
|
56 |
-
}
|
57 |
-
$trClass = 'class="' . $type[0] . $meta . '" id="item_' . $item->ID . '"';
|
58 |
-
?>
|
59 |
-
<tr <?php echo $trClass; ?>>
|
60 |
-
<td class="bufer"><span> </span></td>
|
61 |
-
<td class="cb">
|
62 |
-
<span><input name="doaction[]" type="checkbox" value="<?php echo $item->ID; ?>" <?php echo $checked; ?> /></span>
|
63 |
-
</td>
|
64 |
-
<td class="id"><span><?php echo $item->ID; ?></span></td>
|
65 |
-
<td class="file"><span><?php echo $file; ?></span></td>
|
66 |
-
<td class="type"><span><?php echo $file_info['extension']; ?></span></td>
|
67 |
-
<td class="title"><span><?php echo $item->post_title; ?></span></td>
|
68 |
-
<td class="descr">
|
69 |
-
<div><?php echo htmlspecialchars($item->post_content); ?></div>
|
70 |
-
</td>
|
71 |
-
<td class="actions">
|
72 |
-
<div><?php echo $actions; ?></div>
|
73 |
-
</td>
|
74 |
-
</tr>
|
75 |
-
<?php
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* gMediaRow
|
80 |
-
*
|
81 |
-
* @param object $item
|
82 |
-
*/
|
83 |
-
function gMediaRow( $item ) {
|
84 |
-
global $grandCore, $gMDb;
|
85 |
-
|
86 |
-
$nonce = wp_create_nonce( 'grandMedia' );
|
87 |
-
$gMediaURL = plugins_url( GRAND_FOLDER );
|
88 |
-
$selected_items = isset( $_COOKIE['gmedia_gm_selected_items'] ) ? explode( ',', $_COOKIE['gmedia_gm_selected_items'] ) : array();
|
89 |
-
$checked = in_array( $item->ID, $selected_items ) ? ' checked="checked"' : '';
|
90 |
-
$gmOptions = get_option( 'gmediaOptions' );
|
91 |
-
$uploads = $grandCore->gm_upload_dir();
|
92 |
-
$type = explode( '/', $item->mime_type );
|
93 |
-
$item_url = $uploads['url'] . $gmOptions['folder'][$type[0]] . '/' . $item->gmuid;
|
94 |
-
$attr = array( 'width' => 36, 'height' => 36 );
|
95 |
-
|
96 |
-
/*if('image' != $type[0]){
|
97 |
-
$preview_meta = $gMDb->get_metadata( 'gmedia', $item->ID, 'preview', true );
|
98 |
-
if(intval($preview_meta)){
|
99 |
-
$preview_item = $gMDb->get_gmedia( intval($preview_meta) );
|
100 |
-
$preview_image = $grandCore->gm_get_media_image( $preview_item, 'thumb', array(), 'src' );
|
101 |
-
$attr['data-preview'] = $preview_image;
|
102 |
-
}
|
103 |
-
}*/
|
104 |
-
|
105 |
-
$image = $grandCore->gm_get_media_image( $item, 'thumb', $attr );
|
106 |
-
$file = '<a class="grandbox" href="' . $item_url . '">' . $image . '</a>';
|
107 |
-
$file_info = pathinfo( $item_url );
|
108 |
-
switch ( $type[0] ) {
|
109 |
-
case 'image':
|
110 |
-
$actions = '<a class="fancy-view" rel="image" href="' . $item_url . '" title="' . __( "View", "gmLang" ) . '">' . __( "View", "gmLang" ) . '</a>';
|
111 |
-
break;
|
112 |
-
case 'audio':
|
113 |
-
$actions = '<a class="fancy-listen" rel="audio" href="' . $item_url . '" title="' . __( "Listen", "gmLang" ) . '">' . __( "Listen", "gmLang" ) . '</a>';
|
114 |
-
break;
|
115 |
-
case 'video':
|
116 |
-
$actions = '<a class="fancy-watch" rel="video" href="' . $item_url . '" title="' . __( "Watch", "gmLang" ) . '">' . __( "Watch", "gmLang" ) . '</a>';
|
117 |
-
break;
|
118 |
-
default:
|
119 |
-
$actions = '<a class="fancy-app" rel="application" href="' . $item_url . '" title="' . __( "Application", "gmLang" ) . '">' . __( "Application", "gmLang" ) . '</a>';
|
120 |
-
break;
|
121 |
-
}
|
122 |
-
$actions .= '<a class="edit ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="' . $nonce . '" data-gmedia_id="' . $item->ID . '" data-task="gmedia-edit" href="' . wp_nonce_url( "admin-ajax.php?action=gmDoAjax&gmedia_id=" . $item->ID . "&task=gmedia-edit", 'grandMedia' ) . '" title="' . __( "Edit", "gmLang" ) . '">' . __( "Edit", "gmLang" ) . '</a>';
|
123 |
-
$actions .= '<a class="delete ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="' . $nonce . '" data-gmedia_id="' . $item->ID . '" data-task="gmedia-delete" data-confirmtxt="' . __( "You are about to permanently delete the selected items.\n\r'Cancel' to stop, 'OK' to delete.", "gmLang" ) . '" href="' . wp_nonce_url( "admin-ajax.php?action=gmDoAjax&gmedia_id=" . $item->ID . "&task=gmedia-delete", 'grandMedia' ) . '" title="' . __( "Delete Permanently", "gmLang" ) . '">' . __( "Delete Permanently", "gmLang" ) . '</a>';
|
124 |
-
$trClass = 'class="' . $type[0] . '" id="item_' . $item->ID . '"';
|
125 |
-
$tags = $gMDb->get_the_gmedia_terms( $item->ID, 'gmedia_tag' );
|
126 |
-
if ( ! empty( $tags ) ) {
|
127 |
-
$out = array();
|
128 |
-
foreach ( $tags as $c ) {
|
129 |
-
$out[] = sprintf( '<a class="tag" href="%s">%s</a>',
|
130 |
-
esc_url( add_query_arg( array( 'tag_id' => $c->term_id, 'cat' => false, 'pager' => false ) ) ),
|
131 |
-
esc_html( $c->name )
|
132 |
-
);
|
133 |
-
}
|
134 |
-
$tags = join( '', $out );
|
135 |
-
unset( $out );
|
136 |
-
}
|
137 |
-
else {
|
138 |
-
$tags = '';
|
139 |
-
}
|
140 |
-
$cats = $gMDb->get_the_gmedia_terms( $item->ID, 'gmedia_category' );
|
141 |
-
if ( ! empty( $cats ) ) {
|
142 |
-
$out = array();
|
143 |
-
foreach ( $cats as $c ) {
|
144 |
-
$out[] = sprintf( '<a class="category" href="%s">%s</a>',
|
145 |
-
esc_url( add_query_arg( array( 'cat' => $c->term_id, 'tag_id' => false, 'pager' => false ) ) ),
|
146 |
-
esc_html( $c->name )
|
147 |
-
);
|
148 |
-
}
|
149 |
-
$cats = join( '', $out );
|
150 |
-
unset( $out );
|
151 |
-
}
|
152 |
-
else {
|
153 |
-
$cats = '';
|
154 |
-
}
|
155 |
-
?>
|
156 |
-
<tr <?php echo $trClass; ?>>
|
157 |
-
<td class="bufer"><span> </span></td>
|
158 |
-
<td class="cb">
|
159 |
-
<span><input name="doaction[]" type="checkbox" value="<?php echo $item->ID; ?>" <?php echo $checked; ?> /></span>
|
160 |
-
</td>
|
161 |
-
<td class="id"><span><?php echo $item->ID; ?></span></td>
|
162 |
-
<td class="file"><span><?php echo $file; ?></span></td>
|
163 |
-
<td class="type"><span><?php echo $file_info['extension']; ?></span></td>
|
164 |
-
<td class="title"><span><?php echo $item->title; ?></span></td>
|
165 |
-
<td class="descr">
|
166 |
-
<div><?php echo $cats . $tags . htmlspecialchars($item->description); ?></div>
|
167 |
-
</td>
|
168 |
-
<td class="actions">
|
169 |
-
<div><?php echo $actions; ?></div>
|
170 |
-
</td>
|
171 |
-
</tr>
|
172 |
-
<?php
|
173 |
-
}
|
174 |
-
|
175 |
-
function gm_term_row( $item, $gmOptions = array() ) {
|
176 |
-
global $grandCore;
|
177 |
-
|
178 |
-
$nonce = wp_create_nonce( 'grandMedia' );
|
179 |
-
|
180 |
-
if ( $item->taxonomy == 'gmedia_module' ) {
|
181 |
-
global $gMDb;
|
182 |
-
|
183 |
-
$meta_type = 'gmedia_term';
|
184 |
-
$last_edited = $gMDb->get_metadata( $meta_type, $item->term_id, 'last_edited', true );
|
185 |
-
$module_folder = $gMDb->get_metadata( $meta_type, $item->term_id, 'module_name', true );
|
186 |
-
$gMediaQuery = $gMDb->get_metadata( $meta_type, $item->term_id, 'gMediaQuery', true );
|
187 |
-
$gmModuleCount = 0;
|
188 |
-
foreach ( $gMediaQuery as $query_args ) {
|
189 |
-
$query_args['fields'] = 'ids';
|
190 |
-
$gmModuleCount += count( $gMDb->get_gmedias( $query_args ) );
|
191 |
-
}
|
192 |
-
|
193 |
-
$module_dir = $grandCore->get_module_path( $module_folder );
|
194 |
-
/** @var $module array */
|
195 |
-
if($module_dir) {
|
196 |
-
include( $module_dir['path'] . '/details.php' );
|
197 |
-
$actions = '<a class="edit" href="' . admin_url( "admin.php?page=GrandMedia_Modules&module=" . $module_folder . "&term_id=" . $item->term_id, 'grandMedia' ) . '" title="' . __( "Edit", "gmLang" ) . '">' . __( "Edit", "gmLang" ) . '</a>';
|
198 |
-
} else {
|
199 |
-
$actions = '<span class="pad"> </span>';
|
200 |
-
}
|
201 |
-
$actions .= '<a class="delete ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="' . $nonce . '" data-term_id="' . $item->term_id . '" data-tax="' . $item->taxonomy . '" data-task="term-delete" data-confirmtxt="' . __( "You are about to permanently delete the selected items.\n\r'Cancel' to stop, 'OK' to delete.", "gmLang" ) . '" href="' . wp_nonce_url( "admin-ajax.php?action=gmDoAjax&term_id=" . $item->term_id . "&tax=" . $item->taxonomy . "&task=term-delete", 'grandMedia' ) . '" title="' . __( "Delete Permanently", "gmLang" ) . '">' . __( "Delete Permanently", "gmLang" ) . '</a>';
|
202 |
-
$trClass = 'class="gmTermRow" id="item_' . $item->term_id . '"';
|
203 |
-
?>
|
204 |
-
<tr <?php echo $trClass; ?>>
|
205 |
-
<td class="bufer"><span> </span></td>
|
206 |
-
<td class="module_preview">
|
207 |
-
<span><?php if($module_dir) { ?><img src="<?php echo $module_dir['url'] . '/screenshot.png'; ?>" alt="" width="100" style="height: auto;" /><?php } else { _e('No Module', 'gmLang'); } ?></span>
|
208 |
-
</td>
|
209 |
-
<td class="id"><p><?php echo $item->term_id; ?></p></td>
|
210 |
-
<td class="name"><span><?php echo $item->name; ?></span><br />
|
211 |
-
<small><?php echo __( 'module', 'gmLang' ) . ': '; if($module_dir) { echo $module['title']; } else { echo "'{$module_folder}' " . __('not installed or broken', 'gmLang'); } ?></small>
|
212 |
-
</td>
|
213 |
-
<td class="descr">
|
214 |
-
<div><?php echo htmlspecialchars( $item->description ); ?></div>
|
215 |
-
</td>
|
216 |
-
<td class="count">
|
217 |
-
<div><?php echo $gmModuleCount; ?></div>
|
218 |
-
</td>
|
219 |
-
<td class="last_edited">
|
220 |
-
<div><?php echo $last_edited; ?></div>
|
221 |
-
</td>
|
222 |
-
<td class="actions">
|
223 |
-
<div><?php echo $actions; ?></div>
|
224 |
-
</td>
|
225 |
-
</tr>
|
226 |
-
<?php
|
227 |
-
}
|
228 |
-
else {
|
229 |
-
$selected_items = isset( $_COOKIE['gmedia_' . $item->taxonomy . '_selected_items'] ) ? explode( ',', $_COOKIE['gmedia_' . $item->taxonomy . '_selected_items'] ) : array();
|
230 |
-
$checked = in_array( $item->term_id, $selected_items ) ? ' checked="checked"' : '';
|
231 |
-
$pad = str_repeat( '— ', max( 0, $item->level ) );
|
232 |
-
if ( $pad ) $pad = '<i class="gm_has_parent" rel="' . $item->global . '">' . $pad . '</i>';
|
233 |
-
$name = $pad . $item->name;
|
234 |
-
$actions = '<a class="edit ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="' . $nonce . '" data-term_id="' . $item->term_id . '" data-tax="' . $item->taxonomy . '" data-task="term-edit" href="' . wp_nonce_url( "admin-ajax.php?action=gmDoAjax&term_id=" . $item->term_id . "&tax=" . $item->taxonomy . "&task=term-edit", 'grandMedia' ) . '" title="' . __( "Edit", "gmLang" ) . '">' . __( "Edit", "gmLang" ) . '</a>';
|
235 |
-
$actions .= '<a class="delete ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="' . $nonce . '" data-term_id="' . $item->term_id . '" data-tax="' . $item->taxonomy . '" data-task="term-delete" data-confirmtxt="' . __( "You are about to permanently delete the selected items.\n\r'Cancel' to stop, 'OK' to delete.", "gmLang" ) . '" href="' . wp_nonce_url( "admin-ajax.php?action=gmDoAjax&term_id=" . $item->term_id . "&tax=" . $item->taxonomy . "&task=term-delete", 'grandMedia' ) . '" title="' . __( "Delete Permanently", "gmLang" ) . '">' . __( "Delete Permanently", "gmLang" ) . '</a>';
|
236 |
-
$trClass = 'class="gmTermRow level' . $item->level . '" id="item_' . $item->term_id . '"';
|
237 |
-
?>
|
238 |
-
<tr <?php echo $trClass; ?>>
|
239 |
-
<td class="bufer"><span> </span></td>
|
240 |
-
<td class="cb">
|
241 |
-
<span><input name="doaction[]" type="checkbox" value="<?php echo $item->term_id; ?>" <?php echo $checked; ?> /></span>
|
242 |
-
</td>
|
243 |
-
<td class="id"><span><?php echo $item->term_id; ?></span></td>
|
244 |
-
<td class="name"><span><?php echo $name; ?></span></td>
|
245 |
-
<td class="descr">
|
246 |
-
<div><?php echo htmlspecialchars($item->description); ?></div>
|
247 |
-
</td>
|
248 |
-
<td class="count">
|
249 |
-
<div><?php echo $item->count; ?></div>
|
250 |
-
</td>
|
251 |
-
<td class="actions">
|
252 |
-
<div><?php echo $actions; ?></div>
|
253 |
-
</td>
|
254 |
-
</tr>
|
255 |
-
<?php
|
256 |
-
}
|
257 |
-
}
|
258 |
-
|
259 |
-
/**
|
260 |
-
* gMediaRow
|
261 |
-
*
|
262 |
-
* @param $id
|
263 |
-
* @param $type
|
264 |
-
*
|
265 |
-
* @return string
|
266 |
-
*/
|
267 |
-
function gmEditRow( $id, $type ) {
|
268 |
-
global $grandCore, $gMDb;
|
269 |
-
$nonce = wp_create_nonce( 'grandMedia' );
|
270 |
-
|
271 |
-
$gMediaURL = plugins_url( GRAND_FOLDER );
|
272 |
-
switch ( $type ) {
|
273 |
-
case 'gmedia_category':
|
274 |
-
case 'gmedia_tag':
|
275 |
-
$item = $gMDb->get_term( $id, $type );
|
276 |
-
?>
|
277 |
-
<table id="gmedia-edit">
|
278 |
-
<tr class="gmedia-edit-row">
|
279 |
-
<td class="colspanchange" colspan="8">
|
280 |
-
<form action="" method="post" id="gmEdit_<?php echo $item->term_id; ?>">
|
281 |
-
<fieldset class="<?php echo $type; ?>">
|
282 |
-
<legend><span class="legendID"><?php echo $item->term_id; ?></span></legend>
|
283 |
-
<input name="gmID" type="hidden" value="<?php echo $item->term_id; ?>" />
|
284 |
-
<?php wp_nonce_field( 'grandMedia' ); ?>
|
285 |
-
<div class="set gmName">
|
286 |
-
<label for="tax-edit-<?php echo $type; ?>"><?php _e( 'Name', 'gmLang' ); ?></label>
|
287 |
-
<input type="text" id="tax-edit-<?php echo $type; ?>" class="the-term" name="terms[<?php echo $type; ?>]" autocomplete="off" value="<?php echo $item->name; ?>" />
|
288 |
-
<?php
|
289 |
-
if ( $type == 'gmedia_category' ) {
|
290 |
-
$gmTerms = $gMDb->get_terms( $type, array( 'exclude_tree' => array( $item->term_id ) ) );
|
291 |
-
$opt = '';
|
292 |
-
if ( count( $gmTerms ) ) {
|
293 |
-
$children = $gMDb->_get_term_hierarchy( $type );
|
294 |
-
$termsHierarr = $grandCore->get_terms_hierarrhically( $type, $gmTerms, $children, $count = 0 );
|
295 |
-
foreach ( $termsHierarr as $termitem ) {
|
296 |
-
$sel = ( $item->global == $termitem->term_id ) ? ' selected="selected"' : '';
|
297 |
-
$pad = str_repeat( '— ', max( 0, $termitem->level ) );
|
298 |
-
$opt .= '<option' . $sel . ' value="' . $termitem->term_id . '">' . $pad . $termitem->name . '</option>' . "\n";
|
299 |
-
}
|
300 |
-
}
|
301 |
-
$sel = ( $item->global == 0 ) ? ' selected="selected"' : '';
|
302 |
-
?>
|
303 |
-
<div class="term_global_div">
|
304 |
-
<hr class="spacer" />
|
305 |
-
<label for="tax-edit-gm_term_global"><?php _e( 'Parent', 'gmLang' ); ?></label>
|
306 |
-
<select id="tax-edit-gm_term_global" class="the-term-global" name="gm_term_global">
|
307 |
-
<option<?php echo $sel; ?> value="0"><?php _e( 'None', 'gmLang' ); ?></option>
|
308 |
-
<?php echo $opt; ?>
|
309 |
-
</select>
|
310 |
-
</div>
|
311 |
-
<?php
|
312 |
-
}
|
313 |
-
?>
|
314 |
-
</div>
|
315 |
-
<div class="set gmDescription">
|
316 |
-
<label for="tax-edit-gm_term_description"><?php _e( 'Description', 'gmLang' ); ?></label>
|
317 |
-
<textarea id="tax-edit-gm_term_description" class="the-term-description" cols="20" rows="3" name="gm_term_description"><?php echo htmlspecialchars($item->description); ?></textarea>
|
318 |
-
</div>
|
319 |
-
<div class="buttons">
|
320 |
-
<input type="button" class="cancel" value="<?php _e( 'Cancel', 'gmLang' ); ?>" title="<?php _e( 'Cancel', 'gmLang' ); ?>" />
|
321 |
-
<input type="submit" class="save" name="updateTerm" value="<?php _e( 'Save', 'gmLang' ); ?>" title="<?php _e( 'Save', 'gmLang' ); ?>" />
|
322 |
-
</div>
|
323 |
-
</fieldset>
|
324 |
-
</form>
|
325 |
-
</td>
|
326 |
-
</tr>
|
327 |
-
</table>
|
328 |
-
<?php
|
329 |
-
die();
|
330 |
-
break;
|
331 |
-
case 'gmedia':
|
332 |
-
$item = $gMDb->get_gmedia( $id );
|
333 |
-
$meta = $gMDb->get_metadata( 'gmedia', $id );
|
334 |
-
$mime_type = explode( '/', $item->mime_type );
|
335 |
-
$image = $grandCore->gm_get_media_image( $item, 'thumb', array( 'data-icon' => false ) );
|
336 |
-
if(isset($meta['preview'][0]) && intval($meta['preview'][0])){
|
337 |
-
$preview_item = $gMDb->get_gmedia( intval($meta['preview'][0]) );
|
338 |
-
$preview_image = $grandCore->gm_get_media_image( $preview_item, 'thumb', array( 'id' => false, 'class' => 'gmedia-thumb-preview' ) );
|
339 |
-
$image = $preview_image . $image;
|
340 |
-
}
|
341 |
-
?>
|
342 |
-
<table id="gmedia-edit">
|
343 |
-
<tr class="gmedia-edit-row">
|
344 |
-
<td class="colspanchange" colspan="8">
|
345 |
-
<form action="" method="post" id="gmEdit_<?php echo $item->ID; ?>">
|
346 |
-
<fieldset class="<?php echo $type; ?>">
|
347 |
-
<legend><span class="legendID"><?php echo $item->ID; ?></span></legend>
|
348 |
-
<input name="gmedia[ID]" type="hidden" value="<?php echo $item->ID; ?>" />
|
349 |
-
|
350 |
-
<div class="gmImage"><?php echo $image; ?></div>
|
351 |
-
<div class="gmFile row va-t">
|
352 |
-
<span class="label"><?php _e( 'Filename', 'gmLang' ); ?></span><span class="value"><?php echo $item->gmuid; ?></span>
|
353 |
-
</div>
|
354 |
-
<div class="gmTitle row va-b">
|
355 |
-
<span class="label"><?php _e( 'Title', 'gmLang' ); ?></span><input name="gmedia[title]" type="text" value="<?php echo $item->title; ?>" />
|
356 |
-
</div>
|
357 |
-
<?php if('image' != $mime_type[0]){ ?>
|
358 |
-
<div class="gmPreview row va-b">
|
359 |
-
<span class="label"><?php _e( 'Preview ID', 'gmLang' ); ?></span><input name="gmedia[meta][preview]" type="text" value="<?php if(isset($meta['preview'][0]) && intval($meta['preview'][0])){echo $meta['preview'][0];}; ?>" readonly /><span title="<?php _e('clear', 'gmLang'); ?>" class="clear-preview">×</span>
|
360 |
-
<span class="metabox-preview">#</span>
|
361 |
-
</div>
|
362 |
-
<?php } ?>
|
363 |
-
<div class="gmLink row va-b">
|
364 |
-
<span class="label"><?php _e( 'Link', 'gmLang' ); ?></span><input name="gmedia[meta][link]" type="text" value="<?php if(isset($meta['link'][0])){echo $meta['link'][0];}; ?>" />
|
365 |
-
</div>
|
366 |
-
<?php $cat = $gMDb->get_the_gmedia_terms( $item->ID, 'gmedia_category' );
|
367 |
-
if ( empty( $cat ) ) {
|
368 |
-
$cat_id = 0;
|
369 |
-
}
|
370 |
-
else {
|
371 |
-
$cat_id = $cat[0]->term_id;
|
372 |
-
}
|
373 |
-
$ttype = 'gmedia_category';
|
374 |
-
$gmTerms = $gMDb->get_terms( $ttype );
|
375 |
-
$opt = '';
|
376 |
-
if ( count( $gmTerms ) ) {
|
377 |
-
$children = $gMDb->_get_term_hierarchy( $ttype );
|
378 |
-
$termsHierarr = $grandCore->get_terms_hierarrhically( $ttype, $gmTerms, $children, $count = 0 );
|
379 |
-
foreach ( $termsHierarr as $termitem ) {
|
380 |
-
$sel = ( $cat_id == $termitem->term_id ) ? ' selected="selected"' : '';
|
381 |
-
$pad = str_repeat( '— ', max( 0, $termitem->level ) );
|
382 |
-
$opt .= '<option' . $sel . ' value="' . $termitem->term_id . '">' . $pad . $termitem->name . '</option>' . "\n";
|
383 |
-
}
|
384 |
-
}
|
385 |
-
$sel = ( $cat_id == 0 ) ? ' selected="selected"' : '';
|
386 |
-
?>
|
387 |
-
<div class="gmCategory row va-b">
|
388 |
-
<span class="label"><?php _e( 'Category', 'gmLang' ); ?></span><select name="gmedia[terms][gmedia_category]">
|
389 |
-
<option<?php echo $sel; ?> value="0"><?php _e( 'None', 'gmLang' ); ?></option>
|
390 |
-
<?php echo $opt; ?>
|
391 |
-
</select></div>
|
392 |
-
<?php
|
393 |
-
$tags = $gMDb->get_the_gmedia_terms( $item->ID, 'gmedia_tag' );
|
394 |
-
if ( ! empty( $tags ) ) {
|
395 |
-
$out = array();
|
396 |
-
foreach ( $tags as $c ) {
|
397 |
-
$out[] = esc_html( $c->name );
|
398 |
-
}
|
399 |
-
$tags = join( ', ', $out );
|
400 |
-
unset( $out );
|
401 |
-
}
|
402 |
-
else {
|
403 |
-
$tags = '';
|
404 |
-
}
|
405 |
-
?>
|
406 |
-
<div class="gmLabels row va-b">
|
407 |
-
<span class="label"><?php _e( 'Labels', 'gmLang' ); ?></span><textarea name="gmedia[terms][gmedia_tag]" rows="2" cols="60"><?php echo $tags; ?></textarea>
|
408 |
-
</div>
|
409 |
-
<div class="gmDescription">
|
410 |
-
<span class="label"><?php _e( 'Description', 'gmLang' ); ?></span><textarea name="gmedia[description]" rows="4" cols="10"><?php echo htmlspecialchars($item->description); ?></textarea>
|
411 |
-
</div>
|
412 |
-
<input name="gmedia[author]" type="hidden" value="<?php echo $item->author; ?>" />
|
413 |
-
<input name="gmedia[gmuid]" type="hidden" value="<?php echo $item->gmuid; ?>" />
|
414 |
-
<input name="gmedia[mime_type]" type="hidden" value="<?php echo $item->mime_type; ?>" />
|
415 |
-
<input name="gmedia[date]" type="hidden" value="<?php echo $item->date; ?>" />
|
416 |
-
|
417 |
-
<div class="buttons">
|
418 |
-
<input type="button" class="cancel" value="<?php _e( 'Cancel', 'gmLang' ); ?>" title="<?php _e( 'Cancel', 'gmLang' ); ?>" />
|
419 |
-
<input type="submit" class="save ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="<?php echo $nonce; ?>" data-form="#gmEdit_<?php echo $item->ID; ?>" data-task="gmedia-update" name="gmedia-update" value="<?php _e( 'Save', 'gmLang' ); ?>" title="<?php _e( 'Save', 'gmLang' ); ?>" />
|
420 |
-
</div>
|
421 |
-
</fieldset>
|
422 |
-
</form>
|
423 |
-
</td>
|
424 |
-
</tr>
|
425 |
-
</table>
|
426 |
-
<?php
|
427 |
-
die();
|
428 |
-
break;
|
429 |
-
case 'wpmedia':
|
430 |
-
$item = get_post( $id );
|
431 |
-
$image = wp_get_attachment_image_src( $item->ID, array( 150, 150 ), false );
|
432 |
-
$item_url = wp_get_attachment_url( $item->ID );
|
433 |
-
$item_url = wp_basename( $item_url );
|
434 |
-
if ( ! $image ) {
|
435 |
-
if ( $src = wp_mime_type_icon( $item->ID ) ) {
|
436 |
-
$icon_dir_url = $gMediaURL . '/admin/images';
|
437 |
-
$image[0] = $icon_dir_url . '/' . wp_basename( $src );
|
438 |
-
}
|
439 |
-
}
|
440 |
-
$edit_url = admin_url( 'media.php?action=edit&attachment_id=' . $item->ID );
|
441 |
-
?>
|
442 |
-
<table id="gmedia-edit">
|
443 |
-
<tr class="gmedia-edit-row">
|
444 |
-
<td class="colspanchange" colspan="8">
|
445 |
-
<form action="" method="post" id="gmEdit_<?php echo $item->ID; ?>">
|
446 |
-
<fieldset class="<?php echo $type; ?>">
|
447 |
-
<legend><span class="legendID"><?php echo $item->ID; ?></span></legend>
|
448 |
-
<input name="gmID" type="hidden" value="<?php echo $item->ID; ?>" />
|
449 |
-
|
450 |
-
<div class="gmImage">
|
451 |
-
<img width="150" height="150" alt="<?php echo $item->post_title; ?>" class="attachment-150x150" src="<?php echo $image[0]; ?>" /><a class="gmImageEdit" href="<?php echo $edit_url; ?>" title="<?php _e( 'Edit media by WordPress Media Library.', 'gmLang' ); ?>"><?php _e( 'Edit', 'gmLang' ); ?></a>
|
452 |
-
</div>
|
453 |
-
<div class="gmFile row va-t">
|
454 |
-
<span class="label"><?php _e( 'Filename', 'gmLang' ); ?></span><span class="value"><?php echo $item_url; ?></span>
|
455 |
-
</div>
|
456 |
-
<div class="gmTitle row va-b">
|
457 |
-
<span class="label"><?php _e( 'Title', 'gmLang' ); ?></span><input name="gmTitle" type="text" value="<?php echo $item->post_title; ?>" />
|
458 |
-
</div>
|
459 |
-
<div class="gmDescription">
|
460 |
-
<span class="label"><?php _e( 'Description', 'gmLang' ); ?></span><textarea name="gmDescription" rows="4" cols="60"><?php echo htmlspecialchars($item->post_content); ?></textarea>
|
461 |
-
</div>
|
462 |
-
<div class="buttons">
|
463 |
-
<input type="button" class="cancel" value="<?php _e( 'Cancel', 'gmLang' ); ?>" title="<?php _e( 'Cancel', 'gmLang' ); ?>" />
|
464 |
-
<input type="submit" class="save ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="<?php echo $nonce; ?>" data-form="#gmEdit_<?php echo $item->ID; ?>" data-task="updateMedia" name="wpmedia-update" value="<?php _e( 'Save', 'gmLang' ); ?>" title="<?php _e( 'Save', 'gmLang' ); ?>" />
|
465 |
-
</div>
|
466 |
-
</fieldset>
|
467 |
-
</form>
|
468 |
-
</td>
|
469 |
-
</tr>
|
470 |
-
</table>
|
471 |
-
<?php
|
472 |
-
die();
|
473 |
-
break;
|
474 |
-
}
|
475 |
-
die();
|
476 |
-
}
|
477 |
-
|
478 |
-
/**
|
479 |
-
* gm_build_query_tabs
|
480 |
-
*
|
481 |
-
* @param $query_args
|
482 |
-
*
|
483 |
-
* @return string
|
484 |
-
*/
|
485 |
-
function gm_build_query_tab( $query_args ) {
|
486 |
-
global $gMDb, $grandCore;
|
487 |
-
|
488 |
-
$nonce = wp_create_nonce( 'grandMedia' );
|
489 |
-
$tab = $query_args['tab'];
|
490 |
-
|
491 |
-
if ( isset( $_REQUEST['term_id'] ) ) {
|
492 |
-
$gMediaLib = $gMDb->get_gmedias( $query_args );
|
493 |
-
$gmediaCount = $gMDb->gmediaCount;
|
494 |
-
}
|
495 |
-
else {
|
496 |
-
$gMediaLib = array();
|
497 |
-
$gmediaCount = 0;
|
498 |
-
}
|
499 |
-
$gmOptions = get_option( 'gmediaOptions' );
|
500 |
-
$uploads = $grandCore->gm_upload_dir();
|
501 |
-
?>
|
502 |
-
<div class="tabqueryblock" id="tabqueryblock__<?php echo $tab; ?>">
|
503 |
-
<?php if ( isset( $query_args['multitab'] ) && $query_args['multitab'] == 'true' ) { ?>
|
504 |
-
<div class="format-setting-query gm_query_tabname">
|
505 |
-
<label for="query_tabname__<?php echo $tab; ?>"><?php _e( 'Tab Name', 'gmLang' ); ?>:</label>
|
506 |
-
<input type="text" name="gMediaQuery[<?php echo $tab; ?>][tabname]" id="query_tabname__<?php echo $tab; ?>" class="gmedia-ui-select query_tabname" value="<?php echo $query_args['tabname']; ?>" />
|
507 |
-
</div>
|
508 |
-
<?php } ?>
|
509 |
-
|
510 |
-
<div class="gMediaLibActions">
|
511 |
-
<input type="hidden" name="gMediaQuery[<?php echo $tab; ?>][mime_type]" id="query_vis_mime_type__<?php echo $tab; ?>" class="gmedia-ui-select query_mime_type" value="<?php echo $query_args['mime_type']; ?>" />
|
512 |
-
|
513 |
-
<div class="abuts">
|
514 |
-
<span class="gm-ui-folder" title="<?php _e( 'Category', 'gmLang' ); ?>"><select name="gMediaQuery[<?php echo $tab; ?>][cat]" id="query_vis_cat__<?php echo $tab; ?>" class="gmedia-ui-select query_cat">
|
515 |
-
<option value=""<?php selected( $query_args['cat'], '' ); ?>><?php _e( 'Any', 'gmLang' ); ?></option>
|
516 |
-
<option value="0"<?php selected( $query_args['cat'], '0' ); ?>><?php _e( 'Uncategorized', 'gmLang' ); ?></option>
|
517 |
-
<?php
|
518 |
-
/* get category array */
|
519 |
-
$type = 'gmedia_category';
|
520 |
-
$categories = $gMDb->get_terms( $type, array( 'hide_empty' => false ) );
|
521 |
-
$opt = '';
|
522 |
-
if ( count( $categories ) ) {
|
523 |
-
$children = $gMDb->_get_term_hierarchy( $type );
|
524 |
-
$termsHierarr = $grandCore->get_terms_hierarrhically( $type, $categories, $children, $count = 0 );
|
525 |
-
foreach ( $termsHierarr as $termitem ) {
|
526 |
-
$sel = selected( $query_args['cat'], $termitem->term_id, false );
|
527 |
-
$pad = str_repeat( '— ', max( 0, $termitem->level ) );
|
528 |
-
$opt .= '<option' . $sel . ' value="' . $termitem->term_id . '">' . $pad . $termitem->name . '</option>' . "\n";
|
529 |
-
}
|
530 |
-
echo $opt;
|
531 |
-
}
|
532 |
-
?>
|
533 |
-
</select></span>
|
534 |
-
<span class="gm-ui-author" title="<?php _e( 'Author', 'gmLang' ); ?>"><select name="gMediaQuery[<?php echo $tab; ?>][author]" id="query_vis_author__<?php echo $tab; ?>" class="gmedia-ui-select query_author">
|
535 |
-
<option value=""<?php selected( $query_args['author'], '' ); ?>><?php _e( 'Any', 'gmLang' ); ?></option>
|
536 |
-
<?php $args = array(
|
537 |
-
'who' => 'authors'
|
538 |
-
);
|
539 |
-
$blogusers = get_users( $args );
|
540 |
-
foreach ( $blogusers as $user ) {
|
541 |
-
?>
|
542 |
-
<option value="<?php echo $user->ID; ?>" <?php selected( $query_args['author'], $user->ID ); ?>><?php echo $user->display_name; ?></option>
|
543 |
-
<?php } ?>
|
544 |
-
</select></span>
|
545 |
-
<span class="gm-ui-orderby" title="<?php _e( 'Order By', 'gmLang' ); ?>"><select name="gMediaQuery[<?php echo $tab; ?>][orderby]" id="query_vis_orderby__<?php echo $tab; ?>" class="gmedia-ui-select query_orderby">
|
546 |
-
<option value="none"<?php selected( $query_args['orderby'], 'none' ); ?>><?php _e( 'No order', 'gmLang' ); ?></option>
|
547 |
-
<option value="ID"<?php selected( $query_args['orderby'], 'ID' ); ?>><?php _e( 'Order by gMedia id', 'gmLang' ); ?></option>
|
548 |
-
<option value="author"<?php selected( $query_args['orderby'], 'author' ); ?>><?php _e( 'Order by author', 'gmLang' ); ?></option>
|
549 |
-
<option value="title"<?php selected( $query_args['orderby'], 'title' ); ?>><?php _e( 'Order by title', 'gmLang' ); ?></option>
|
550 |
-
<option value="date"<?php selected( $query_args['orderby'], 'date' ); ?>><?php _e( 'Order by date', 'gmLang' ); ?></option>
|
551 |
-
<option value="modified"<?php selected( $query_args['orderby'], 'modified' ); ?>><?php _e( 'Order by last modified date', 'gmLang' ); ?></option>
|
552 |
-
<option value="rand"<?php selected( $query_args['orderby'], 'rand' ); ?>><?php _e( 'Random order', 'gmLang' ); ?></option>
|
553 |
-
</select></span>
|
554 |
-
<span class="gm-ui-order" title="<?php _e( 'Order', 'gmLang' ); ?>"><select name="gMediaQuery[<?php echo $tab; ?>][order]" id="query_vis_order__<?php echo $tab; ?>" class="gmedia-ui-select query_order">
|
555 |
-
<option value="DESC"<?php selected( $query_args['order'], 'DESC' ); ?>><?php _e( 'DESC', 'gmLang' ); ?></option>
|
556 |
-
<option value="ASC"<?php selected( $query_args['order'], 'ASC' ); ?>><?php _e( 'ASC', 'gmLang' ); ?></option>
|
557 |
-
</select></span>
|
558 |
-
</div>
|
559 |
-
<div class="more abut">
|
560 |
-
<div class="dropbut"><?php _e( 'Labels', 'gmLang' ); ?></div>
|
561 |
-
<div class="dropbox">
|
562 |
-
<div class="term_list" id="query_vis_tag__<?php echo $tab; ?>">
|
563 |
-
<?php
|
564 |
-
/* get category array */
|
565 |
-
$type = 'gmedia_tag';
|
566 |
-
$tags = $gMDb->get_terms( $type, array( 'hide_empty' => false ) );
|
567 |
-
$opt = '';
|
568 |
-
if ( count( $tags ) ) {
|
569 |
-
foreach ( $tags as $termitem ) {
|
570 |
-
$sel = ( in_array( $termitem->term_id, $query_args['tag__in'] ) ) ? ' checked' : '';
|
571 |
-
$opt .= '<div class="item' . $sel . '"><span class="dropchild query_tag_value">';
|
572 |
-
$opt .= '<input type="checkbox"' . $sel . ' name="gMediaQuery[' . $tab . '][tag__in][]" id="l_ch_' . $termitem->term_id . '__' . $tab . '" value="' . $termitem->term_id . '" /> ';
|
573 |
-
$opt .= '<label for="l_ch_' . $termitem->term_id . '__' . $tab . '">' . $termitem->name . '</label>';
|
574 |
-
$opt .= '</span></div>' . "\n";
|
575 |
-
}
|
576 |
-
echo $opt;
|
577 |
-
}
|
578 |
-
else {
|
579 |
-
echo '<p>' . __( 'No Tags Found', 'gmLang' ) . '</p>';
|
580 |
-
}
|
581 |
-
?>
|
582 |
-
</div>
|
583 |
-
</div>
|
584 |
-
</div>
|
585 |
-
<div class="msg reload ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="<?php echo $nonce; ?>" data-form="#tabqueryblock__<?php echo $tab; ?>" data-task="gm-tabquery-load" title="<?php _e( 'Reload', 'gmLang' ); ?>">
|
586 |
-
<span id="selectedItems__<?php echo $tab; ?>"><span class="selectedItems"><?php echo $gmediaCount; ?></span> <?php _e( 'loaded', 'gmLang' ); ?></span>
|
587 |
-
</div>
|
588 |
-
<a href="#" class="gmDelTab"><?php _e( 'Remove Tab', 'gmLang' ); ?></a>
|
589 |
-
</div>
|
590 |
-
<div id="query_media_vis__<?php echo $tab; ?>" class="query_media_vis">
|
591 |
-
<?php
|
592 |
-
if ( ! empty( $gMediaLib ) ) {
|
593 |
-
foreach ( $gMediaLib as $item ) {
|
594 |
-
$type = explode( '/', $item->mime_type );
|
595 |
-
$item_url = $uploads['url'] . $gmOptions['folder'][$type[0]] . '/' . $item->gmuid;
|
596 |
-
$image = $grandCore->gm_get_media_image( $item, 'thumb', array( 'width' => 48, 'height' => 48 ) );
|
597 |
-
$title = trim( esc_attr( strip_tags( $item->title ) ) );
|
598 |
-
$file = '<a class="grandbox" title="' . $title . '" rel="querybuilder__' . $tab . '" href="' . $item_url . '">' . $image . '<span>' . $title . '</span></a> ';
|
599 |
-
echo $file;
|
600 |
-
}
|
601 |
-
}
|
602 |
-
else {
|
603 |
-
echo '<div style="height:48px; text-align: center; line-height: 48px;">' . __( 'Change filter options or click refresh icon.', 'gmLang' ) . '</div>';
|
604 |
-
}
|
605 |
-
|
606 |
-
?>
|
607 |
-
|
608 |
-
</div>
|
609 |
-
</div>
|
610 |
-
<?php
|
611 |
-
}
|
612 |
-
|
613 |
-
} // END class gmAdmin
|
614 |
-
|
615 |
-
global $grandAdmin;
|
616 |
-
$grandAdmin = new gmAdmin();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/galleries.php
ADDED
@@ -0,0 +1,727 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) ) {
|
3 |
+
die( 'You are not allowed to call this page directly.' );
|
4 |
+
}
|
5 |
+
|
6 |
+
/**
|
7 |
+
* gmediaGalleries()
|
8 |
+
*
|
9 |
+
* @return mixed content
|
10 |
+
*/
|
11 |
+
function gmediaGalleries() {
|
12 |
+
global $user_ID, $gmDB, $gmCore, $gmGallery, $gmProcessor;
|
13 |
+
|
14 |
+
$url = add_query_arg(array('page' => $gmProcessor->page), admin_url('admin.php'));
|
15 |
+
|
16 |
+
/* todo: per_page and order options for gmedia_terms
|
17 |
+
$gm_screen_options = get_user_meta($user_ID, 'gm_screen_options', true);
|
18 |
+
if(!is_array($gm_screen_options)){
|
19 |
+
$gm_screen_options = array();
|
20 |
+
}
|
21 |
+
$gm_screen_options = array_merge($gmGallery->options['gm_screen_options'], $gm_screen_options);
|
22 |
+
*/
|
23 |
+
|
24 |
+
$filter = ('selected' == $gmCore->_req('filter'))? $gmProcessor->selected_items : null;
|
25 |
+
$args = array('orderby' => $gmCore->_get('orderby', 'name'), 'order' => $gmCore->_get('order', 'ASC'),
|
26 |
+
'search' => $gmCore->_get('s', ''), 'number' => $gmCore->_get('number', 30),
|
27 |
+
'hide_empty' => 0, 'page' => $gmCore->_get('pager', 1), 'include' => $filter);
|
28 |
+
$args['offset'] = ($args['page'] - 1) * $args['number'];
|
29 |
+
|
30 |
+
$taxonomy = 'gmedia_gallery';
|
31 |
+
$gmediaTerms = $gmDB->get_terms($taxonomy, $args);
|
32 |
+
if(is_wp_error($gmediaTerms)){
|
33 |
+
echo $gmProcessor->alert('danger', $gmediaTerms->get_error_message());
|
34 |
+
$gmediaTerms = array();
|
35 |
+
}
|
36 |
+
|
37 |
+
$modules = array();
|
38 |
+
if($plugin_modules = glob(GMEDIA_ABSPATH . 'module/*', GLOB_ONLYDIR | GLOB_NOSORT)){
|
39 |
+
foreach($plugin_modules as $path){
|
40 |
+
$mfold = basename($path);
|
41 |
+
$modules[$mfold] = array(
|
42 |
+
'module_name' => $mfold,
|
43 |
+
'module_url' => $gmCore->gmedia_url . "/module/{$mfold}",
|
44 |
+
'module_path' => $path
|
45 |
+
);
|
46 |
+
}
|
47 |
+
}
|
48 |
+
if($upload_modules = glob($gmCore->upload['path'].'/'.$gmGallery->options['folder']['module'].'/*', GLOB_ONLYDIR | GLOB_NOSORT)){
|
49 |
+
foreach($upload_modules as $path){
|
50 |
+
$mfold = basename($path);
|
51 |
+
$modules[$mfold] = array(
|
52 |
+
'module_name' => $mfold,
|
53 |
+
'module_url' => $gmCore->upload['url'] . "/{$gmGallery->options['folder']['module']}/{$mfold}",
|
54 |
+
'module_path' => $path
|
55 |
+
);
|
56 |
+
}
|
57 |
+
}
|
58 |
+
?>
|
59 |
+
|
60 |
+
<div class="panel panel-default">
|
61 |
+
<div class="panel-heading clearfix">
|
62 |
+
<form class="form-inline gmedia-search-form" role="search" method="get">
|
63 |
+
<div class="form-group">
|
64 |
+
<input type="hidden" name="page" value="<?php echo $gmProcessor->page; ?>"/>
|
65 |
+
<input type="hidden" name="term" value="<?php echo $taxonomy; ?>"/>
|
66 |
+
<input id="gmedia-search" class="form-control input-sm" type="text" name="s" placeholder="<?php _e('Search...', 'gmLang'); ?>" value="<?php echo $gmCore->_get('s', ''); ?>"/>
|
67 |
+
</div>
|
68 |
+
<button type="submit" class="btn btn-default input-sm"><span class="glyphicon glyphicon-search"></span></button>
|
69 |
+
</form>
|
70 |
+
<?php echo $gmDB->query_pager(); ?>
|
71 |
+
|
72 |
+
<div class="btn-toolbar pull-left">
|
73 |
+
<div class="btn-group gm-checkgroup" id="cb_global-btn">
|
74 |
+
<span class="btn btn-default active"><input class="doaction" id="cb_global" data-group="cb_media-object" type="checkbox"/></span>
|
75 |
+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
76 |
+
<span class="caret"></span>
|
77 |
+
<span class="sr-only"><?php _e('Toggle Dropdown', 'gmLang'); ?></span>
|
78 |
+
</button>
|
79 |
+
<ul class="dropdown-menu" role="menu">
|
80 |
+
<li><a data-select="total" href="#"><?php _e('All', 'gmLang'); ?></a></li>
|
81 |
+
<li><a data-select="none" href="#"><?php _e('None', 'gmLang'); ?></a></li>
|
82 |
+
<li class="divider"></li>
|
83 |
+
<li><a data-select="reverse" href="#" title="<?php _e('Reverse only visible items', 'gmLang'); ?>"><?php _e('Reverse', 'gmLang'); ?></a></li>
|
84 |
+
</ul>
|
85 |
+
</div>
|
86 |
+
|
87 |
+
<div class="btn-group" style="margin-right:20px;">
|
88 |
+
<a class="btn btn-primary" href="#chooseModuleModal" data-toggle="modal"><?php _e('Create Gallery', 'gmLang'); ?></a>
|
89 |
+
</div>
|
90 |
+
|
91 |
+
<div class="btn-group">
|
92 |
+
<a class="btn btn-default" href="#"><?php _e('Action', 'gmLang'); ?></a>
|
93 |
+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
94 |
+
<span class="caret"></span>
|
95 |
+
<span class="sr-only"><?php _e('Toggle Dropdown', 'gmLang'); ?></span>
|
96 |
+
</button>
|
97 |
+
<?php
|
98 |
+
$rel_selected_show = 'rel-selected-show';
|
99 |
+
$rel_selected_hide = 'rel-selected-hide';
|
100 |
+
?>
|
101 |
+
<ul class="dropdown-menu" role="menu">
|
102 |
+
<li class="dropdown-header <?php echo $rel_selected_hide; ?>"><span><?php _e("Select items to see more actions", "gmLang"); ?></span></li>
|
103 |
+
<li class="<?php echo $rel_selected_show; ?>"><a href="<?php echo wp_nonce_url($gmCore->get_admin_url(array('delete' => 'selected'), array('filter')), 'gmedia_delete') ?>" class="gmedia-delete" data-confirm="<?php _e("You are about to permanently delete the selected items.\n\r'Cancel' to stop, 'OK' to delete.", "gmLang"); ?>"><?php _e('Delete Selected Items', 'gmLang'); ?></a></li>
|
104 |
+
<?php do_action('gmedia_term_action_list'); ?>
|
105 |
+
</ul>
|
106 |
+
</div>
|
107 |
+
|
108 |
+
<form class="btn-group" id="gm-selected-btn" name="gm-selected-form" action="<?php echo add_query_arg(array('filter' => 'selected'), $url); ?>" method="post">
|
109 |
+
<button type="submit" class="btn btn<?php echo ('selected' == $gmCore->_req('filter'))? '-success' : '-info' ?>"><?php printf(__('%s selected', 'gmLang'), '<span id="gm-selected-qty">' . count($gmProcessor->selected_items) . '</span>'); ?></button>
|
110 |
+
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown"><span class="caret"></span> <span class="sr-only"><?php _e('Toggle Dropdown', 'gmLang'); ?></span></button>
|
111 |
+
<input type="hidden" id="gm-selected" data-userid="<?php echo $user_ID; ?>" data-key="<?php echo $taxonomy; ?>" name="selected_items" value="<?php echo implode(',', $gmProcessor->selected_items); ?>"/>
|
112 |
+
<ul class="dropdown-menu" role="menu">
|
113 |
+
<li><a id="gm-selected-show" href="#show"><?php _e('Show only selected items', 'gmLang'); ?></a></li>
|
114 |
+
<li><a id="gm-selected-clear" href="#clear"><?php _e('Clear selected items', 'gmLang'); ?></a></li>
|
115 |
+
</ul>
|
116 |
+
</form>
|
117 |
+
|
118 |
+
</div>
|
119 |
+
|
120 |
+
</div>
|
121 |
+
<div class="panel-body" id="gmedia-msg-panel"></div>
|
122 |
+
<form class="list-group" id="gm-list-table" style="margin-bottom:4px;">
|
123 |
+
<?php
|
124 |
+
if(count($gmediaTerms)){
|
125 |
+
$lib_url = add_query_arg(array('page' => 'GrandMedia'), admin_url('admin.php'));
|
126 |
+
foreach($gmediaTerms as $term){
|
127 |
+
|
128 |
+
$term_meta = $gmDB->get_metadata('gmedia_term', $term->term_id);
|
129 |
+
$term_meta = array_map('reset', $term_meta);
|
130 |
+
$term_meta = array_map('maybe_unserialize', $term_meta);
|
131 |
+
|
132 |
+
$module = $gmCore->get_module_path( $term_meta['module'] );
|
133 |
+
$module_info = array('type' => '—');
|
134 |
+
if(file_exists($module['path'] . '/index.php')){
|
135 |
+
$broken = false;
|
136 |
+
include($module['path'] . '/index.php');
|
137 |
+
} else{
|
138 |
+
$broken = true;
|
139 |
+
}
|
140 |
+
|
141 |
+
|
142 |
+
$is_selected = in_array($term->term_id, $gmProcessor->selected_items)? true : false;
|
143 |
+
?>
|
144 |
+
<div class="list-group-item row d-row<?php echo $is_selected? ' active' : ''; ?>" id="list-item-<?php echo $term->term_id; ?>" data-id="<?php echo $term->term_id; ?>" data-type="<?php echo $term_meta['module']; ?>">
|
145 |
+
<div class="term_id">#<?php echo $term->term_id; ?></div>
|
146 |
+
<div class="col-xs-7">
|
147 |
+
<label class="cb_media-object" style="width:130px;">
|
148 |
+
<input name="doaction[]" type="checkbox"<?php echo $is_selected? ' checked="checked"' : ''; ?> data-type="<?php echo $term_meta['module']; ?>" class="hidden" value="<?php echo $term->term_id; ?>"/>
|
149 |
+
<?php if(!$broken){ ?>
|
150 |
+
<span class="thumbnail"><img src="<?php echo $module['url'].'/screenshot.png'; ?>" alt="<?php echo esc_attr($term->name); ?>"/></span>
|
151 |
+
<?php } else{ ?>
|
152 |
+
<div class="bg-danger text-center"><?php _e('Module broken <br>Reinstall module', 'gmLang') ?></div>
|
153 |
+
<?php } ?>
|
154 |
+
</label>
|
155 |
+
<div class="media-body" style="margin-left:145px;">
|
156 |
+
<p class="media-title">
|
157 |
+
<a href="<?php echo add_query_arg(array('edit_gallery' => $term->term_id), $url); ?>"><?php echo esc_html($term->name); ?></a>
|
158 |
+
</p>
|
159 |
+
<p class="media-caption"><?php echo esc_html($term->description); ?></p>
|
160 |
+
<p class="media-meta" title="<?php _e('Shortcode', 'gmLang'); ?>" style="font-weight:bold">
|
161 |
+
<span class="label label-default"><?php _e('Shortcode', 'gmLang'); ?>:</span> [gmedia id=<?php echo $term->term_id; ?>]
|
162 |
+
</p>
|
163 |
+
</div>
|
164 |
+
</div>
|
165 |
+
<div class="col-xs-5">
|
166 |
+
<p class="media-meta">
|
167 |
+
<span class="label label-default"><?php _e('Module', 'gmLang'); ?>:</span> <?php echo $term_meta['module']; ?>
|
168 |
+
<br><span class="label label-default"><?php _e('Type','gmLang'); ?>:</span> <?php echo $module_info['type']; ?>
|
169 |
+
<br><span class="label label-default"><?php _e('Last Edited','gmLang'); ?>:</span> <?php echo $term_meta['edited']; ?>
|
170 |
+
<br><span class="label label-default"><?php _e('Status','gmLang'); ?>:</span> <?php echo $term->status; ?>
|
171 |
+
<br><span class="label label-default"><?php _e('Source','gmLang'); ?>:</span>
|
172 |
+
<?php
|
173 |
+
$gallery_tabs = reset($term_meta['query']);
|
174 |
+
$tax_tabs = key($term_meta['query']);
|
175 |
+
if('gmedia__in' == $tax_tabs){
|
176 |
+
_e('Selected Gmedia', 'gmLang');
|
177 |
+
$gmedia_ids = wp_parse_id_list($gallery_tabs[0]);
|
178 |
+
$gal_source = sprintf('<a class="selected__in" href="%s">'.__('Show %d items in Gmedia Library','gmLang').'</a>', esc_url(add_query_arg(array('gmedia__in' => implode(',', $gmedia_ids)), $lib_url)), count($gmedia_ids));
|
179 |
+
echo " ($gal_source)";
|
180 |
+
} else{
|
181 |
+
$tabs = $gmDB->get_terms($tax_tabs, array('include' => $gallery_tabs));
|
182 |
+
$terms_source = array();
|
183 |
+
if('gmedia_category' == $tax_tabs){
|
184 |
+
_e('Categories', 'gmLang');
|
185 |
+
foreach($tabs as $t){
|
186 |
+
$terms_source[] = sprintf('<a class="category" href="%s">%s</a>', esc_url(add_query_arg(array('cat' => $t->term_id), $lib_url)), esc_html($gmGallery->options['taxonomies']['gmedia_category'][$t->name]));
|
187 |
+
}
|
188 |
+
} elseif('gmedia_album' == $tax_tabs){
|
189 |
+
_e('Albums', 'gmLang');
|
190 |
+
foreach($tabs as $t){
|
191 |
+
$terms_source[] = sprintf('<a class="album" href="%s">%s</a>', esc_url(add_query_arg(array('alb' => $t->term_id), $lib_url)), esc_html($t->name));
|
192 |
+
}
|
193 |
+
} elseif('gmedia_tag' == $tax_tabs){
|
194 |
+
_e('Tags', 'gmLang');
|
195 |
+
foreach($tabs as $t){
|
196 |
+
$terms_source[] = sprintf('<a class="tag" href="%s">%s</a>', esc_url(add_query_arg(array('tag_id' => $t->term_id), $lib_url)), esc_html($t->name));
|
197 |
+
}
|
198 |
+
} elseif('gmedia_filter' == $tax_tabs){
|
199 |
+
_e('Filters', 'gmLang');
|
200 |
+
foreach($tabs as $t){
|
201 |
+
$terms_source[] = sprintf('<a class="filter" href="%s">%s</a>', esc_url(add_query_arg(array('stack_id' => $t->term_id), $lib_url)), esc_html($t->name));
|
202 |
+
}
|
203 |
+
}
|
204 |
+
if(!empty($terms_source)){
|
205 |
+
echo ' ('.join(', ', $terms_source).')';
|
206 |
+
}
|
207 |
+
}
|
208 |
+
?>
|
209 |
+
</p>
|
210 |
+
</div>
|
211 |
+
</div>
|
212 |
+
<?php
|
213 |
+
}
|
214 |
+
} else{
|
215 |
+
?>
|
216 |
+
<div class="list-group-item">
|
217 |
+
<div class="well well-lg text-center">
|
218 |
+
<h4><?php _e('No items to show.', 'gmLang'); ?></h4>
|
219 |
+
</div>
|
220 |
+
</div>
|
221 |
+
<?php } ?>
|
222 |
+
<?php
|
223 |
+
wp_original_referer_field(true, 'previous');
|
224 |
+
wp_nonce_field('GmediaTerms');
|
225 |
+
?>
|
226 |
+
</form>
|
227 |
+
</div>
|
228 |
+
|
229 |
+
<!-- Modal -->
|
230 |
+
<div class="modal fade gmedia-modal" id="chooseModuleModal" tabindex="-1" role="dialog" aria-hidden="true">
|
231 |
+
<div class="modal-dialog">
|
232 |
+
<div class="modal-content">
|
233 |
+
<div class="modal-header">
|
234 |
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
235 |
+
<h4 class="modal-title"><?php _e('Choose Module for Gallery'); ?></h4>
|
236 |
+
</div>
|
237 |
+
<div class="modal-body linkblock">
|
238 |
+
<?php
|
239 |
+
if(!empty($modules)){
|
240 |
+
foreach($modules as $m){
|
241 |
+
/**
|
242 |
+
* @var $module_name
|
243 |
+
* @var $module_url
|
244 |
+
* @var $module_path
|
245 |
+
*/
|
246 |
+
extract($m);
|
247 |
+
if(!file_exists($module_path . '/index.php')){
|
248 |
+
continue;
|
249 |
+
}
|
250 |
+
$module_info = array();
|
251 |
+
include($module_path . '/index.php');
|
252 |
+
if(empty($module_info)){
|
253 |
+
continue;
|
254 |
+
}
|
255 |
+
$mclass = ' module-'.$module_info['type'].' module-'.$module_info['status'];
|
256 |
+
?>
|
257 |
+
<div data-href="<?php echo add_query_arg(array('gallery_module' => $module_name), $url); ?>" class="choose-module media<?php echo $mclass; ?>">
|
258 |
+
<a href="<?php echo add_query_arg(array('gallery_module' => $module_name), $url); ?>" class="thumbnail pull-left">
|
259 |
+
<img class="media-object" src="<?php echo $module_url.'/screenshot.png'; ?>" alt="<?php echo esc_attr($module_info['title']); ?>" width="160" height="120"/>
|
260 |
+
</a>
|
261 |
+
<div class="media-body" style="margin-left:180px;">
|
262 |
+
<h4 class="media-heading"><?php echo $module_info['title']; ?></h4>
|
263 |
+
<p class="version"><?php echo __('Version', 'gmLang') . ': ' . $module_info['version']; ?></p>
|
264 |
+
<div class="description"><?php echo str_replace("\n", '<br />', $module_info['description']); ?></div>
|
265 |
+
</div>
|
266 |
+
</div>
|
267 |
+
<?php
|
268 |
+
}
|
269 |
+
} else{
|
270 |
+
_e('No installed modules', 'gmLang');
|
271 |
+
}
|
272 |
+
?>
|
273 |
+
</div>
|
274 |
+
<div class="modal-footer">
|
275 |
+
<button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Cancel', 'gmLang'); ?></button>
|
276 |
+
</div>
|
277 |
+
</div>
|
278 |
+
</div>
|
279 |
+
</div>
|
280 |
+
<?php
|
281 |
+
}
|
282 |
+
|
283 |
+
/**
|
284 |
+
* gmediaGalleryEdit()
|
285 |
+
*
|
286 |
+
* @return mixed content
|
287 |
+
*/
|
288 |
+
function gmediaGalleryEdit() {
|
289 |
+
global $gmDB, $gmCore, $gmGallery, $gmProcessor;
|
290 |
+
|
291 |
+
$alert = array();
|
292 |
+
|
293 |
+
$module_name = $gmCore->_get('gallery_module');
|
294 |
+
$gallery_id = $gmCore->_get('edit_gallery');
|
295 |
+
|
296 |
+
$url = add_query_arg(array('page' => $gmProcessor->page, 'edit_gallery' => $gallery_id ), admin_url('admin.php'));
|
297 |
+
|
298 |
+
$gallery = array(
|
299 |
+
'name'=>'',
|
300 |
+
'description'=>'',
|
301 |
+
'status' => 'public',
|
302 |
+
'edited' => '—',
|
303 |
+
'module' => '',
|
304 |
+
'query' => array(),
|
305 |
+
'settings' => array()
|
306 |
+
);
|
307 |
+
$taxonomy = 'gmedia_gallery';
|
308 |
+
if($gallery_id){
|
309 |
+
$url = add_query_arg(array('page' => $gmProcessor->page, 'edit_gallery' => $gallery_id ), admin_url('admin.php'));
|
310 |
+
$gallery = $gmDB->get_term($gallery_id, $taxonomy, ARRAY_A);
|
311 |
+
if(is_wp_error($gallery)){
|
312 |
+
$alert[] = $gallery->get_error_message();
|
313 |
+
} elseif(empty($gallery)){
|
314 |
+
$alert[] = sprintf(__('No gallery with ID #%s in database'), $gallery_id);
|
315 |
+
} else{
|
316 |
+
$gallery_meta = $gmDB->get_metadata('gmedia_term', $gallery_id);
|
317 |
+
$gallery_meta = array_map('reset', $gallery_meta);
|
318 |
+
$gallery_meta = array_map('maybe_unserialize', $gallery_meta);
|
319 |
+
$gallery = array_merge($gallery, $gallery_meta);
|
320 |
+
if(!$module_name){
|
321 |
+
$module_name = $gallery['module'];
|
322 |
+
}
|
323 |
+
}
|
324 |
+
} elseif($module_name){
|
325 |
+
$url = add_query_arg(array('page' => $gmProcessor->page, 'gallery_module' => $module_name ), admin_url('admin.php'));
|
326 |
+
$error_post = $gmCore->_post('gallery');
|
327 |
+
if($error_post){
|
328 |
+
$gallery = array_merge($gallery, $error_post);
|
329 |
+
}
|
330 |
+
$gallery['module'] = $module_name;
|
331 |
+
}
|
332 |
+
|
333 |
+
if(!empty($alert)){
|
334 |
+
echo $gmProcessor->alert('danger', $alert);
|
335 |
+
gmediaGalleries();
|
336 |
+
return;
|
337 |
+
}
|
338 |
+
|
339 |
+
$modules = array();
|
340 |
+
if($plugin_modules = glob(GMEDIA_ABSPATH . 'module/*', GLOB_ONLYDIR | GLOB_NOSORT)){
|
341 |
+
foreach($plugin_modules as $path){
|
342 |
+
$mfold = basename($path);
|
343 |
+
$modules[$mfold] = array(
|
344 |
+
'place' => 'plugin',
|
345 |
+
'module_name' => $mfold,
|
346 |
+
'module_url' => "{$gmCore->gmedia_url}/module/{$mfold}",
|
347 |
+
'module_path' => $path
|
348 |
+
);
|
349 |
+
}
|
350 |
+
}
|
351 |
+
if($upload_modules = glob($gmCore->upload['path'].'/'.$gmGallery->options['folder']['module'].'/*', GLOB_ONLYDIR | GLOB_NOSORT)){
|
352 |
+
foreach($upload_modules as $path){
|
353 |
+
$mfold = basename($path);
|
354 |
+
$modules[$mfold] = array(
|
355 |
+
'place' => 'upload',
|
356 |
+
'module_name' => $mfold,
|
357 |
+
'module_url' => "{$gmCore->upload['url']}/{$gmGallery->options['folder']['module']}/{$mfold}",
|
358 |
+
'module_path' => $path
|
359 |
+
);
|
360 |
+
}
|
361 |
+
}
|
362 |
+
|
363 |
+
$default_options = array();
|
364 |
+
/**
|
365 |
+
* @var $place
|
366 |
+
* @var $module_name
|
367 |
+
* @var $module_url
|
368 |
+
* @var $module_path
|
369 |
+
*/
|
370 |
+
if($module_name){
|
371 |
+
if(isset($modules[$module_name])){
|
372 |
+
extract($modules[$module_name]);
|
373 |
+
|
374 |
+
/**
|
375 |
+
* @var $module_info
|
376 |
+
*
|
377 |
+
* @var $default_options
|
378 |
+
* @var $options_tree
|
379 |
+
*/
|
380 |
+
if(file_exists($module_path . '/index.php') && file_exists($module_path . '/settings.php')){
|
381 |
+
include($module_path . '/index.php');
|
382 |
+
include($module_path . '/settings.php');
|
383 |
+
} else{
|
384 |
+
$alert[] = sprintf(__('Module `%s` is broken. Choose another module from the list and save settings'), $module_name);
|
385 |
+
}
|
386 |
+
} else{
|
387 |
+
$alert[] = sprintf(__('Can\'t get module with name `%s`. Choose module from the list and save settings'), $module_name);
|
388 |
+
}
|
389 |
+
} else{
|
390 |
+
$alert[] = sprintf(__('Module is not selected for this gallery. Choose module from the list and save settings'), $module_name);
|
391 |
+
}
|
392 |
+
|
393 |
+
if(!empty($alert)){
|
394 |
+
echo $gmProcessor->alert('danger', $alert);
|
395 |
+
}
|
396 |
+
|
397 |
+
if(isset($gallery['settings'][$module_name])){
|
398 |
+
$gallery_settings = array_merge($default_options, $gallery['settings'][$module_name]);
|
399 |
+
} else{
|
400 |
+
$gallery_settings = $default_options;
|
401 |
+
}
|
402 |
+
|
403 |
+
include_once(GMEDIA_ABSPATH . '/inc/module.options.php');
|
404 |
+
|
405 |
+
?>
|
406 |
+
|
407 |
+
<form class="panel panel-default" method="post" action="<?php echo $url; ?>">
|
408 |
+
<div class="panel-heading clearfix">
|
409 |
+
<div class="btn-toolbar pull-left">
|
410 |
+
<div class="btn-group">
|
411 |
+
<a href="<?php echo add_query_arg(array('page' => 'GrandMedia_Galleries' ), admin_url('admin.php')); ?>" class="btn btn-default"><span class="glyphicon glyphicon-arrow-left"></span> <?php _e('Manage Galleries', 'gmLang'); ?></a>
|
412 |
+
</div>
|
413 |
+
<div class="btn-group">
|
414 |
+
<?php if($gallery['module'] != $module_name){ ?>
|
415 |
+
<a href="<?php echo $url; ?>" class="btn btn-default"><?php _e('Cancel preview module', 'gmLang'); ?></a>
|
416 |
+
<button type="submit" name="gmedia_gallery_save" class="btn btn-primary"><?php _e('Save with new module', 'gmLang'); ?></button>
|
417 |
+
<?php } else{ ?>
|
418 |
+
<?php if($gallery_settings != $default_options){ ?>
|
419 |
+
<button type="submit" name="gmedia_gallery_reset" class="btn btn-default" data-confirm="<?php _e('Confirm reset gallery options') ?>"><?php _e('Reset to default', 'gmLang'); ?></button>
|
420 |
+
<?php } ?>
|
421 |
+
<button type="submit" name="gmedia_gallery_save" class="btn btn-primary"><?php _e('Save', 'gmLang'); ?></button>
|
422 |
+
<?php } ?>
|
423 |
+
</div>
|
424 |
+
</div>
|
425 |
+
</div>
|
426 |
+
<div class="panel-body" id="gmedia-msg-panel"></div>
|
427 |
+
<div class="panel-body" id="gmedia-edit-gallery" style="margin-bottom:4px; padding-top:0;">
|
428 |
+
<div class="row">
|
429 |
+
<div class="col-lg-6 tabable tabs-left">
|
430 |
+
<ul class="nav nav-tabs" style="padding:10px 0;">
|
431 |
+
<?php if(isset($module_info)){ ?>
|
432 |
+
<li class="text-center"><strong><?php echo $module_info['title']; ?></strong><a href="#chooseModuleModal" data-toggle="modal" style="padding:5px 0;"><img src="<?php echo $module_url.'/screenshot.png'; ?>" alt="<?php echo esc_attr($module_info['title']); ?>" width="100" style="height:auto;"/></a></li>
|
433 |
+
<?php } ?>
|
434 |
+
<li class="active"><a href="#general_settings" data-toggle="tab"><?php _e('General Settings', 'gmLang'); ?></a></li>
|
435 |
+
<?php
|
436 |
+
if(isset($options_tree)){
|
437 |
+
gmedia_gallery_options_nav($options_tree);
|
438 |
+
}
|
439 |
+
?>
|
440 |
+
</ul>
|
441 |
+
|
442 |
+
<div id="gallery_options_block" class="tab-content" style="padding-top:20px;">
|
443 |
+
|
444 |
+
<fieldset id="general_settings" class="tab-pane active">
|
445 |
+
<p><?php echo '<b>'.__('Gallery module:').'</b> '.$gallery['module'];
|
446 |
+
if($gallery['module'] != $module_name){
|
447 |
+
echo '<br /><b>'.__('Preview module:').'</b> '.$module_name;
|
448 |
+
echo '<br /><span class="text-muted">'.sprintf(__('Note: Module changed to %s, but not saved yet'), $module_name).'</span>';
|
449 |
+
} ?></p>
|
450 |
+
<?php if($gallery_id){ ?>
|
451 |
+
<p><b><?php _e('Shortcode:'); ?></b> [gmedia id=<?php echo $gallery_id; ?>]</p>
|
452 |
+
<?php } ?>
|
453 |
+
<input type="hidden" name="gallery[module]" value="<?php echo esc_attr($module_name); ?>">
|
454 |
+
<div class="form-group">
|
455 |
+
<label><?php _e('Gallery Name', 'gmLang'); ?></label>
|
456 |
+
<input type="text" class="form-control input-sm" name="gallery[name]" placeholder="<?php echo empty($gallery['name'])? esc_attr(__('Gallery Name', 'gmLang')) : esc_attr($gallery['name']); ?>" value="<?php echo esc_attr($gallery['name']); ?>" required="required" />
|
457 |
+
</div>
|
458 |
+
<div class="form-group">
|
459 |
+
<label><?php _e('Status', 'gmLang'); ?></label>
|
460 |
+
<select name="gallery[status]" class="form-control input-sm">
|
461 |
+
<option value="public"<?php selected($gallery['status'], 'public'); ?>><?php _e('Public', 'gmLang'); ?></option>
|
462 |
+
<?php /* ?>
|
463 |
+
<option value="private"<?php selected($gallery['status'], 'private'); ?>><?php _e('Private', 'gmLang'); ?></option>
|
464 |
+
<option value="draft"<?php selected($gallery['status'], 'draft'); ?>><?php _e('Draft', 'gmLang'); ?></option>
|
465 |
+
<?php */ ?>
|
466 |
+
</select>
|
467 |
+
</div>
|
468 |
+
<div class="form-group">
|
469 |
+
<label><?php _e('Show supported files from', 'gmLang'); ?></label>
|
470 |
+
<select data-watch="change" id="gmedia_query" class="form-control input-sm" name="gallery[term]">
|
471 |
+
<?php reset($gallery['query']); $gallery['term'] = key($gallery['query']); ?>
|
472 |
+
<option value="gmedia_album"<?php selected($gallery['term'], 'gmedia_album'); ?>><?php _e('Albums', 'gmLang'); ?></option>
|
473 |
+
<option value="gmedia_tag"<?php selected($gallery['term'], 'gmedia_tag'); ?>><?php _e('Tags', 'gmLang'); ?></option>
|
474 |
+
<option value="gmedia_category"<?php selected($gallery['term'], 'gmedia_category'); ?>><?php _e('Categories', 'gmLang'); ?></option>
|
475 |
+
<option value="gmedia__in"<?php selected($gallery['term'], 'gmedia__in'); ?>><?php _e('Selected Gmedia', 'gmLang'); ?></option>
|
476 |
+
<!-- <option value="gmedia_filter"<?php selected($gallery['term'], 'gmedia_filter'); ?>><?php _e('Filter', 'gmLang'); ?></option> -->
|
477 |
+
</select>
|
478 |
+
</div>
|
479 |
+
|
480 |
+
|
481 |
+
<div class="form-group" id="div_gmedia_category">
|
482 |
+
<?php
|
483 |
+
$term_type = 'gmedia_category';
|
484 |
+
$gm_terms_all = $gmGallery->options['taxonomies'][$term_type];
|
485 |
+
$gm_terms = $gmDB->get_terms($term_type, array('fields' => 'names_count'));
|
486 |
+
|
487 |
+
$terms_items = '';
|
488 |
+
if(count($gm_terms)){
|
489 |
+
foreach($gm_terms as $id => $term){
|
490 |
+
$selected = (isset($gallery['query'][$term_type]) && in_array($id, $gallery['query'][$term_type]))? ' selected="selected"' : '';
|
491 |
+
$terms_items .= '<option value="' . $id . '"'.$selected.'>' . esc_html($gm_terms_all[$term['name']]) . ' (' . $term['count'] . ')</option>' . "\n";
|
492 |
+
}
|
493 |
+
}
|
494 |
+
$setvalue = isset($gallery['query'][$term_type])? 'data-setvalue="'.implode(',',$gallery['query'][$term_type]).'"' : '';
|
495 |
+
?>
|
496 |
+
<label><?php _e('Choose Categories', 'gmLang'); ?></label>
|
497 |
+
<select data-gmedia_query="is:gmedia_category" <?php echo $setvalue; ?> id="gmedia_category" name="gallery[query][gmedia_category][]" class="gmedia-combobox form-control input-sm" multiple="multiple" placeholder="<?php echo esc_attr(__('Choose Categories...', 'gmLang')); ?>">
|
498 |
+
<option value=""><?php _e('Choose Categories...', 'gmLang'); ?></option>
|
499 |
+
<?php echo $terms_items; ?>
|
500 |
+
</select>
|
501 |
+
</div>
|
502 |
+
|
503 |
+
<div class="form-group" id="div_gmedia_tag">
|
504 |
+
<?php
|
505 |
+
$term_type = 'gmedia_tag';
|
506 |
+
$gm_terms = $gmDB->get_terms($term_type, array('fields' => 'names_count'));
|
507 |
+
|
508 |
+
$terms_items = '';
|
509 |
+
if(count($gm_terms)){
|
510 |
+
foreach($gm_terms as $id => $term){
|
511 |
+
$selected = (isset($gallery['query'][$term_type]) && in_array($id, $gallery['query'][$term_type]))? ' selected="selected"' : '';
|
512 |
+
$terms_items .= '<option value="' . $id . '"'.$selected.'>' . esc_html($term['name']) . ' (' . $term['count'] . ')</option>' . "\n";
|
513 |
+
}
|
514 |
+
}
|
515 |
+
$setvalue = isset($gallery['query'][$term_type])? 'data-setvalue="'.implode(',',$gallery['query'][$term_type]).'"' : '';
|
516 |
+
?>
|
517 |
+
<label><?php _e('Choose Tags', 'gmLang'); ?> </label>
|
518 |
+
<select data-gmedia_query="is:gmedia_tag" <?php echo $setvalue; ?> id="gmedia_tag" name="gallery[query][gmedia_tag][]" class="gmedia-combobox form-control input-sm" multiple="multiple" placeholder="<?php echo esc_attr(__('Choose Tags...', 'gmLang')); ?>">
|
519 |
+
<option value=""><?php echo __('Choose Tags...', 'gmLang'); ?></option>
|
520 |
+
<?php echo $terms_items; ?>
|
521 |
+
</select>
|
522 |
+
</div>
|
523 |
+
|
524 |
+
<div class="form-group" id="div_gmedia_album">
|
525 |
+
<?php
|
526 |
+
$term_type = 'gmedia_album';
|
527 |
+
$gm_terms = $gmDB->get_terms($term_type, array('fields' => 'names_count'));
|
528 |
+
|
529 |
+
$terms_items = '';
|
530 |
+
if(count($gm_terms)){
|
531 |
+
foreach($gm_terms as $id => $term){
|
532 |
+
//if(!$term->count){ continue; }
|
533 |
+
$selected = (isset($gallery['query'][$term_type]) && in_array($id, $gallery['query'][$term_type]))? ' selected="selected"' : '';
|
534 |
+
$terms_items .= '<option value="' . $id . '"'.$selected.'>' . esc_html($term['name']) . ' (' . $term['count'] . ')</option>' . "\n";
|
535 |
+
}
|
536 |
+
}
|
537 |
+
$setvalue = isset($gallery['query'][$term_type])? 'data-setvalue="'.implode(',',$gallery['query'][$term_type]).'"' : '';
|
538 |
+
?>
|
539 |
+
<label><?php _e('Choose Albums', 'gmLang'); ?> </label>
|
540 |
+
<select data-gmedia_query="is:gmedia_album" <?php echo $setvalue; ?> id="gmedia_album" name="gallery[query][gmedia_album][]" class="gmedia-combobox form-control input-sm" multiple="multiple" placeholder="<?php echo esc_attr(__('Choose Albums...', 'gmLang')); ?>">
|
541 |
+
<option value=""><?php echo __('Choose Albums...', 'gmLang'); ?></option>
|
542 |
+
<?php echo $terms_items; ?>
|
543 |
+
</select>
|
544 |
+
</div>
|
545 |
+
|
546 |
+
<div class="form-group" id="div_gmedia__in">
|
547 |
+
<label><?php _e('Selected Gmedia IDs <small class="text-muted">separated by comma</small>', 'gmLang'); ?> </label>
|
548 |
+
<?php $value = isset($gallery['query']['gmedia__in'][0])? implode(',', wp_parse_id_list($gallery['query']['gmedia__in'][0])) : ''; ?>
|
549 |
+
<textarea data-gmedia_query="is:gmedia__in" id="gmedia__in" name="gallery[query][gmedia__in][]" rows="1" class="form-control input-sm" style="resize:vertical;" placeholder="<?php echo esc_attr(__('Gmedia IDs...', 'gmLang')); ?>"><?php echo $value; ?></textarea>
|
550 |
+
</div>
|
551 |
+
|
552 |
+
<div class="form-group">
|
553 |
+
<label><?php _e('Description', 'gmLang'); ?></label>
|
554 |
+
<textarea class="form-control input-sm" rows="5" name="gallery[description]"><?php echo esc_html($gallery['description']) ?></textarea>
|
555 |
+
</div>
|
556 |
+
|
557 |
+
</fieldset>
|
558 |
+
|
559 |
+
<?php
|
560 |
+
if(isset($options_tree)){
|
561 |
+
gmedia_gallery_options_fieldset($options_tree, $default_options, $gallery_settings);
|
562 |
+
}
|
563 |
+
?>
|
564 |
+
</div>
|
565 |
+
|
566 |
+
</div>
|
567 |
+
<div class="col-lg-6" style="padding-top:20px;">
|
568 |
+
<p><b><?php _e('Last edited:'); ?></b> <?php echo $gallery['edited']; ?></p>
|
569 |
+
<?php if($gallery_id){
|
570 |
+
$preview_param = ($gallery['module'] != $module_name)? '&preview='.$module_name : '';
|
571 |
+
?>
|
572 |
+
<p><b><?php _e('Gallery ID:'); ?></b> #<?php echo $gallery_id; ?></p>
|
573 |
+
<div><b><?php _e('Gallery Preview:'); ?></b></div>
|
574 |
+
<div class="gallery_preview" style="overflow:hidden;">
|
575 |
+
<iframe id="gallery_preview" name="gallery_preview" src="<?php echo $gmCore->gmedia_url; ?>/gallery.php?id=<?php echo $gallery_id.$preview_param; ?>"></iframe>
|
576 |
+
</div>
|
577 |
+
<?php } ?>
|
578 |
+
</div>
|
579 |
+
</div>
|
580 |
+
<script type="text/javascript">
|
581 |
+
jQuery(function($){
|
582 |
+
<?php if(!empty($alert)){ ?>
|
583 |
+
$('#chooseModuleModal').modal('show');
|
584 |
+
<?php } ?>
|
585 |
+
|
586 |
+
$('.gmedia-combobox').each(function(){
|
587 |
+
var select = $(this).selectize({
|
588 |
+
plugins: ['drag_drop'],
|
589 |
+
create: false,
|
590 |
+
hideSelected: true
|
591 |
+
});
|
592 |
+
var val = $(this).data('setvalue');
|
593 |
+
if(val){
|
594 |
+
val = val.toString().split(',');
|
595 |
+
select[0].selectize.setValue(val);
|
596 |
+
}
|
597 |
+
});
|
598 |
+
|
599 |
+
var main = $('#gallery_options_block');
|
600 |
+
|
601 |
+
$('input', main).filter('[data-type="color"]').minicolors({
|
602 |
+
animationSpeed: 50,
|
603 |
+
animationEasing: 'swing',
|
604 |
+
change: null,
|
605 |
+
changeDelay: 0,
|
606 |
+
control: 'hue',
|
607 |
+
//defaultValue: '',
|
608 |
+
hide: null,
|
609 |
+
hideSpeed: 100,
|
610 |
+
inline: false,
|
611 |
+
letterCase: 'lowercase',
|
612 |
+
opacity: false,
|
613 |
+
position: 'bottom left',
|
614 |
+
show: null,
|
615 |
+
showSpeed: 100,
|
616 |
+
theme: 'bootstrap'
|
617 |
+
});
|
618 |
+
|
619 |
+
$('[data-watch]', main).each(function(){
|
620 |
+
var el = $(this);
|
621 |
+
gmedia_options_conditional_logic(el, 0);
|
622 |
+
el.on(el.data('watch'),function(){
|
623 |
+
$(this).blur().focus();
|
624 |
+
gmedia_options_conditional_logic($(this), 400);
|
625 |
+
});
|
626 |
+
});
|
627 |
+
|
628 |
+
function gmedia_options_conditional_logic(el, slide){
|
629 |
+
if(el.is(':input')){
|
630 |
+
var val = el.val();
|
631 |
+
var id = el.attr('id').toLowerCase();
|
632 |
+
if(el.is(':checkbox') && !el[0].checked){
|
633 |
+
val = '0';
|
634 |
+
}
|
635 |
+
var key;
|
636 |
+
$('[data-'+id+']', main).each(function(){
|
637 |
+
key = $(this).data(id);
|
638 |
+
key = key.split(':');
|
639 |
+
switch(key[0]){
|
640 |
+
case '=':
|
641 |
+
case 'is':
|
642 |
+
if(val == key[1]){
|
643 |
+
$(this).prop('disabled',false).closest('.form-group').slideDown(slide, function(){ $(this).css({display:'block'}); });
|
644 |
+
} else{
|
645 |
+
$(this).prop('disabled',true).closest('.form-group').slideUp(slide, function(){ $(this).css({display:'none'}); });
|
646 |
+
}
|
647 |
+
break;
|
648 |
+
case '!=':
|
649 |
+
case 'not':
|
650 |
+
if(val != key[1]){
|
651 |
+
$(this).prop('disabled',false).closest('.form-group').slideDown(slide, function(){ $(this).css({display:'block'}); });
|
652 |
+
} else{
|
653 |
+
$(this).prop('disabled',true).closest('.form-group').slideUp(slide, function(){ $(this).css({display:'none'}); });
|
654 |
+
}
|
655 |
+
break;
|
656 |
+
}
|
657 |
+
if(key[2]){
|
658 |
+
$(this).val(key[2]).trigger('change');
|
659 |
+
}
|
660 |
+
});
|
661 |
+
}
|
662 |
+
}
|
663 |
+
});
|
664 |
+
</script>
|
665 |
+
</div>
|
666 |
+
</form>
|
667 |
+
|
668 |
+
<!-- Modal -->
|
669 |
+
<div class="modal fade gmedia-modal" id="chooseModuleModal" tabindex="-1" role="dialog" aria-hidden="true">
|
670 |
+
<div class="modal-dialog">
|
671 |
+
<div class="modal-content">
|
672 |
+
<div class="modal-header">
|
673 |
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
674 |
+
<h4 class="modal-title"><?php _e('Choose Module for Gallery'); ?></h4>
|
675 |
+
</div>
|
676 |
+
<div class="modal-body linkblock">
|
677 |
+
<?php
|
678 |
+
if(!empty($alert)){
|
679 |
+
echo $gmProcessor->alert('danger', $alert);
|
680 |
+
}
|
681 |
+
|
682 |
+
$current_module = $module_name;
|
683 |
+
if(!empty($modules)){
|
684 |
+
foreach($modules as $m){
|
685 |
+
/**
|
686 |
+
* @var $module_name
|
687 |
+
* @var $module_url
|
688 |
+
* @var $module_path
|
689 |
+
*/
|
690 |
+
extract($m);
|
691 |
+
if(($module_name == $current_module) || !file_exists($module_path . '/index.php')){
|
692 |
+
continue;
|
693 |
+
}
|
694 |
+
$module_info = array();
|
695 |
+
include($module_path . '/index.php');
|
696 |
+
if(empty($module_info)){
|
697 |
+
continue;
|
698 |
+
}
|
699 |
+
$mclass = ' module-'.$module_info['type'].' module-'.$module_info['status'];
|
700 |
+
?>
|
701 |
+
<div data-href="<?php echo add_query_arg(array('edit_gallery' => $gallery_id, 'gallery_module' => $module_name), $url); ?>" class="choose-module media<?php echo $mclass; ?>">
|
702 |
+
<a href="<?php echo add_query_arg(array('edit_gallery' => $gallery_id, 'gallery_module' => $module_name), $url); ?>" class="thumbnail pull-left">
|
703 |
+
<img class="media-object" src="<?php echo $module_url.'/screenshot.png'; ?>" alt="<?php echo esc_attr($module_info['title']); ?>" width="160" height="120"/>
|
704 |
+
</a>
|
705 |
+
<div class="media-body" style="margin-left:180px;">
|
706 |
+
<h4 class="media-heading"><?php echo $module_info['title']; ?></h4>
|
707 |
+
<p class="version"><?php echo __('Version', 'gmLang') . ': ' . $module_info['version']; ?></p>
|
708 |
+
<div class="description"><?php echo str_replace("\n", '<br />', $module_info['description']); ?></div>
|
709 |
+
</div>
|
710 |
+
</div>
|
711 |
+
<?php
|
712 |
+
}
|
713 |
+
} else{
|
714 |
+
_e('No installed modules', 'gmLang');
|
715 |
+
}
|
716 |
+
?>
|
717 |
+
</div>
|
718 |
+
<div class="modal-footer">
|
719 |
+
<button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Cancel', 'gmLang'); ?></button>
|
720 |
+
</div>
|
721 |
+
</div>
|
722 |
+
</div>
|
723 |
+
</div>
|
724 |
+
|
725 |
+
<?php
|
726 |
+
}
|
727 |
+
|
admin/gmedia.php
CHANGED
@@ -1,262 +1,527 @@
|
|
1 |
<?php
|
2 |
-
if
|
3 |
-
die(
|
4 |
}
|
5 |
|
6 |
/**
|
7 |
-
*
|
8 |
*
|
9 |
* @return mixed content
|
10 |
*/
|
11 |
-
function
|
12 |
-
global $
|
13 |
|
14 |
-
$
|
15 |
-
|
16 |
-
$
|
17 |
-
if
|
18 |
-
$
|
19 |
-
$sel_ids = array_filter( $sel_ids, 'is_numeric' );
|
20 |
-
}
|
21 |
-
elseif ( isset( $_REQUEST['filter'] ) && $_REQUEST['filter'] == 'selected' && isset( $_COOKIE['gmedia_gm_selected_items'] ) ) {
|
22 |
-
$sel_ids = explode( ',', $_COOKIE['gmedia_gm_selected_items'] );
|
23 |
-
$sel_ids = array_filter( $sel_ids, 'is_numeric' );
|
24 |
-
}
|
25 |
-
else {
|
26 |
-
$sel_ids = array();
|
27 |
}
|
28 |
-
$
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
'
|
37 |
-
's' => $grandCore->_get( 's', '' )
|
38 |
-
);
|
39 |
-
$gMediaLib = $gMDb->get_gmedias( $arg );
|
40 |
-
//echo '<pre>'; print_r($gMediaLib); echo '</pre>';
|
41 |
-
/** @var $mime_type
|
42 |
-
* @var $orderby
|
43 |
-
* @var $order
|
44 |
-
* @var $per_page
|
45 |
-
* @var $page
|
46 |
-
* @var $gmedia__in
|
47 |
-
* @var $s
|
48 |
-
*/
|
49 |
-
extract( $arg );
|
50 |
-
$media = $mCount = array(
|
51 |
-
'total' => '',
|
52 |
-
'image' => '',
|
53 |
-
'audio' => '',
|
54 |
-
'video' => '',
|
55 |
-
'application' => ''
|
56 |
-
);
|
57 |
-
if ( count( $gMediaLib ) ) {
|
58 |
-
foreach ( $gMediaLib as $item ) {
|
59 |
-
$type = explode( '/', $item->mime_type );
|
60 |
-
$mCount[$type[0]] ++;
|
61 |
-
$mCount['total'] ++;
|
62 |
-
}
|
63 |
}
|
64 |
-
$
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
-
|
72 |
-
$orderby = $orderby ? $orderby : 'ID';
|
73 |
-
$sort = 'ASC';
|
74 |
-
$url_param['mime_type'] = $mime_type ? '&mime_type=' . $mime_type : '';
|
75 |
-
$url_param['orderby'] = '&orderby=' . $orderby;
|
76 |
-
$url_param['order'] = '&order=' . $order;
|
77 |
-
$url_param['filter'] = $grandCore->_get( 'filter' ) ? '&filter=' . $_GET['filter'] : '';
|
78 |
-
$url_param['s'] = $s ? '&s=' . $s : '';
|
79 |
-
$gmSelected = isset( $_COOKIE['gmedia_gm_selected_items'] ) ? $_COOKIE['gmedia_gm_selected_items'] : '';
|
80 |
?>
|
81 |
-
<div class="
|
82 |
-
|
83 |
-
|
84 |
-
<div class="
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
<
|
91 |
</div>
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
<a class="total<?php if ( $curr_mime == 'total' ) echo ' active'; ?>" rel="total" href="<?php echo $url['page'] . $url_param['filter'] . $url_param['s']; ?>"><?php _e( 'All', 'gmLang' ); echo $counting['total']; ?></a>
|
96 |
-
<a class="image<?php if ( $curr_mime == 'image' ) echo ' active'; if ( ! $gmDbCount['image'] ) echo ' disabled'; ?>" rel="image" href="<?php echo $url['page'] . '&mime_type=image' . $url_param['filter'] . $url_param['s']; ?>"><?php _e( 'Images', 'gmLang' ); echo $counting['image']; ?></a>
|
97 |
-
<a class="audio<?php if ( $curr_mime == 'audio' ) echo ' active'; if ( ! $gmDbCount['audio'] ) echo ' disabled'; ?>" rel="audio" href="<?php echo $url['page'] . '&mime_type=audio' . $url_param['filter'] . $url_param['s']; ?>"><?php _e( 'Audio', 'gmLang' ); echo $counting['audio']; ?></a>
|
98 |
-
<a class="video<?php if ( $curr_mime == 'video' ) echo ' active'; if ( ! $gmDbCount['video'] ) echo ' disabled'; ?>" rel="video" href="<?php echo $url['page'] . '&mime_type=video' . $url_param['filter'] . $url_param['s']; ?>"><?php _e( 'Video', 'gmLang' ); echo $counting['video']; ?></a>
|
99 |
-
<a class="application<?php if ( $curr_mime == 'application' ) echo ' active'; if ( ! $gmDbCount['application'] ) echo ' disabled'; ?>" rel="application" href="<?php echo $url['page'] . '&mime_type=application' . $url_param['filter'] . $url_param['s']; ?>"><?php _e( 'Other', 'gmLang' ); echo $counting['application']; ?></a>
|
100 |
-
<span class="delete ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="<?php echo $nonce; ?>" data-form="#selectedForm" data-task="gmedia-bulk-delete" data-confirmtxt="<?php _e( "You are about to permanently delete the selected items.\n\r'Cancel' to stop, 'OK' to delete.", "gmLang" ); ?>"><?php _e( 'Delete', 'gmLang' ); ?></span>
|
101 |
-
</div>
|
102 |
-
<div class="more abut">
|
103 |
-
<div class="dropbut"><?php _e( 'Category', 'gmLang' ); ?></div>
|
104 |
-
<div class="dropbox">
|
105 |
-
<strong class="label"><?php _e( 'Move to / Open category', 'gmLang' ); ?>:</strong>
|
106 |
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
}
|
123 |
-
}
|
124 |
-
else {
|
125 |
-
$terms = '<a href="' . admin_url( 'admin.php?page=GrandMedia_Tags_and_Categories&tab=gmedia_category' ) . '">' . __( 'Create category', 'gmLang' ) . '</a>';
|
126 |
-
}
|
127 |
-
echo $terms;
|
128 |
-
?>
|
129 |
</div>
|
130 |
-
|
131 |
-
</div>
|
132 |
-
<div class="more abut">
|
133 |
-
<div class="dropbut"><?php _e( 'Labels', 'gmLang' ); ?></div>
|
134 |
-
<div class="dropbox">
|
135 |
-
<strong class="label"><?php _e( 'Add new label', 'gmLang' ); ?>:</strong>
|
136 |
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
<?php
|
143 |
-
$
|
144 |
-
|
145 |
-
$terms = '<form id="tag_list" name="tag_list" action="" method="post"><div class="term_list">' . "\n";
|
146 |
-
foreach ( $gmTerms as $termitem ) {
|
147 |
-
$terms .= ' <div class="item">';
|
148 |
-
$terms .= ' <span class="dropchild"><input type="checkbox" name="label[]" id="l_ch_' . $termitem->term_id . '" value="' . $termitem->term_id . '" /> <label for="l_ch_' . $termitem->term_id . '">' . $termitem->name . '</label></span>';
|
149 |
-
$terms .= ' <a class="openterm" href="' . $url['page'] . '&tag_id=' . $termitem->term_id . '" title="' . __( 'Show gmedia with this label', 'gmLang' ) . '">' . __( 'Show gmedia with this label', 'gmLang' ) . '</a>';
|
150 |
-
$terms .= ' </div>' . "\n";
|
151 |
-
}
|
152 |
-
$terms .= '</div>' . "\n";
|
153 |
-
$terms .= '<div class="buttons floatholder">';
|
154 |
-
$terms .= ' <span class="button alignleft removeLabels ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="' . $nonce . '" data-form="#selectedForm,#tag_list" data-task="gm-remove-label" title="' . __( 'Remove labels from selected gmedia', 'gmLang' ) . '">' . __( 'Remove', 'gmLang' ) . '</span>';
|
155 |
-
$terms .= ' <span class="button alignright addLabels ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="' . $nonce . '" data-form="#selectedForm,#tag_list" data-task="gm-add-label" title="' . __( 'Add labels to selected gmedia', 'gmLang' ) . '">' . __( 'Add', 'gmLang' ) . '</span>';
|
156 |
-
$terms .= '</div></form>' . "\n";
|
157 |
-
}
|
158 |
-
echo $terms;
|
159 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
</div>
|
161 |
-
</div>
|
162 |
-
<div class="msg">
|
163 |
-
<span id="selectedItems"><span class="selectedItems"><?php if ( ! empty( $gmSelected ) ) {
|
164 |
-
echo count( explode( ',', $gmSelected ) );
|
165 |
-
}
|
166 |
-
else {
|
167 |
-
echo '0';
|
168 |
-
} ?></span> <?php _e( 'selected', 'gmLang' ); ?></span>
|
169 |
|
170 |
-
|
171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
</form>
|
173 |
-
<!--suppress CheckDtdRefs -->
|
174 |
-
<span class="more">»</span>
|
175 |
|
176 |
-
|
177 |
-
|
178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
</div>
|
180 |
</div>
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
<?php } ?>
|
188 |
-
|
189 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
</div>
|
191 |
</form>
|
192 |
-
|
193 |
-
|
194 |
-
<
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
<th class="type"><span><?php _e( 'Type', 'gmLang' ); ?></span></th>
|
221 |
-
<th class="title <?php if ( $orderby == 'title' ) {
|
222 |
-
echo $order;
|
223 |
-
$sort = ( $order == 'DESC' ) ? 'ASC' : 'DESC';
|
224 |
-
} ?>">
|
225 |
-
<a href="<?php echo $url['page'] . $url_param['mime_type'] . '&orderby=title&order=' . $sort . $url_param['filter'] . $url_param['s']; ?>"><?php _e( 'Title', 'gmLang' ); ?></a>
|
226 |
-
</th>
|
227 |
-
<th class="descr"><span><?php _e( 'Description', 'gmLang' ); ?></span></th>
|
228 |
-
<th class="actions"><span><?php _e( 'Actions', 'gmLang' ); ?></span></th>
|
229 |
-
</tr>
|
230 |
-
</thead>
|
231 |
-
<tbody class="gmLib">
|
232 |
-
<?php
|
233 |
-
if ( count( $gMediaLib ) ) {
|
234 |
-
foreach ( $gMediaLib as $item ) {
|
235 |
-
$grandAdmin->gMediaRow( $item );
|
236 |
}
|
237 |
-
}
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
|
|
|
|
250 |
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
</div>
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
</div>
|
261 |
</div>
|
262 |
<?php
|
1 |
<?php
|
2 |
+
if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])){
|
3 |
+
die('You are not allowed to call this page directly.');
|
4 |
}
|
5 |
|
6 |
/**
|
7 |
+
* gmediaLib()
|
8 |
*
|
9 |
* @return mixed content
|
10 |
*/
|
11 |
+
function gmediaLib(){
|
12 |
+
global $user_ID, $gmDB, $gmCore, $gmGallery, $gmProcessor;
|
13 |
|
14 |
+
$url = add_query_arg(array('page' => $gmProcessor->page, 'mode' => $gmProcessor->mode), admin_url('admin.php'));
|
15 |
+
|
16 |
+
$gm_screen_options = get_user_meta($user_ID, 'gm_screen_options', true);
|
17 |
+
if(!is_array($gm_screen_options)){
|
18 |
+
$gm_screen_options = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
}
|
20 |
+
$gm_screen_options = array_merge($gmGallery->options['gm_screen_options'], $gm_screen_options);
|
21 |
+
|
22 |
+
$gmedia__in = $gmCore->_get('gmedia__in', null);
|
23 |
+
$orderby = $gm_screen_options['orderby_gmedia'];
|
24 |
+
$order = $gm_screen_options['sortorder_gmedia'];
|
25 |
+
if('selected' == $gmCore->_req('filter')){
|
26 |
+
$gmedia__in = $gmProcessor->selected_items;
|
27 |
+
$orderby = 'gmedia__in';
|
28 |
+
$order = 'ASC';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
+
$args = array('mime_type' => $gmCore->_get('mime_type', null),
|
31 |
+
'orderby' => $orderby, 'order' => $order,
|
32 |
+
'per_page' => $gm_screen_options['per_page_gmedia'], 'page' => $gmCore->_get('pager', 1),
|
33 |
+
'tag_id' => $gmCore->_get('tag_id', null), 'tag__in' => $gmCore->_get('tag__in', null),
|
34 |
+
'cat' => $gmCore->_get('cat', null), 'category__in' => $gmCore->_get('category__in', null),
|
35 |
+
'alb' => $gmCore->_get('alb', null), 'album__in' => $gmCore->_get('album__in', null),
|
36 |
+
'gmedia__in' => $gmedia__in, 's' => $gmCore->_get('s', null));
|
37 |
+
$gmediaQuery = $gmDB->get_gmedias($args);
|
38 |
+
|
39 |
+
$gm_qty = array('total' => '', 'image' => '', 'audio' => '', 'video' => '', 'text' => '', 'application' => '',
|
40 |
+
'other' => '');
|
41 |
+
|
42 |
+
$gmDbCount = $gmDB->count_gmedia();
|
43 |
+
foreach($gmDbCount as $key => $value){
|
44 |
+
$gm_qty[$key] = '<span class="badge pull-right">' . (int)$value . '</span>';
|
45 |
}
|
46 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
?>
|
48 |
+
<div class="panel panel-default" id="gmedia-panel">
|
49 |
+
<div class="panel-heading clearfix">
|
50 |
+
<form class="form-inline gmedia-search-form" role="search">
|
51 |
+
<div class="form-group">
|
52 |
+
<?php foreach($_GET as $key => $value){
|
53 |
+
if(in_array($key, array('page', 'mime_type', 'tag_id', 'tag__in', 'cat', 'category__in', 'alb', 'album__in'))){ ?>
|
54 |
+
<input type="hidden" name="<?php echo $key; ?>" value="<?php echo $value; ?>"/>
|
55 |
+
<?php }
|
56 |
+
} ?>
|
57 |
+
<input id="gmedia-search" class="form-control input-sm" type="text" name="s" placeholder="<?php _e('Search...', 'gmLang'); ?>" value="<?php echo $gmCore->_get('s', ''); ?>"/>
|
58 |
</div>
|
59 |
+
<button type="submit" class="btn btn-default input-sm"><span class="glyphicon glyphicon-search"></span></button>
|
60 |
+
</form>
|
61 |
+
<?php echo $gmDB->query_pager(); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
+
<div class="btn-toolbar pull-left">
|
64 |
+
<?php if(!$gmProcessor->mode){ ?>
|
65 |
+
<div class="btn-group gm-checkgroup" id="cb_global-btn">
|
66 |
+
<span class="btn btn-default active"><input class="doaction" id="cb_global" data-group="cb_media-object" type="checkbox"/></span>
|
67 |
+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span> <span class="sr-only"><?php _e('Toggle Dropdown', 'gmLang'); ?></span></button>
|
68 |
+
<ul class="dropdown-menu" role="menu">
|
69 |
+
<li><a data-select="total" href="#"><?php _e('All', 'gmLang'); ?></a></li>
|
70 |
+
<li><a data-select="none" href="#"><?php _e('None', 'gmLang'); ?></a></li>
|
71 |
+
<li class="divider"></li>
|
72 |
+
<li><a data-select="image" href="#"><?php _e('Images', 'gmLang'); ?></a></li>
|
73 |
+
<li><a data-select="audio" href="#"><?php _e('Audio', 'gmLang'); ?></a></li>
|
74 |
+
<li><a data-select="video" href="#"><?php _e('Video', 'gmLang'); ?></a></li>
|
75 |
+
<li class="divider"></li>
|
76 |
+
<li><a data-select="reverse" href="#" title="<?php _e('Reverse only visible items', 'gmLang'); ?>"><?php _e('Reverse', 'gmLang'); ?></a></li>
|
77 |
+
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
</div>
|
79 |
+
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
+
<div class="btn-group">
|
82 |
+
<?php $curr_mime = explode(',', $gmCore->_get('mime_type', 'total')); ?>
|
83 |
+
<?php if($gmDB->filter){ ?>
|
84 |
+
<a class="btn btn-warning" title="<?php _e('Reset Filter', 'gmLang'); ?>" rel="total" href="<?php echo $url; ?>"><?php _e('Filter', 'gmLang'); ?></a>
|
85 |
+
<?php } else{ ?>
|
86 |
+
<button type="button" class="btn btn-default"><?php _e('Filter', 'gmLang'); ?></button>
|
87 |
+
<?php } ?>
|
88 |
+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
89 |
+
<span class="caret"></span>
|
90 |
+
<span class="sr-only"><?php _e('Toggle Dropdown', 'gmLang'); ?></span>
|
91 |
+
</button>
|
92 |
+
<ul class="dropdown-menu" role="menu">
|
93 |
+
<li role="presentation" class="dropdown-header"><?php _e('TYPE', 'gmLang'); ?></li>
|
94 |
+
<li class="total<?php if(in_array('total', $curr_mime)){ echo ' active'; } ?>"><a rel="total" href="<?php echo $gmCore->get_admin_url(array(), array('mime_type','pager')); ?>"><?php _e('All', 'gmLang'); echo $gm_qty['total']; ?></a></li>
|
95 |
+
<li class="image<?php if(in_array('image', $curr_mime)){ echo ' active'; } if(!$gmDbCount['image']){ echo ' disabled'; } ?>"><a rel="image" href="<?php echo $gmCore->get_admin_url(array('mime_type' => 'image'), array('pager')); ?>"><?php _e('Images', 'gmLang'); echo $gm_qty['image']; ?></a></li>
|
96 |
+
<li class="audio<?php if(in_array('audio', $curr_mime)){ echo ' active'; } if(!$gmDbCount['audio']){ echo ' disabled'; } ?>"><a rel="audio" href="<?php echo $gmCore->get_admin_url(array('mime_type' => 'audio'), array('pager')); ?>"><?php _e('Audio', 'gmLang'); echo $gm_qty['audio']; ?></a></li>
|
97 |
+
<li class="video<?php if(in_array('video', $curr_mime)){ echo ' active'; } if(!$gmDbCount['video']){ echo ' disabled'; } ?>"><a rel="video" href="<?php echo $gmCore->get_admin_url(array('mime_type' => 'video'), array('pager')); ?>"><?php _e('Video', 'gmLang'); echo $gm_qty['video']; ?></a></li>
|
98 |
+
<li class="application<?php if(in_array('application', $curr_mime) || in_array('text', $curr_mime)){ echo ' active'; } if(!$gmDbCount['application']){ echo ' disabled'; } ?>"><a rel="application" href="<?php echo $gmCore->get_admin_url(array('mime_type' => 'application,text'), array('pager')); ?>"><?php _e('Other', 'gmLang'); echo $gm_qty['other']; ?></a></li>
|
99 |
+
<li role="presentation" class="dropdown-header"><?php _e('COLLECTIONS', 'gmLang'); ?></li>
|
100 |
+
<li class="filter_categories<?php if(isset($gmDB->filter_tax['gmedia_category'])){ echo ' active'; } ?>"><a href="#termsModal" data-modal="filter_categories" data-action="gmedia_terms_modal" class="gmedia-modal"><?php _e('Categories', 'gmLang'); ?></a></li>
|
101 |
+
<li class="filter_albums<?php if(isset($gmDB->filter_tax['gmedia_album'])){ echo ' active'; } ?>"><a href="#termsModal" data-modal="filter_albums" data-action="gmedia_terms_modal" class="gmedia-modal"><?php _e('Albums', 'gmLang'); ?></a></li>
|
102 |
+
<li class="filter_tags<?php if(isset($gmDB->filter_tax['gmedia_tag'])){ echo ' active'; } ?>"><a href="#termsModal" data-modal="filter_tags" data-action="gmedia_terms_modal" class="gmedia-modal"><?php _e('Tags', 'gmLang'); ?></a></li>
|
103 |
+
<?php do_action('gmedia_filter_list'); ?>
|
104 |
+
</ul>
|
105 |
+
</div>
|
106 |
|
107 |
+
<div class="btn-group">
|
108 |
+
<?php if(!$gmProcessor->mode){
|
109 |
+
$args = array('mode' => 'edit');
|
110 |
+
$edit_mode_href = $gmCore->get_admin_url($args);
|
111 |
+
$args2 = array('mode' => 'edit', 'filter' => 'selected', 'pager' => false);
|
112 |
+
$edit_mode_data = 'data-href="'.$edit_mode_href.'" data-href_sel="'.$gmCore->get_admin_url($args2).'"';
|
113 |
+
} else{
|
114 |
+
$edit_mode_href = $gmCore->get_admin_url(array(), array('mode'));
|
115 |
+
$edit_mode_data = '';
|
116 |
+
} ?>
|
117 |
+
<a class="btn btn-default edit-mode-link" title="<?php _e('Toggle Edit Mode', 'gmLang'); ?>" href="<?php echo $edit_mode_href; ?>" <?php echo $edit_mode_data; ?>><?php _e('Action', 'gmLang'); ?></a>
|
118 |
+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span> <span class="sr-only"><?php _e('Toggle Dropdown', 'gmLang'); ?></span></button>
|
119 |
<?php
|
120 |
+
$rel_selected_show = 'rel-selected-show';
|
121 |
+
$rel_selected_hide = 'rel-selected-hide';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
?>
|
123 |
+
<ul class="dropdown-menu" role="menu">
|
124 |
+
<?php if(!$gmProcessor->mode){ ?>
|
125 |
+
<li><a class="edit-mode-link" href="<?php echo $edit_mode_href; ?>" <?php echo $edit_mode_data; ?>><?php _e('Enter Edit Mode', 'gmLang'); ?></a></li>
|
126 |
+
<li class="divider"></li>
|
127 |
+
<li class="<?php echo $rel_selected_show; ?>"><a href="#termsModal" data-modal="quick_gallery" data-action="gmedia_terms_modal" class="gmedia-modal"><?php _e('Quick Gallery from Selected', 'gmLang'); ?></a></li>
|
128 |
+
<li class="<?php echo $rel_selected_show; ?>"><a href="#termsModal" data-modal="assign_category" data-action="gmedia_terms_modal" class="gmedia-modal"><?php _e('Assign Category...', 'gmLang'); ?></a></li>
|
129 |
+
<li class="<?php echo $rel_selected_show; ?>"><a href="#termsModal" data-modal="assign_album" data-action="gmedia_terms_modal" class="gmedia-modal"><?php _e('Move to Album...', 'gmLang'); ?></a></li>
|
130 |
+
<li class="<?php echo $rel_selected_show; ?>"><a href="#termsModal" data-modal="add_tags" data-action="gmedia_terms_modal" class="gmedia-modal"><?php _e('Add Tags...', 'gmLang'); ?></a></li>
|
131 |
+
<li class="<?php echo $rel_selected_show; ?>"><a href="#termsModal" data-modal="delete_tags" data-action="gmedia_terms_modal" class="gmedia-modal"><?php _e('Delete Tags...', 'gmLang'); ?></a></li>
|
132 |
+
<li class="<?php echo $rel_selected_show; ?>"><a href="<?php echo wp_nonce_url($gmCore->get_admin_url(array('delete' => 'selected'), array('filter')), 'gmedia_delete') ?>" class="gmedia-delete" data-confirm="<?php _e("You are about to permanently delete the selected items.\n\r'Cancel' to stop, 'OK' to delete.", "gmLang"); ?>"><?php _e('Delete Selected Items', 'gmLang'); ?></a></li>
|
133 |
+
|
134 |
+
<li class="dropdown-header <?php echo $rel_selected_hide; ?>"><span><?php _e("Select items to see more actions", "gmLang"); ?></span></li>
|
135 |
+
<?php } else{ ?>
|
136 |
+
<li><a href="<?php echo $edit_mode_href; ?>"><?php _e('Exit Edit Mode', 'gmLang'); ?></a></li>
|
137 |
+
<?php }
|
138 |
+
do_action('gmedia_action_list');
|
139 |
+
?>
|
140 |
+
</ul>
|
141 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
|
143 |
+
<?php
|
144 |
+
$filter_selected = $gmCore->_req('filter');
|
145 |
+
$filter_selected_arg = $filter_selected? false : 'selected';
|
146 |
+
?>
|
147 |
+
<form class="btn-group" id="gm-selected-btn" name="gm-selected-form" action="<?php echo add_query_arg(array('filter' => $filter_selected_arg), $url); ?>" method="post">
|
148 |
+
<button type="submit" class="btn btn<?php echo ('selected' == $filter_selected)? '-success' : '-info' ?>"><?php printf(__('%s selected', 'gmLang'), '<span id="gm-selected-qty">' . count($gmProcessor->selected_items) . '</span>'); ?></button>
|
149 |
+
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown"><span class="caret"></span> <span class="sr-only"><?php _e('Toggle Dropdown', 'gmLang'); ?></span></button>
|
150 |
+
<input type="hidden" id="gm-selected" data-userid="<?php echo $user_ID; ?>" data-key="library" name="selected_items" value="<?php echo implode(',', $gmProcessor->selected_items); ?>"/>
|
151 |
+
<ul class="dropdown-menu" role="menu">
|
152 |
+
<li><a id="gm-selected-show" href="#show"><?php
|
153 |
+
if(!$filter_selected){
|
154 |
+
_e('Show only selected items', 'gmLang');
|
155 |
+
} else{
|
156 |
+
_e('Show all gmedia items', 'gmLang');
|
157 |
+
}
|
158 |
+
?></a></li>
|
159 |
+
<li><a id="gm-selected-clear" href="#clear"><?php _e('Clear selected items', 'gmLang'); ?></a></li>
|
160 |
+
<li><a href="#termsModal" data-modal="quick_gallery" data-action="gmedia_terms_modal" class="gmedia-modal"><?php _e('Quick Gallery from Selected', 'gmLang'); ?></a></li>
|
161 |
+
</ul>
|
162 |
</form>
|
|
|
|
|
163 |
|
164 |
+
</div>
|
165 |
+
|
166 |
+
</div>
|
167 |
+
<div class="panel-body"></div>
|
168 |
+
<div class="list-group" id="gm-list-table">
|
169 |
+
<?php
|
170 |
+
if(count($gmediaQuery)){
|
171 |
+
foreach($gmediaQuery as $item) {
|
172 |
+
$meta = $gmDB->get_metadata('gmedia', $item->ID);
|
173 |
+
$type = explode('/', $item->mime_type);
|
174 |
+
$item_url = $gmCore->upload['url'] . '/' . $gmGallery->options['folder'][$type[0]] . '/' . $item->gmuid;
|
175 |
+
$item_path = $gmCore->upload['path'] . '/' . $gmGallery->options['folder'][$type[0]] . '/' . $item->gmuid;
|
176 |
+
|
177 |
+
if (function_exists('exif_imagetype')) {
|
178 |
+
$is_webimage = (('image' == $type[0]) && in_array(exif_imagetype($item_path), array(IMAGETYPE_GIF,
|
179 |
+
IMAGETYPE_JPEG,
|
180 |
+
IMAGETYPE_PNG)))? true : false;
|
181 |
+
} else{
|
182 |
+
$is_webimage = (('image' == $type[0]) && in_array($type[1], array('jpeg', 'png', 'gif')))? true : false;
|
183 |
+
}
|
184 |
+
|
185 |
+
$tags = $gmDB->get_the_gmedia_terms($item->ID, 'gmedia_tag');
|
186 |
+
$albs = $gmDB->get_the_gmedia_terms($item->ID, 'gmedia_album');
|
187 |
+
$cats = $gmDB->get_the_gmedia_terms($item->ID, 'gmedia_category');
|
188 |
+
?>
|
189 |
+
<?php if(!$gmProcessor->mode){
|
190 |
+
$is_selected = in_array($item->ID, $gmProcessor->selected_items)? true : false; ?>
|
191 |
+
<div class="list-group-item d-row clearfix<?php echo $is_selected? ' active' : ''; ?>" id="list-item-<?php echo $item->ID; ?>" data-id="<?php echo $item->ID; ?>" data-type="<?php echo $type[0]; ?>">
|
192 |
+
<div class="gmedia_id">#<?php echo $item->ID; ?></div>
|
193 |
+
<label class="cb_media-object">
|
194 |
+
<input name="doaction[]" type="checkbox"<?php echo $is_selected? ' checked="checked"' : ''; ?> data-type="<?php echo $type[0]; ?>" class="hidden" value="<?php echo $item->ID; ?>"/>
|
195 |
+
<span data-target="<?php echo $item_url; ?>" class="thumbnail">
|
196 |
+
<img class="gmedia-thumb" src="<?php echo $gmCore->gm_get_media_image($item, 'thumb'); ?>" alt=""/>
|
197 |
+
<?php if(('image' != $type[0]) && isset($meta['cover'][0]) && !empty($meta['cover'][0])){ ?>
|
198 |
+
<img class="gmedia-typethumb" src="<?php echo $gmCore->gm_get_media_image($item, 'thumb', false); ?>" alt=""/>
|
199 |
+
<?php } ?>
|
200 |
+
</span>
|
201 |
+
</label>
|
202 |
+
|
203 |
+
<div class="media-body">
|
204 |
+
<div class="col-md-6">
|
205 |
+
<p class="media-title"><?php echo esc_html($item->title); ?> </p>
|
206 |
+
|
207 |
+
<p class="media-caption"><?php echo esc_html($item->description); ?></p>
|
208 |
+
|
209 |
+
<p class="media-meta"><span class="label label-default"><?php _e('Album', 'gmLang'); ?>:</span>
|
210 |
+
<?php
|
211 |
+
if($albs){
|
212 |
+
$terms_album = array();
|
213 |
+
foreach($albs as $c){
|
214 |
+
$terms_album[] = sprintf('<a class="album" href="%s">%s</a>', esc_url(add_query_arg(array('alb' => $c->term_id), $url)), esc_html($c->name));
|
215 |
+
}
|
216 |
+
$terms_album = join(', ', $terms_album);
|
217 |
+
} else{
|
218 |
+
$terms_album = sprintf('<a class="album" href="%s">%s</a>', esc_url(add_query_arg(array('alb' => 0), $url)), '—');
|
219 |
+
}
|
220 |
+
echo $terms_album;
|
221 |
+
|
222 |
+
if($is_webimage){
|
223 |
+
?>
|
224 |
+
<br/><span class="label label-default"><?php _e('Category', 'gmLang'); ?>:</span>
|
225 |
+
<?php
|
226 |
+
if($cats){
|
227 |
+
$terms_category = array();
|
228 |
+
foreach($cats as $c){
|
229 |
+
$terms_category[] = sprintf('<a class="category" href="%s">%s</a>', esc_url(add_query_arg(array('cat' => $c->term_id), $url)), esc_html($gmGallery->options['taxonomies']['gmedia_category'][$c->name]));
|
230 |
+
}
|
231 |
+
$terms_category = join(', ', $terms_category);
|
232 |
+
} else{
|
233 |
+
$terms_category = sprintf('<a class="category" href="%s">%s</a>', esc_url(add_query_arg(array('cat' => 0), $url)), __('Uncategorized'));
|
234 |
+
}
|
235 |
+
echo $terms_category;
|
236 |
+
} ?>
|
237 |
+
<br/><span class="label label-default"><?php _e('Tags', 'gmLang'); ?>:</span>
|
238 |
+
<?php
|
239 |
+
if($tags){
|
240 |
+
$terms_tag = array();
|
241 |
+
foreach($tags as $c){
|
242 |
+
$terms_tag[] = sprintf('<a class="tag" href="%s">%s</a>', esc_url(add_query_arg(array('tag_id' => $c->term_id), $url)), esc_html($c->name));
|
243 |
+
}
|
244 |
+
$terms_tag = join(', ', $terms_tag);
|
245 |
+
} else{
|
246 |
+
$terms_tag = '—';
|
247 |
+
}
|
248 |
+
echo $terms_tag;
|
249 |
+
?>
|
250 |
+
</p>
|
251 |
+
</div>
|
252 |
+
<div class="col-md-6">
|
253 |
+
<div class="media-meta">
|
254 |
+
<span class="label label-default"><?php _e('Type','gmLang'); ?>:</span> <?php echo $item->mime_type; //echo ucfirst($type[0]); ?>
|
255 |
+
</div>
|
256 |
+
<?php if('image' == $type[0]){
|
257 |
+
$_metadata = unserialize($meta['_metadata'][0]);
|
258 |
+
?>
|
259 |
+
<div class="media-meta">
|
260 |
+
<span class="label label-default"><?php _e('Size','gmLang'); ?>:</span> <?php echo $_metadata['original']['width'] . ' × ' . $_metadata['original']['height']; ?>
|
261 |
+
</div>
|
262 |
+
<?php } ?>
|
263 |
+
<div class="media-meta"><span class="label label-default"><?php _e('Filename','gmLang'); ?>:</span>
|
264 |
+
<a href="<?php echo $item_url; ?>"><?php echo $item->gmuid; ?></a></div>
|
265 |
+
<div class="media-meta">
|
266 |
+
<span class="label label-default"><?php _e('Author','gmLang'); ?>:</span> <?php printf('<a class="gmedia-author" href="%s">%s</a>', esc_url(add_query_arg(array('author' => $item->author), $url)), get_user_option('display_name', $item->author)); ?>
|
267 |
+
</div>
|
268 |
+
<div class="media-meta"><span class="label label-default"><?php _e('Date', 'gmLang'); ?>:</span> <?php echo $item->date;
|
269 |
+
echo ' <small class="modified" title="' . __('Last Modified Date', 'gmLang') . '">' . (($item->modified != $item->date)? $item->modified : '') . '</small>';
|
270 |
+
?></div>
|
271 |
+
<div class="media-meta"><span class="label label-default"><?php _e('Link','gmLang'); ?>:</span>
|
272 |
+
<?php if(!empty($item->link)){ ?>
|
273 |
+
<a href="<?php echo $item->link; ?>"><?php echo $item->link; ?></a>
|
274 |
+
<?php
|
275 |
+
} else{
|
276 |
+
echo '—';
|
277 |
+
} ?></div>
|
278 |
+
<p class="media-meta" style="margin:5px 4px;">
|
279 |
+
<a href="<?php echo admin_url("admin.php?page=GrandMedia&gmediablank=image_editor&id={$item->ID}"); ?>" data-target="#gmeditModal" class="gmedit-modal" title="<?php echo esc_attr($item->title); ?>">
|
280 |
+
<?php _e('Edit Image', 'gmLang'); ?>
|
281 |
+
</a> |
|
282 |
+
<a href="<?php echo $gmCore->gm_get_media_image($item, 'original'); ?>" data-target="#previewModal" class="preview-modal" title="<?php echo esc_attr($item->title); ?>">
|
283 |
+
<?php _e('View Original', 'gmLang'); ?>
|
284 |
+
</a>
|
285 |
+
</p>
|
286 |
+
</div>
|
287 |
</div>
|
288 |
</div>
|
289 |
+
|
290 |
+
<?php } else{ ?>
|
291 |
+
|
292 |
+
<form class="list-group-item row d-row edit-gmedia" id="list-item-<?php echo $item->ID; ?>" data-id="<?php echo $item->ID; ?>" data-type="<?php echo $type[0]; ?>" role="form">
|
293 |
+
<div class="col-sm-4" style="max-width:350px;">
|
294 |
+
<input name="ID" type="hidden" value="<?php echo $item->ID; ?>"/>
|
295 |
+
<?php if(('image' == $type[0])){ ?>
|
296 |
+
<a href="<?php echo $item_url; ?>" data-target="#previewModal" class="thumbnail preview-modal" title="<?php echo esc_attr($item->title); ?>">
|
297 |
+
<img class="gmedia-thumb" src="<?php echo $gmCore->gm_get_media_image($item, 'thumb'); ?>" alt=""/>
|
298 |
+
</a>
|
299 |
+
<p>
|
300 |
+
<a href="<?php echo admin_url("admin.php?page=GrandMedia&gmediablank=image_editor&id={$item->ID}"); ?>" data-target="#gmeditModal" class="btn btn-link btn-sm gmedit-modal" title="<?php echo esc_attr($item->title); ?>">
|
301 |
+
<?php _e('Edit Image', 'gmLang'); ?>
|
302 |
+
</a> |
|
303 |
+
<a href="<?php echo $gmCore->gm_get_media_image($item, 'original'); ?>" data-target="#previewModal" class="btn btn-link btn-sm preview-modal" title="<?php echo esc_attr($item->title); ?>">
|
304 |
+
<?php _e('View Original', 'gmLang'); ?>
|
305 |
+
</a>
|
306 |
+
</p>
|
307 |
+
<?php } else{ ?>
|
308 |
+
<a href="<?php echo $item_url; ?>" data-target="#previewModal" class="thumbnail preview-modal" title="<?php echo esc_attr($item->title); ?>">
|
309 |
+
<img class="gmedia-thumb" src="<?php echo $gmCore->gm_get_media_image($item, 'thumb'); ?>" alt=""/>
|
310 |
+
<?php if(isset($meta['cover'][0]) && !empty($meta['cover'][0])){ ?>
|
311 |
+
<img class="gmedia-typethumb" src="<?php echo $gmCore->gm_get_media_image($item, 'thumb', false); ?>" alt=""/>
|
312 |
+
<?php } ?>
|
313 |
+
</a>
|
314 |
<?php } ?>
|
315 |
+
</div>
|
316 |
+
<div class="col-sm-8">
|
317 |
+
<div class="row">
|
318 |
+
<div class="form-group col-lg-6">
|
319 |
+
<label><?php _e('Title', 'gmLang'); ?></label>
|
320 |
+
<input name="title" type="text" class="form-control input-sm" placeholder="<?php _e('Title', 'gmLang'); ?>" value="<?php echo esc_attr($item->title); ?>">
|
321 |
+
</div>
|
322 |
+
<div class="form-group col-lg-6">
|
323 |
+
<label><?php _e('Link URL', 'gmLang'); ?></label>
|
324 |
+
<input name="link" type="text" class="form-control input-sm" value="<?php echo $item->link; ?>"/>
|
325 |
+
</div>
|
326 |
+
</div>
|
327 |
+
<div class="row">
|
328 |
+
<div class="form-group col-lg-6">
|
329 |
+
<label><?php _e('Description', 'gmLang'); ?></label>
|
330 |
+
<?php wp_editor(esc_html($item->description), "gm{$item->ID}_description", array('editor_class' => 'form-control input-sm',
|
331 |
+
'editor_height' => 140,
|
332 |
+
'wpautop' => false,
|
333 |
+
'media_buttons' => false,
|
334 |
+
'textarea_name' => 'description',
|
335 |
+
'textarea_rows' => '4',
|
336 |
+
'tinymce' => false,
|
337 |
+
'quicktags' => array('buttons' => apply_filters('gmedia_editor_quicktags', 'strong,em,link,ul,li,close')))); ?>
|
338 |
+
</div>
|
339 |
+
<div class="col-lg-6">
|
340 |
+
<?php if($is_webimage){ ?>
|
341 |
+
<div class="form-group">
|
342 |
+
<?php
|
343 |
+
$cat_name = empty($cats)? 0 : reset($cats)->name;
|
344 |
+
$term_type = 'gmedia_category';
|
345 |
+
$gm_terms = $gmGallery->options['taxonomies'][$term_type];
|
346 |
+
|
347 |
+
$terms_category = '';
|
348 |
+
if(count($gm_terms)){
|
349 |
+
foreach($gm_terms as $term_name => $term_title){
|
350 |
+
$selected_option = ($cat_name === $term_name)? ' selected="selected"' : '';
|
351 |
+
$terms_category .= '<option' . $selected_option . ' value="' . $term_name . '">' . esc_html($term_title) . '</option>' . "\n";
|
352 |
+
}
|
353 |
+
}
|
354 |
+
?>
|
355 |
+
<label><?php _e('Category', 'gmLang'); ?> </label>
|
356 |
+
<select name="terms[gmedia_category]" class="gmedia_category form-control input-sm">
|
357 |
+
<option<?php echo $cat_name? '' : ' selected="selected"'; ?> value=""><?php _e('Uncategorized', 'gmLang'); ?></option>
|
358 |
+
<?php echo $terms_category; ?>
|
359 |
+
</select>
|
360 |
+
</div>
|
361 |
+
<?php } elseif(('image' != $type[0])){ ?>
|
362 |
+
<div class="form-group">
|
363 |
+
<label><?php _e('Cover', 'gmLang'); ?></label>
|
364 |
+
<input name="meta[cover]" type="text" class="form-control input-sm gmedia-cover" value="<?php if(isset($meta['cover'][0])){ echo $meta['cover'][0]; } ?>" placeholder="<?php _e('Gmedia ID or Image URL', 'gmLang'); ?>"/>
|
365 |
+
</div>
|
366 |
+
<?php } ?>
|
367 |
+
|
368 |
+
<div class="form-group">
|
369 |
+
<?php
|
370 |
+
$alb_id = empty($albs)? 0 : reset($albs)->term_id;
|
371 |
+
$term_type = 'gmedia_album';
|
372 |
+
$gm_terms = $gmDB->get_terms($term_type);
|
373 |
+
|
374 |
+
$terms_album = '';
|
375 |
+
if(count($gm_terms)){
|
376 |
+
foreach($gm_terms as $term){
|
377 |
+
$selected_option = ($alb_id == $term->term_id)? ' selected="selected"' : '';
|
378 |
+
$terms_album .= '<option' . $selected_option . ' value="' . $term->term_id . '">' . esc_html($term->name) . '</option>' . "\n";
|
379 |
+
}
|
380 |
+
}
|
381 |
+
?>
|
382 |
+
<label><?php _e('Album ', 'gmLang'); ?></label>
|
383 |
+
<select name="terms[gmedia_album]" class="combobox_gmedia_album form-control input-sm" placeholder="<?php _e('Album Name...', 'gmLang'); ?>">
|
384 |
+
<option<?php echo $alb_id? '' : ' selected="selected"'; ?> value=""></option>
|
385 |
+
<?php echo $terms_album; ?>
|
386 |
+
</select>
|
387 |
+
</div>
|
388 |
+
<div class="form-group">
|
389 |
+
<?php
|
390 |
+
if(!empty($tags)){
|
391 |
+
$terms_tag = array();
|
392 |
+
foreach($tags as $c){
|
393 |
+
$terms_tag[] = esc_html($c->name);
|
394 |
+
}
|
395 |
+
$terms_tag = join(', ', $terms_tag);
|
396 |
+
} else{
|
397 |
+
$terms_tag = '';
|
398 |
+
}
|
399 |
+
?>
|
400 |
+
<label><?php _e('Tags ', 'gmLang'); ?></label>
|
401 |
+
<textarea name="terms[gmedia_tag]" class="form-control input-sm" rows="1" cols="50"><?php echo $terms_tag; ?></textarea>
|
402 |
+
</div>
|
403 |
+
</div>
|
404 |
+
</div>
|
405 |
+
<div class="row">
|
406 |
+
<div class="col-lg-6">
|
407 |
+
<div class="form-group">
|
408 |
+
<label><?php _e('Filename', 'gmLang'); ?></label>
|
409 |
+
<input name="filename" type="text" class="form-control input-sm gmedia-filename" value="<?php echo pathinfo($item->gmuid, PATHINFO_FILENAME); ?>"/>
|
410 |
+
</div>
|
411 |
+
<div class="form-group">
|
412 |
+
<label><?php _e('Date', 'gmLang'); ?></label>
|
413 |
+
|
414 |
+
<div class="input-group date input-group-sm" data-date-format="YYYY-MM-DD HH:mm:ss">
|
415 |
+
<input name="date" type="text" readonly="readonly" class="form-control input-sm" value="<?php echo $item->date; ?>"/>
|
416 |
+
<span class="input-group-btn"><button type="button" class="btn btn-primary">
|
417 |
+
<span class="glyphicon glyphicon-calendar"></span></button></span>
|
418 |
+
</div>
|
419 |
+
</div>
|
420 |
+
</div>
|
421 |
+
<div class="col-lg-6">
|
422 |
+
<div class="form-group hidden">
|
423 |
+
<label><?php _e('Author', 'gmLang'); ?></label>
|
424 |
+
<?php $user_ids = $gmCore->get_editable_user_ids($user_ID);
|
425 |
+
wp_dropdown_users(array('include' => $user_ids, 'include_selected' => true,
|
426 |
+
'name' => 'author', 'selected' => $item->author,
|
427 |
+
'class' => 'form-control'));
|
428 |
+
?>
|
429 |
+
</div>
|
430 |
+
<div class="media-meta"><span class="label label-default"><?php _e('ID', 'gmLang') ?>:</span> <strong><?php echo $item->ID; ?></strong></div>
|
431 |
+
<div class="media-meta"><span class="label label-default"><?php _e('Type', 'gmLang') ?>:</span> <?php echo $item->mime_type; //echo ucfirst($type[0]); ?></div>
|
432 |
+
<div class="media-meta"><span class="label label-default"><?php _e('File Size', 'gmLang') ?> :</span> <?php echo $gmCore->filesize($item_path); ?></div>
|
433 |
+
<?php if('image' == $type[0]){
|
434 |
+
$_metadata = unserialize($meta['_metadata'][0]); ?>
|
435 |
+
<div class="media-meta"> <span class="label label-default"><?php _e('Dimensions', 'gmLang') ?>:</span> <?php echo $_metadata['original']['width'] . ' × ' . $_metadata['original']['height']; ?></div>
|
436 |
+
<?php } ?>
|
437 |
+
<div class="media-meta"><span class="label label-default"><?php _e('Last Edited', 'gmLang') ?>:</span> <span class="gm-last-edited modified"><?php echo $item->modified; ?></span></div>
|
438 |
+
</div>
|
439 |
+
</div>
|
440 |
+
<?php do_action('gmedia_edit_form'); ?>
|
441 |
</div>
|
442 |
</form>
|
443 |
+
<?php } ?>
|
444 |
+
<?php } ?>
|
445 |
+
<script type="text/javascript">
|
446 |
+
jQuery(function($){
|
447 |
+
<?php if(!$gmProcessor->mode){ ?>
|
448 |
+
$('#gm-selected').on('change', function(){
|
449 |
+
var val = $(this).val();
|
450 |
+
$('.edit-mode-link').each(function(){
|
451 |
+
if(val){
|
452 |
+
$(this).attr('href', $(this).data('href_sel'));
|
453 |
+
} else{
|
454 |
+
$(this).attr('href', $(this).data('href'));
|
455 |
+
}
|
456 |
+
});
|
457 |
+
}).trigger('change');
|
458 |
+
|
459 |
+
<?php } else { ?>
|
460 |
+
$('.combobox_gmedia_album').selectize({
|
461 |
+
create: true,
|
462 |
+
persist: false
|
463 |
+
});
|
464 |
+
|
465 |
+
var gmedia_date_temp;
|
466 |
+
$('.input-group.date').datetimepicker({useSeconds: true}).on('show.dp',function(e){
|
467 |
+
gmedia_date_temp = $('input', this).val();
|
468 |
+
}).on('hide.dp', function(e){
|
469 |
+
if(gmedia_date_temp != $('input', this).val()){
|
470 |
+
$('input', this).change();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
471 |
}
|
472 |
+
});
|
473 |
+
$('input.gmedia-filename').alphanum({
|
474 |
+
allow: '-_',
|
475 |
+
disallow: '',
|
476 |
+
allowSpace: false,
|
477 |
+
allowNumeric: true,
|
478 |
+
allowUpper: true,
|
479 |
+
allowLower: true,
|
480 |
+
allowCaseless: true,
|
481 |
+
allowLatin: true,
|
482 |
+
allowOtherCharSets: false,
|
483 |
+
forceUpper: false,
|
484 |
+
forceLower: false,
|
485 |
+
maxLength: NaN
|
486 |
+
});
|
487 |
|
488 |
+
<?php } ?>
|
489 |
+
});
|
490 |
+
window.closeModal = function(id){
|
491 |
+
jQuery('#'+id).modal('hide');
|
492 |
+
};
|
493 |
+
</script>
|
494 |
+
<?php } else{ ?>
|
495 |
+
<div class="list-group-item">
|
496 |
+
<div class="well well-lg text-center">
|
497 |
+
<h4><?php _e('No items to show.', 'gmLang'); ?></h4>
|
498 |
+
<p><a href="<?php echo admin_url('admin.php?page=GrandMedia_AddMedia') ?>" class="btn btn-success"><span class="glyphicon glyphicon-plus"></span> <?php _e('Add Media', 'gmLang'); ?></a></p>
|
499 |
+
</div>
|
500 |
</div>
|
501 |
+
<?php } ?>
|
502 |
+
</div>
|
503 |
+
|
504 |
+
<?php
|
505 |
+
wp_original_referer_field(true, 'previous');
|
506 |
+
wp_nonce_field('GmediaGallery');
|
507 |
+
?>
|
508 |
+
</div>
|
509 |
+
|
510 |
+
<div class="modal fade gmedia-modal" id="termsModal" tabindex="-1" role="dialog" aria-hidden="true">
|
511 |
+
<div class="modal-dialog"></div>
|
512 |
+
</div>
|
513 |
+
<div class="modal fade gmedia-modal" id="gmeditModal" tabindex="-1" role="dialog" aria-hidden="true">
|
514 |
+
<div class="modal-dialog modal-lg"><div class="modal-content"></div></div>
|
515 |
+
</div>
|
516 |
+
<div class="modal fade gmedia-modal" id="previewModal" tabindex="-1" role="dialog" aria-hidden="true">
|
517 |
+
<div class="modal-dialog modal-lg">
|
518 |
+
<div class="modal-content">
|
519 |
+
<div class="modal-header">
|
520 |
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
521 |
+
<h4 class="modal-title"></h4>
|
522 |
+
</div>
|
523 |
+
<div class="modal-body"></div>
|
524 |
+
</div>
|
525 |
</div>
|
526 |
</div>
|
527 |
<?php
|
admin/images/Folder.png
DELETED
Binary file
|
admin/images/Labels.png
DELETED
Binary file
|
admin/images/Order.png
DELETED
Binary file
|
admin/images/OrderBy.png
DELETED
Binary file
|
admin/images/User.png
DELETED
Binary file
|
admin/images/application_.png
DELETED
Binary file
|
admin/images/archive_.png
DELETED
Binary file
|
admin/images/audio_.png
DELETED
Binary file
|
admin/images/bg.png
DELETED
Binary file
|
admin/images/bg_act_bar.png
DELETED
Binary file
|
admin/images/bg_act_but.png
DELETED
Binary file
|
admin/images/bg_act_but2.png
DELETED
Binary file
|
admin/images/bg_search.png
DELETED
Binary file
|
admin/images/catalog.png
DELETED
Binary file
|
admin/images/close.png
DELETED
Binary file
|
admin/images/code_.png
DELETED
Binary file
|
admin/images/default_.png
DELETED
Binary file
|
admin/images/document_.png
DELETED
Binary file
|
admin/images/dropbut.png
DELETED
Binary file
|
admin/images/gray-grad.png
DELETED
Binary file
|
admin/images/icon_cancel.png
DELETED
Binary file
|
admin/images/icon_checked.png
DELETED
Binary file
|
admin/images/icon_delete.png
DELETED
Binary file
|
admin/images/icon_edit2.png
DELETED
Binary file
|
admin/images/icon_eye.png
DELETED
Binary file
|
admin/images/icon_listen.png
DELETED
Binary file
|
admin/images/icon_listen2.png
DELETED
Binary file
|
admin/images/icon_save.png
DELETED
Binary file
|
admin/images/icon_watch.png
DELETED
Binary file
|
admin/images/interactive_.png
DELETED
Binary file
|
admin/images/label0.png
DELETED
Binary file
|
admin/images/label1.png
DELETED
Binary file
|
admin/images/link.png
DELETED
Binary file
|
admin/images/logo.png
DELETED
Binary file
|
admin/images/navtabtop_bg.png
DELETED
Binary file
|
admin/images/ot-menu-bg.png
DELETED
Binary file
|
admin/images/ot-menu-top-bg.png
DELETED
Binary file
|
admin/images/sorting.png
DELETED
Binary file
|
admin/images/spreadsheet_.png
DELETED
Binary file
|
admin/images/text_.png
DELETED
Binary file
|
admin/images/video_.png
DELETED
Binary file
|
admin/import.php
ADDED
@@ -0,0 +1,392 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
ini_set('display_errors', 0);
|
4 |
+
ini_set('error_reporting', 0);
|
5 |
+
ini_set('max_execution_time', 600);
|
6 |
+
/*
|
7 |
+
@apache_setenv('no-gzip', 1);
|
8 |
+
@ini_set('zlib.output_compression', 0);
|
9 |
+
@ini_set('implicit_flush', 1);
|
10 |
+
for ($i = 0; $i < ob_get_level(); $i++) { ob_end_flush(); }
|
11 |
+
ob_implicit_flush(1);
|
12 |
+
*/
|
13 |
+
|
14 |
+
preg_match('|^(.*?/)(grand-media)/|i', str_replace('\\', '/', __FILE__), $_m);
|
15 |
+
require_once($_m[1] . 'grand-media/config.php');
|
16 |
+
|
17 |
+
/** WordPress Image Administration API */
|
18 |
+
require_once(ABSPATH . 'wp-admin/includes/image.php');
|
19 |
+
|
20 |
+
// HTTP headers for no cache etc
|
21 |
+
nocache_headers();
|
22 |
+
|
23 |
+
if(!current_user_can('upload_files')){
|
24 |
+
wp_die(__('You do not have permission to upload files.'));
|
25 |
+
}
|
26 |
+
|
27 |
+
check_admin_referer('GmediaImport');
|
28 |
+
|
29 |
+
// 10 minutes execution time
|
30 |
+
@set_time_limit(10 * 60);
|
31 |
+
|
32 |
+
// fake upload time
|
33 |
+
usleep(10);
|
34 |
+
|
35 |
+
global $gmCore, $gmGallery;
|
36 |
+
|
37 |
+
$import = $gmCore->_post('import');
|
38 |
+
$terms = $gmCore->_post('terms');
|
39 |
+
|
40 |
+
function gmedia_import_files($files, $terms, $move, $exists = 0){
|
41 |
+
global $gmCore, $gmGallery;
|
42 |
+
|
43 |
+
if (ob_get_level() == 0) {
|
44 |
+
ob_start();
|
45 |
+
}
|
46 |
+
$eol = '</pre>'.PHP_EOL;
|
47 |
+
$c = count($files);
|
48 |
+
$i = 0;
|
49 |
+
foreach($files as $file){
|
50 |
+
|
51 |
+
if(is_array($file)){
|
52 |
+
if(isset($file['file'])){
|
53 |
+
extract($file);
|
54 |
+
} else{
|
55 |
+
_e('Something went wrong...', 'gmLang');
|
56 |
+
die();
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
wp_ob_end_flush_all();
|
61 |
+
flush();
|
62 |
+
|
63 |
+
$i++;
|
64 |
+
$prefix = "\n<pre>$i/$c - ";
|
65 |
+
$prefix_ko = "\n<pre class='ko'>$i/$c - ";
|
66 |
+
|
67 |
+
if(!is_file($file)){
|
68 |
+
echo $prefix_ko . sprintf(__('File not exists: %s', 'gmLang'), $file) . $eol;
|
69 |
+
continue;
|
70 |
+
}
|
71 |
+
|
72 |
+
|
73 |
+
$fileinfo = $gmCore->fileinfo($file, $exists);
|
74 |
+
|
75 |
+
// try to make grand-media dir if not exists
|
76 |
+
if(!wp_mkdir_p($fileinfo['dirpath'])){
|
77 |
+
echo $prefix_ko . sprintf(__('Unable to create directory `%s`. Is its parent directory writable by the server?', 'gmLang'), $fileinfo['dirpath']) . $eol;
|
78 |
+
continue;
|
79 |
+
}
|
80 |
+
// Check if grand-media dir is writable
|
81 |
+
if(!is_writable($fileinfo['dirpath'])){
|
82 |
+
@chmod($fileinfo['dirpath'], 0755);
|
83 |
+
if(!is_writable($fileinfo['dirpath'])){
|
84 |
+
echo $prefix_ko . sprintf(__('Directory `%s` or its subfolders are not writable by the server.', 'gmLang'), dirname($fileinfo['dirpath'])) . $eol;
|
85 |
+
continue;
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
if(!copy($file, $fileinfo['filepath'])){
|
90 |
+
echo $prefix_ko . sprintf(__("Can't copy file from `%s` to `%s`", 'gmLang'), $file, $fileinfo['filepath']) . $eol;
|
91 |
+
continue;
|
92 |
+
}
|
93 |
+
|
94 |
+
$gmCore->file_chmod($fileinfo['filepath']);
|
95 |
+
|
96 |
+
$size = false;
|
97 |
+
$is_webimage = false;
|
98 |
+
if('image' == $fileinfo['dirname']){
|
99 |
+
$size = @getimagesize($fileinfo['filepath']);
|
100 |
+
if($size && file_is_displayable_image($fileinfo['filepath'])){
|
101 |
+
if(!wp_mkdir_p($fileinfo['dirpath_thumb'])){
|
102 |
+
echo $prefix_ko . sprintf(__('Unable to create directory `%s`. Is its parent directory writable by the server?', 'gmLang'), $fileinfo['dirpath_thumb']) . $eol;
|
103 |
+
continue;
|
104 |
+
}
|
105 |
+
if(!is_writable($fileinfo['dirpath_thumb'])){
|
106 |
+
@chmod($fileinfo['dirpath_thumb'], 0755);
|
107 |
+
if(!is_writable($fileinfo['dirpath_thumb'])){
|
108 |
+
@unlink($fileinfo['filepath']);
|
109 |
+
echo $prefix_ko . sprintf(__('Directory `%s` is not writable by the server.', 'gmLang'), $fileinfo['dirpath_thumb']) . $eol;
|
110 |
+
continue;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
if(!wp_mkdir_p($fileinfo['dirpath_original'])){
|
114 |
+
echo $prefix_ko . sprintf(__('Unable to create directory `%s`. Is its parent directory writable by the server?', 'gmLang'), $fileinfo['dirpath_original']) . $eol;
|
115 |
+
continue;
|
116 |
+
}
|
117 |
+
if(!is_writable($fileinfo['dirpath_original'])){
|
118 |
+
@chmod($fileinfo['dirpath_original'], 0755);
|
119 |
+
if(!is_writable($fileinfo['dirpath_original'])){
|
120 |
+
@unlink($fileinfo['filepath']);
|
121 |
+
echo $prefix_ko . sprintf(__('Directory `%s` is not writable by the server.', 'gmLang'), $fileinfo['dirpath_original']) . $eol;
|
122 |
+
continue;
|
123 |
+
}
|
124 |
+
}
|
125 |
+
|
126 |
+
// Optimized image
|
127 |
+
$webimg = $gmGallery->options['image'];
|
128 |
+
$thumbimg = $gmGallery->options['thumb'];
|
129 |
+
|
130 |
+
$webimg['resize'] = (($webimg['width'] < $size[0]) || ($webimg['height'] < $size[1]))? true : false;
|
131 |
+
$thumbimg['resize'] = (($thumbimg['width'] < $size[0]) || ($thumbimg['height'] < $size[1]))? true : false;
|
132 |
+
|
133 |
+
if($webimg['resize']){
|
134 |
+
rename($fileinfo['filepath'], $fileinfo['filepath_original']);
|
135 |
+
} else{
|
136 |
+
copy($fileinfo['filepath'], $fileinfo['filepath_original']);
|
137 |
+
}
|
138 |
+
if($webimg['resize'] || $thumbimg['resize']){
|
139 |
+
$editor = wp_get_image_editor($fileinfo['filepath_original']);
|
140 |
+
if(is_wp_error($editor)){
|
141 |
+
@unlink($fileinfo['filepath_original']);
|
142 |
+
echo $prefix_ko . $fileinfo['basename']. " (wp_get_image_editor): ". $editor->get_error_message() . $eol;
|
143 |
+
continue;
|
144 |
+
}
|
145 |
+
|
146 |
+
$crop = 0;
|
147 |
+
|
148 |
+
if($webimg['resize']){
|
149 |
+
$editor->set_quality($webimg['quality']);
|
150 |
+
|
151 |
+
$resized = $editor->resize($webimg['width'], $webimg['height'], $webimg['crop']);
|
152 |
+
if(is_wp_error($resized)){
|
153 |
+
@unlink($fileinfo['filepath_original']);
|
154 |
+
echo $prefix_ko . $fileinfo['basename']. " (".$resized->get_error_code()." | editor->resize->webimage({$webimg['width']}, {$webimg['height']}, {$webimg['crop']})): ". $resized->get_error_message() . $eol;
|
155 |
+
continue;
|
156 |
+
}
|
157 |
+
|
158 |
+
$saved = $editor->save($fileinfo['filepath']);
|
159 |
+
if(is_wp_error($saved)){
|
160 |
+
@unlink($fileinfo['filepath_original']);
|
161 |
+
echo $prefix_ko . $fileinfo['basename']. " (".$saved->get_error_code()." | editor->save->webimage): ". $saved->get_error_message() . $eol;
|
162 |
+
continue;
|
163 |
+
}
|
164 |
+
}
|
165 |
+
|
166 |
+
// Thumbnail
|
167 |
+
$editor->set_quality($thumbimg['quality']);
|
168 |
+
|
169 |
+
$resized = $editor->resize($thumbimg['width'], $thumbimg['height'], $thumbimg['crop']);
|
170 |
+
if(is_wp_error($resized)){
|
171 |
+
@unlink($fileinfo['filepath']);
|
172 |
+
@unlink($fileinfo['filepath_original']);
|
173 |
+
echo $prefix_ko . $fileinfo['basename']. " (".$resized->get_error_code()." | editor->resize->thumb({$thumbimg['width']}, {$thumbimg['height']}, {$thumbimg['crop']})): ". $resized->get_error_message() . $eol;
|
174 |
+
continue;
|
175 |
+
}
|
176 |
+
|
177 |
+
$saved = $editor->save($fileinfo['filepath_thumb']);
|
178 |
+
if(is_wp_error($saved)){
|
179 |
+
@unlink($fileinfo['filepath']);
|
180 |
+
@unlink($fileinfo['filepath_original']);
|
181 |
+
echo $prefix_ko . $fileinfo['basename'] . " (".$saved->get_error_code()." | editor->save->thumb): ". $saved->get_error_message() . $eol;
|
182 |
+
continue;
|
183 |
+
}
|
184 |
+
} else{
|
185 |
+
copy($fileinfo['filepath'], $fileinfo['filepath_thumb']);
|
186 |
+
}
|
187 |
+
$is_webimage = true;
|
188 |
+
} else{
|
189 |
+
@unlink($fileinfo['filepath']);
|
190 |
+
echo $prefix_ko . $fileinfo['basename']. ": " . __("Could not read image size. Invalid image was deleted.", 'gmLang') . $eol;
|
191 |
+
continue;
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
// Write media data to DB
|
196 |
+
// TODO Option to set title empty string or from metadata or from filename or both
|
197 |
+
// use image exif/iptc data for title and caption defaults if possible
|
198 |
+
if($size && !isset($title) && !isset($description)){
|
199 |
+
$image_meta = @wp_read_image_metadata($fileinfo['filepath_original']);
|
200 |
+
if(trim($image_meta['title']) && !is_numeric(sanitize_title($image_meta['title']))){
|
201 |
+
$title = $image_meta['title'];
|
202 |
+
}
|
203 |
+
if(trim($image_meta['caption'])){
|
204 |
+
$description = $image_meta['caption'];
|
205 |
+
}
|
206 |
+
}
|
207 |
+
if(!isset($title) || empty($title)){ $title = $fileinfo['title']; }
|
208 |
+
if(!isset($description)){ $description = ''; }
|
209 |
+
if(!isset($link)){ $link = ''; }
|
210 |
+
|
211 |
+
$_terms = $terms;
|
212 |
+
if(!$is_webimage){
|
213 |
+
unset($_terms['gmedia_category']);
|
214 |
+
}
|
215 |
+
|
216 |
+
// Construct the media_data array
|
217 |
+
$media_data = array('mime_type' => $fileinfo['mime_type'], 'gmuid' => $fileinfo['basename'], 'title' => $title, 'link' => $link, 'description' => $description, 'terms' => $_terms);
|
218 |
+
|
219 |
+
unset($title, $description);
|
220 |
+
|
221 |
+
global $gmDB;
|
222 |
+
// Save the data
|
223 |
+
$id = $gmDB->insert_gmedia($media_data);
|
224 |
+
$gmDB->update_metadata($meta_type = 'gmedia', $id, $meta_key = '_metadata', $gmDB->generate_gmedia_metadata($id, $fileinfo));
|
225 |
+
|
226 |
+
echo $prefix . $fileinfo['basename']. ': <span class="ok">' . sprintf(__('success (ID #%s)', 'gmLang'), $id) . '</span>' . $eol;
|
227 |
+
|
228 |
+
if($move){
|
229 |
+
@unlink($file);
|
230 |
+
}
|
231 |
+
|
232 |
+
}
|
233 |
+
|
234 |
+
echo '<p><b>'.__('Category').':</b> '. esc_html($gmGallery->options['taxonomies']['gmedia_category'][$terms['gmedia_category']]) . PHP_EOL;
|
235 |
+
echo '<br /><b>'.__('Album').':</b> '. esc_html($terms['gmedia_album']) . PHP_EOL;
|
236 |
+
echo '<br /><b>'.__('Tags').':</b> '. esc_html(str_replace(',', ', ', $terms['gmedia_tag'])) .'</p>' . PHP_EOL;
|
237 |
+
|
238 |
+
wp_ob_end_flush_all();
|
239 |
+
flush();
|
240 |
+
}
|
241 |
+
|
242 |
+
if (ob_get_level() == 0) {
|
243 |
+
ob_start();
|
244 |
+
}
|
245 |
+
echo str_pad(' ',4096) . PHP_EOL;
|
246 |
+
wp_ob_end_flush_all();
|
247 |
+
flush();
|
248 |
+
?>
|
249 |
+
<html>
|
250 |
+
<style type="text/css">
|
251 |
+
* {margin:0; padding:0;}
|
252 |
+
pre { display:block; }
|
253 |
+
p { padding: 10px 0; font-size: 14px; }
|
254 |
+
.ok { color: darkgreen; }
|
255 |
+
.ko { color: darkred; }
|
256 |
+
</style>
|
257 |
+
<body>
|
258 |
+
<?php
|
259 |
+
if('import-folder' == $import){
|
260 |
+
|
261 |
+
$path = $gmCore->_post('path');
|
262 |
+
echo '<h4 style="margin: 0 0 10px">'.__('Import Server Folder')." `$path`:</h4>" . PHP_EOL;
|
263 |
+
|
264 |
+
if($path){
|
265 |
+
$path = trim(urldecode($path),'/');
|
266 |
+
if(!empty($path)) {
|
267 |
+
$fullpath = ABSPATH.trailingslashit ( $path );
|
268 |
+
$files = glob($fullpath.'?*.?*', GLOB_NOSORT);
|
269 |
+
if(!empty($files)) {
|
270 |
+
if(('grand-media' == basename(dirname(dirname($path)))) || ('grand-media' == basename(dirname($path)))){
|
271 |
+
global $wpdb;
|
272 |
+
$gmedias = $wpdb->get_col("SELECT gmuid FROM {$wpdb->prefix}gmedia");
|
273 |
+
foreach($files as $i => $filepath){
|
274 |
+
$gmuid = basename($filepath);
|
275 |
+
if(in_array($gmuid, $gmedias)){
|
276 |
+
unset($files[$i]);
|
277 |
+
}
|
278 |
+
}
|
279 |
+
$move = false;
|
280 |
+
$exists = false;
|
281 |
+
} else{
|
282 |
+
$move = $gmCore->_post('delete_source');
|
283 |
+
$exists = 0;
|
284 |
+
}
|
285 |
+
gmedia_import_files($files, $terms, $move, $exists);
|
286 |
+
} else {
|
287 |
+
echo sprintf( __( 'Folder `%s` is empty', 'gmLang' ), $path ) . PHP_EOL;
|
288 |
+
}
|
289 |
+
} else {
|
290 |
+
echo __( 'No folder chosen', 'gmLang' ) . PHP_EOL;
|
291 |
+
}
|
292 |
+
}
|
293 |
+
} elseif('import-flagallery' == $import){
|
294 |
+
|
295 |
+
echo '<h4 style="margin: 0 0 10px">'.__('Import from Flagallery plugin').":</h4>" . PHP_EOL;
|
296 |
+
|
297 |
+
$gallery = $gmCore->_post('gallery');
|
298 |
+
if(!empty($gallery)){
|
299 |
+
global $wpdb, $gmDB;
|
300 |
+
|
301 |
+
$album = empty($terms['gmedia_album'])? false : true;
|
302 |
+
foreach($gallery as $gid){
|
303 |
+
$flag_gallery = $wpdb->get_row($wpdb->prepare("SELECT gid, path, title, galdesc FROM `{$wpdb->prefix}flag_gallery` WHERE gid = %d", $gid), ARRAY_A);
|
304 |
+
if(empty($flag_gallery))
|
305 |
+
continue;
|
306 |
+
|
307 |
+
if(!$album) {
|
308 |
+
$terms['gmedia_album'] = $flag_gallery['title'];
|
309 |
+
if(!$gmDB->term_exists($flag_gallery['title'], 'gmedia_album') ) {
|
310 |
+
$term_id = $gmDB->insert_term( $flag_gallery['title'], 'gmedia_album', array('description' => htmlspecialchars_decode(stripslashes( $flag_gallery['galdesc'] ))) );
|
311 |
+
}
|
312 |
+
}
|
313 |
+
|
314 |
+
$path = ABSPATH.trailingslashit($flag_gallery['path']);
|
315 |
+
|
316 |
+
echo '<h5 style="margin: 10px 0 5px">'.sprintf( __( 'Import `%s` gallery', 'gmLang' ), $flag_gallery['title'] ).":</h5>" . PHP_EOL;
|
317 |
+
|
318 |
+
$flag_pictures = $wpdb->get_results($wpdb->prepare("SELECT CONCAT('%s', filename) AS file, description, alttext AS title, link FROM `{$wpdb->prefix}flag_pictures` WHERE galleryid = %d", $path, $flag_gallery['gid']), ARRAY_A);
|
319 |
+
if(empty($flag_pictures)){
|
320 |
+
echo '<pre>'.__( 'gallery contains 0 images', 'gmLang' ).'</pre>';
|
321 |
+
continue;
|
322 |
+
}
|
323 |
+
//echo '<pre>'.print_r($flag_pictures, true).'</pre>';
|
324 |
+
gmedia_import_files($flag_pictures, $terms, false);
|
325 |
+
}
|
326 |
+
} else {
|
327 |
+
echo __( 'No gallery chosen', 'gmLang' ) . PHP_EOL;
|
328 |
+
}
|
329 |
+
} elseif('import-nextgen' == $import){
|
330 |
+
|
331 |
+
echo '<h4 style="margin: 0 0 10px">'.__('Import from NextGen plugin').":</h4>" . PHP_EOL;
|
332 |
+
|
333 |
+
$gallery = $gmCore->_post('gallery');
|
334 |
+
if(!empty($gallery)){
|
335 |
+
global $wpdb, $gmDB;
|
336 |
+
|
337 |
+
$album = empty($terms['gmedia_album'])? false : true;
|
338 |
+
foreach($gallery as $gid){
|
339 |
+
$ngg_gallery = $wpdb->get_row($wpdb->prepare("SELECT gid, path, title, galdesc FROM `{$wpdb->prefix}ngg_gallery` WHERE gid = %d", $gid), ARRAY_A);
|
340 |
+
if(empty($ngg_gallery))
|
341 |
+
continue;
|
342 |
+
|
343 |
+
if(!$album) {
|
344 |
+
$terms['gmedia_album'] = $ngg_gallery['title'];
|
345 |
+
if(!$gmDB->term_exists($ngg_gallery['title'], 'gmedia_album') ) {
|
346 |
+
$term_id = $gmDB->insert_term( $ngg_gallery['title'], 'gmedia_album', array('description' => htmlspecialchars_decode(stripslashes( $ngg_gallery['galdesc'] ))) );
|
347 |
+
}
|
348 |
+
}
|
349 |
+
|
350 |
+
$path = ABSPATH.trailingslashit($ngg_gallery['path']);
|
351 |
+
|
352 |
+
echo '<h5 style="margin: 10px 0 5px">'.sprintf( __( 'Import `%s` gallery', 'gmLang' ), $ngg_gallery['title'] ).":</h5>" . PHP_EOL;
|
353 |
+
|
354 |
+
$ngg_pictures = $wpdb->get_results($wpdb->prepare("SELECT CONCAT('%s', filename) AS file, description, alttext AS title FROM `{$wpdb->prefix}ngg_pictures` WHERE galleryid = %d", $path, $ngg_gallery['gid']), ARRAY_A);
|
355 |
+
if(empty($ngg_pictures)){
|
356 |
+
echo '<pre>'.__( 'gallery contains 0 images', 'gmLang' ).'</pre>';
|
357 |
+
continue;
|
358 |
+
}
|
359 |
+
gmedia_import_files($ngg_pictures, $terms, false);
|
360 |
+
}
|
361 |
+
} else {
|
362 |
+
echo __( 'No gallery chosen', 'gmLang' ) . PHP_EOL;
|
363 |
+
}
|
364 |
+
} elseif('import-wpmedia' == $import){
|
365 |
+
global $user_ID, $gmDB;
|
366 |
+
|
367 |
+
echo '<h4 style="margin: 0 0 10px">'.__('Import from WP Media Library').":</h4>" . PHP_EOL;
|
368 |
+
|
369 |
+
$wpMediaLib = $gmDB->get_wp_media_lib(array('filter'=>'selected', 'selected'=>$gmCore->_post('selected')));
|
370 |
+
|
371 |
+
if(!empty($wpMediaLib)){
|
372 |
+
|
373 |
+
$wp_media = array();
|
374 |
+
foreach($wpMediaLib as $item){
|
375 |
+
$wp_media[] = array(
|
376 |
+
'file' => get_attached_file($item->ID),
|
377 |
+
'title' => $item->post_title,
|
378 |
+
'description' => $item->post_content
|
379 |
+
);
|
380 |
+
}
|
381 |
+
echo '<pre>' . print_r($wp_media, true) . '</pre>';
|
382 |
+
gmedia_import_files($wp_media, $terms, false);
|
383 |
+
|
384 |
+
} else {
|
385 |
+
echo __( 'No items chosen', 'gmLang' ) . PHP_EOL;
|
386 |
+
}
|
387 |
+
}
|
388 |
+
?>
|
389 |
+
</body>
|
390 |
+
</html>
|
391 |
+
<?php
|
392 |
+
ob_end_flush();
|
admin/js/editor_plugin.js
DELETED
@@ -1,154 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* GrandMedia plugin.
|
3 |
-
*/
|
4 |
-
(function () {
|
5 |
-
var DOM = tinymce.DOM;
|
6 |
-
|
7 |
-
tinymce.create('tinymce.plugins.GrandMedia', {
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Initializes the plugin, this will be executed after the plugin has been created.
|
11 |
-
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
12 |
-
* of the editor instance to intercept that event.
|
13 |
-
*
|
14 |
-
* @param {object} ed tinymce.Editor instance that the plugin is initialized in.
|
15 |
-
*/
|
16 |
-
init: function (ed) {
|
17 |
-
var t = this;
|
18 |
-
|
19 |
-
/*ed.addCommand('gMedia_redraw', function () {
|
20 |
-
t._handleFunction(ed);
|
21 |
-
});*/
|
22 |
-
|
23 |
-
|
24 |
-
/** "onPreInit","onBeforeRenderUI","onPostRender","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState" */
|
25 |
-
ed.onInit.add(function (ed) {
|
26 |
-
|
27 |
-
// make sure these run last
|
28 |
-
/*ed.onClick.add(function (ed, e) {
|
29 |
-
if (e.target.nodeName == 'IMG' && ed.dom.hasClass(e.target, 'gm-image')) {
|
30 |
-
console.log(e.target);
|
31 |
-
}
|
32 |
-
});*/
|
33 |
-
|
34 |
-
/*ed.onMouseUp.add(function (ed, e) {
|
35 |
-
if (e.target.nodeName == 'INS' && ed.dom.hasClass(e.target, 'mceGMgallery')) {
|
36 |
-
if (!ed.dom.hasClass(e.target, 'selected')) {
|
37 |
-
var nParent = ed.selection.getNode();//.parentNode;
|
38 |
-
ed.selection.select(nParent);
|
39 |
-
ed.dom.addClass(e.target, 'selected');
|
40 |
-
} else {
|
41 |
-
ed.selection.collapse(false);
|
42 |
-
ed.dom.removeClass(e.target, 'selected');
|
43 |
-
}
|
44 |
-
} else {
|
45 |
-
ed.dom.removeClass(ed.dom.select('ins.mceGMgallery'), 'selected');
|
46 |
-
}
|
47 |
-
});
|
48 |
-
tinymce.dom.Event.add(ed.getBody(), 'dragend', function (e) {
|
49 |
-
if (ed.dom.select('ins.mceGMgallery')) {
|
50 |
-
ed.selection.collapse(false);
|
51 |
-
ed.dom.removeClass(ed.dom.select('ins.mceGMgallery'), 'selected');
|
52 |
-
}
|
53 |
-
});*/
|
54 |
-
|
55 |
-
if ('undefined' != typeof(jQuery)) {
|
56 |
-
ed.onKeyUp.add(function (ed, e, o) {
|
57 |
-
var k = e.keyCode || e.charCode;
|
58 |
-
/*if (k == 35 || k == 36 || k == 37 || k == 38 || k == 39 || k == 40) {
|
59 |
-
if (ed.dom.select('ins.mceGMgallery')) {
|
60 |
-
//ed.selection.collapse(false);
|
61 |
-
ed.dom.removeClass(ed.dom.select('ins.mceGMgallery'), 'selected');
|
62 |
-
}
|
63 |
-
}*/
|
64 |
-
if (k == 8 || k == 13 || k == 46) {
|
65 |
-
var m, content = ed.getContent();
|
66 |
-
m = content.match(/\[gmedia \s*id=(\d+)\s*?\]/g);
|
67 |
-
jQuery('#gMedia-galleries-list li.gMedia-gallery-li').removeClass('gMedia-selected');
|
68 |
-
if (m) {
|
69 |
-
jQuery.each(m, function (i, shcode) {
|
70 |
-
var id = shcode.replace(/\[gm.*id=(\d+).*?\]/, '$1');
|
71 |
-
jQuery('#gmModule-' + id).addClass('gMedia-selected');
|
72 |
-
});
|
73 |
-
}
|
74 |
-
}
|
75 |
-
|
76 |
-
});
|
77 |
-
}
|
78 |
-
|
79 |
-
|
80 |
-
});
|
81 |
-
|
82 |
-
// Add listeners to handle function
|
83 |
-
//t._handleFunction(ed);
|
84 |
-
|
85 |
-
},
|
86 |
-
|
87 |
-
getInfo: function () {
|
88 |
-
return {
|
89 |
-
longname : 'Gmedia Gallery',
|
90 |
-
author : 'Rattus',
|
91 |
-
authorurl: 'http://codeasily.com',
|
92 |
-
infourl : 'http://codeasily.com',
|
93 |
-
version : '1.1'
|
94 |
-
};
|
95 |
-
},
|
96 |
-
|
97 |
-
_handleFunction: function (ed) {
|
98 |
-
|
99 |
-
// Load plugin specific CSS into editor
|
100 |
-
ed.onInit.add(function () {
|
101 |
-
ed.dom.loadCSS(gMediaGlobalVar.pluginPath + '/admin/css/editor_plugin.css');
|
102 |
-
});
|
103 |
-
|
104 |
-
/*
|
105 |
-
var galleryHTML = '<ins class="mceGMgallery" title="ID#$1">$1</ins>';
|
106 |
-
|
107 |
-
// Replace morebreak with images
|
108 |
-
ed.onBeforeSetContent.add(function (ed, o) {
|
109 |
-
if (o.content) {
|
110 |
-
if ('undefined' != typeof(jQuery)) {
|
111 |
-
var m = o.content.match(/\[gmedia[ ]+id=(\d+)[ ]?\]/g);
|
112 |
-
jQuery('#gMedia-galleries-list li.gMedia-gallery-li').removeClass('gMedia-selected');
|
113 |
-
if (m) {
|
114 |
-
jQuery.each(m, function (i, shcode) {
|
115 |
-
var id = shcode.replace(/\[gmedia[ ]+id=(\d+)[ ]?\]/, '$1');
|
116 |
-
jQuery('#gmModule-' + id).addClass('gMedia-selected');
|
117 |
-
});
|
118 |
-
}
|
119 |
-
}
|
120 |
-
o.content = o.content.replace(/\[gmedia[ ]+id=(\d+)[ ]?\]/g, galleryHTML);
|
121 |
-
}
|
122 |
-
});
|
123 |
-
|
124 |
-
// Replace images with morebreak
|
125 |
-
ed.onPostProcess.add(function (ed, o) {
|
126 |
-
if (o.get) {
|
127 |
-
if ('undefined' != typeof(jQuery)) {
|
128 |
-
jQuery('#gMedia-galleries-list li.gMedia-gallery-li').removeClass('gMedia-selected');
|
129 |
-
}
|
130 |
-
o.content = o.content.replace(/(?:<ins class="mceGMgallery[^>]*>)(.*?)(?:<\/ins>)/g, function (a, im) {
|
131 |
-
if (a.indexOf('title="ID#') !== -1) {
|
132 |
-
var m = (m = a.match(/title="ID#(\d+)"/)) ? m[1] : '';
|
133 |
-
im = '[gmedia id=' + m + ']';
|
134 |
-
|
135 |
-
if ('undefined' != typeof(jQuery)) {
|
136 |
-
jQuery('#gmModule-' + m).addClass('gMedia-selected');
|
137 |
-
}
|
138 |
-
} else {
|
139 |
-
im = '';
|
140 |
-
}
|
141 |
-
|
142 |
-
return im;
|
143 |
-
});
|
144 |
-
}
|
145 |
-
});
|
146 |
-
*/
|
147 |
-
}
|
148 |
-
|
149 |
-
});
|
150 |
-
|
151 |
-
// Register plugin
|
152 |
-
tinymce.PluginManager.add('gmedia', tinymce.plugins.GrandMedia);
|
153 |
-
|
154 |
-
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/gmedia.global.back.js
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
/**
|
2 |
-
*
|
3 |
-
* @var
|
4 |
-
*/
|
|
|
|
|
|
1 |
/**
|
2 |
+
* Gmedia Globals
|
3 |
+
* @var gmediaGlobalVar
|
4 |
+
*/
|
5 |
+
if(!ajaxurl){
|
6 |
+
var ajaxurl = gmediaGlobalVar.ajaxurl;
|
7 |
+
}
|
admin/js/gmedia.global.front.js
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* gMedia Globals
|
3 |
-
* @var gMediaGlobalVar
|
4 |
-
*/
|
5 |
-
var ajaxurl = gMediaGlobalVar.ajaxurl;
|
|
|
|
|
|
|
|
|
|
admin/js/grand-media.js
CHANGED
@@ -1,994 +1,362 @@
|
|
1 |
/*
|
2 |
* jQuery functions for GRAND Flash Media
|
3 |
*/
|
4 |
-
var
|
5 |
-
|
6 |
-
play_with_page = false;
|
7 |
-
|
8 |
jQuery(function($){
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
var
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
c.css('opacity', '
|
19 |
-
}
|
20 |
-
|
21 |
-
|
|
|
22 |
}
|
23 |
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
26 |
return(e);
|
27 |
});
|
28 |
-
if
|
29 |
-
|
30 |
-
|
31 |
cur = $(this);
|
32 |
-
if
|
33 |
arr.push(cur.val());
|
34 |
-
} else if
|
35 |
-
arr = $.grep(arr, function
|
36 |
return e != cur.val();
|
37 |
});
|
38 |
}
|
39 |
});
|
40 |
-
|
41 |
}
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
if (arr.length)
|
47 |
-
msg.addClass('showmore').children('.more').attr('toolTip', '#' + arr.join(', #')).qtip('enable');
|
48 |
-
else {
|
49 |
-
msg.removeClass('showmore').children('.more').removeAttr('toolTip').qtip('disable');
|
50 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
},
|
52 |
-
chk_all
|
53 |
-
$('
|
|
|
|
|
54 |
},
|
55 |
-
chk_none
|
56 |
-
$('
|
|
|
|
|
57 |
},
|
58 |
-
chk_toggle
|
59 |
-
if
|
60 |
-
if
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
|
|
|
|
68 |
});
|
69 |
}
|
70 |
},
|
71 |
-
|
72 |
-
var
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
$('
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
|
|
|
|
|
|
|
|
83 |
}
|
84 |
-
$('#
|
85 |
-
$(
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
$('#showSelected').click(function () {
|
90 |
-
$('#selectedForm').submit();
|
91 |
-
});
|
92 |
-
$('.gMediaLibActions .doaction:checkbox').click(function (e) {
|
93 |
-
var tr = ':visible';
|
94 |
-
$(this).parent().parent().removeClass('active');
|
95 |
-
if ($(this).is(':checked')) {
|
96 |
-
MediaLibActions.chk_all(tr);
|
97 |
-
} else {
|
98 |
-
MediaLibActions.chk_none(tr);
|
99 |
}
|
100 |
-
|
101 |
-
$('body').trigger('click');
|
102 |
-
e.stopPropagation();
|
103 |
});
|
104 |
-
$('
|
105 |
-
var sel = $(
|
106 |
-
|
107 |
-
switch (sel) {
|
108 |
case 'total':
|
109 |
-
|
110 |
break;
|
111 |
case 'none':
|
112 |
-
|
113 |
break;
|
114 |
case 'reverse':
|
115 |
-
|
116 |
break;
|
117 |
case 'image':
|
118 |
case 'audio':
|
119 |
case 'video':
|
120 |
-
|
121 |
-
MediaLibActions.chk_toggle(tr);
|
122 |
break;
|
123 |
}
|
124 |
-
|
|
|
125 |
});
|
126 |
-
$('
|
127 |
-
var arr = $('#
|
128 |
var cur = $(this).val();
|
129 |
-
if
|
130 |
-
if
|
131 |
arr = arr + ',' + cur;
|
132 |
-
} else
|
133 |
arr = cur;
|
134 |
}
|
135 |
-
} else
|
136 |
-
arr = $.grep(arr.split(','),function
|
137 |
return a != cur;
|
138 |
}).join(',');
|
139 |
}
|
140 |
-
$('#
|
141 |
-
|
|
|
142 |
});
|
143 |
-
$('
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
}).join(',');
|
152 |
-
$('#gmSelected').val(arr);
|
153 |
-
MediaLibActions.msg_selected(true);
|
154 |
}
|
155 |
});
|
156 |
-
var grandSearch = $('input[type="search"]');
|
157 |
-
if (grandSearch && play_with_page) {
|
158 |
-
grandSearch = grandSearch.quicksearch('table.gMediaLibTable tbody tr', {
|
159 |
-
'delay' : 100,
|
160 |
-
'loader' : 'span.loading',
|
161 |
-
'bind' : 'keyup',
|
162 |
-
'noResults': 'tr.noitems',
|
163 |
-
'onAfter' : function () {
|
164 |
-
if (grandSearch.val()) {
|
165 |
-
grandSearch.addClass('val');
|
166 |
-
$('.resetSearch').show();
|
167 |
-
} else {
|
168 |
-
grandSearch.removeClass('val');
|
169 |
-
$('.resetSearch').hide();
|
170 |
-
}
|
171 |
-
}
|
172 |
-
});
|
173 |
-
$('.resetSearch').click(function () {
|
174 |
-
grandSearch.val('').search('');
|
175 |
-
});
|
176 |
-
}
|
177 |
-
$('#grandMedia').on('click', '.gmedia-edit-row .buttons .cancel', function (e) {
|
178 |
-
var EditRow = $(this).parents('tr:first');
|
179 |
-
EditRow.prev().show();
|
180 |
-
EditRow.remove();
|
181 |
-
e.preventDefault();
|
182 |
-
})
|
183 |
}
|
184 |
};
|
185 |
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
MediaLibActions.init();
|
191 |
-
|
192 |
-
$('#toplevel_page_GrandMedia').addClass('current').removeClass('wp-not-current-submenu');
|
193 |
-
|
194 |
-
var messageY = $('.grandmedia #gm-message').offset().top - $('#wpadminbar').height(),
|
195 |
-
fixed = false;
|
196 |
-
$(window).scroll(function(e){
|
197 |
-
if($(this).scrollTop() > messageY && !fixed){
|
198 |
-
fixed = true;
|
199 |
-
$('#gm-message').appendTo($('#wpadminbar')[0]);
|
200 |
-
} else if($(this).scrollTop() < messageY && fixed){
|
201 |
-
fixed = false;
|
202 |
-
$('#gm-message').insertAfter($('#grandMedia .grandHeader')[0]);
|
203 |
-
}
|
204 |
-
});
|
205 |
-
$('#gm-message').on('click', '.gm-close', function () {
|
206 |
-
$(this).closest('.gm-message').fadeOut(200);
|
207 |
-
});
|
208 |
-
|
209 |
-
$('.msg').click(function () {
|
210 |
-
$('.actions', this).toggle();
|
211 |
-
$(this).one('clickoutside', function () {
|
212 |
-
$('.actions', this).hide();
|
213 |
-
});
|
214 |
-
});
|
215 |
-
|
216 |
-
grandMediaDOM.on('click', '.dropbut', function () {
|
217 |
-
$(this).parent().toggleClass('active');
|
218 |
-
$(this).on('clickoutside', function (e) {
|
219 |
-
if (!$(e.target).closest('.dropchild').length) {
|
220 |
-
$(this).parent().removeClass('active');
|
221 |
-
$(this).off('clickoutside');
|
222 |
}
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
$('a.gmToggle').click(function () {
|
227 |
-
$($(this).attr('href')).toggle();
|
228 |
-
return false;
|
229 |
-
});
|
230 |
-
|
231 |
-
grandMediaDOM.on('click', '.gmDelTab', function () {
|
232 |
-
$(this).closest('.tabqueryblock').remove();
|
233 |
-
return false;
|
234 |
-
});
|
235 |
-
|
236 |
-
grandMediaDOM.on('click', '.gm_toggle_checklist', function() {
|
237 |
-
var checkBoxes = $(this).parent().find('.gm_checklist :checkbox');
|
238 |
-
checkBoxes.each(function(){
|
239 |
-
$(this).prop("checked", !$(this).prop("checked"));
|
240 |
-
});
|
241 |
-
});
|
242 |
-
|
243 |
-
|
244 |
-
$(document).ajaxStart(function () {
|
245 |
-
$('body').addClass('gmDoingAjax');
|
246 |
-
//if(!$('#gMediaQuery').length)
|
247 |
-
//$('body,html').animate({ scrollTop: 0 }, 400);
|
248 |
-
}).ajaxStop(function () {
|
249 |
-
$('body').removeClass('gmDoingAjax');
|
250 |
-
});
|
251 |
-
// here we declare the parameters to send along with the request
|
252 |
-
// this means the following action hooks will be fired:
|
253 |
-
// wp_ajax_nopriv_myajax-submit and wp_ajax_myajax-submit
|
254 |
-
// action : data.action,
|
255 |
-
// 'cookie' which contains the cookie required to authenticate you admin access to admin-ajax.php
|
256 |
-
// 'cookie' : encodeURIComponent(document.cookie),
|
257 |
-
// other parameters can be added along with "action"
|
258 |
-
// _ajax_nonce : data._ajax_nonce,
|
259 |
-
// data : postdata
|
260 |
-
grandMediaDOM.on('click', '.ajaxPost', function (event) {
|
261 |
-
event.preventDefault();
|
262 |
-
var arr, node, count;
|
263 |
-
var edata = $(this).dataset();
|
264 |
-
if (edata.form) {
|
265 |
-
var form = edata.form;
|
266 |
-
arr = form.split(',');
|
267 |
-
$.each(arr, function (i, v) {
|
268 |
-
if (v == '#selectedForm' && !$('#gmSelected').val()) {
|
269 |
-
alert($('#selectedItems').text());
|
270 |
-
form = false;
|
271 |
-
}
|
272 |
-
if (!$(v).length) {
|
273 |
-
alert('#form = false');
|
274 |
-
form = false;
|
275 |
-
}
|
276 |
-
});
|
277 |
-
if (!form)
|
278 |
-
return;
|
279 |
-
edata.form = $(form + ' :input').serialize().replace(/%5B/g, '[').replace(/%5D/g, ']');
|
280 |
-
}
|
281 |
-
/** @namespace edata.confirmtxt */
|
282 |
-
if (edata.confirmtxt && !gmConfirm(edata.confirmtxt)) {
|
283 |
-
return;
|
284 |
-
}
|
285 |
-
switch (edata.task) {
|
286 |
-
case 'gm-update-module':
|
287 |
-
case 'gm-install-module':
|
288 |
-
gmMessage('info', grandMedia.download);
|
289 |
-
break;
|
290 |
-
case 'gm-get-key':
|
291 |
-
gmMessage('info', grandMedia.wait);
|
292 |
-
break;
|
293 |
-
case 'gmedia-update':
|
294 |
-
case 'updateMedia':
|
295 |
-
if (typeof($.fn.qtip) != 'undefined') {
|
296 |
-
$(this).closest('tr').prev('tr').find('td.file img, a.fancy-listen, a.fancy-watch').qtip('destroy');
|
297 |
-
}
|
298 |
-
break;
|
299 |
-
}
|
300 |
-
//noinspection JSUnresolvedVariable,JSUnusedGlobalSymbols
|
301 |
-
/** @namespace edata.task
|
302 |
-
* @namespace msg.stat
|
303 |
-
* @namespace msg.postmsg
|
304 |
-
* @namespace msg.message
|
305 |
-
* @namespace msg.message2
|
306 |
-
* @namespace msg.files
|
307 |
-
* @namespace msg.delete_source
|
308 |
-
* @namespace msg2.file
|
309 |
-
*/
|
310 |
-
$.ajax({
|
311 |
-
type : "POST",
|
312 |
-
url : ajaxurl,
|
313 |
-
data : edata,
|
314 |
-
cache : false,
|
315 |
-
timeout : 10000,
|
316 |
-
success : function (msg) {
|
317 |
-
if(msg.stat && msg.message){
|
318 |
-
gmMessage(msg.stat, msg.message);
|
319 |
-
}
|
320 |
-
var domel;
|
321 |
-
switch (edata.task) {
|
322 |
-
case 'gmedia-edit':
|
323 |
-
domel = $('tr.gmedia-edit-row');
|
324 |
-
domel.prev().show();
|
325 |
-
domel.remove();
|
326 |
-
node = $(event.target).closest('tr');
|
327 |
-
domel = $('tr', msg);
|
328 |
-
domel.find('fieldset').append($('#gMedia-MetaBox').clone().attr('id', 'gm_metabox'));
|
329 |
-
node.hide().after(domel);
|
330 |
-
break;
|
331 |
-
case 'gmedia-update':
|
332 |
-
node = $(event.target).closest('tr');
|
333 |
-
if (msg.stat == 'OK') {
|
334 |
-
node.prev().replaceWith(msg.content);
|
335 |
-
gmTableImageTip(node.prev().find('td.file img').get(0));
|
336 |
-
gmTableActionTip(node.prev().find('a.fancy-listen, a.fancy-watch').get(0));
|
337 |
-
} else if (msg.stat == 'KO') {
|
338 |
-
node.prev().show();
|
339 |
-
}
|
340 |
-
node.remove();
|
341 |
-
break;
|
342 |
-
case 'gmedia-delete':
|
343 |
-
if (msg.stat == 'OK') {
|
344 |
-
$('#gmUpdateMessage').val(msg.postmsg).next('#gmUpdateStatus').val(msg.stat).parent('#gmUpdateContent').submit();
|
345 |
-
}
|
346 |
-
break;
|
347 |
-
case 'gmedia-bulk-delete':
|
348 |
-
if (msg.stat == 'OK') {
|
349 |
-
arr = $('#gmSelected').val().split(',');
|
350 |
-
node = $.map(arr, function (i) {
|
351 |
-
return document.getElementById('item_' + i);
|
352 |
-
});
|
353 |
-
count = node.length;
|
354 |
-
$(node).addClass(edata.task).fadeTo('slow', '0.7', function () {
|
355 |
-
if (!--count) {
|
356 |
-
MediaLibActions.chk_none('');
|
357 |
-
$('#gmSelected').val('');
|
358 |
-
MediaLibActions.msg_selected(true);
|
359 |
-
$('#gmUpdateMessage').val(msg.postmsg).next('#gmUpdateStatus').val(msg.stat).parent('#gmUpdateContent').submit();
|
360 |
-
}
|
361 |
-
});
|
362 |
-
}
|
363 |
-
break;
|
364 |
-
case 'term-edit':
|
365 |
-
domel = $('tr.gmedia-edit-row');
|
366 |
-
domel.prev().show();
|
367 |
-
domel.remove();
|
368 |
-
node = $(event.target).closest('tr');
|
369 |
-
node.hide().after($('tr', msg));
|
370 |
-
break;
|
371 |
-
case 'term-delete':
|
372 |
-
if (msg.stat == 'OK') {
|
373 |
-
node = $(event.target).closest('tr');
|
374 |
-
$(node).addClass(edata.task).fadeTo('slow', '0.7', function () {
|
375 |
-
node.remove();
|
376 |
-
gmMessage(msg.stat, msg.postmsg, true);
|
377 |
-
});
|
378 |
-
}
|
379 |
-
break;
|
380 |
-
case 'terms-delete':
|
381 |
-
arr = $('#gmSelected').val().split(',');
|
382 |
-
node = $.map(arr, function (i) {
|
383 |
-
return document.getElementById('item_' + i);
|
384 |
-
});
|
385 |
-
count = node.length;
|
386 |
-
$(node).addClass(edata.task).fadeTo('slow', '0.7', function () {
|
387 |
-
$(this).remove();
|
388 |
-
if (!--count) {
|
389 |
-
MediaLibActions.chk_none('');
|
390 |
-
$('#gmSelected').val('');
|
391 |
-
MediaLibActions.msg_selected(true);
|
392 |
-
gmMessage(msg.stat, msg.postmsg, true);
|
393 |
-
}
|
394 |
-
});
|
395 |
-
break;
|
396 |
-
case 'moveToCategory':
|
397 |
-
case 'gm-add-label':
|
398 |
-
case 'gm-remove-label':
|
399 |
-
if (msg.stat == 'OK') {
|
400 |
-
$('#gmUpdateMessage').val(msg.postmsg).next('#gmUpdateStatus').val(msg.stat).parent('#gmUpdateContent').submit();
|
401 |
-
}
|
402 |
-
break;
|
403 |
-
case 'gm-install-module':
|
404 |
-
case 'gm-update-module':
|
405 |
-
case 'gm-delete-module':
|
406 |
-
if (msg.stat == 'OK') {
|
407 |
-
$('#gmUpdateMessage').val(msg.postmsg).next('#gmUpdateStatus').val(msg.stat).parent('#gmUpdateContent').submit();
|
408 |
-
}
|
409 |
-
break;
|
410 |
-
case 'hideMedia':
|
411 |
-
case 'unhideMedia':
|
412 |
-
case 'deleteMedia':
|
413 |
-
arr = $('#gmSelected').val().split(',');
|
414 |
-
node = $.map(arr, function (i) {
|
415 |
-
return document.getElementById('item_' + i);
|
416 |
-
});
|
417 |
-
count = node.length;
|
418 |
-
$(node).addClass(edata.task).fadeTo('slow', '0.7', function () {
|
419 |
-
if (!--count) {
|
420 |
-
MediaLibActions.chk_none('');
|
421 |
-
$('#gmSelected').val('');
|
422 |
-
MediaLibActions.msg_selected(true);
|
423 |
-
$('#gmUpdateMessage').val(msg.postmsg).next('#gmUpdateStatus').val(msg.stat).parent('#gmUpdateContent').submit();
|
424 |
-
}
|
425 |
-
});
|
426 |
-
break;
|
427 |
-
case 'updateMedia':
|
428 |
-
node = $(event.target).closest('tr');
|
429 |
-
if (msg.stat == 'OK') {
|
430 |
-
node.prev().replaceWith(msg.content);
|
431 |
-
gmTableImageTip(node.prev().find('td.file img').get(0));
|
432 |
-
gmTableActionTip(node.prev().find('a.fancy-listen, a.fancy-watch').get(0));
|
433 |
-
} else if (msg.stat == 'KO') {
|
434 |
-
node.prev().show();
|
435 |
-
}
|
436 |
-
node.remove();
|
437 |
-
break;
|
438 |
-
case 'wpmedia-edit':
|
439 |
-
domel = $('tr.gmedia-edit-row');
|
440 |
-
domel.prev().show();
|
441 |
-
domel.remove();
|
442 |
-
node = $(event.target).closest('tr');
|
443 |
-
node.hide().after($('tr', msg));
|
444 |
-
break;
|
445 |
-
case 'gm-add-tab':
|
446 |
-
$('#gMediaQuery').append(msg);
|
447 |
-
break;
|
448 |
-
case 'gm-tabquery-load':
|
449 |
-
if (msg.stat == 'OK') {
|
450 |
-
var tabqueryblock = $(event.target).closest('.tabqueryblock');
|
451 |
-
tabqueryblock.find('.query_media_vis').html(msg.gMediaLib);
|
452 |
-
tabqueryblock.find('.selectedItems').html(msg.gmediaCount);
|
453 |
-
}
|
454 |
-
break;
|
455 |
-
case 'gm-import-folder':
|
456 |
-
if(msg.files) {
|
457 |
-
var crunchlength = msg.files.length;
|
458 |
-
if(crunchlength) {
|
459 |
-
var index = 0,
|
460 |
-
crunch_file = function(index){
|
461 |
-
$.ajax({
|
462 |
-
type : "POST",
|
463 |
-
url : ajaxurl,
|
464 |
-
data : { action: 'gmDoAjax', task: 'gm-import-folder', _ajax_nonce: grandMedia.nonce, post: encodeURI('file='+encodeURIComponent(msg.files[index])+'&delete_source='+msg.delete_source)},
|
465 |
-
cache : false,
|
466 |
-
timeout : 10000,
|
467 |
-
async : true,
|
468 |
-
success : function (msg2) {
|
469 |
-
index++;
|
470 |
-
$('.msg0_progress').css({width: (100/crunchlength*(index))+'%'});
|
471 |
-
if(msg2.error) {
|
472 |
-
$('<div/>').addClass('gm-message gm-error').html('<span><u><em>'+msg2.id+':</em></u> '+msg2.error.message+'</span>').appendTo('#import_folder .inside');
|
473 |
-
}
|
474 |
-
if(msg.files[index]) {
|
475 |
-
$('#gm-message').find('.crunch_file').text(msg.files[index].replace(/\\/g,'/').replace(/.*\//, ''));
|
476 |
-
crunch_file(index);
|
477 |
-
} else {
|
478 |
-
gmMessage(msg.stat, msg.message2);
|
479 |
-
$('.msg0_progress').css({width: 0});
|
480 |
-
}
|
481 |
-
}
|
482 |
-
});
|
483 |
-
};
|
484 |
-
crunch_file(index);
|
485 |
-
}
|
486 |
-
}
|
487 |
-
break;
|
488 |
-
case 'gm-import-flagallery':
|
489 |
-
if(msg.files) {
|
490 |
-
crunchlength = msg.files.length;
|
491 |
-
if(crunchlength) {
|
492 |
-
index = 0;
|
493 |
-
crunch_file = function(index){
|
494 |
-
$.ajax({
|
495 |
-
type : "POST",
|
496 |
-
url : ajaxurl,
|
497 |
-
data : { action: 'gmDoAjax', task: 'gm-import-flagallery', _ajax_nonce: grandMedia.nonce, post: $.param(msg.files[index])},
|
498 |
-
cache : false,
|
499 |
-
timeout : 10000,
|
500 |
-
async : true,
|
501 |
-
success : function (msg2) {
|
502 |
-
index++;
|
503 |
-
$('.msg0_progress').css({width: (100/crunchlength*(index))+'%'});
|
504 |
-
if(msg2.error) {
|
505 |
-
$('<div/>').addClass('gm-message gm-error').html('<span><u><em>'+msg2.id+':</em></u> '+msg2.error.message+'</span>').appendTo('#import_flagallery .inside');
|
506 |
-
}
|
507 |
-
if(msg.files[index]) {
|
508 |
-
$('#gm-message').find('.crunch_file').text(msg.files[index]['file']);
|
509 |
-
crunch_file(index);
|
510 |
-
} else {
|
511 |
-
gmMessage(msg.stat, msg.message2);
|
512 |
-
$('.msg0_progress').css({width: 0});
|
513 |
-
}
|
514 |
-
}
|
515 |
-
});
|
516 |
-
};
|
517 |
-
crunch_file(index);
|
518 |
-
}
|
519 |
-
}
|
520 |
-
break;
|
521 |
-
case 'gm-import-nextgen':
|
522 |
-
if(msg.files) {
|
523 |
-
crunchlength = msg.files.length;
|
524 |
-
if(crunchlength) {
|
525 |
-
index = 0;
|
526 |
-
crunch_file = function(index){
|
527 |
-
$.ajax({
|
528 |
-
type : "POST",
|
529 |
-
url : ajaxurl,
|
530 |
-
data : { action: 'gmDoAjax', task: 'gm-import-nextgen', _ajax_nonce: grandMedia.nonce, post: $.param(msg.files[index])},
|
531 |
-
cache : false,
|
532 |
-
timeout : 10000,
|
533 |
-
async : true,
|
534 |
-
success : function (msg2) {
|
535 |
-
index++;
|
536 |
-
$('.msg0_progress').css({width: (100/crunchlength*(index))+'%'});
|
537 |
-
if(msg2.error) {
|
538 |
-
$('<div/>').addClass('gm-message gm-error').html('<span><u><em>'+msg2.id+':</em></u> '+msg2.error.message+'</span>').appendTo('#import_nextgen .inside');
|
539 |
-
}
|
540 |
-
if(msg.files[index]) {
|
541 |
-
$('#gm-message').find('.crunch_file').text(msg.files[index]['file']);
|
542 |
-
crunch_file(index);
|
543 |
-
} else {
|
544 |
-
gmMessage(msg.stat, msg.message2);
|
545 |
-
$('.msg0_progress').css({width: 0});
|
546 |
-
}
|
547 |
-
}
|
548 |
-
});
|
549 |
-
};
|
550 |
-
crunch_file(index);
|
551 |
-
}
|
552 |
-
}
|
553 |
-
break;
|
554 |
-
case 'gm-get-key':
|
555 |
-
node = $(event.target).closest('.block-text');
|
556 |
-
if (msg.error.code == 200) {
|
557 |
-
$('#gmedia_key').val(msg.key);
|
558 |
-
$('#gmedia_key2').val(msg.key2);
|
559 |
-
$('#product_name').val(msg.content);
|
560 |
-
$('#gmedia_key_label span').html(': <i>'+msg.content+'</i>');
|
561 |
-
gmMessage('info', msg.message);
|
562 |
-
node.removeClass('block-error').addClass('block-success');
|
563 |
-
} else if(msg.error.code == 100){
|
564 |
-
gmMessage('error', msg.message);
|
565 |
-
$('#gmedia_key').val('');
|
566 |
-
$('#gmedia_key2').val('');
|
567 |
-
$('#product_name').val('');
|
568 |
-
$('#gmedia_key_label span').text(':');
|
569 |
-
node.removeClass('block-success').addClass('block-error');
|
570 |
-
} else {
|
571 |
-
gmMessage('error', msg.error.message);
|
572 |
-
}
|
573 |
-
break;
|
574 |
-
}
|
575 |
-
},
|
576 |
-
error : function (msg) {
|
577 |
-
gmMessage(msg.stat, msg.message);
|
578 |
-
},
|
579 |
-
complete: function () {
|
580 |
}
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
$('.confirm').click(function () {
|
585 |
-
return gmConfirm($(this).dataset('txt'));
|
586 |
-
});
|
587 |
-
|
588 |
-
/** MetaBox */
|
589 |
-
var fieldset, cur_tags = '';
|
590 |
-
var dload = true, load_page = 1, gm_rel = 1;
|
591 |
-
$('.grandmedia').on('click', '.clear-preview', function (e) {
|
592 |
-
fieldset = $(this).closest('fieldset');
|
593 |
-
$('.gmImage img.gmedia-thumb-preview', fieldset).remove();
|
594 |
-
$(this).prev().val('');
|
595 |
-
});
|
596 |
-
$('.grandmedia').on('click', '.metabox-preview', function (e) {
|
597 |
-
fieldset = $(this).closest('fieldset');
|
598 |
-
cur_tags = $('.gmLabels textarea', fieldset).val();
|
599 |
-
$(this).toggleClass('active');
|
600 |
-
$('#gm_metabox', fieldset).toggle();
|
601 |
-
if(!$(this).hasClass('loaded')){
|
602 |
-
$('.gMedia-images-wrap', fieldset).on('scroll', function(){
|
603 |
-
if( dload && ( $(this).scrollTop() >= ($(this)[0].scrollHeight - $(this).outerHeight() - 5) ) ){
|
604 |
-
dload = false;
|
605 |
-
var q = $('.gMedia-refine-input', fieldset).val();
|
606 |
-
var jqXHR = $.get(ajaxurl, {
|
607 |
-
_wpnonce: gMediaGlobalVar.nonce,
|
608 |
-
action: 'gmDoAjax',
|
609 |
-
task: 'related-image',
|
610 |
-
paged: load_page,
|
611 |
-
search: q,
|
612 |
-
rel: gm_rel,
|
613 |
-
tags: cur_tags
|
614 |
-
}, function(r) {
|
615 |
-
if(r.paged){
|
616 |
-
$('.gMedia-images-thumbnails', fieldset).append(r.content);
|
617 |
-
if(r.continue){
|
618 |
-
dload = true;
|
619 |
-
load_page = r.paged + 1;
|
620 |
-
gm_rel = r.rel;
|
621 |
-
$('.gMedia-images-wrap', fieldset).trigger('scroll');
|
622 |
-
}
|
623 |
-
}
|
624 |
-
//console.log(r);
|
625 |
-
}).fail(function(){
|
626 |
-
dload = true;
|
627 |
-
$('.gMedia-images-wrap', fieldset).trigger('scroll');
|
628 |
-
});
|
629 |
-
}
|
630 |
-
});
|
631 |
-
gm_update_metabox();
|
632 |
-
$(this).addClass('loaded');
|
633 |
-
}
|
634 |
-
});
|
635 |
-
|
636 |
-
var delayTimer;
|
637 |
-
$('.grandmedia').on('keyup', '#gm_metabox .gMedia-refine-input', function(e){
|
638 |
-
var k = e.keyCode || e.charCode;
|
639 |
-
var arr = [16,17,18,20,27,33,34,35,36,37,38,39,40,144];
|
640 |
-
if ($.inArray(k,arr) > -1) {
|
641 |
-
return;
|
642 |
-
}
|
643 |
-
var q = $(this).val();
|
644 |
-
clearTimeout(delayTimer);
|
645 |
-
delayTimer = setTimeout(function() {
|
646 |
-
if($.trim(q).length > 2){
|
647 |
-
$.get(ajaxurl, {
|
648 |
-
_wpnonce: gMediaGlobalVar.nonce,
|
649 |
-
action: 'gmDoAjax',
|
650 |
-
task: 'related-image',
|
651 |
-
search: q
|
652 |
-
}, function(r) {
|
653 |
-
if(r.content){
|
654 |
-
$('.gMedia-images-thumbnails', fieldset).html(r.content);
|
655 |
-
if(r.continue){
|
656 |
-
dload = true;
|
657 |
-
load_page = r.paged + 1;
|
658 |
-
gm_rel = r.rel;
|
659 |
-
$('.gMedia-images-wrap', fieldset).trigger('scroll');
|
660 |
-
}
|
661 |
-
}
|
662 |
-
//console.log(r);
|
663 |
-
}).fail(function(){
|
664 |
-
dload = true;
|
665 |
-
$('.gMedia-images-wrap', fieldset).trigger('scroll');
|
666 |
-
});
|
667 |
-
} else if(q.length == 0){
|
668 |
-
gm_update_metabox();
|
669 |
}
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
|
|
|
|
|
|
|
|
676 |
});
|
|
|
677 |
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
});
|
682 |
-
|
683 |
-
$('.grandmedia').on('click', 'li.gMedia-image-li', function (e) {
|
684 |
-
var gm_src = $('.gmedia-thumb', this).attr('src'),
|
685 |
-
gm_id = $('.gM-img', this).data('gmid');
|
686 |
-
$(this).addClass('active').siblings().removeClass('active');
|
687 |
-
$('.gmPreview input', fieldset).val(gm_id);
|
688 |
-
if($('.gmImage img.gmedia-thumb-preview', fieldset).length){
|
689 |
-
$('.gmImage img.gmedia-thumb-preview', fieldset).attr('src', gm_src);
|
690 |
-
} else {
|
691 |
-
$('.gmImage img.gmedia-thumb', fieldset).clone().removeAttr('id alt').attr({'src':gm_src, 'class':'gmedia-thumb-preview'}).prependTo($('.gmImage', fieldset));
|
692 |
-
}
|
693 |
-
e.preventDefault();
|
694 |
-
});
|
695 |
-
|
696 |
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
}
|
714 |
-
//console.log(r);
|
715 |
-
}).fail(function(){
|
716 |
-
dload = true;
|
717 |
-
$('.gMedia-images-wrap', fieldset).trigger('scroll');
|
718 |
});
|
719 |
-
|
|
|
720 |
|
721 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
722 |
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
$(
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
|
|
|
|
|
|
732 |
}
|
733 |
-
},
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
solo : true,
|
744 |
-
event: event.type,
|
745 |
-
ready: true
|
746 |
-
},
|
747 |
-
hide : {
|
748 |
-
delay: 100,
|
749 |
-
fixed: true
|
750 |
-
}
|
751 |
-
}, event);
|
752 |
-
}
|
753 |
-
});
|
754 |
-
|
755 |
-
}
|
756 |
|
757 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
758 |
|
759 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
760 |
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
|
|
|
|
|
|
|
|
768 |
});
|
769 |
-
}
|
770 |
-
$('.grandbox').fancybox();
|
771 |
-
/*
|
772 |
-
if($('.fancy-watch').length){
|
773 |
-
$('.fancy-watch').fancybox({
|
774 |
-
'type' : 'iframe',
|
775 |
-
'padding' : 0,
|
776 |
-
'width' : 520,
|
777 |
-
'height': 304,
|
778 |
-
//'showNavArrows' : false,
|
779 |
-
'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
|
780 |
-
title = $(currentArray[currentIndex]).parents('tr:first').find("td.title span").text();
|
781 |
-
return (title.length? '<table cellspacing="0" cellpadding="0" id="fancybox-title-float-wrap"><tbody><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+title+'</td><td id="fancybox-title-float-right"></td></tr></tbody></table>' : '');
|
782 |
-
}
|
783 |
-
});
|
784 |
-
}
|
785 |
-
*/
|
786 |
-
}
|
787 |
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
window.location.hash = index;
|
802 |
-
$("input[name=\'_wp_http_referer\']").val(window.location);
|
803 |
-
$("a.ui-tab-link").attr('href', reset_url + '#' + index);
|
804 |
-
$("a.gm_add_hash").attr('href', back_url + '#' + index);
|
805 |
-
$("form#gm_module_settings_form").attr('action', form_action + '#' + index);
|
806 |
-
}
|
807 |
});
|
|
|
808 |
}
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
|
814 |
});
|
815 |
|
816 |
|
817 |
-
function getStorage(key_prefix)
|
818 |
-
// this function will return us an object with a "set" and "get" method
|
819 |
-
// using either localStorage if available, or defaulting to document.cookie
|
820 |
-
/*if (window.localStorage) {
|
821 |
-
// use localStorage:
|
822 |
-
return {
|
823 |
-
set: function(id, data) {
|
824 |
-
localStorage.setItem(key_prefix+id, data);
|
825 |
-
},
|
826 |
-
get: function(id) {
|
827 |
-
return localStorage.getItem(key_prefix+id);
|
828 |
-
}
|
829 |
-
};
|
830 |
-
} else {*/
|
831 |
// use document.cookie:
|
832 |
return {
|
833 |
-
set: function
|
834 |
document.cookie = key_prefix + id + '=' + encodeURIComponent(data);
|
835 |
},
|
836 |
-
get: function
|
837 |
var cookies = document.cookie, parsed = {};
|
838 |
-
cookies.replace(/([^=]+)=([^;]*);?\s*/g, function
|
839 |
parsed[key] = decodeURIComponent(value);
|
840 |
});
|
841 |
return parsed[key_prefix + id];
|
842 |
}
|
843 |
};
|
844 |
-
//}
|
845 |
-
}
|
846 |
-
|
847 |
-
function countmedias() {
|
848 |
-
var i = jQuery('table.gMediaLibTable tbody:visible tr.image').length;
|
849 |
-
var a = jQuery('table.gMediaLibTable tbody:visible tr.audio').length;
|
850 |
-
var v = jQuery('table.gMediaLibTable tbody:visible tr.video').length;
|
851 |
-
var o = jQuery('table.gMediaLibTable tbody:visible tr.other').length;
|
852 |
-
jQuery('.gMediaLibActions .abuts').each(function () {
|
853 |
-
jQuery('.total .page', this).text(i + a + v + o);
|
854 |
-
jQuery('.image .page', this).text(i);
|
855 |
-
jQuery('.audio .page', this).text(a);
|
856 |
-
jQuery('.video .page', this).text(v);
|
857 |
-
jQuery('.other .page', this).text(o);
|
858 |
-
});
|
859 |
-
}
|
860 |
-
function gmMessage(stat, message, get_ajax, append) {
|
861 |
-
if (get_ajax) {
|
862 |
-
jQuery.post(ajaxurl, { action: 'gmGetAjax', task: 'gmMessage', stat: stat, message: message }, function (response) {
|
863 |
-
if(append)
|
864 |
-
jQuery('#gm-message').append(response);
|
865 |
-
else
|
866 |
-
jQuery('#gm-message').html(response);
|
867 |
-
});
|
868 |
-
} else {
|
869 |
-
if(append)
|
870 |
-
jQuery('#gm-message').append(message);
|
871 |
-
else
|
872 |
-
jQuery('#gm-message').html(message);
|
873 |
-
}
|
874 |
-
}
|
875 |
-
function gmConfirm(txt) {
|
876 |
-
var r = false;
|
877 |
-
try {
|
878 |
-
r = confirm(txt);
|
879 |
-
}
|
880 |
-
catch (err) {
|
881 |
-
//noinspection JSUnresolvedVariable
|
882 |
-
gmMessage('error', grandMedia.error3);
|
883 |
-
}
|
884 |
-
return r;
|
885 |
-
}
|
886 |
-
function gmTableImageTip(item) {
|
887 |
-
if (typeof(jQuery.fn.qtip) != 'undefined') {
|
888 |
-
jQuery(item).qtip({
|
889 |
-
content : {
|
890 |
-
text : function (api) {
|
891 |
-
var preview_thumb = '<img src="' + jQuery(this).attr('src') + '" width="150" height="150" class="gmedia-thumb" alt="' + jQuery(this).attr('alt') + '" />';
|
892 |
-
if(jQuery(this).data('icon')){
|
893 |
-
preview_thumb = '<div class="relative">' + preview_thumb + '<img src="' + jQuery(this).data('icon') + '" width="150" height="150" class="gmedia-thumb-icon" alt="' + jQuery(this).attr('alt') + '" /></div>';
|
894 |
-
}
|
895 |
-
return preview_thumb;
|
896 |
-
},
|
897 |
-
title: function (api) {
|
898 |
-
return '<div class="title">' + jQuery(this).attr('title') + '</div>';
|
899 |
-
}
|
900 |
-
},
|
901 |
-
position: {
|
902 |
-
my : 'left center',
|
903 |
-
at : 'top right',
|
904 |
-
container: jQuery('div.tooltip-file-preview'),
|
905 |
-
//viewport : jQuery(window),
|
906 |
-
adjust : {
|
907 |
-
x : 10, y: 10,
|
908 |
-
method: 'shift',
|
909 |
-
resize: false
|
910 |
-
}
|
911 |
-
},
|
912 |
-
show : {
|
913 |
-
delay: 300,
|
914 |
-
solo : jQuery('div.tooltip-file-preview')
|
915 |
-
},
|
916 |
-
hide : {
|
917 |
-
delay: 500,
|
918 |
-
fixed: true
|
919 |
-
},
|
920 |
-
style : {
|
921 |
-
classes: 'qtip-jtools qtip-preview',
|
922 |
-
tip : {
|
923 |
-
corner: true
|
924 |
-
}
|
925 |
-
}
|
926 |
-
});
|
927 |
-
}
|
928 |
-
}
|
929 |
-
function gmTableActionTip(item) {
|
930 |
-
if (typeof(jQuery.fn.qtip) != 'undefined') {
|
931 |
-
var me;
|
932 |
-
// We make use of the .each() loop to gain access to each element via the "this" keyword...
|
933 |
-
jQuery(item).each(function(){
|
934 |
-
jQuery(this).qtip({
|
935 |
-
content : ' ',
|
936 |
-
position: {
|
937 |
-
at : 'left center', // Position the tooltip above the link
|
938 |
-
my : 'right center',
|
939 |
-
container: jQuery('div.tooltip-mediaelement')
|
940 |
-
//viewport : jQuery(window)
|
941 |
-
},
|
942 |
-
show : {
|
943 |
-
event: 'click',
|
944 |
-
solo : jQuery('div.tooltip-mediaelement') // Only show one tooltip at a time
|
945 |
-
},
|
946 |
-
hide : 'unfocus',
|
947 |
-
style : {
|
948 |
-
classes: jQuery(this).attr('class')
|
949 |
-
},
|
950 |
-
events: {
|
951 |
-
render: function (event, api) {
|
952 |
-
var target = jQuery(event.originalEvent.target);
|
953 |
-
if(target.length) {
|
954 |
-
var elsize = (target.attr('rel') == 'audio')? ' width="250" height="30"' : ' width="520" height="304"';
|
955 |
-
api.set('content.text', '<'+target.attr('rel')+' src="'+target.attr('href')+'" controls="controls" preload="none"'+elsize+'></'+target.attr('rel')+'>');
|
956 |
-
me = new MediaElementPlayer(jQuery(target.attr('rel'), this), {pluginPath: gMediaGlobalVar.pluginPath + '/inc/mediaelement/'});
|
957 |
-
//me.play();
|
958 |
-
}
|
959 |
-
//console.log(jQuery(this).html());
|
960 |
-
},
|
961 |
-
hide: function (event, api) {
|
962 |
-
me.pause();
|
963 |
-
}
|
964 |
-
}
|
965 |
-
});
|
966 |
-
})
|
967 |
-
// Make sure it doesn't follow the link when we click it
|
968 |
-
.click(function (event) {
|
969 |
-
event.preventDefault();
|
970 |
-
});
|
971 |
-
}
|
972 |
}
|
973 |
|
|
|
974 |
function gmHashCode(str){
|
975 |
var l = str.length,
|
976 |
-
|
977 |
-
for
|
978 |
-
hash += Math.floor((str.charCodeAt(i)+i+0.33)/(str.charCodeAt(l-i-1)+l)+(str.charCodeAt(i)+l)*(str.charCodeAt(l-i-1)+i+0.33));
|
979 |
}
|
980 |
return hash;
|
981 |
}
|
982 |
-
function gmCreateKey(site, lic, uuid)
|
983 |
-
if(!lic){
|
984 |
-
|
985 |
-
|
|
|
|
|
|
|
|
|
986 |
var p = d;
|
987 |
-
uuid = uuid.replace(/[xy]/g, function(c)
|
988 |
-
var r = d%16|0, v = c == 'x'
|
989 |
-
d = Math.floor(d*15/16);
|
990 |
return v.toString(16);
|
991 |
});
|
992 |
-
var key = p+': '+lic + '-' + uuid;
|
993 |
return key.toLowerCase();
|
994 |
}
|
|
1 |
/*
|
2 |
* jQuery functions for GRAND Flash Media
|
3 |
*/
|
4 |
+
var GmediaSelect;
|
5 |
+
var GmediaFunction;
|
|
|
|
|
6 |
jQuery(function($){
|
7 |
+
var gmedia_DOM = $('#gmedia-container');
|
8 |
+
|
9 |
+
GmediaSelect = {
|
10 |
+
msg_selected: function(obj, global){
|
11 |
+
var gm_cb = $('.'+obj+' input'),
|
12 |
+
qty_v = gm_cb.length,
|
13 |
+
sel_v = gm_cb.filter(':checked').length,
|
14 |
+
c = $('#cb_global');
|
15 |
+
if(sel_v != qty_v && sel_v != 0){
|
16 |
+
c.css('opacity', '0.5').prop('checked', true);
|
17 |
+
} else if(sel_v == qty_v && qty_v != 0){
|
18 |
+
c.css('opacity', '1').prop('checked', true);
|
19 |
+
} else if(sel_v == 0){
|
20 |
+
c.css('opacity', '1').prop('checked', false);
|
21 |
}
|
22 |
|
23 |
+
if(!$('#gm-selected').length){ return; }
|
24 |
+
|
25 |
+
var sel = $('#gm-selected'),
|
26 |
+
arr = sel.val().split(','),
|
27 |
+
cur;
|
28 |
+
|
29 |
+
arr = $.grep(arr, function(e){
|
30 |
return(e);
|
31 |
});
|
32 |
+
if(global){
|
33 |
+
cur = false;
|
34 |
+
gm_cb.each(function(){
|
35 |
cur = $(this);
|
36 |
+
if(cur.is(':checked') && ($.inArray(cur.val(), arr) === -1)){
|
37 |
arr.push(cur.val());
|
38 |
+
} else if(!(cur.is(':checked')) && ($.inArray(cur.val(), arr) !== -1)){
|
39 |
+
arr = $.grep(arr, function(e){
|
40 |
return e != cur.val();
|
41 |
});
|
42 |
}
|
43 |
});
|
44 |
+
sel.val(arr.join(','));
|
45 |
}
|
46 |
+
|
47 |
+
if(sel.data('userid')){
|
48 |
+
var storedData = getStorage('gmedia_u' + sel.data('userid') + '_');
|
49 |
+
storedData.set(sel.data('key'), arr);
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
+
$('#gm-selected-qty').text(arr.length);
|
52 |
+
if(arr.length){
|
53 |
+
$('#gm-selected-btn').removeClass('hidden');
|
54 |
+
$('.rel-selected-show').show();
|
55 |
+
$('.rel-selected-hide').hide();
|
56 |
+
}
|
57 |
+
else{
|
58 |
+
$('#gm-selected-btn').addClass('hidden');
|
59 |
+
$('.rel-selected-show').hide();
|
60 |
+
$('.rel-selected-hide').show();
|
61 |
+
}
|
62 |
+
sel.trigger('change');
|
63 |
},
|
64 |
+
chk_all: function(type, obj){
|
65 |
+
$('.'+obj+' input').filter(function(){
|
66 |
+
return type? $(this).data('type') == type : true;
|
67 |
+
}).prop('checked', true).closest('div.list-group-item').addClass('active');
|
68 |
},
|
69 |
+
chk_none: function(type, obj){
|
70 |
+
$('.'+obj+' input').filter(function(){
|
71 |
+
return type? $(this).data('type') == type : true;
|
72 |
+
}).prop('checked', false).closest('div.list-group-item').removeClass('active');
|
73 |
},
|
74 |
+
chk_toggle: function(type, obj){
|
75 |
+
if(type){
|
76 |
+
if($('.'+obj+' input:checked').filter(function(){
|
77 |
+
return $(this).data('type') == type;
|
78 |
+
}).length){
|
79 |
+
GmediaSelect.chk_none(type, obj);
|
80 |
+
} else{
|
81 |
+
GmediaSelect.chk_all(type, obj)
|
82 |
+
}
|
83 |
+
} else{
|
84 |
+
$('.'+obj+' input').each(function(){
|
85 |
+
$(this).prop("checked", !$(this).prop("checked")).closest('div.list-group-item').toggleClass('active');
|
86 |
});
|
87 |
}
|
88 |
},
|
89 |
+
init: function(){
|
90 |
+
var cb_obj = $('#cb_global').data('group');
|
91 |
+
|
92 |
+
if($('#gm-selected').length){
|
93 |
+
GmediaSelect.msg_selected(cb_obj);
|
94 |
+
$('#gm-selected-clear').click(function(e){
|
95 |
+
$('#gm-selected').val('');
|
96 |
+
var obj = $('#cb_global').data('group');
|
97 |
+
GmediaSelect.chk_none(false, cb_obj);
|
98 |
+
GmediaSelect.msg_selected(cb_obj);
|
99 |
+
e.preventDefault();
|
100 |
+
});
|
101 |
+
$('#gm-selected-show').click(function(){
|
102 |
+
$('#gm-selected-btn').submit();
|
103 |
+
e.preventDefault();
|
104 |
+
});
|
105 |
}
|
106 |
+
$('#cb_global').click(function(e){
|
107 |
+
if($(this).is(':checked')){
|
108 |
+
GmediaSelect.chk_all(false, cb_obj);
|
109 |
+
} else{
|
110 |
+
GmediaSelect.chk_none(false, cb_obj);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
}
|
112 |
+
GmediaSelect.msg_selected(cb_obj, true);
|
|
|
|
|
113 |
});
|
114 |
+
$('#cb_global-btn li a').click(function(e){
|
115 |
+
var sel = $(this).data('select');
|
116 |
+
switch(sel){
|
|
|
117 |
case 'total':
|
118 |
+
GmediaSelect.chk_all(false, cb_obj);
|
119 |
break;
|
120 |
case 'none':
|
121 |
+
GmediaSelect.chk_none(false, cb_obj);
|
122 |
break;
|
123 |
case 'reverse':
|
124 |
+
GmediaSelect.chk_toggle(false, cb_obj);
|
125 |
break;
|
126 |
case 'image':
|
127 |
case 'audio':
|
128 |
case 'video':
|
129 |
+
GmediaSelect.chk_toggle(sel, cb_obj);
|
|
|
130 |
break;
|
131 |
}
|
132 |
+
GmediaSelect.msg_selected(cb_obj, true);
|
133 |
+
e.preventDefault();
|
134 |
});
|
135 |
+
$('.cb_media-object input:checkbox, .cb_term-object input:checkbox').change(function(){
|
136 |
+
var arr = $('#gm-selected').val();
|
137 |
var cur = $(this).val();
|
138 |
+
if($(this).is(':checked')){
|
139 |
+
if(arr){
|
140 |
arr = arr + ',' + cur;
|
141 |
+
} else{
|
142 |
arr = cur;
|
143 |
}
|
144 |
+
} else{
|
145 |
+
arr = $.grep(arr.split(','),function(a){
|
146 |
return a != cur;
|
147 |
}).join(',');
|
148 |
}
|
149 |
+
$('#list-item-' + cur).toggleClass('active');
|
150 |
+
$('#gm-selected').val(arr);
|
151 |
+
GmediaSelect.msg_selected(cb_obj);
|
152 |
});
|
153 |
+
$('.term-label').click(function(e){
|
154 |
+
if('DIV' == e.target.nodeName){
|
155 |
+
if(!$('#gm-list-table').data('edit')){
|
156 |
+
var cb = $('input:checkbox', this);
|
157 |
+
cb.prop("checked", !cb.prop("checked")).change();
|
158 |
+
} else{
|
159 |
+
$('#gm-list-table').data('edit', false);
|
160 |
+
}
|
|
|
|
|
|
|
161 |
}
|
162 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
}
|
164 |
};
|
165 |
|
166 |
+
GmediaFunction = {
|
167 |
+
confirm: function(txt){
|
168 |
+
if(!txt){
|
169 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
}
|
171 |
+
var r = false;
|
172 |
+
try{
|
173 |
+
r = confirm(txt);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
}
|
175 |
+
catch(err){
|
176 |
+
alert('Disable Popup Blocker');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
}
|
178 |
+
return r;
|
179 |
+
},
|
180 |
+
init: function(){
|
181 |
+
$('#toplevel_page_GrandMedia').addClass('current').removeClass('wp-not-current-submenu');
|
182 |
+
|
183 |
+
/*
|
184 |
+
$(document).ajaxStart(function(){
|
185 |
+
$('body').addClass('gmedia-busy');
|
186 |
+
}).ajaxStop(function(){
|
187 |
+
$('body').removeClass('gmedia-busy');
|
188 |
});
|
189 |
+
*/
|
190 |
|
191 |
+
$('[data-confirm]').click(function(){
|
192 |
+
return GmediaFunction.confirm($(this).data('confirm'));
|
193 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
|
195 |
+
$('div.gmedia-modal').appendTo('body');
|
196 |
+
$('a.gmedia-modal').click(function(e){
|
197 |
+
$('body').addClass('gmedia-busy');
|
198 |
+
var modal_div = $($(this).attr('href'));
|
199 |
+
var post_data = {
|
200 |
+
action: $(this).data('action'), modal: $(this).data('modal'), _wpnonce: $('#_wpnonce').val()
|
201 |
+
};
|
202 |
+
$.post(ajaxurl, post_data, function(data, textStatus, jqXHR){
|
203 |
+
$('.modal-dialog', modal_div).html(data);
|
204 |
+
modal_div.modal({
|
205 |
+
backdrop: 'static',
|
206 |
+
show: true
|
207 |
+
}).on('hidden.bs.modal', function(e){
|
208 |
+
$('.modal-dialog', this).empty();
|
209 |
+
});
|
210 |
+
$('body').removeClass('gmedia-busy');
|
|
|
|
|
|
|
|
|
|
|
211 |
});
|
212 |
+
e.preventDefault();
|
213 |
+
});
|
214 |
|
215 |
+
$('a.gmedit-modal').click(function(e){
|
216 |
+
e.preventDefault();
|
217 |
+
var modal_div = $($(this).data('target'));
|
218 |
+
$('.modal-content', modal_div).html(
|
219 |
+
$('<iframe />', {
|
220 |
+
name: 'gmeditFrame',
|
221 |
+
id: 'gmeditFrame',
|
222 |
+
width: '100%',
|
223 |
+
height: '500',
|
224 |
+
src: $(this).attr('href')
|
225 |
+
}).css({display: 'block', margin: '4px 0'})
|
226 |
+
);
|
227 |
+
modal_div.modal({
|
228 |
+
backdrop: true,
|
229 |
+
show: true
|
230 |
+
}).on('hidden.bs.modal', function(e){
|
231 |
+
$('.modal-content', this).empty();
|
232 |
+
});
|
233 |
+
});
|
234 |
|
235 |
+
$('a.preview-modal').click(function(e){
|
236 |
+
e.preventDefault();
|
237 |
+
var modal_div = $($(this).data('target'));
|
238 |
+
$('.modal-title', modal_div).text($(this).attr('title'));
|
239 |
+
$('.modal-body', modal_div).html(
|
240 |
+
$('<iframe />', {
|
241 |
+
name: 'previewFrame',
|
242 |
+
id: 'previewFrame',
|
243 |
+
width: '100%',
|
244 |
+
src: $(this).attr('href'),
|
245 |
+
load: function(){
|
246 |
+
$(this).height(this.contentWindow.document.body.offsetHeight + 30);
|
247 |
}
|
248 |
+
}).css({display: 'block', margin: '4px 0'})
|
249 |
+
);
|
250 |
+
modal_div.modal({
|
251 |
+
backdrop: true,
|
252 |
+
show: true
|
253 |
+
}).on('hidden.bs.modal', function(e){
|
254 |
+
$('.modal-title', this).empty();
|
255 |
+
$('.modal-body', this).empty();
|
256 |
+
});
|
257 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
|
259 |
+
$('form.edit-gmedia :input').change(function(){
|
260 |
+
$('body').addClass('gmedia-busy');
|
261 |
+
var post_data = {
|
262 |
+
action: 'gmedia_update_data', data: $(this).closest('form').serialize(), _wpnonce: $('#_wpnonce').val()
|
263 |
+
};
|
264 |
+
$.post(ajaxurl, post_data, function(data, textStatus, jqXHR){
|
265 |
+
console.log(data);
|
266 |
+
var id = data.ID;
|
267 |
+
$('#list-item-'+id).find('.modified').text(data.modified);
|
268 |
+
$('body').removeClass('gmedia-busy');
|
269 |
+
});
|
270 |
+
});
|
271 |
|
272 |
+
gmedia_DOM.on('click', '.gm-toggle-cb', function(e){
|
273 |
+
var checkBoxes = $(this).attr('href');
|
274 |
+
$(checkBoxes + ' :checkbox').each(function(){
|
275 |
+
$(this).prop("checked", !$(this).prop("checked"));
|
276 |
+
});
|
277 |
+
e.preventDefault();
|
278 |
+
});
|
279 |
+
$('.linkblock').on('click', '[data-href]', function(){
|
280 |
+
window.location.href = $(this).data('href');
|
281 |
+
});
|
282 |
|
283 |
+
$('.gmedia-import').click(function(e){
|
284 |
+
$('#import-action').val($(this).attr('name'));
|
285 |
+
$('#importModal').modal({
|
286 |
+
backdrop: 'static',
|
287 |
+
show: true
|
288 |
+
}).on('shown.bs.modal', function(){
|
289 |
+
$('#import_form').submit();
|
290 |
+
}).on('hidden.bs.modal', function(){
|
291 |
+
$('#import-done').button('reset').prop('disabled', true);
|
292 |
+
$('#import_window').attr('src', 'about:blank');
|
293 |
+
});
|
294 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
|
296 |
+
$('#gmedia_modules').on('click', '.module_install', function(e){
|
297 |
+
e.preventDefault();
|
298 |
+
$('body').addClass('gmedia-busy');
|
299 |
+
var module = $(this).data('module');
|
300 |
+
$('.module_install').filter('[data-module="'+module+'"]').button('loading');
|
301 |
+
var post_data = {
|
302 |
+
action: 'gmedia_module_install', download: $(this).attr('href'), module: module, _wpnonce: $('#_wpnonce').val()
|
303 |
+
};
|
304 |
+
var pathname = window.location.href;
|
305 |
+
$.post(ajaxurl, post_data, function(data, status, xhr){
|
306 |
+
$('#gmedia_modules').load(pathname + ' #gmedia_modules > *').before(data);
|
307 |
+
$('body').removeClass('gmedia-busy');
|
308 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
});
|
310 |
+
|
311 |
}
|
312 |
+
};
|
313 |
+
|
314 |
+
GmediaSelect.init();
|
315 |
+
GmediaFunction.init();
|
316 |
|
317 |
});
|
318 |
|
319 |
|
320 |
+
function getStorage(key_prefix){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
// use document.cookie:
|
322 |
return {
|
323 |
+
set: function(id, data){
|
324 |
document.cookie = key_prefix + id + '=' + encodeURIComponent(data);
|
325 |
},
|
326 |
+
get: function(id, data){
|
327 |
var cookies = document.cookie, parsed = {};
|
328 |
+
cookies.replace(/([^=]+)=([^;]*);?\s*/g, function(whole, key, value){
|
329 |
parsed[key] = decodeURIComponent(value);
|
330 |
});
|
331 |
return parsed[key_prefix + id];
|
332 |
}
|
333 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
334 |
}
|
335 |
|
336 |
+
/*
|
337 |
function gmHashCode(str){
|
338 |
var l = str.length,
|
339 |
+
hash = 5381 * l * (str.charCodeAt(0) + l);
|
340 |
+
for(var i = 0; i < str.length; i++){
|
341 |
+
hash += Math.floor((str.charCodeAt(i) + i + 0.33) / (str.charCodeAt(l - i - 1) + l) + (str.charCodeAt(i) + l) * (str.charCodeAt(l - i - 1) + i + 0.33));
|
342 |
}
|
343 |
return hash;
|
344 |
}
|
345 |
+
function gmCreateKey(site, lic, uuid){
|
346 |
+
if(!lic){
|
347 |
+
lic = '0:lk';
|
348 |
+
}
|
349 |
+
if(!uuid){
|
350 |
+
uuid = 'xyxx-xxyx-xxxy';
|
351 |
+
}
|
352 |
+
var d = gmHashCode((site + ':' + lic).toLowerCase());
|
353 |
var p = d;
|
354 |
+
uuid = uuid.replace(/[xy]/g, function(c){
|
355 |
+
var r = d % 16 | 0, v = c == 'x'? r : (r & 0x7 | 0x8);
|
356 |
+
d = Math.floor(d * 15 / 16);
|
357 |
return v.toString(16);
|
358 |
});
|
359 |
+
var key = p + ': ' + lic + '-' + uuid;
|
360 |
return key.toLowerCase();
|
361 |
}
|
362 |
+
*/
|
admin/js/jquery.dataset.js
DELETED
@@ -1,167 +0,0 @@
|
|
1 |
-
/// jquery.dataset v0.1.0 -- HTML5 dataset jQuery plugin
|
2 |
-
/// http://orangesoda.net/jquery.dataset.html
|
3 |
-
|
4 |
-
/// Copyright (c) 2009, Ben Weaver. All rights reserved.
|
5 |
-
/// This software is issued "as is" under a BSD license
|
6 |
-
/// <http://orangesoda.net/license.html>. All warrenties disclaimed.
|
7 |
-
|
8 |
-
/// The HTML5 specification allows elements to have custom data
|
9 |
-
/// attributes that are prefixed with `data-'. They may be
|
10 |
-
/// conveniently accessed through an element's `dataset' property.
|
11 |
-
/// This plugin provides similar functionality.
|
12 |
-
///
|
13 |
-
/// The methods in the plugin are designed to be similar to the
|
14 |
-
/// built-in `attr' and `data' methods. All names are without the
|
15 |
-
/// `data-' prefix.
|
16 |
-
//
|
17 |
-
/// These methods are defined:
|
18 |
-
///
|
19 |
-
/// dataset()
|
20 |
-
/// Return an object with all custom attribute (name, value) items.
|
21 |
-
///
|
22 |
-
/// dataset(name)
|
23 |
-
/// Return the value of the attribute `data-NAME'.
|
24 |
-
///
|
25 |
-
/// dataset(name, value)
|
26 |
-
/// Set the value of attribtue `data-NAME' to VALUE.
|
27 |
-
///
|
28 |
-
/// dataset({...})
|
29 |
-
/// Set many custom attributes at once.
|
30 |
-
///
|
31 |
-
/// removeDataset(name)
|
32 |
-
/// Remove the attribute `data-NAME'.
|
33 |
-
///
|
34 |
-
/// removeDataset([n1, n2, ...])
|
35 |
-
/// Remove the attributes `data-N1', `data-N2', ...
|
36 |
-
|
37 |
-
(function ($) {
|
38 |
-
var PREFIX = 'data-',
|
39 |
-
PATTERN = /^data\-(.*)$/;
|
40 |
-
|
41 |
-
function dataset(name, value) {
|
42 |
-
if (value !== undefined) {
|
43 |
-
// dataset(name, value): set the NAME attribute to VALUE.
|
44 |
-
return this.attr(PREFIX + name, value);
|
45 |
-
}
|
46 |
-
|
47 |
-
switch (typeof name) {
|
48 |
-
case 'string':
|
49 |
-
// dataset(name): get the value of the NAME attribute.
|
50 |
-
return this.attr(PREFIX + name);
|
51 |
-
|
52 |
-
case 'object':
|
53 |
-
// dataset(items): set the values of all (name, value) items.
|
54 |
-
return set_items.call(this, name);
|
55 |
-
|
56 |
-
case 'undefined':
|
57 |
-
// dataset(): return a mapping of (name, value) items for the
|
58 |
-
// first element.
|
59 |
-
return get_items.call(this);
|
60 |
-
|
61 |
-
default:
|
62 |
-
throw 'dataset: invalid argument ' + name;
|
63 |
-
}
|
64 |
-
}
|
65 |
-
|
66 |
-
function get_items() {
|
67 |
-
return this.foldAttr(function (index, attr, result) {
|
68 |
-
var match = PATTERN.exec(this.name);
|
69 |
-
if (match) result[match[1]] = this.value;
|
70 |
-
});
|
71 |
-
}
|
72 |
-
|
73 |
-
function set_items(items) {
|
74 |
-
for (var key in items) {
|
75 |
-
this.attr(PREFIX + key, items[key]);
|
76 |
-
}
|
77 |
-
return this;
|
78 |
-
}
|
79 |
-
|
80 |
-
function remove(name) {
|
81 |
-
if (typeof name == 'string') {
|
82 |
-
// Remove a single attribute;
|
83 |
-
return this.removeAttr(PREFIX + name);
|
84 |
-
}
|
85 |
-
return remove_names(name);
|
86 |
-
}
|
87 |
-
|
88 |
-
function remove_names(obj) {
|
89 |
-
var idx, length = obj && obj.length;
|
90 |
-
|
91 |
-
// For any object, remove attributes named by the keys.
|
92 |
-
if (length === undefined) {
|
93 |
-
for (idx in obj) {
|
94 |
-
this.removeAttr(PREFIX + idx);
|
95 |
-
}
|
96 |
-
}
|
97 |
-
// For an array, remove attributes named by the values.
|
98 |
-
else {
|
99 |
-
for (idx = 0; idx < length; idx++) {
|
100 |
-
this.removeAttr(PREFIX + obj[idx]);
|
101 |
-
}
|
102 |
-
}
|
103 |
-
|
104 |
-
return this;
|
105 |
-
}
|
106 |
-
|
107 |
-
$.fn.dataset = dataset;
|
108 |
-
$.fn.removeDataset = remove_names;
|
109 |
-
|
110 |
-
})(jQuery);
|
111 |
-
|
112 |
-
(function ($) {
|
113 |
-
|
114 |
-
function each_attr(proc) {
|
115 |
-
if (this.length > 0) {
|
116 |
-
$.each(this[0].attributes, proc);
|
117 |
-
}
|
118 |
-
return this;
|
119 |
-
}
|
120 |
-
|
121 |
-
function fold_attr(proc, acc) {
|
122 |
-
return fold((this.length > 0) && this[0].attributes, proc, acc);
|
123 |
-
}
|
124 |
-
|
125 |
-
/*
|
126 |
-
* A left-fold operator. The behavior is the same as $.each(),
|
127 |
-
* but the callback is called with the accumulator as the third
|
128 |
-
* argument. The default accumulator is an empty object.
|
129 |
-
*/
|
130 |
-
function fold(object, proc, acc) {
|
131 |
-
var length = object && object.length;
|
132 |
-
|
133 |
-
// The default accumulator is an empty object.
|
134 |
-
if (acc === undefined) acc = {};
|
135 |
-
|
136 |
-
// Returning an empty accumulator when OBJECT is "false"
|
137 |
-
// makes FOLD more composable.
|
138 |
-
if (!object) return acc;
|
139 |
-
|
140 |
-
// Check to see if OBJECT is an array.
|
141 |
-
if (length !== undefined) {
|
142 |
-
for (var i = 0, value = object[i];
|
143 |
-
(i < length) && (proc.call(value, i, value, acc) !== false);
|
144 |
-
value = object[++i]) {
|
145 |
-
}
|
146 |
-
}
|
147 |
-
// Object is a map of (name, value) items.
|
148 |
-
else {
|
149 |
-
for (var name in object) {
|
150 |
-
if (proc.call(object[name], name, object[name], acc) === false) break;
|
151 |
-
}
|
152 |
-
}
|
153 |
-
|
154 |
-
return acc;
|
155 |
-
}
|
156 |
-
|
157 |
-
function fold_jquery(proc, acc) {
|
158 |
-
if (acc === undefined) acc = [];
|
159 |
-
return fold(this, proc, acc);
|
160 |
-
}
|
161 |
-
|
162 |
-
$.fn.eachAttr = each_attr;
|
163 |
-
$.fn.foldAttr = fold_attr;
|
164 |
-
$.fn.fold = fold_jquery;
|
165 |
-
$.fold = fold;
|
166 |
-
|
167 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/jquery.fancybox.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
/*
|
2 |
* FancyBox - jQuery Plugin
|
3 |
* Simple and fancy lightbox alternative
|
4 |
*
|
5 |
* Examples and documentation at: http://fancybox.net
|
6 |
*
|
7 |
* Copyright (c) 2008 - 2010 Janis Skarnelis
|
8 |
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
|
9 |
*
|
10 |
* Version: 1.3.4 (11/11/2010)
|
11 |
* Requires: jQuery v1.3+
|
12 |
*
|
13 |
* Dual licensed under the MIT and GPL licenses:
|
14 |
* http://www.opensource.org/licenses/mit-license.php
|
15 |
* http://www.gnu.org/licenses/gpl.html
|
16 |
*/
|
|
|
0 |
* FancyBox - jQuery Plugin
|
1 |
* Simple and fancy lightbox alternative
|
2 |
*
|
3 |
* Examples and documentation at: http://fancybox.net
|
4 |
*
|
5 |
* Copyright (c) 2008 - 2010 Janis Skarnelis
|
6 |
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
|
7 |
*
|
8 |
* Version: 1.3.4 (11/11/2010)
|
9 |
* Requires: jQuery v1.3+
|
10 |
*
|
11 |
* Dual licensed under the MIT and GPL licenses:
|
12 |
* http://www.opensource.org/licenses/mit-license.php
|
13 |
* http://www.gnu.org/licenses/gpl.html
|
14 |
*/
|
admin/js/jquery.quicksearch.js
DELETED
@@ -1,180 +0,0 @@
|
|
1 |
-
(function ($, window, document, undefined) {
|
2 |
-
$.fn.quicksearch = function (target, opt) {
|
3 |
-
|
4 |
-
var timeout, cache, rowcache, jq_results, val = '', e = this, options = $.extend({
|
5 |
-
delay : 100,
|
6 |
-
selector : null,
|
7 |
-
stripeRows : null,
|
8 |
-
loader : null,
|
9 |
-
noResults : '',
|
10 |
-
matchedResultsCount: 0,
|
11 |
-
bind : 'keyup',
|
12 |
-
onBefore : function () {
|
13 |
-
return;
|
14 |
-
},
|
15 |
-
onAfter : function () {
|
16 |
-
return;
|
17 |
-
},
|
18 |
-
show : function () {
|
19 |
-
this.style.display = "";
|
20 |
-
},
|
21 |
-
hide : function () {
|
22 |
-
this.style.display = "none";
|
23 |
-
},
|
24 |
-
prepareQuery : function (val) {
|
25 |
-
return val.toLowerCase().split(' ');
|
26 |
-
},
|
27 |
-
testQuery : function (query, txt, _row) {
|
28 |
-
for (var i = 0; i < query.length; i += 1) {
|
29 |
-
if (txt.indexOf(query[i]) === -1) {
|
30 |
-
return false;
|
31 |
-
}
|
32 |
-
}
|
33 |
-
return true;
|
34 |
-
}
|
35 |
-
}, opt);
|
36 |
-
|
37 |
-
this.go = function () {
|
38 |
-
|
39 |
-
var i = 0,
|
40 |
-
numMatchedRows = 0,
|
41 |
-
noresults = true,
|
42 |
-
query = options.prepareQuery(val),
|
43 |
-
val_empty = (val.replace(' ', '').length === 0);
|
44 |
-
|
45 |
-
for (var i = 0, len = rowcache.length; i < len; i++) {
|
46 |
-
if (val_empty || options.testQuery(query, cache[i], rowcache[i])) {
|
47 |
-
options.show.apply(rowcache[i]);
|
48 |
-
noresults = false;
|
49 |
-
numMatchedRows++;
|
50 |
-
} else {
|
51 |
-
options.hide.apply(rowcache[i]);
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
if (noresults) {
|
56 |
-
this.results(false);
|
57 |
-
} else {
|
58 |
-
this.results(true);
|
59 |
-
this.stripe();
|
60 |
-
}
|
61 |
-
|
62 |
-
this.matchedResultsCount = numMatchedRows;
|
63 |
-
this.loader(false);
|
64 |
-
options.onAfter();
|
65 |
-
|
66 |
-
return this;
|
67 |
-
};
|
68 |
-
|
69 |
-
/*
|
70 |
-
* External API so that users can perform search programatically.
|
71 |
-
* */
|
72 |
-
this.search = function (submittedVal) {
|
73 |
-
val = submittedVal;
|
74 |
-
e.trigger();
|
75 |
-
};
|
76 |
-
|
77 |
-
/*
|
78 |
-
* External API to get the number of matched results as seen in
|
79 |
-
* https://github.com/ruiz107/quicksearch/commit/f78dc440b42d95ce9caed1d087174dd4359982d6
|
80 |
-
* */
|
81 |
-
this.currentMatchedResults = function () {
|
82 |
-
return this.matchedResultsCount;
|
83 |
-
};
|
84 |
-
|
85 |
-
this.stripe = function () {
|
86 |
-
|
87 |
-
if (typeof options.stripeRows === "object" && options.stripeRows !== null) {
|
88 |
-
var joined = options.stripeRows.join(' ');
|
89 |
-
var stripeRows_length = options.stripeRows.length;
|
90 |
-
|
91 |
-
jq_results.not(':hidden').each(function (i) {
|
92 |
-
$(this).removeClass(joined).addClass(options.stripeRows[i % stripeRows_length]);
|
93 |
-
});
|
94 |
-
}
|
95 |
-
|
96 |
-
return this;
|
97 |
-
};
|
98 |
-
|
99 |
-
this.strip_html = function (input) {
|
100 |
-
var output = input.replace(new RegExp('<[^<]+\>', 'g'), "");
|
101 |
-
output = $.trim(output.toLowerCase());
|
102 |
-
return output;
|
103 |
-
};
|
104 |
-
|
105 |
-
this.results = function (bool) {
|
106 |
-
if (typeof options.noResults === "string" && options.noResults !== "") {
|
107 |
-
if (bool) {
|
108 |
-
$(options.noResults).hide();
|
109 |
-
} else {
|
110 |
-
$(options.noResults).show();
|
111 |
-
}
|
112 |
-
}
|
113 |
-
return this;
|
114 |
-
};
|
115 |
-
|
116 |
-
this.loader = function (bool) {
|
117 |
-
if (typeof options.loader === "string" && options.loader !== "") {
|
118 |
-
(bool) ? $(options.loader).show() : $(options.loader).hide();
|
119 |
-
}
|
120 |
-
return this;
|
121 |
-
};
|
122 |
-
|
123 |
-
this.cache = function () {
|
124 |
-
|
125 |
-
jq_results = $(target);
|
126 |
-
|
127 |
-
if (typeof options.noResults === "string" && options.noResults !== "") {
|
128 |
-
jq_results = jq_results.not(options.noResults);
|
129 |
-
}
|
130 |
-
|
131 |
-
var t = (typeof options.selector === "string") ? jq_results.find(options.selector) : $(target).not(options.noResults);
|
132 |
-
cache = t.map(function () {
|
133 |
-
return e.strip_html(this.innerHTML);
|
134 |
-
});
|
135 |
-
|
136 |
-
rowcache = jq_results.map(function () {
|
137 |
-
return this;
|
138 |
-
});
|
139 |
-
|
140 |
-
/*
|
141 |
-
* Modified fix for sync-ing "val".
|
142 |
-
* Original fix https://github.com/michaellwest/quicksearch/commit/4ace4008d079298a01f97f885ba8fa956a9703d1
|
143 |
-
* */
|
144 |
-
val = val || this.val() || "";
|
145 |
-
|
146 |
-
return this.go();
|
147 |
-
};
|
148 |
-
|
149 |
-
this.trigger = function () {
|
150 |
-
this.loader(true);
|
151 |
-
options.onBefore();
|
152 |
-
|
153 |
-
window.clearTimeout(timeout);
|
154 |
-
timeout = window.setTimeout(function () {
|
155 |
-
e.go();
|
156 |
-
}, options.delay);
|
157 |
-
|
158 |
-
return this;
|
159 |
-
};
|
160 |
-
|
161 |
-
this.cache();
|
162 |
-
this.results(true);
|
163 |
-
this.stripe();
|
164 |
-
this.loader(false);
|
165 |
-
|
166 |
-
return this.each(function () {
|
167 |
-
|
168 |
-
/*
|
169 |
-
* Changed from .bind to .on.
|
170 |
-
* */
|
171 |
-
$(this).on(options.bind, function () {
|
172 |
-
|
173 |
-
val = $(this).val();
|
174 |
-
e.trigger();
|
175 |
-
});
|
176 |
-
});
|
177 |
-
|
178 |
-
};
|
179 |
-
|
180 |
-
}(jQuery, this, document));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/jquery.quicksearch_.js
DELETED
@@ -1,164 +0,0 @@
|
|
1 |
-
(function ($, window, document, undefined) {
|
2 |
-
$.fn.quicksearch = function (target, opt) {
|
3 |
-
|
4 |
-
var timeout, cache, rowcache, jq_results, val = '', e = this, options = $.extend({
|
5 |
-
delay : 100,
|
6 |
-
selector : null,
|
7 |
-
stripeRows : null,
|
8 |
-
loader : null,
|
9 |
-
noResults : '',
|
10 |
-
bind : 'keyup',
|
11 |
-
onBind : function (inp) {
|
12 |
-
return;
|
13 |
-
},
|
14 |
-
onBefore : function () {
|
15 |
-
return;
|
16 |
-
},
|
17 |
-
onAfter : function () {
|
18 |
-
return;
|
19 |
-
},
|
20 |
-
show : function () {
|
21 |
-
this.style.display = "";
|
22 |
-
},
|
23 |
-
hide : function () {
|
24 |
-
this.style.display = "none";
|
25 |
-
},
|
26 |
-
prepareQuery: function (val) {
|
27 |
-
return val.toLowerCase().split(' ');
|
28 |
-
},
|
29 |
-
testQuery : function (query, txt, _row) {
|
30 |
-
for (var i = 0; i < query.length; i += 1) {
|
31 |
-
if (txt.indexOf(query[i]) === -1) {
|
32 |
-
return false;
|
33 |
-
}
|
34 |
-
}
|
35 |
-
return true;
|
36 |
-
}
|
37 |
-
}, opt);
|
38 |
-
|
39 |
-
this.go = function () {
|
40 |
-
|
41 |
-
var i = 0,
|
42 |
-
noresults = true,
|
43 |
-
query = options.prepareQuery(val),
|
44 |
-
val_empty = (val.replace(' ', '').length === 0);
|
45 |
-
|
46 |
-
for (var i = 0, len = rowcache.length; i < len; i++) {
|
47 |
-
if (val_empty || options.testQuery(query, cache[i], rowcache[i])) {
|
48 |
-
options.show.apply(rowcache[i]);
|
49 |
-
noresults = false;
|
50 |
-
} else {
|
51 |
-
options.hide.apply(rowcache[i]);
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
if (noresults) {
|
56 |
-
this.results(false);
|
57 |
-
} else {
|
58 |
-
this.results(true);
|
59 |
-
this.stripe();
|
60 |
-
}
|
61 |
-
|
62 |
-
this.loader(false);
|
63 |
-
options.onAfter();
|
64 |
-
|
65 |
-
return this;
|
66 |
-
};
|
67 |
-
|
68 |
-
this.stripe = function () {
|
69 |
-
|
70 |
-
if (typeof options.stripeRows === "object" && options.stripeRows !== null) {
|
71 |
-
var joined = options.stripeRows.join(' ');
|
72 |
-
var stripeRows_length = options.stripeRows.length;
|
73 |
-
|
74 |
-
jq_results.not(':hidden').each(function (i) {
|
75 |
-
$(this).removeClass(joined).addClass(options.stripeRows[i % stripeRows_length]);
|
76 |
-
});
|
77 |
-
}
|
78 |
-
|
79 |
-
return this;
|
80 |
-
};
|
81 |
-
|
82 |
-
this.strip_html = function (input) {
|
83 |
-
var output = input.replace(new RegExp('<[^<]+\>', 'g'), "");
|
84 |
-
output = $.trim(output.toLowerCase());
|
85 |
-
return output;
|
86 |
-
};
|
87 |
-
|
88 |
-
this.results = function (bool) {
|
89 |
-
if (typeof options.noResults === "string" && options.noResults !== "") {
|
90 |
-
if (bool) {
|
91 |
-
$(options.noResults).hide();
|
92 |
-
} else {
|
93 |
-
$(options.noResults).show();
|
94 |
-
}
|
95 |
-
}
|
96 |
-
return this;
|
97 |
-
};
|
98 |
-
|
99 |
-
this.loader = function (bool) {
|
100 |
-
if (typeof options.loader === "string" && options.loader !== "") {
|
101 |
-
(bool) ? $(options.loader).show() : $(options.loader).hide();
|
102 |
-
}
|
103 |
-
return this;
|
104 |
-
};
|
105 |
-
|
106 |
-
this.cache = function () {
|
107 |
-
if ($(this).attr('rel')) {
|
108 |
-
target = '#' + $(this).attr('rel') + ' ' + target;
|
109 |
-
}
|
110 |
-
jq_results = $(target);
|
111 |
-
|
112 |
-
if (typeof options.noResults === "string" && options.noResults !== "") {
|
113 |
-
jq_results = jq_results.not(options.noResults);
|
114 |
-
}
|
115 |
-
|
116 |
-
var t = (typeof options.selector === "string") ? jq_results.find(options.selector) : $(target).not(options.noResults);
|
117 |
-
cache = t.map(function () {
|
118 |
-
return e.strip_html(this.innerHTML);
|
119 |
-
});
|
120 |
-
|
121 |
-
rowcache = jq_results.map(function () {
|
122 |
-
return this;
|
123 |
-
});
|
124 |
-
|
125 |
-
return this.go();
|
126 |
-
};
|
127 |
-
|
128 |
-
this.trigger = function (el) {
|
129 |
-
this.loader(true);
|
130 |
-
options.onBefore();
|
131 |
-
|
132 |
-
window.clearTimeout(timeout);
|
133 |
-
timeout = window.setTimeout(function () {
|
134 |
-
e.go();
|
135 |
-
options.onBind(el);
|
136 |
-
}, options.delay);
|
137 |
-
|
138 |
-
|
139 |
-
return this;
|
140 |
-
};
|
141 |
-
|
142 |
-
this.cache();
|
143 |
-
this.results(true);
|
144 |
-
this.stripe();
|
145 |
-
this.loader(false);
|
146 |
-
|
147 |
-
return this.each(function () {
|
148 |
-
$(this).bind(options.bind, function (event) {
|
149 |
-
if (options.bind == 'keypress') {
|
150 |
-
if (event.keyCode == 13) {
|
151 |
-
val = $(this).val();
|
152 |
-
//acts = $(this).parents('div.MediaLibActions:first');
|
153 |
-
e.trigger($(this));
|
154 |
-
}
|
155 |
-
} else {
|
156 |
-
val = $(this).val();
|
157 |
-
e.trigger();
|
158 |
-
}
|
159 |
-
});
|
160 |
-
});
|
161 |
-
|
162 |
-
};
|
163 |
-
|
164 |
-
}(jQuery, this, document));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/jscolor/arrow.gif
DELETED
Binary file
|
admin/js/jscolor/cross.gif
DELETED
Binary file
|
admin/js/jscolor/hs.png
DELETED
Binary file
|
admin/js/jscolor/hv.png
DELETED
Binary file
|
admin/js/jscolor/jscolor.js
DELETED
@@ -1,1078 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* jscolor, JavaScript Color Picker
|
3 |
-
*
|
4 |
-
* @version 1.4.0
|
5 |
-
* @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
|
6 |
-
* @author Jan Odvarko, http://odvarko.cz
|
7 |
-
* @created 2008-06-15
|
8 |
-
* @updated 2012-07-06
|
9 |
-
* @link http://jscolor.com
|
10 |
-
*/
|
11 |
-
|
12 |
-
|
13 |
-
var jscolor = {
|
14 |
-
|
15 |
-
|
16 |
-
dir : gMediaGlobalVar.pluginPath + '/admin/js/jscolor/', // location of jscolor directory (leave empty to autodetect)
|
17 |
-
bindClass : 'color', // class name
|
18 |
-
binding : true, // automatic binding via <input class="...">
|
19 |
-
preloading: true, // use image preloading?
|
20 |
-
|
21 |
-
|
22 |
-
install: function () {
|
23 |
-
jscolor.addEvent(window, 'load', jscolor.init);
|
24 |
-
},
|
25 |
-
|
26 |
-
|
27 |
-
init: function () {
|
28 |
-
if (jscolor.binding) {
|
29 |
-
jscolor.bind();
|
30 |
-
}
|
31 |
-
if (jscolor.preloading) {
|
32 |
-
jscolor.preload();
|
33 |
-
}
|
34 |
-
},
|
35 |
-
|
36 |
-
|
37 |
-
getDir: function () {
|
38 |
-
if (!jscolor.dir) {
|
39 |
-
var detected = jscolor.detectDir();
|
40 |
-
jscolor.dir = detected !== false ? detected : 'jscolor/';
|
41 |
-
}
|
42 |
-
return jscolor.dir;
|
43 |
-
},
|
44 |
-
|
45 |
-
|
46 |
-
detectDir: function () {
|
47 |
-
var base = location.href;
|
48 |
-
|
49 |
-
var e = document.getElementsByTagName('base');
|
50 |
-
for (var i = 0; i < e.length; i += 1) {
|
51 |
-
if (e[i].href) {
|
52 |
-
base = e[i].href;
|
53 |
-
}
|
54 |
-
}
|
55 |
-
|
56 |
-
var e = document.getElementsByTagName('script');
|
57 |
-
for (var i = 0; i < e.length; i += 1) {
|
58 |
-
if (e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) {
|
59 |
-
var src = new jscolor.URI(e[i].src);
|
60 |
-
var srcAbs = src.toAbsolute(base);
|
61 |
-
srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename
|
62 |
-
srcAbs.query = null;
|
63 |
-
srcAbs.fragment = null;
|
64 |
-
return srcAbs.toString();
|
65 |
-
}
|
66 |
-
}
|
67 |
-
return false;
|
68 |
-
},
|
69 |
-
|
70 |
-
|
71 |
-
bind: function () {
|
72 |
-
var matchClass = new RegExp('(^|\\s)(' + jscolor.bindClass + ')\\s*(\\{[^}]*\\})?', 'i');
|
73 |
-
var e = document.getElementsByTagName('input');
|
74 |
-
for (var i = 0; i < e.length; i += 1) {
|
75 |
-
var m;
|
76 |
-
if (!e[i].color && e[i].className && (m = e[i].className.match(matchClass))) {
|
77 |
-
var prop = {};
|
78 |
-
if (m[3]) {
|
79 |
-
try {
|
80 |
-
prop = (new Function('return (' + m[3] + ')'))();
|
81 |
-
} catch (eInvalidProp) {
|
82 |
-
}
|
83 |
-
}
|
84 |
-
e[i].color = new jscolor.color(e[i], prop);
|
85 |
-
}
|
86 |
-
}
|
87 |
-
},
|
88 |
-
|
89 |
-
|
90 |
-
preload: function () {
|
91 |
-
for (var fn in jscolor.imgRequire) {
|
92 |
-
if (jscolor.imgRequire.hasOwnProperty(fn)) {
|
93 |
-
jscolor.loadImage(fn);
|
94 |
-
}
|
95 |
-
}
|
96 |
-
},
|
97 |
-
|
98 |
-
|
99 |
-
images: {
|
100 |
-
pad : [ 181, 101 ],
|
101 |
-
sld : [ 16, 101 ],
|
102 |
-
cross: [ 15, 15 ],
|
103 |
-
arrow: [ 7, 11 ]
|
104 |
-
},
|
105 |
-
|
106 |
-
|
107 |
-
imgRequire: {},
|
108 |
-
imgLoaded : {},
|
109 |
-
|
110 |
-
|
111 |
-
requireImage: function (filename) {
|
112 |
-
jscolor.imgRequire[filename] = true;
|
113 |
-
},
|
114 |
-
|
115 |
-
|
116 |
-
loadImage: function (filename) {
|
117 |
-
if (!jscolor.imgLoaded[filename]) {
|
118 |
-
jscolor.imgLoaded[filename] = new Image();
|
119 |
-
jscolor.imgLoaded[filename].src = jscolor.getDir() + filename;
|
120 |
-
}
|
121 |
-
},
|
122 |
-
|
123 |
-
|
124 |
-
fetchElement: function (mixed) {
|
125 |
-
return typeof mixed === 'string' ? document.getElementById(mixed) : mixed;
|
126 |
-
},
|
127 |
-
|
128 |
-
|
129 |
-
addEvent: function (el, evnt, func) {
|
130 |
-
if (el.addEventListener) {
|
131 |
-
el.addEventListener(evnt, func, false);
|
132 |
-
} else if (el.attachEvent) {
|
133 |
-
el.attachEvent('on' + evnt, func);
|
134 |
-
}
|
135 |
-
},
|
136 |
-
|
137 |
-
|
138 |
-
fireEvent: function (el, evnt) {
|
139 |
-
if (!el) {
|
140 |
-
return;
|
141 |
-
}
|
142 |
-
if (document.createEvent) {
|
143 |
-
var ev = document.createEvent('HTMLEvents');
|
144 |
-
ev.initEvent(evnt, true, true);
|
145 |
-
el.dispatchEvent(ev);
|
146 |
-
} else if (document.createEventObject) {
|
147 |
-
var ev = document.createEventObject();
|
148 |
-
el.fireEvent('on' + evnt, ev);
|
149 |
-
} else if (el['on' + evnt]) { // alternatively use the traditional event model (IE5)
|
150 |
-
el['on' + evnt]();
|
151 |
-
}
|
152 |
-
},
|
153 |
-
|
154 |
-
|
155 |
-
getElementPos: function (e) {
|
156 |
-
var e1 = e, e2 = e;
|
157 |
-
var x = 0, y = 0;
|
158 |
-
if (e1.offsetParent) {
|
159 |
-
do {
|
160 |
-
x += e1.offsetLeft;
|
161 |
-
y += e1.offsetTop;
|
162 |
-
} while (e1 = e1.offsetParent);
|
163 |
-
}
|
164 |
-
while ((e2 = e2.parentNode) && e2.nodeName.toUpperCase() !== 'BODY') {
|
165 |
-
x -= e2.scrollLeft;
|
166 |
-
y -= e2.scrollTop;
|
167 |
-
}
|
168 |
-
return [x, y];
|
169 |
-
},
|
170 |
-
|
171 |
-
|
172 |
-
getElementSize: function (e) {
|
173 |
-
return [e.offsetWidth, e.offsetHeight];
|
174 |
-
},
|
175 |
-
|
176 |
-
|
177 |
-
getRelMousePos: function (e) {
|
178 |
-
var x = 0, y = 0;
|
179 |
-
if (!e) {
|
180 |
-
e = window.event;
|
181 |
-
}
|
182 |
-
if (typeof e.offsetX === 'number') {
|
183 |
-
x = e.offsetX;
|
184 |
-
y = e.offsetY;
|
185 |
-
} else if (typeof e.layerX === 'number') {
|
186 |
-
x = e.layerX;
|
187 |
-
y = e.layerY;
|
188 |
-
}
|
189 |
-
return { x: x, y: y };
|
190 |
-
},
|
191 |
-
|
192 |
-
|
193 |
-
getViewPos: function () {
|
194 |
-
if (typeof window.pageYOffset === 'number') {
|
195 |
-
return [window.pageXOffset, window.pageYOffset];
|
196 |
-
} else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) {
|
197 |
-
return [document.body.scrollLeft, document.body.scrollTop];
|
198 |
-
} else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
|
199 |
-
return [document.documentElement.scrollLeft, document.documentElement.scrollTop];
|
200 |
-
} else {
|
201 |
-
return [0, 0];
|
202 |
-
}
|
203 |
-
},
|
204 |
-
|
205 |
-
|
206 |
-
getViewSize: function () {
|
207 |
-
if (typeof window.innerWidth === 'number') {
|
208 |
-
return [window.innerWidth, window.innerHeight];
|
209 |
-
} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
|
210 |
-
return [document.body.clientWidth, document.body.clientHeight];
|
211 |
-
} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
|
212 |
-
return [document.documentElement.clientWidth, document.documentElement.clientHeight];
|
213 |
-
} else {
|
214 |
-
return [0, 0];
|
215 |
-
}
|
216 |
-
},
|
217 |
-
|
218 |
-
|
219 |
-
URI: function (uri) { // See RFC3986
|
220 |
-
|
221 |
-
this.scheme = null;
|
222 |
-
this.authority = null;
|
223 |
-
this.path = '';
|
224 |
-
this.query = null;
|
225 |
-
this.fragment = null;
|
226 |
-
|
227 |
-
this.parse = function (uri) {
|
228 |
-
var m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);
|
229 |
-
this.scheme = m[3] ? m[2] : null;
|
230 |
-
this.authority = m[5] ? m[6] : null;
|
231 |
-
this.path = m[7];
|
232 |
-
this.query = m[9] ? m[10] : null;
|
233 |
-
this.fragment = m[12] ? m[13] : null;
|
234 |
-
return this;
|
235 |
-
};
|
236 |
-
|
237 |
-
this.toString = function () {
|
238 |
-
var result = '';
|
239 |
-
if (this.scheme !== null) {
|
240 |
-
result = result + this.scheme + ':';
|
241 |
-
}
|
242 |
-
if (this.authority !== null) {
|
243 |
-
result = result + '//' + this.authority;
|
244 |
-
}
|
245 |
-
if (this.path !== null) {
|
246 |
-
result = result + this.path;
|
247 |
-
}
|
248 |
-
if (this.query !== null) {
|
249 |
-
result = result + '?' + this.query;
|
250 |
-
}
|
251 |
-
if (this.fragment !== null) {
|
252 |
-
result = result + '#' + this.fragment;
|
253 |
-
}
|
254 |
-
return result;
|
255 |
-
};
|
256 |
-
|
257 |
-
this.toAbsolute = function (base) {
|
258 |
-
var base = new jscolor.URI(base);
|
259 |
-
var r = this;
|
260 |
-
var t = new jscolor.URI;
|
261 |
-
|
262 |
-
if (base.scheme === null) {
|
263 |
-
return false;
|
264 |
-
}
|
265 |
-
|
266 |
-
if (r.scheme !== null && r.scheme.toLowerCase() === base.scheme.toLowerCase()) {
|
267 |
-
r.scheme = null;
|
268 |
-
}
|
269 |
-
|
270 |
-
if (r.scheme !== null) {
|
271 |
-
t.scheme = r.scheme;
|
272 |
-
t.authority = r.authority;
|
273 |
-
t.path = removeDotSegments(r.path);
|
274 |
-
t.query = r.query;
|
275 |
-
} else {
|
276 |
-
if (r.authority !== null) {
|
277 |
-
t.authority = r.authority;
|
278 |
-
t.path = removeDotSegments(r.path);
|
279 |
-
t.query = r.query;
|
280 |
-
} else {
|
281 |
-
if (r.path === '') {
|
282 |
-
t.path = base.path;
|
283 |
-
if (r.query !== null) {
|
284 |
-
t.query = r.query;
|
285 |
-
} else {
|
286 |
-
t.query = base.query;
|
287 |
-
}
|
288 |
-
} else {
|
289 |
-
if (r.path.substr(0, 1) === '/') {
|
290 |
-
t.path = removeDotSegments(r.path);
|
291 |
-
} else {
|
292 |
-
if (base.authority !== null && base.path === '') {
|
293 |
-
t.path = '/' + r.path;
|
294 |
-
} else {
|
295 |
-
t.path = base.path.replace(/[^\/]+$/, '') + r.path;
|
296 |
-
}
|
297 |
-
t.path = removeDotSegments(t.path);
|
298 |
-
}
|
299 |
-
t.query = r.query;
|
300 |
-
}
|
301 |
-
t.authority = base.authority;
|
302 |
-
}
|
303 |
-
t.scheme = base.scheme;
|
304 |
-
}
|
305 |
-
t.fragment = r.fragment;
|
306 |
-
|
307 |
-
return t;
|
308 |
-
};
|
309 |
-
|
310 |
-
function removeDotSegments(path) {
|
311 |
-
var out = '';
|
312 |
-
while (path) {
|
313 |
-
if (path.substr(0, 3) === '../' || path.substr(0, 2) === './') {
|
314 |
-
path = path.replace(/^\.+/, '').substr(1);
|
315 |
-
} else if (path.substr(0, 3) === '/./' || path === '/.') {
|
316 |
-
path = '/' + path.substr(3);
|
317 |
-
} else if (path.substr(0, 4) === '/../' || path === '/..') {
|
318 |
-
path = '/' + path.substr(4);
|
319 |
-
out = out.replace(/\/?[^\/]*$/, '');
|
320 |
-
} else if (path === '.' || path === '..') {
|
321 |
-
path = '';
|
322 |
-
} else {
|
323 |
-
var rm = path.match(/^\/?[^\/]*/)[0];
|
324 |
-
path = path.substr(rm.length);
|
325 |
-
out = out + rm;
|
326 |
-
}
|
327 |
-
}
|
328 |
-
return out;
|
329 |
-
}
|
330 |
-
|
331 |
-
if (uri) {
|
332 |
-
this.parse(uri);
|
333 |
-
}
|
334 |
-
|
335 |
-
},
|
336 |
-
|
337 |
-
|
338 |
-
/*
|
339 |
-
* Usage example:
|
340 |
-
* var myColor = new jscolor.color(myInputElement)
|
341 |
-
*/
|
342 |
-
|
343 |
-
color: function (target, prop) {
|
344 |
-
|
345 |
-
|
346 |
-
this.required = true; // refuse empty values?
|
347 |
-
this.adjust = true; // adjust value to uniform notation?
|
348 |
-
this.hash = false; // prefix color with # symbol?
|
349 |
-
this.caps = true; // uppercase?
|
350 |
-
this.slider = true; // show the value/saturation slider?
|
351 |
-
this.valueElement = target; // value holder
|
352 |
-
this.styleElement = target; // where to reflect current color
|
353 |
-
this.onImmediateChange = null; // onchange callback (can be either string or function)
|
354 |
-
this.hsv = [0, 0, 1]; // read-only 0-6, 0-1, 0-1
|
355 |
-
this.rgb = [1, 1, 1]; // read-only 0-1, 0-1, 0-1
|
356 |
-
this.minH = 0; // read-only 0-6
|
357 |
-
this.maxH = 6; // read-only 0-6
|
358 |
-
this.minS = 0; // read-only 0-1
|
359 |
-
this.maxS = 1; // read-only 0-1
|
360 |
-
this.minV = 0; // read-only 0-1
|
361 |
-
this.maxV = 1; // read-only 0-1
|
362 |
-
|
363 |
-
this.pickerOnfocus = true; // display picker on focus?
|
364 |
-
this.pickerMode = 'HSV'; // HSV | HVS
|
365 |
-
this.pickerPosition = 'bottom'; // left | right | top | bottom
|
366 |
-
this.pickerSmartPosition = true; // automatically adjust picker position when necessary
|
367 |
-
this.pickerButtonHeight = 20; // px
|
368 |
-
this.pickerClosable = false;
|
369 |
-
this.pickerCloseText = 'Close';
|
370 |
-
this.pickerButtonColor = 'ButtonText'; // px
|
371 |
-
this.pickerFace = 10; // px
|
372 |
-
this.pickerFaceColor = 'ThreeDFace'; // CSS color
|
373 |
-
this.pickerBorder = 1; // px
|
374 |
-
this.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight'; // CSS color
|
375 |
-
this.pickerInset = 1; // px
|
376 |
-
this.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow'; // CSS color
|
377 |
-
this.pickerZIndex = 10000;
|
378 |
-
|
379 |
-
|
380 |
-
for (var p in prop) {
|
381 |
-
if (prop.hasOwnProperty(p)) {
|
382 |
-
this[p] = prop[p];
|
383 |
-
}
|
384 |
-
}
|
385 |
-
|
386 |
-
|
387 |
-
this.hidePicker = function () {
|
388 |
-
if (isPickerOwner()) {
|
389 |
-
removePicker();
|
390 |
-
}
|
391 |
-
};
|
392 |
-
|
393 |
-
|
394 |
-
this.showPicker = function () {
|
395 |
-
if (!isPickerOwner()) {
|
396 |
-
var tp = jscolor.getElementPos(target); // target pos
|
397 |
-
var ts = jscolor.getElementSize(target); // target size
|
398 |
-
var vp = jscolor.getViewPos(); // view pos
|
399 |
-
var vs = jscolor.getViewSize(); // view size
|
400 |
-
var ps = getPickerDims(this); // picker size
|
401 |
-
var a, b, c;
|
402 |
-
switch (this.pickerPosition.toLowerCase()) {
|
403 |
-
case 'left':
|
404 |
-
a = 1;
|
405 |
-
b = 0;
|
406 |
-
c = -1;
|
407 |
-
break;
|
408 |
-
case 'right':
|
409 |
-
a = 1;
|
410 |
-
b = 0;
|
411 |
-
c = 1;
|
412 |
-
break;
|
413 |
-
case 'top':
|
414 |
-
a = 0;
|
415 |
-
b = 1;
|
416 |
-
c = -1;
|
417 |
-
break;
|
418 |
-
default:
|
419 |
-
a = 0;
|
420 |
-
b = 1;
|
421 |
-
c = 1;
|
422 |
-
break;
|
423 |
-
}
|
424 |
-
var l = (ts[b] + ps[b]) / 2;
|
425 |
-
|
426 |
-
// picker pos
|
427 |
-
if (!this.pickerSmartPosition) {
|
428 |
-
var pp = [
|
429 |
-
tp[a] + ts[a] - ps[a],
|
430 |
-
tp[b] + ts[b] - l + l * c
|
431 |
-
];
|
432 |
-
} else {
|
433 |
-
var pp = [
|
434 |
-
-vp[a] + tp[a] + ps[a] > vs[a] ?
|
435 |
-
(-vp[a] + tp[a] + ts[a] / 2 > vs[a] / 2 && tp[a] + ts[a] - ps[a] >= 0 ? tp[a] + ts[a] - ps[a] : (ts[a] - ps[a] > 0 ? tp[a] + ts[a] - ps[a] : tp[a])) :
|
436 |
-
(ts[a] - ps[a] > 0 ? tp[a] + ts[a] - ps[a] : tp[a]),
|
437 |
-
-vp[b] + tp[b] + ts[b] + ps[b] - l + l * c > vs[b] ?
|
438 |
-
(-vp[b] + tp[b] + ts[b] / 2 > vs[b] / 2 && tp[b] + ts[b] - l - l * c >= 0 ? tp[b] + ts[b] - l - l * c : tp[b] + ts[b] - l + l * c) :
|
439 |
-
(tp[b] + ts[b] - l + l * c >= 0 ? tp[b] + ts[b] - l + l * c : tp[b] + ts[b] - l - l * c)
|
440 |
-
];
|
441 |
-
}
|
442 |
-
drawPicker(pp[a], pp[b]);
|
443 |
-
}
|
444 |
-
};
|
445 |
-
|
446 |
-
|
447 |
-
this.importColor = function () {
|
448 |
-
if (!valueElement) {
|
449 |
-
this.exportColor();
|
450 |
-
} else {
|
451 |
-
if (!this.adjust) {
|
452 |
-
if (!this.fromString(valueElement.value, leaveValue)) {
|
453 |
-
styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
|
454 |
-
styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
|
455 |
-
styleElement.style.color = styleElement.jscStyle.color;
|
456 |
-
this.exportColor(leaveValue | leaveStyle);
|
457 |
-
}
|
458 |
-
} else if (!this.required && /^\s*$/.test(valueElement.value)) {
|
459 |
-
valueElement.value = '';
|
460 |
-
styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
|
461 |
-
styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
|
462 |
-
styleElement.style.color = styleElement.jscStyle.color;
|
463 |
-
this.exportColor(leaveValue | leaveStyle);
|
464 |
-
|
465 |
-
} else if (this.fromString(valueElement.value)) {
|
466 |
-
// OK
|
467 |
-
} else {
|
468 |
-
this.exportColor();
|
469 |
-
}
|
470 |
-
}
|
471 |
-
};
|
472 |
-
|
473 |
-
|
474 |
-
this.exportColor = function (flags) {
|
475 |
-
if (!(flags & leaveValue) && valueElement) {
|
476 |
-
var value = this.toString();
|
477 |
-
if (this.caps) {
|
478 |
-
value = value.toUpperCase();
|
479 |
-
}
|
480 |
-
if (this.hash) {
|
481 |
-
value = '#' + value;
|
482 |
-
}
|
483 |
-
valueElement.value = value;
|
484 |
-
}
|
485 |
-
if (!(flags & leaveStyle) && styleElement) {
|
486 |
-
styleElement.style.backgroundImage = "none";
|
487 |
-
styleElement.style.backgroundColor =
|
488 |
-
'#' + this.toString();
|
489 |
-
styleElement.style.color =
|
490 |
-
0.213 * this.rgb[0] +
|
491 |
-
0.715 * this.rgb[1] +
|
492 |
-
0.072 * this.rgb[2]
|
493 |
-
< 0.5 ? '#FFF' : '#000';
|
494 |
-
}
|
495 |
-
if (!(flags & leavePad) && isPickerOwner()) {
|
496 |
-
redrawPad();
|
497 |
-
}
|
498 |
-
if (!(flags & leaveSld) && isPickerOwner()) {
|
499 |
-
redrawSld();
|
500 |
-
}
|
501 |
-
};
|
502 |
-
|
503 |
-
|
504 |
-
this.fromHSV = function (h, s, v, flags) { // null = don't change
|
505 |
-
if (h !== null) {
|
506 |
-
h = Math.max(0.0, this.minH, Math.min(6.0, this.maxH, h));
|
507 |
-
}
|
508 |
-
if (s !== null) {
|
509 |
-
s = Math.max(0.0, this.minS, Math.min(1.0, this.maxS, s));
|
510 |
-
}
|
511 |
-
if (v !== null) {
|
512 |
-
v = Math.max(0.0, this.minV, Math.min(1.0, this.maxV, v));
|
513 |
-
}
|
514 |
-
|
515 |
-
this.rgb = HSV_RGB(
|
516 |
-
h === null ? this.hsv[0] : (this.hsv[0] = h),
|
517 |
-
s === null ? this.hsv[1] : (this.hsv[1] = s),
|
518 |
-
v === null ? this.hsv[2] : (this.hsv[2] = v)
|
519 |
-
);
|
520 |
-
|
521 |
-
this.exportColor(flags);
|
522 |
-
};
|
523 |
-
|
524 |
-
|
525 |
-
this.fromRGB = function (r, g, b, flags) { // null = don't change
|
526 |
-
if (r !== null) {
|
527 |
-
r = Math.max(0.0, Math.min(1.0, r));
|
528 |
-
}
|
529 |
-
if (g !== null) {
|
530 |
-
g = Math.max(0.0, Math.min(1.0, g));
|
531 |
-
}
|
532 |
-
if (b !== null) {
|
533 |
-
b = Math.max(0.0, Math.min(1.0, b));
|
534 |
-
}
|
535 |
-
|
536 |
-
var hsv = RGB_HSV(
|
537 |
-
r === null ? this.rgb[0] : r,
|
538 |
-
g === null ? this.rgb[1] : g,
|
539 |
-
b === null ? this.rgb[2] : b
|
540 |
-
);
|
541 |
-
if (hsv[0] !== null) {
|
542 |
-
this.hsv[0] = Math.max(0.0, this.minH, Math.min(6.0, this.maxH, hsv[0]));
|
543 |
-
}
|
544 |
-
if (hsv[2] !== 0) {
|
545 |
-
this.hsv[1] = hsv[1] === null ? null : Math.max(0.0, this.minS, Math.min(1.0, this.maxS, hsv[1]));
|
546 |
-
}
|
547 |
-
this.hsv[2] = hsv[2] === null ? null : Math.max(0.0, this.minV, Math.min(1.0, this.maxV, hsv[2]));
|
548 |
-
|
549 |
-
// update RGB according to final HSV, as some values might be trimmed
|
550 |
-
var rgb = HSV_RGB(this.hsv[0], this.hsv[1], this.hsv[2]);
|
551 |
-
this.rgb[0] = rgb[0];
|
552 |
-
this.rgb[1] = rgb[1];
|
553 |
-
this.rgb[2] = rgb[2];
|
554 |
-
|
555 |
-
this.exportColor(flags);
|
556 |
-
};
|
557 |
-
|
558 |
-
|
559 |
-
this.fromString = function (hex, flags) {
|
560 |
-
var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);
|
561 |
-
if (!m) {
|
562 |
-
return false;
|
563 |
-
} else {
|
564 |
-
if (m[1].length === 6) { // 6-char notation
|
565 |
-
this.fromRGB(
|
566 |
-
parseInt(m[1].substr(0, 2), 16) / 255,
|
567 |
-
parseInt(m[1].substr(2, 2), 16) / 255,
|
568 |
-
parseInt(m[1].substr(4, 2), 16) / 255,
|
569 |
-
flags
|
570 |
-
);
|
571 |
-
} else { // 3-char notation
|
572 |
-
this.fromRGB(
|
573 |
-
parseInt(m[1].charAt(0) + m[1].charAt(0), 16) / 255,
|
574 |
-
parseInt(m[1].charAt(1) + m[1].charAt(1), 16) / 255,
|
575 |
-
parseInt(m[1].charAt(2) + m[1].charAt(2), 16) / 255,
|
576 |
-
flags
|
577 |
-
);
|
578 |
-
}
|
579 |
-
return true;
|
580 |
-
}
|
581 |
-
};
|
582 |
-
|
583 |
-
|
584 |
-
this.toString = function () {
|
585 |
-
return (
|
586 |
-
(0x100 | Math.round(255 * this.rgb[0])).toString(16).substr(1) +
|
587 |
-
(0x100 | Math.round(255 * this.rgb[1])).toString(16).substr(1) +
|
588 |
-
(0x100 | Math.round(255 * this.rgb[2])).toString(16).substr(1)
|
589 |
-
);
|
590 |
-
};
|
591 |
-
|
592 |
-
|
593 |
-
function RGB_HSV(r, g, b) {
|
594 |
-
var n = Math.min(Math.min(r, g), b);
|
595 |
-
var v = Math.max(Math.max(r, g), b);
|
596 |
-
var m = v - n;
|
597 |
-
if (m === 0) {
|
598 |
-
return [ null, 0, v ];
|
599 |
-
}
|
600 |
-
var h = r === n ? 3 + (b - g) / m : (g === n ? 5 + (r - b) / m : 1 + (g - r) / m);
|
601 |
-
return [ h === 6 ? 0 : h, m / v, v ];
|
602 |
-
}
|
603 |
-
|
604 |
-
|
605 |
-
function HSV_RGB(h, s, v) {
|
606 |
-
if (h === null) {
|
607 |
-
return [ v, v, v ];
|
608 |
-
}
|
609 |
-
var i = Math.floor(h);
|
610 |
-
var f = i % 2 ? h - i : 1 - (h - i);
|
611 |
-
var m = v * (1 - s);
|
612 |
-
var n = v * (1 - s * f);
|
613 |
-
switch (i) {
|
614 |
-
case 6:
|
615 |
-
case 0:
|
616 |
-
return [v, n, m];
|
617 |
-
case 1:
|
618 |
-
return [n, v, m];
|
619 |
-
case 2:
|
620 |
-
return [m, v, n];
|
621 |
-
case 3:
|
622 |
-
return [m, n, v];
|
623 |
-
case 4:
|
624 |
-
return [n, m, v];
|
625 |
-
case 5:
|
626 |
-
return [v, m, n];
|
627 |
-
}
|
628 |
-
}
|
629 |
-
|
630 |
-
|
631 |
-
function removePicker() {
|
632 |
-
delete jscolor.picker.owner;
|
633 |
-
document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB);
|
634 |
-
}
|
635 |
-
|
636 |
-
|
637 |
-
function drawPicker(x, y) {
|
638 |
-
if (!jscolor.picker) {
|
639 |
-
jscolor.picker = {
|
640 |
-
box : document.createElement('div'),
|
641 |
-
boxB: document.createElement('div'),
|
642 |
-
pad : document.createElement('div'),
|
643 |
-
padB: document.createElement('div'),
|
644 |
-
padM: document.createElement('div'),
|
645 |
-
sld : document.createElement('div'),
|
646 |
-
sldB: document.createElement('div'),
|
647 |
-
sldM: document.createElement('div'),
|
648 |
-
btn : document.createElement('div'),
|
649 |
-
btnS: document.createElement('span'),
|
650 |
-
btnT: document.createTextNode(THIS.pickerCloseText)
|
651 |
-
};
|
652 |
-
for (var i = 0, segSize = 4; i < jscolor.images.sld[1]; i += segSize) {
|
653 |
-
var seg = document.createElement('div');
|
654 |
-
seg.style.height = segSize + 'px';
|
655 |
-
seg.style.fontSize = '1px';
|
656 |
-
seg.style.lineHeight = '0';
|
657 |
-
jscolor.picker.sld.appendChild(seg);
|
658 |
-
}
|
659 |
-
jscolor.picker.sldB.appendChild(jscolor.picker.sld);
|
660 |
-
jscolor.picker.box.appendChild(jscolor.picker.sldB);
|
661 |
-
jscolor.picker.box.appendChild(jscolor.picker.sldM);
|
662 |
-
jscolor.picker.padB.appendChild(jscolor.picker.pad);
|
663 |
-
jscolor.picker.box.appendChild(jscolor.picker.padB);
|
664 |
-
jscolor.picker.box.appendChild(jscolor.picker.padM);
|
665 |
-
jscolor.picker.btnS.appendChild(jscolor.picker.btnT);
|
666 |
-
jscolor.picker.btn.appendChild(jscolor.picker.btnS);
|
667 |
-
jscolor.picker.box.appendChild(jscolor.picker.btn);
|
668 |
-
jscolor.picker.boxB.appendChild(jscolor.picker.box);
|
669 |
-
}
|
670 |
-
|
671 |
-
var p = jscolor.picker;
|
672 |
-
|
673 |
-
// controls interaction
|
674 |
-
p.box.onmouseup =
|
675 |
-
p.box.onmouseout = function () {
|
676 |
-
target.focus();
|
677 |
-
};
|
678 |
-
p.box.onmousedown = function () {
|
679 |
-
abortBlur = true;
|
680 |
-
};
|
681 |
-
p.box.onmousemove = function (e) {
|
682 |
-
if (holdPad || holdSld) {
|
683 |
-
holdPad && setPad(e);
|
684 |
-
holdSld && setSld(e);
|
685 |
-
if (document.selection) {
|
686 |
-
document.selection.empty();
|
687 |
-
} else if (window.getSelection) {
|
688 |
-
window.getSelection().removeAllRanges();
|
689 |
-
}
|
690 |
-
dispatchImmediateChange();
|
691 |
-
}
|
692 |
-
};
|
693 |
-
p.padM.onmouseup =
|
694 |
-
p.padM.onmouseout = function () {
|
695 |
-
if (holdPad) {
|
696 |
-
holdPad = false;
|
697 |
-
jscolor.fireEvent(valueElement, 'change');
|
698 |
-
}
|
699 |
-
};
|
700 |
-
p.padM.onmousedown = function (e) {
|
701 |
-
// if the slider is at the bottom, move it up
|
702 |
-
switch (modeID) {
|
703 |
-
case 0:
|
704 |
-
if (THIS.hsv[2] === 0) {
|
705 |
-
THIS.fromHSV(null, null, 1.0);
|
706 |
-
}
|
707 |
-
;
|
708 |
-
break;
|
709 |
-
case 1:
|
710 |
-
if (THIS.hsv[1] === 0) {
|
711 |
-
THIS.fromHSV(null, 1.0, null);
|
712 |
-
}
|
713 |
-
;
|
714 |
-
break;
|
715 |
-
}
|
716 |
-
holdPad = true;
|
717 |
-
setPad(e);
|
718 |
-
dispatchImmediateChange();
|
719 |
-
};
|
720 |
-
p.sldM.onmouseup =
|
721 |
-
p.sldM.onmouseout = function () {
|
722 |
-
if (holdSld) {
|
723 |
-
holdSld = false;
|
724 |
-
jscolor.fireEvent(valueElement, 'change');
|
725 |
-
}
|
726 |
-
};
|
727 |
-
p.sldM.onmousedown = function (e) {
|
728 |
-
holdSld = true;
|
729 |
-
setSld(e);
|
730 |
-
dispatchImmediateChange();
|
731 |
-
};
|
732 |
-
|
733 |
-
// picker
|
734 |
-
var dims = getPickerDims(THIS);
|
735 |
-
p.box.style.width = dims[0] + 'px';
|
736 |
-
p.box.style.height = dims[1] + 'px';
|
737 |
-
|
738 |
-
// picker border
|
739 |
-
p.boxB.style.position = 'absolute';
|
740 |
-
p.boxB.style.clear = 'both';
|
741 |
-
p.boxB.style.left = x + 'px';
|
742 |
-
p.boxB.style.top = y + 'px';
|
743 |
-
p.boxB.style.zIndex = THIS.pickerZIndex;
|
744 |
-
p.boxB.style.border = THIS.pickerBorder + 'px solid';
|
745 |
-
p.boxB.style.borderColor = THIS.pickerBorderColor;
|
746 |
-
p.boxB.style.background = THIS.pickerFaceColor;
|
747 |
-
|
748 |
-
// pad image
|
749 |
-
p.pad.style.width = jscolor.images.pad[0] + 'px';
|
750 |
-
p.pad.style.height = jscolor.images.pad[1] + 'px';
|
751 |
-
|
752 |
-
// pad border
|
753 |
-
p.padB.style.position = 'absolute';
|
754 |
-
p.padB.style.left = THIS.pickerFace + 'px';
|
755 |
-
p.padB.style.top = THIS.pickerFace + 'px';
|
756 |
-
p.padB.style.border = THIS.pickerInset + 'px solid';
|
757 |
-
p.padB.style.borderColor = THIS.pickerInsetColor;
|
758 |
-
|
759 |
-
// pad mouse area
|
760 |
-
p.padM.style.position = 'absolute';
|
761 |
-
p.padM.style.left = '0';
|
762 |
-
p.padM.style.top = '0';
|
763 |
-
p.padM.style.width = THIS.pickerFace + 2 * THIS.pickerInset + jscolor.images.pad[0] + jscolor.images.arrow[0] + 'px';
|
764 |
-
p.padM.style.height = p.box.style.height;
|
765 |
-
p.padM.style.cursor = 'crosshair';
|
766 |
-
|
767 |
-
// slider image
|
768 |
-
p.sld.style.overflow = 'hidden';
|
769 |
-
p.sld.style.width = jscolor.images.sld[0] + 'px';
|
770 |
-
p.sld.style.height = jscolor.images.sld[1] + 'px';
|
771 |
-
|
772 |
-
// slider border
|
773 |
-
p.sldB.style.display = THIS.slider ? 'block' : 'none';
|
774 |
-
p.sldB.style.position = 'absolute';
|
775 |
-
p.sldB.style.right = THIS.pickerFace + 'px';
|
776 |
-
p.sldB.style.top = THIS.pickerFace + 'px';
|
777 |
-
p.sldB.style.border = THIS.pickerInset + 'px solid';
|
778 |
-
p.sldB.style.borderColor = THIS.pickerInsetColor;
|
779 |
-
|
780 |
-
// slider mouse area
|
781 |
-
p.sldM.style.display = THIS.slider ? 'block' : 'none';
|
782 |
-
p.sldM.style.position = 'absolute';
|
783 |
-
p.sldM.style.right = '0';
|
784 |
-
p.sldM.style.top = '0';
|
785 |
-
p.sldM.style.width = jscolor.images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2 * THIS.pickerInset + 'px';
|
786 |
-
p.sldM.style.height = p.box.style.height;
|
787 |
-
try {
|
788 |
-
p.sldM.style.cursor = 'pointer';
|
789 |
-
} catch (eOldIE) {
|
790 |
-
p.sldM.style.cursor = 'hand';
|
791 |
-
}
|
792 |
-
|
793 |
-
// "close" button
|
794 |
-
function setBtnBorder() {
|
795 |
-
var insetColors = THIS.pickerInsetColor.split(/\s+/);
|
796 |
-
var pickerOutsetColor = insetColors.length < 2 ? insetColors[0] : insetColors[1] + ' ' + insetColors[0] + ' ' + insetColors[0] + ' ' + insetColors[1];
|
797 |
-
p.btn.style.borderColor = pickerOutsetColor;
|
798 |
-
}
|
799 |
-
|
800 |
-
p.btn.style.display = THIS.pickerClosable ? 'block' : 'none';
|
801 |
-
p.btn.style.position = 'absolute';
|
802 |
-
p.btn.style.left = THIS.pickerFace + 'px';
|
803 |
-
p.btn.style.bottom = THIS.pickerFace + 'px';
|
804 |
-
p.btn.style.padding = '0 15px';
|
805 |
-
p.btn.style.height = '18px';
|
806 |
-
p.btn.style.border = THIS.pickerInset + 'px solid';
|
807 |
-
setBtnBorder();
|
808 |
-
p.btn.style.color = THIS.pickerButtonColor;
|
809 |
-
p.btn.style.font = '12px sans-serif';
|
810 |
-
p.btn.style.textAlign = 'center';
|
811 |
-
try {
|
812 |
-
p.btn.style.cursor = 'pointer';
|
813 |
-
} catch (eOldIE) {
|
814 |
-
p.btn.style.cursor = 'hand';
|
815 |
-
}
|
816 |
-
p.btn.onmousedown = function () {
|
817 |
-
THIS.hidePicker();
|
818 |
-
};
|
819 |
-
p.btnS.style.lineHeight = p.btn.style.height;
|
820 |
-
|
821 |
-
// load images in optimal order
|
822 |
-
switch (modeID) {
|
823 |
-
case 0:
|
824 |
-
var padImg = 'hs.png';
|
825 |
-
break;
|
826 |
-
case 1:
|
827 |
-
var padImg = 'hv.png';
|
828 |
-
break;
|
829 |
-
}
|
830 |
-
p.padM.style.backgroundImage = "url('" + jscolor.getDir() + "cross.gif')";
|
831 |
-
p.padM.style.backgroundRepeat = "no-repeat";
|
832 |
-
p.sldM.style.backgroundImage = "url('" + jscolor.getDir() + "arrow.gif')";
|
833 |
-
p.sldM.style.backgroundRepeat = "no-repeat";
|
834 |
-
p.pad.style.backgroundImage = "url('" + jscolor.getDir() + padImg + "')";
|
835 |
-
p.pad.style.backgroundRepeat = "no-repeat";
|
836 |
-
p.pad.style.backgroundPosition = "0 0";
|
837 |
-
|
838 |
-
// place pointers
|
839 |
-
redrawPad();
|
840 |
-
redrawSld();
|
841 |
-
|
842 |
-
jscolor.picker.owner = THIS;
|
843 |
-
document.getElementsByTagName('body')[0].appendChild(p.boxB);
|
844 |
-
}
|
845 |
-
|
846 |
-
|
847 |
-
function getPickerDims(o) {
|
848 |
-
var dims = [
|
849 |
-
2 * o.pickerInset + 2 * o.pickerFace + jscolor.images.pad[0] +
|
850 |
-
(o.slider ? 2 * o.pickerInset + 2 * jscolor.images.arrow[0] + jscolor.images.sld[0] : 0),
|
851 |
-
o.pickerClosable ?
|
852 |
-
4 * o.pickerInset + 3 * o.pickerFace + jscolor.images.pad[1] + o.pickerButtonHeight :
|
853 |
-
2 * o.pickerInset + 2 * o.pickerFace + jscolor.images.pad[1]
|
854 |
-
];
|
855 |
-
return dims;
|
856 |
-
}
|
857 |
-
|
858 |
-
|
859 |
-
function redrawPad() {
|
860 |
-
// redraw the pad pointer
|
861 |
-
switch (modeID) {
|
862 |
-
case 0:
|
863 |
-
var yComponent = 1;
|
864 |
-
break;
|
865 |
-
case 1:
|
866 |
-
var yComponent = 2;
|
867 |
-
break;
|
868 |
-
}
|
869 |
-
var x = Math.round((THIS.hsv[0] / 6) * (jscolor.images.pad[0] - 1));
|
870 |
-
var y = Math.round((1 - THIS.hsv[yComponent]) * (jscolor.images.pad[1] - 1));
|
871 |
-
jscolor.picker.padM.style.backgroundPosition =
|
872 |
-
(THIS.pickerFace + THIS.pickerInset + x - Math.floor(jscolor.images.cross[0] / 2)) + 'px ' +
|
873 |
-
(THIS.pickerFace + THIS.pickerInset + y - Math.floor(jscolor.images.cross[1] / 2)) + 'px';
|
874 |
-
|
875 |
-
// redraw the slider image
|
876 |
-
var seg = jscolor.picker.sld.childNodes;
|
877 |
-
|
878 |
-
switch (modeID) {
|
879 |
-
case 0:
|
880 |
-
var rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1);
|
881 |
-
for (var i = 0; i < seg.length; i += 1) {
|
882 |
-
seg[i].style.backgroundColor = 'rgb(' +
|
883 |
-
(rgb[0] * (1 - i / seg.length) * 100) + '%,' +
|
884 |
-
(rgb[1] * (1 - i / seg.length) * 100) + '%,' +
|
885 |
-
(rgb[2] * (1 - i / seg.length) * 100) + '%)';
|
886 |
-
}
|
887 |
-
break;
|
888 |
-
case 1:
|
889 |
-
var rgb, s, c = [ THIS.hsv[2], 0, 0 ];
|
890 |
-
var i = Math.floor(THIS.hsv[0]);
|
891 |
-
var f = i % 2 ? THIS.hsv[0] - i : 1 - (THIS.hsv[0] - i);
|
892 |
-
switch (i) {
|
893 |
-
case 6:
|
894 |
-
case 0:
|
895 |
-
rgb = [0, 1, 2];
|
896 |
-
break;
|
897 |
-
case 1:
|
898 |
-
rgb = [1, 0, 2];
|
899 |
-
break;
|
900 |
-
case 2:
|
901 |
-
rgb = [2, 0, 1];
|
902 |
-
break;
|
903 |
-
case 3:
|
904 |
-
rgb = [2, 1, 0];
|
905 |
-
break;
|
906 |
-
case 4:
|
907 |
-
rgb = [1, 2, 0];
|
908 |
-
break;
|
909 |
-
case 5:
|
910 |
-
rgb = [0, 2, 1];
|
911 |
-
break;
|
912 |
-
}
|
913 |
-
for (var i = 0; i < seg.length; i += 1) {
|
914 |
-
s = 1 - 1 / (seg.length - 1) * i;
|
915 |
-
c[1] = c[0] * (1 - s * f);
|
916 |
-
c[2] = c[0] * (1 - s);
|
917 |
-
seg[i].style.backgroundColor = 'rgb(' +
|
918 |
-
(c[rgb[0]] * 100) + '%,' +
|
919 |
-
(c[rgb[1]] * 100) + '%,' +
|
920 |
-
(c[rgb[2]] * 100) + '%)';
|
921 |
-
}
|
922 |
-
break;
|
923 |
-
}
|
924 |
-
}
|
925 |
-
|
926 |
-
|
927 |
-
function redrawSld() {
|
928 |
-
// redraw the slider pointer
|
929 |
-
switch (modeID) {
|
930 |
-
case 0:
|
931 |
-
var yComponent = 2;
|
932 |
-
break;
|
933 |
-
case 1:
|
934 |
-
var yComponent = 1;
|
935 |
-
break;
|
936 |
-
}
|
937 |
-
var y = Math.round((1 - THIS.hsv[yComponent]) * (jscolor.images.sld[1] - 1));
|
938 |
-
jscolor.picker.sldM.style.backgroundPosition =
|
939 |
-
'0 ' + (THIS.pickerFace + THIS.pickerInset + y - Math.floor(jscolor.images.arrow[1] / 2)) + 'px';
|
940 |
-
}
|
941 |
-
|
942 |
-
|
943 |
-
function isPickerOwner() {
|
944 |
-
return jscolor.picker && jscolor.picker.owner === THIS;
|
945 |
-
}
|
946 |
-
|
947 |
-
|
948 |
-
function blurTarget() {
|
949 |
-
if (valueElement === target) {
|
950 |
-
THIS.importColor();
|
951 |
-
}
|
952 |
-
if (THIS.pickerOnfocus) {
|
953 |
-
THIS.hidePicker();
|
954 |
-
}
|
955 |
-
}
|
956 |
-
|
957 |
-
|
958 |
-
function blurValue() {
|
959 |
-
if (valueElement !== target) {
|
960 |
-
THIS.importColor();
|
961 |
-
}
|
962 |
-
}
|
963 |
-
|
964 |
-
|
965 |
-
function setPad(e) {
|
966 |
-
var mpos = jscolor.getRelMousePos(e);
|
967 |
-
var x = mpos.x - THIS.pickerFace - THIS.pickerInset;
|
968 |
-
var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
|
969 |
-
switch (modeID) {
|
970 |
-
case 0:
|
971 |
-
THIS.fromHSV(x * (6 / (jscolor.images.pad[0] - 1)), 1 - y / (jscolor.images.pad[1] - 1), null, leaveSld);
|
972 |
-
break;
|
973 |
-
case 1:
|
974 |
-
THIS.fromHSV(x * (6 / (jscolor.images.pad[0] - 1)), null, 1 - y / (jscolor.images.pad[1] - 1), leaveSld);
|
975 |
-
break;
|
976 |
-
}
|
977 |
-
}
|
978 |
-
|
979 |
-
|
980 |
-
function setSld(e) {
|
981 |
-
var mpos = jscolor.getRelMousePos(e);
|
982 |
-
var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
|
983 |
-
switch (modeID) {
|
984 |
-
case 0:
|
985 |
-
THIS.fromHSV(null, null, 1 - y / (jscolor.images.sld[1] - 1), leavePad);
|
986 |
-
break;
|
987 |
-
case 1:
|
988 |
-
THIS.fromHSV(null, 1 - y / (jscolor.images.sld[1] - 1), null, leavePad);
|
989 |
-
break;
|
990 |
-
}
|
991 |
-
}
|
992 |
-
|
993 |
-
|
994 |
-
function dispatchImmediateChange() {
|
995 |
-
if (THIS.onImmediateChange) {
|
996 |
-
var callback;
|
997 |
-
if (typeof THIS.onImmediateChange === 'string') {
|
998 |
-
callback = new Function(THIS.onImmediateChange);
|
999 |
-
} else {
|
1000 |
-
callback = THIS.onImmediateChange;
|
1001 |
-
}
|
1002 |
-
callback.call(THIS);
|
1003 |
-
}
|
1004 |
-
}
|
1005 |
-
|
1006 |
-
|
1007 |
-
var THIS = this;
|
1008 |
-
var modeID = this.pickerMode.toLowerCase() === 'hvs' ? 1 : 0;
|
1009 |
-
var abortBlur = false;
|
1010 |
-
var
|
1011 |
-
valueElement = jscolor.fetchElement(this.valueElement),
|
1012 |
-
styleElement = jscolor.fetchElement(this.styleElement);
|
1013 |
-
var
|
1014 |
-
holdPad = false,
|
1015 |
-
holdSld = false;
|
1016 |
-
var
|
1017 |
-
leaveValue = 1 << 0,
|
1018 |
-
leaveStyle = 1 << 1,
|
1019 |
-
leavePad = 1 << 2,
|
1020 |
-
leaveSld = 1 << 3;
|
1021 |
-
|
1022 |
-
// target
|
1023 |
-
jscolor.addEvent(target, 'focus', function () {
|
1024 |
-
if (THIS.pickerOnfocus) {
|
1025 |
-
THIS.showPicker();
|
1026 |
-
}
|
1027 |
-
});
|
1028 |
-
jscolor.addEvent(target, 'blur', function () {
|
1029 |
-
if (!abortBlur) {
|
1030 |
-
window.setTimeout(function () {
|
1031 |
-
abortBlur || blurTarget();
|
1032 |
-
abortBlur = false;
|
1033 |
-
}, 0);
|
1034 |
-
} else {
|
1035 |
-
abortBlur = false;
|
1036 |
-
}
|
1037 |
-
});
|
1038 |
-
|
1039 |
-
// valueElement
|
1040 |
-
if (valueElement) {
|
1041 |
-
var updateField = function () {
|
1042 |
-
THIS.fromString(valueElement.value, leaveValue);
|
1043 |
-
dispatchImmediateChange();
|
1044 |
-
};
|
1045 |
-
jscolor.addEvent(valueElement, 'keyup', updateField);
|
1046 |
-
jscolor.addEvent(valueElement, 'input', updateField);
|
1047 |
-
jscolor.addEvent(valueElement, 'blur', blurValue);
|
1048 |
-
valueElement.setAttribute('autocomplete', 'off');
|
1049 |
-
}
|
1050 |
-
|
1051 |
-
// styleElement
|
1052 |
-
if (styleElement) {
|
1053 |
-
styleElement.jscStyle = {
|
1054 |
-
backgroundImage: styleElement.style.backgroundImage,
|
1055 |
-
backgroundColor: styleElement.style.backgroundColor,
|
1056 |
-
color : styleElement.style.color
|
1057 |
-
};
|
1058 |
-
}
|
1059 |
-
|
1060 |
-
// require images
|
1061 |
-
switch (modeID) {
|
1062 |
-
case 0:
|
1063 |
-
jscolor.requireImage('hs.png');
|
1064 |
-
break;
|
1065 |
-
case 1:
|
1066 |
-
jscolor.requireImage('hv.png');
|
1067 |
-
break;
|
1068 |
-
}
|
1069 |
-
jscolor.requireImage('cross.gif');
|
1070 |
-
jscolor.requireImage('arrow.gif');
|
1071 |
-
|
1072 |
-
this.importColor();
|
1073 |
-
}
|
1074 |
-
|
1075 |
-
};
|
1076 |
-
|
1077 |
-
|
1078 |
-
jscolor.install();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/meta-box.js
CHANGED
@@ -1,356 +1,200 @@
|
|
1 |
var gmActiveEditor = false;
|
2 |
-
|
3 |
-
var dload = true, load_page = 2, gm_rel = 1;
|
4 |
-
(function ($, window, document, undefined) {
|
5 |
$('body').on('click', 'textarea.wp-editor-area', function(){
|
6 |
gmActiveEditor = $(this).attr('id');
|
7 |
-
setTimeout(
|
|
|
|
|
8 |
});
|
9 |
|
10 |
-
$("#
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
$('iframe').css('pointer-events','none');
|
15 |
},
|
16 |
-
stop: function(event, ui)
|
17 |
-
$('iframe').css('pointer-events','auto');
|
18 |
-
$('#
|
19 |
},
|
20 |
-
resize: function(
|
21 |
ui.element.height('auto');
|
22 |
}
|
23 |
});
|
24 |
-
$("#
|
25 |
-
handles
|
26 |
-
minHeight: 124,
|
27 |
-
stop: function( event, ui ) {
|
28 |
-
ui.element.width('auto');
|
29 |
-
$('#gMedia-images-wrap').trigger('scroll');
|
30 |
-
}
|
31 |
-
});
|
32 |
-
$("#gMedia-galleries").resizable({
|
33 |
-
handles : 's',
|
34 |
minHeight: 94,
|
35 |
-
start: function(event, ui)
|
36 |
-
$('iframe').css('pointer-events','none');
|
37 |
},
|
38 |
-
stop: function(event, ui)
|
39 |
-
$('iframe').css('pointer-events','auto');
|
40 |
ui.element.width('auto');
|
41 |
}
|
42 |
});
|
43 |
|
44 |
-
$('
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
gm_send_to_editor(html);
|
51 |
-
e.preventDefault();
|
52 |
-
});
|
53 |
-
|
54 |
-
$('li.gMedia-gallery-li').click(function (e) {
|
55 |
-
if ($(e.target).hasClass('gMedia-gallery-gear'))
|
56 |
-
return true;
|
57 |
-
var html, gm_id = $(this).attr('id').split('-')[1];
|
58 |
-
if ($(this).hasClass('gMedia-selected')) {
|
59 |
if(gm_delete_scode(gm_id)){
|
60 |
-
|
61 |
-
|
62 |
-
html = html.split('[gmedia id=' + gm_id + ']').join('');
|
63 |
-
$('textarea#'+gmActiveEditor).val(html);
|
64 |
-
if (tinyMCE.activeEditor) {
|
65 |
-
tinyMCE.activeEditor.setContent(html);
|
66 |
-
}
|
67 |
-
*/
|
68 |
-
$(this).removeClass('gMedia-selected');
|
69 |
-
} else {
|
70 |
// Show message "Focus textarea"
|
71 |
-
|
72 |
m.slideDown(100, function(){
|
73 |
-
setTimeout(function(){
|
|
|
|
|
74 |
});
|
75 |
}
|
76 |
-
} else
|
77 |
html = '[gmedia id=' + gm_id + ']';
|
78 |
-
/*if (getUserSetting('editor') == 'tinymce') {
|
79 |
-
//html = '<p><ins class="mceGMgallery" title="ID#' + gm_id + '">' + gm_id + '</ins></p>';
|
80 |
-
html = '<p>[gmedia id=' + gm_id + ']</p>';
|
81 |
-
}*/
|
82 |
if(gm_send_to_editor(html)){
|
83 |
-
$(this).addClass('
|
84 |
-
} else
|
85 |
-
|
86 |
m.slideDown(100, function(){
|
87 |
-
setTimeout(function(){
|
|
|
|
|
88 |
});
|
89 |
}
|
90 |
}
|
91 |
e.preventDefault();
|
92 |
});
|
93 |
|
94 |
-
setTimeout(
|
|
|
|
|
95 |
|
96 |
-
$('textarea.wp-editor-area').on('keyup', function
|
97 |
var k = e.keyCode || e.charCode;
|
98 |
-
if
|
99 |
var m, content = $(this).val();
|
100 |
m = content.match(/\[gmedia [ ]*id=(\d+)[ ]*?\]/g);
|
101 |
-
jQuery('#
|
102 |
-
if
|
103 |
-
jQuery.each(m, function
|
104 |
var id = shcode.replace(/\[gmedia [ ]*id=(\d+)[ ]*?\]/, '$1');
|
105 |
-
jQuery('#
|
106 |
});
|
107 |
}
|
108 |
}
|
109 |
});
|
110 |
|
111 |
-
|
112 |
-
$('#gMedia-refine-input').on('keyup', function(e){
|
113 |
-
var k = e.keyCode || e.charCode;
|
114 |
-
var arr = [16,17,18,20,27,33,34,35,36,37,38,39,40,144];
|
115 |
-
if ($.inArray(k,arr) > -1) {
|
116 |
-
return;
|
117 |
-
}
|
118 |
-
var q = $(this).val();
|
119 |
-
clearTimeout(delayTimer);
|
120 |
-
delayTimer = setTimeout(function() {
|
121 |
-
if($.trim(q).length > 2){
|
122 |
-
$.get(ajaxurl, {
|
123 |
-
_wpnonce: gMediaGlobalVar.nonce,
|
124 |
-
action: 'gmDoAjax',
|
125 |
-
task: 'related-image',
|
126 |
-
search: q
|
127 |
-
}, function(r) {
|
128 |
-
if(r.content){
|
129 |
-
jQuery('#gMedia-images-thumbnails').html(r.content);
|
130 |
-
if(r.continue){
|
131 |
-
dload = true;
|
132 |
-
load_page = r.paged + 1;
|
133 |
-
gm_rel = r.rel;
|
134 |
-
jQuery('#gMedia-images-wrap').trigger('scroll');
|
135 |
-
}
|
136 |
-
}
|
137 |
-
//console.log(r);
|
138 |
-
}).fail(function(){
|
139 |
-
dload = true;
|
140 |
-
jQuery('#gMedia-images-wrap').trigger('scroll');
|
141 |
-
});
|
142 |
-
} else if(q.length == 0){
|
143 |
-
gm_update_related();
|
144 |
-
}
|
145 |
-
}, 1000);
|
146 |
-
e.preventDefault();
|
147 |
-
}).keypress(function (e) {
|
148 |
-
if (13 == e.which) {
|
149 |
-
e.preventDefault();
|
150 |
-
}
|
151 |
-
});
|
152 |
|
153 |
-
|
154 |
-
|
|
|
155 |
}
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
action: 'gmDoAjax',
|
167 |
-
task: 'related-image',
|
168 |
-
paged: load_page,
|
169 |
-
search: q,
|
170 |
-
rel: gm_rel,
|
171 |
-
tags: gm_post_tags
|
172 |
-
}, function(r) {
|
173 |
-
if(r.paged){
|
174 |
-
jQuery('#gMedia-images-thumbnails').append(r.content);
|
175 |
-
if(r.continue){
|
176 |
-
dload = true;
|
177 |
-
load_page = r.paged + 1;
|
178 |
-
gm_rel = r.rel;
|
179 |
-
$('#gMedia-images-wrap').trigger('scroll');
|
180 |
-
}
|
181 |
-
}
|
182 |
-
//console.log(r);
|
183 |
-
}).fail(function(){
|
184 |
-
dload = true;
|
185 |
-
$('#gMedia-images-wrap').trigger('scroll');
|
186 |
});
|
187 |
}
|
188 |
-
});
|
189 |
-
|
190 |
-
|
191 |
-
})(jQuery, window, document);
|
192 |
-
|
193 |
-
function gm_check_scode(id) {
|
194 |
-
if( !id && ("undefined" != typeof(tinymce)) && tinymce.activeEditor) {
|
195 |
-
id = tinymce.activeEditor.id;
|
196 |
-
}
|
197 |
-
if(!id){ id = 'content' }
|
198 |
-
|
199 |
-
var temp_html = jQuery('textarea#'+id).val(),
|
200 |
-
temp_m = temp_html.match(/\[gmedia [ ]*id=(\d+)[ ]*?\]/g);
|
201 |
-
if (temp_html && temp_m) {
|
202 |
-
jQuery.each(temp_m, function (i, shcode) {
|
203 |
-
var id = shcode.replace(/\[gm.*id=(\d+).*?\]/, '$1');
|
204 |
-
jQuery('#gmModule-' + id).addClass('gMedia-selected');
|
205 |
-
});
|
206 |
}
|
207 |
}
|
208 |
|
209 |
-
function gm_send_to_editor(c)
|
210 |
var b, a = typeof(tinymce) != "undefined", f = typeof(QTags) != "undefined";
|
211 |
-
if
|
212 |
-
if
|
213 |
b = tinymce.activeEditor;
|
214 |
wpActiveEditor = b.id;
|
215 |
-
} else
|
216 |
if(gmActiveEditor){
|
217 |
wpActiveEditor = gmActiveEditor;
|
218 |
-
} else
|
219 |
return false;
|
220 |
}
|
221 |
}
|
222 |
-
} else
|
223 |
-
if
|
224 |
-
if
|
225 |
b = tinymce.activeEditor;
|
226 |
-
} else
|
227 |
b = tinymce.get(wpActiveEditor);
|
228 |
}
|
229 |
}
|
230 |
}
|
231 |
-
if
|
232 |
-
if
|
233 |
b.selection.moveToBookmark(b.windowManager.insertimagebookmark);
|
234 |
//console.log(b);
|
235 |
}
|
236 |
-
if
|
237 |
-
if
|
238 |
c = b.plugins.wpeditimage._do_shcode(c)
|
239 |
}
|
240 |
-
} else
|
241 |
-
c = '<p>'+c+'</p>';
|
242 |
}
|
243 |
b.execCommand("mceInsertContent", false, c);
|
244 |
-
} else
|
245 |
-
if
|
246 |
QTags.insertContent(c);
|
247 |
-
} else
|
248 |
document.getElementById(wpActiveEditor).value += c;
|
249 |
}
|
250 |
}
|
251 |
return true;
|
252 |
}
|
253 |
|
254 |
-
function gm_delete_scode(c)
|
255 |
var b, a = typeof(tinymce) != "undefined", re, html;
|
256 |
-
if
|
257 |
-
if
|
258 |
b = tinymce.activeEditor;
|
259 |
wpActiveEditor = b.id;
|
260 |
-
} else
|
261 |
if(gmActiveEditor){
|
262 |
wpActiveEditor = gmActiveEditor;
|
263 |
-
} else
|
264 |
return false;
|
265 |
}
|
266 |
}
|
267 |
-
} else
|
268 |
-
if
|
269 |
-
if
|
270 |
b = tinymce.activeEditor;
|
271 |
-
} else
|
272 |
b = tinymce.get(wpActiveEditor);
|
273 |
}
|
274 |
}
|
275 |
}
|
276 |
-
if
|
277 |
html = b.getContent();
|
278 |
-
re = new RegExp("(?:<p>)?\\[gmedia \\s*id=" + c + "\\s*?\\](?:<\\/p>)?","g");
|
279 |
-
b.setContent(
|
280 |
-
} else
|
281 |
html = document.getElementById(wpActiveEditor).value;
|
282 |
-
re = new RegExp("\\[gmedia [ ]*id=" + c + "[ ]*?\\](?:\\n\\n|\\n)?","g");
|
283 |
-
html = html.replace(re,'');
|
284 |
document.getElementById(wpActiveEditor).value = html;
|
285 |
}
|
286 |
return true;
|
287 |
}
|
288 |
|
289 |
-
function
|
290 |
-
return $.ajax({
|
291 |
-
url : ajaxurl,
|
292 |
-
type : "POST",
|
293 |
-
cache : false,
|
294 |
-
dataType: "json",
|
295 |
-
data : {action: "gmedia_set_featured_image", post_id: $('#post_ID[name="post_ID"]').val(), image_url: url},
|
296 |
-
success : function (r) {
|
297 |
-
if (r) {
|
298 |
-
if (r.error && r.error.message) {
|
299 |
-
return new Error(r.error.message);
|
300 |
-
} else {
|
301 |
-
if (r.attach_id && r.html) {
|
302 |
-
if (WPSetThumbnailID && WPSetThumbnailHTML) {
|
303 |
-
WPSetThumbnailID(r.attach_id);
|
304 |
-
WPSetThumbnailHTML(r.html);
|
305 |
-
}
|
306 |
-
return;
|
307 |
-
}
|
308 |
-
}
|
309 |
-
}
|
310 |
-
return new Error("Server error.");
|
311 |
-
},
|
312 |
-
error : function (m, o, n) {
|
313 |
-
return n;
|
314 |
-
}
|
315 |
-
});
|
316 |
-
}
|
317 |
-
|
318 |
-
function gm_media_button(b) {
|
319 |
var pos, el = jQuery(b).toggleClass('active');
|
320 |
-
if(el.hasClass('active'))
|
321 |
pos = el.offset();
|
322 |
pos.top += el.height() + 1;
|
323 |
-
|
324 |
-
jQuery(
|
325 |
-
|
326 |
-
|
327 |
-
jQuery('#
|
|
|
328 |
}
|
329 |
}
|
330 |
-
|
331 |
-
function gm_update_related() {
|
332 |
-
if(jQuery('#tax-input-post_tag').length){
|
333 |
-
gm_post_tags = jQuery('#tax-input-post_tag').val();
|
334 |
-
}
|
335 |
-
jQuery.get(ajaxurl, {
|
336 |
-
_wpnonce: gMediaGlobalVar.nonce,
|
337 |
-
action: 'gmDoAjax',
|
338 |
-
task: 'related-image',
|
339 |
-
tags: gm_post_tags
|
340 |
-
}, function(r) {
|
341 |
-
if(r.content){
|
342 |
-
jQuery('#gMedia-images-thumbnails').html(r.content);
|
343 |
-
if(r.continue){
|
344 |
-
dload = true;
|
345 |
-
load_page = r.paged + 1;
|
346 |
-
gm_rel = r.rel;
|
347 |
-
jQuery('#gMedia-images-wrap').trigger('scroll');
|
348 |
-
}
|
349 |
-
}
|
350 |
-
//console.log(r);
|
351 |
-
}).fail(function(){
|
352 |
-
dload = true;
|
353 |
-
jQuery('#gMedia-images-wrap').trigger('scroll');
|
354 |
-
});
|
355 |
-
}
|
356 |
-
|
1 |
var gmActiveEditor = false;
|
2 |
+
(function($, window, document, undefined){
|
|
|
|
|
3 |
$('body').on('click', 'textarea.wp-editor-area', function(){
|
4 |
gmActiveEditor = $(this).attr('id');
|
5 |
+
setTimeout(function(){
|
6 |
+
gm_check_scode(gmActiveEditor);
|
7 |
+
}, 10);
|
8 |
});
|
9 |
|
10 |
+
$("#gmedia-wraper").resizable({
|
11 |
+
handles: 'e',
|
12 |
+
start: function(event, ui){
|
13 |
+
$('iframe').css('pointer-events', 'none');
|
|
|
14 |
},
|
15 |
+
stop: function(event, ui){
|
16 |
+
$('iframe').css('pointer-events', 'auto');
|
17 |
+
$('#gmedia-images-wrap').trigger('scroll');
|
18 |
},
|
19 |
+
resize: function(event, ui){
|
20 |
ui.element.height('auto');
|
21 |
}
|
22 |
});
|
23 |
+
$("#gmedia-galleries").resizable({
|
24 |
+
handles: 's',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
minHeight: 94,
|
26 |
+
start: function(event, ui){
|
27 |
+
$('iframe').css('pointer-events', 'none');
|
28 |
},
|
29 |
+
stop: function(event, ui){
|
30 |
+
$('iframe').css('pointer-events', 'auto');
|
31 |
ui.element.width('auto');
|
32 |
}
|
33 |
});
|
34 |
|
35 |
+
$('li.gmedia-gallery-li').click(function(e){
|
36 |
+
if($(e.target).hasClass('gmedia-gallery-gear')){
|
37 |
+
return;
|
38 |
+
}
|
39 |
+
var m, html, gm_id = $(this).attr('id').split('-')[1];
|
40 |
+
if($(this).hasClass('gmedia-selected')){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
if(gm_delete_scode(gm_id)){
|
42 |
+
$(this).removeClass('gmedia-selected');
|
43 |
+
} else{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
// Show message "Focus textarea"
|
45 |
+
m = $('#gmedia-message .info-textarea');
|
46 |
m.slideDown(100, function(){
|
47 |
+
setTimeout(function(){
|
48 |
+
m.slideUp(100);
|
49 |
+
}, 1000);
|
50 |
});
|
51 |
}
|
52 |
+
} else{
|
53 |
html = '[gmedia id=' + gm_id + ']';
|
|
|
|
|
|
|
|
|
54 |
if(gm_send_to_editor(html)){
|
55 |
+
$(this).addClass('gmedia-selected');
|
56 |
+
} else{
|
57 |
+
m = $('#gmedia-message .info-textarea');
|
58 |
m.slideDown(100, function(){
|
59 |
+
setTimeout(function(){
|
60 |
+
m.slideUp(100);
|
61 |
+
}, 1000);
|
62 |
});
|
63 |
}
|
64 |
}
|
65 |
e.preventDefault();
|
66 |
});
|
67 |
|
68 |
+
setTimeout(function(){
|
69 |
+
gm_check_scode(false);
|
70 |
+
}, 1000);
|
71 |
|
72 |
+
$('textarea.wp-editor-area').on('keyup', function(e){
|
73 |
var k = e.keyCode || e.charCode;
|
74 |
+
if(k == 8 || k == 13 || k == 46){
|
75 |
var m, content = $(this).val();
|
76 |
m = content.match(/\[gmedia [ ]*id=(\d+)[ ]*?\]/g);
|
77 |
+
jQuery('#gmedia-galleries-list li.gmedia-gallery-li').removeClass('gmedia-selected');
|
78 |
+
if(m){
|
79 |
+
jQuery.each(m, function(i, shcode){
|
80 |
var id = shcode.replace(/\[gmedia [ ]*id=(\d+)[ ]*?\]/, '$1');
|
81 |
+
jQuery('#gmGallery-' + id).addClass('gmedia-selected');
|
82 |
});
|
83 |
}
|
84 |
}
|
85 |
});
|
86 |
|
87 |
+
})(jQuery, window, document, undefined);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
+
function gm_check_scode(id){
|
90 |
+
if(!id && ("undefined" != typeof(tinymce)) && tinymce.activeEditor){
|
91 |
+
id = tinymce.activeEditor.id;
|
92 |
}
|
93 |
+
if(!id){
|
94 |
+
id = 'content'
|
95 |
+
}
|
96 |
+
var temp_html = jQuery('textarea#' + id).val();
|
97 |
+
if(temp_html){
|
98 |
+
var temp_m = temp_html.match(/\[gmedia [ ]*id=(\d+)[ ]*?\]/g);
|
99 |
+
if(temp_m){
|
100 |
+
jQuery.each(temp_m, function(i, shcode){
|
101 |
+
var id = shcode.replace(/\[gm.*id=(\d+).*?\]/, '$1');
|
102 |
+
jQuery('#gmGallery-' + id).addClass('gmedia-selected');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
});
|
104 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
}
|
106 |
}
|
107 |
|
108 |
+
function gm_send_to_editor(c){
|
109 |
var b, a = typeof(tinymce) != "undefined", f = typeof(QTags) != "undefined";
|
110 |
+
if(!wpActiveEditor){
|
111 |
+
if(a && tinymce.activeEditor){
|
112 |
b = tinymce.activeEditor;
|
113 |
wpActiveEditor = b.id;
|
114 |
+
} else{
|
115 |
if(gmActiveEditor){
|
116 |
wpActiveEditor = gmActiveEditor;
|
117 |
+
} else{
|
118 |
return false;
|
119 |
}
|
120 |
}
|
121 |
+
} else{
|
122 |
+
if(a){
|
123 |
+
if(tinymce.activeEditor && (tinymce.activeEditor.id == "mce_fullscreen" || tinymce.activeEditor.id == "wp_mce_fullscreen")){
|
124 |
b = tinymce.activeEditor;
|
125 |
+
} else{
|
126 |
b = tinymce.get(wpActiveEditor);
|
127 |
}
|
128 |
}
|
129 |
}
|
130 |
+
if(b && !b.isHidden()){
|
131 |
+
if(tinymce.isIE && b.windowManager.insertimagebookmark){
|
132 |
b.selection.moveToBookmark(b.windowManager.insertimagebookmark);
|
133 |
//console.log(b);
|
134 |
}
|
135 |
+
if(c.indexOf("[caption") === 0){
|
136 |
+
if(b.plugins.wpeditimage){
|
137 |
c = b.plugins.wpeditimage._do_shcode(c)
|
138 |
}
|
139 |
+
} else{
|
140 |
+
c = '<p>' + c + '</p>';
|
141 |
}
|
142 |
b.execCommand("mceInsertContent", false, c);
|
143 |
+
} else{
|
144 |
+
if(f){
|
145 |
QTags.insertContent(c);
|
146 |
+
} else{
|
147 |
document.getElementById(wpActiveEditor).value += c;
|
148 |
}
|
149 |
}
|
150 |
return true;
|
151 |
}
|
152 |
|
153 |
+
function gm_delete_scode(c){
|
154 |
var b, a = typeof(tinymce) != "undefined", re, html;
|
155 |
+
if(!wpActiveEditor){
|
156 |
+
if(a && tinymce.activeEditor){
|
157 |
b = tinymce.activeEditor;
|
158 |
wpActiveEditor = b.id;
|
159 |
+
} else{
|
160 |
if(gmActiveEditor){
|
161 |
wpActiveEditor = gmActiveEditor;
|
162 |
+
} else{
|
163 |
return false;
|
164 |
}
|
165 |
}
|
166 |
+
} else{
|
167 |
+
if(a){
|
168 |
+
if(tinymce.activeEditor && (tinymce.activeEditor.id == "mce_fullscreen" || tinymce.activeEditor.id == "wp_mce_fullscreen")){
|
169 |
b = tinymce.activeEditor;
|
170 |
+
} else{
|
171 |
b = tinymce.get(wpActiveEditor);
|
172 |
}
|
173 |
}
|
174 |
}
|
175 |
+
if(b && !b.isHidden()){
|
176 |
html = b.getContent();
|
177 |
+
re = new RegExp("(?:<p>)?\\[gmedia \\s*id=" + c + "\\s*?\\](?:<\\/p>)?", "g");
|
178 |
+
b.setContent(html.replace(re, ''));
|
179 |
+
} else{
|
180 |
html = document.getElementById(wpActiveEditor).value;
|
181 |
+
re = new RegExp("\\[gmedia [ ]*id=" + c + "[ ]*?\\](?:\\n\\n|\\n)?", "g");
|
182 |
+
html = html.replace(re, '');
|
183 |
document.getElementById(wpActiveEditor).value = html;
|
184 |
}
|
185 |
return true;
|
186 |
}
|
187 |
|
188 |
+
function gm_media_button(b){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
var pos, el = jQuery(b).toggleClass('active');
|
190 |
+
if(el.hasClass('active')){
|
191 |
pos = el.offset();
|
192 |
pos.top += el.height() + 1;
|
193 |
+
var w = 300;
|
194 |
+
jQuery('#gmedia-wraper').appendTo('body').css({'position': 'absolute', 'z-index': 99999, 'width': w}).offset(pos);
|
195 |
+
jQuery("#gmedia-wraper").draggable({ handle: ".title-bar" });
|
196 |
+
} else{
|
197 |
+
jQuery('#gmedia-wraper').removeAttr('style').appendTo('#gmedia-MetaBox .inside');
|
198 |
+
jQuery('#gmedia-wraper').draggable('destroy');
|
199 |
}
|
200 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/cs.js
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
// .po file like language pack
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Vyberte soubory',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Přidejte soubory do fronty a pak spusťte nahrávání.',
|
5 |
-
'Filename' : 'Název souboru',
|
6 |
-
'Status' : 'Status',
|
7 |
-
'Size' : 'Velikost',
|
8 |
-
'Add Files' : 'Přidat soubory',
|
9 |
-
'Stop current upload' : 'Zastavit nahrávání',
|
10 |
-
'Start uploading queue' : 'Spustit frontu nahrávání',
|
11 |
-
'Drag files here.' : 'Sem přetáhněte soubory.',
|
12 |
-
'Start Upload': 'Spustit nahrávání',
|
13 |
-
'Uploaded %d/%d files': 'Nahráno %d/%d souborů'
|
14 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/da.js
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
// .po file like language pack
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Vælg filer',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Tilføj filer til køen, og tryk på start.',
|
5 |
-
'Filename' : 'Filnavn',
|
6 |
-
'Status' : 'Status',
|
7 |
-
'Size' : 'Størrelse',
|
8 |
-
'Add files' : 'Tilføj filer',
|
9 |
-
'Stop current upload' : 'Stop upload',
|
10 |
-
'Start uploading queue' : 'Start upload',
|
11 |
-
'Drag files here.' : 'Træk filer her.'
|
12 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/de.js
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
// German
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Dateien hochladen',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Dateien hinzufügen und auf \'Hochladen\' klicken.',
|
5 |
-
'Filename' : 'Dateiname',
|
6 |
-
'Status' : 'Status',
|
7 |
-
'Size' : 'Größe',
|
8 |
-
'Add files' : 'Dateien', // hinzufügen',
|
9 |
-
'Stop current upload' : 'Aktuelles Hochladen stoppen',
|
10 |
-
'Start uploading queue' : 'Hochladen starten',
|
11 |
-
'Uploaded %d/%d files': '%d/%d Dateien sind hochgeladen',
|
12 |
-
'N/A' : 'Nicht verfügbar',
|
13 |
-
'Drag files here.' : 'Ziehen Sie die Dateien hier hin',
|
14 |
-
'File extension error.': 'Fehler bei Dateiendung',
|
15 |
-
'File size error.': 'Fehler bei Dateigröße',
|
16 |
-
'Init error.': 'Initialisierungsfehler',
|
17 |
-
'HTTP Error.': 'HTTP-Fehler',
|
18 |
-
'Security error.': 'Sicherheitsfehler',
|
19 |
-
'Generic error.': 'Typischer Fehler',
|
20 |
-
'IO error.': 'Ein/Ausgabe-Fehler',
|
21 |
-
'Stop Upload': 'Hochladen stoppen',
|
22 |
-
'Start upload': 'Hochladen',
|
23 |
-
'%d files queued': '%d Dateien in der Warteschlange'
|
24 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/el.js
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
// Greek
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Επιλέξτε Αρχεία',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Προσθήκη αρχείων στην ουρά μεταφόρτωσης',
|
5 |
-
'Filename' : 'Όνομα αρχείου',
|
6 |
-
'Status' : 'Κατάσταση',
|
7 |
-
'Size' : 'Μέγεθος',
|
8 |
-
'Add Files' : 'Προσθέστε αρχεία',
|
9 |
-
'Stop current upload' : 'Διακοπή τρέχουσας μεταφόρτωσης',
|
10 |
-
'Start uploading queue' : 'Εκκίνηση μεταφόρτωσης ουράς αρχείων',
|
11 |
-
'Drag files here.' : 'Σύρετε αρχεία εδώ',
|
12 |
-
'Start Upload': 'Εκκίνηση μεταφόρτωσης',
|
13 |
-
'Uploaded %d/%d files': 'Ανέβηκαν %d/%d αρχεία'
|
14 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/es.js
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
// Spanish
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Elija archivos:',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Agregue archivos a la cola de subida y haga click en el boton de iniciar.',
|
5 |
-
'Filename' : 'Nombre de archivo',
|
6 |
-
'Status' : 'Estado',
|
7 |
-
'Size' : 'Tamaño',
|
8 |
-
'Add files' : 'Agregue archivos',
|
9 |
-
'Stop current upload' : 'Detener subida actual',
|
10 |
-
'Start uploading queue' : 'Iniciar subida de cola',
|
11 |
-
'Uploaded %d/%d files': 'Subidos %d/%d archivos',
|
12 |
-
'N/A' : 'No disponible',
|
13 |
-
'Drag files here.' : 'Arrastre archivos aquí',
|
14 |
-
'File extension error.': 'Error de extensión de archivo.',
|
15 |
-
'File size error.': 'Error de tamaño de archivo.',
|
16 |
-
'Init error.': 'Error de inicialización.',
|
17 |
-
'HTTP Error.': 'Error de HTTP.',
|
18 |
-
'Security error.': 'Error de seguridad.',
|
19 |
-
'Generic error.': 'Error genérico.',
|
20 |
-
'IO error.': 'Error de entrada/salida.',
|
21 |
-
'Stop Upload': 'Detener Subida.',
|
22 |
-
'Add Files': 'Agregar Archivos',
|
23 |
-
'Start Upload': 'Comenzar Subida.',
|
24 |
-
'%d files queued': '%d archivos en cola.'
|
25 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/et.js
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
// Estonian translation, et.js
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Vali faile',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Lisa failid üleslaadimise järjekorda ja klõpsa alustamise nupule.',
|
5 |
-
'Filename' : 'Failinimi',
|
6 |
-
'Status' : 'Olek',
|
7 |
-
'Size' : 'Suurus',
|
8 |
-
'Add files' : 'Lisa faile',
|
9 |
-
'Stop current upload' : 'Praeguse üleslaadimise peatamine',
|
10 |
-
'Start uploading queue' : 'Järjekorras ootavate failide üleslaadimise alustamine',
|
11 |
-
'Drag files here.' : 'Lohista failid siia.',
|
12 |
-
'Start upload' : 'Alusta üleslaadimist',
|
13 |
-
'Uploaded %d/%d files': 'Üles laaditud %d/%d',
|
14 |
-
'Stop upload': 'Peata üleslaadimine',
|
15 |
-
'Start upload': 'Alusta üleslaadimist',
|
16 |
-
'%d files queued': 'Järjekorras on %d faili',
|
17 |
-
'File: %s': 'Fail: %s',
|
18 |
-
'Close': 'Sulge',
|
19 |
-
'Using runtime: ': 'Kasutatakse varianti: ',
|
20 |
-
'File: %f, size: %s, max file size: %m': 'Fail: %f, suurus: %s, suurim failisuurus: %m',
|
21 |
-
'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'Üleslaadimise element saab vastu võtta ainult %d faili ühe korraga. Ülejäänud failid jäetakse laadimata.',
|
22 |
-
'Upload URL might be wrong or doesn\'t exist': 'Üleslaadimise URL võib olla vale või seda pole',
|
23 |
-
'Error: File too large: ': 'Viga: fail on liiga suur: ',
|
24 |
-
'Error: Invalid file extension: ': 'Viga: sobimatu faililaiend: ',
|
25 |
-
'File extension error.': 'Faililaiendi viga.',
|
26 |
-
'File size error.': 'Failisuuruse viga.',
|
27 |
-
'File count error.': 'Failide arvu viga.',
|
28 |
-
'Init error.': 'Lähtestamise viga.',
|
29 |
-
'HTTP Error.': 'HTTP ühenduse viga.',
|
30 |
-
'Security error.': 'Turvaviga.',
|
31 |
-
'Generic error.': 'Üldine viga.',
|
32 |
-
'IO error.': 'S/V (I/O) viga.'
|
33 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/fa.js
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
// Persian
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'انتخاب فایل',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'اضافه کنید فایل ها را به صف آپلود و دکمه شروع را کلیک کنید.',
|
5 |
-
'Filename' : 'نام فایل',
|
6 |
-
'Status' : 'وضعیت',
|
7 |
-
'Size' : 'سایز',
|
8 |
-
'Add Files' : 'افزودن فایل',
|
9 |
-
'Stop Upload' : 'توقف انتقال',
|
10 |
-
'Start Upload' : 'شروع انتقال',
|
11 |
-
'Add files' : 'افزودن فایل',
|
12 |
-
'Add files.' : 'افزودن فایل',
|
13 |
-
'Stop current upload' : 'توقف انتقال جاری',
|
14 |
-
'Start uploading queue' : 'شروع صف انتقال',
|
15 |
-
'Stop upload' : 'توقف انتقال',
|
16 |
-
'Start upload' : 'شروع انتقال',
|
17 |
-
'Uploaded %d/%d files': 'منتقل شد %d/%d از فایلها',
|
18 |
-
'N/A' : 'N/A',
|
19 |
-
'Drag files here.' : 'بکشید فایل ها رو به اینجا',
|
20 |
-
'File extension error.': 'خطا پیشوند فایل',
|
21 |
-
'File size error.': 'خطای سایز فایل',
|
22 |
-
'File count error.': 'خطای تعداد فایل',
|
23 |
-
'Init error.': 'خطا در استارت اسکریپت',
|
24 |
-
'HTTP Error.': 'HTTP خطای',
|
25 |
-
'Security error.': 'خطای امنیتی',
|
26 |
-
'Generic error.': 'خطای عمومی',
|
27 |
-
'IO error.': 'IO خطای',
|
28 |
-
'File: %s': ' فایل ها : %s',
|
29 |
-
'Close': 'بستن',
|
30 |
-
'%d files queued': '%d فایل در صف',
|
31 |
-
'Using runtime: ': 'استفاده میکنید از : ',
|
32 |
-
'File: %f, size: %s, max file size: %m': فایل: %f, سایز: %s, بزرگترین سایز فایل: %m',
|
33 |
-
'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'عنصر بارگذار فقط %d فایل رو در یک زمان می پذیرد. سایر فایل ها مجرد از این موضوع هستند.',
|
34 |
-
'Upload URL might be wrong or doesn\'t exist': 'آدرس آپلود اشتباه می باشد یا وجود ندارد',
|
35 |
-
'Error: File too large: ': 'خطا: فایل حجیم است :: ',
|
36 |
-
'Error: Invalid file extension: ': 'خطا پسوند فایل معتبر نمی باشد : '
|
37 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/fi.js
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
// .fi file like language pack
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Valitse tiedostoja',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Lisää tiedostoja latausjonoon ja klikkaa aloita-nappia.',
|
5 |
-
'Filename' : 'Tiedostonimi',
|
6 |
-
'Status' : 'Tila',
|
7 |
-
'Size' : 'Koko',
|
8 |
-
'Add files' : 'Lisää tiedostoja',
|
9 |
-
'Stop current upload' : 'Pysäytä nykyinen lataus',
|
10 |
-
'Start uploading queue' : 'Aloita jonon lataus',
|
11 |
-
'Drag files here.' : 'Raahaa tiedostot tänne.',
|
12 |
-
'Start upload' : 'Aloita lataus',
|
13 |
-
'Uploaded %d/%d files': 'Ladattu %d/%d tiedostoa',
|
14 |
-
'Stop upload': 'Pysäytä lataus',
|
15 |
-
'Start upload': 'Aloita lataus',
|
16 |
-
'%d files queued': '%d tiedostoa jonossa',
|
17 |
-
'File: %s': 'Tiedosto: %s',
|
18 |
-
'Close': 'Sulje',
|
19 |
-
'Using runtime: ': 'Käytetään ajonaikaista: ',
|
20 |
-
'File: %f, size: %s, max file size: %m': 'Tiedosto: %f, koko: %s, maksimi tiedostokoko: %m',
|
21 |
-
'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'Latauselementti sallii ladata vain %d tiedosto(a) kerrallaan. Ylimääräiset tiedostot ohitettiin.',
|
22 |
-
'Upload URL might be wrong or doesn\'t exist': 'Lataus URL saattaa olla väärin tai ei ole olemassa',
|
23 |
-
'Error: File too large: ': 'Virhe: Tiedosto liian suuri: ',
|
24 |
-
'Error: Invalid file extension: ': 'Virhe: Kelpaamaton tiedostopääte: ',
|
25 |
-
'File extension error.': 'Tiedostopäätevirhe.',
|
26 |
-
'File size error.': 'Tiedostokokovirhe.',
|
27 |
-
'File count error.': 'Tiedostolaskentavirhe.',
|
28 |
-
'Init error.': 'Init virhe.',
|
29 |
-
'HTTP Error.': 'HTTP virhe.',
|
30 |
-
'Security error.': 'Tietoturvavirhe.',
|
31 |
-
'Generic error.': 'Yleinen virhe.',
|
32 |
-
'IO error.': 'I/O virhe.'
|
33 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/fr-ca.js
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
// French-Canadian
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Sélectionnez les fichiers',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Ajoutez des fichiers à la file d\'attente et appuyez sur le bouton démarrer.',
|
5 |
-
'Filename' : 'Nom du fichier',
|
6 |
-
'Status' : 'Statut',
|
7 |
-
'Size' : 'Taille',
|
8 |
-
'Add files' : 'Ajouter Fichiers',
|
9 |
-
'Stop current upload' : 'Arrêter le téléversement actuel',
|
10 |
-
'Start uploading queue' : 'Démarrer le téléversement',
|
11 |
-
'Uploaded %d/%d files': '%d/%d fichiers envoyés',
|
12 |
-
'N/A' : 'Non applicable',
|
13 |
-
'Drag files here.' : 'Glisser-déposer les fichiers ici',
|
14 |
-
'File extension error.': 'Erreur d\'extension de fichier',
|
15 |
-
'File size error.': 'Erreur de taille de fichier',
|
16 |
-
'Init error.': 'Erreur d\'initialisation',
|
17 |
-
'HTTP Error.': 'Erreur HTTP',
|
18 |
-
'Security error.': 'Erreur de sécurité',
|
19 |
-
'Generic error.': 'Erreur commune',
|
20 |
-
'IO error.': 'Erreur E/S',
|
21 |
-
'Stop Upload': 'Arrêter le téléversement',
|
22 |
-
'Add Files': 'Ajouter des fichiers',
|
23 |
-
'Start upload': 'Démarrer le téléversement',
|
24 |
-
'%d files queued': '%d fichiers en attente',
|
25 |
-
'File: %s':'Fichier: %s',
|
26 |
-
'Close':'Fermer',
|
27 |
-
'Using runtime:':'Moteur logiciel:',
|
28 |
-
'File: %f, size: %s, max file size: %m':'Fichier: %f, poids: %s, poids maximal: %m',
|
29 |
-
'Upload element accepts only %d file(s) at a time. Extra files were stripped.':'La file accepte %d fichier(s) à la fois. Les fichiers en trop sont ignorés',
|
30 |
-
'Upload URL might be wrong or doesn\'t exist':'L\'URL de téléversement est erroné ou inexistant',
|
31 |
-
'Error: File to large: ':'Fichier trop volumineux: ',
|
32 |
-
'Error: Invalid file extension: ':'Extension de fichier invalide: ',
|
33 |
-
'File size error.':'Erreur de taile de fichier',
|
34 |
-
'File count error.':'Erreur de décompte des fichiers'
|
35 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/fr.js
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
// French
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Sélectionnez les fichiers',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Ajoutez des fichiers à la file et appuyez sur le bouton démarrer.',
|
5 |
-
'Filename' : 'Nom de fichier',
|
6 |
-
'Status' : 'Status',
|
7 |
-
'Size' : 'Taille',
|
8 |
-
'Add files' : 'Ajouter Fichiers',
|
9 |
-
'Stop current upload' : 'Arrêter l\'envoi en cours',
|
10 |
-
'Start uploading queue' : 'Démarrer l\'envoi',
|
11 |
-
'Uploaded %d/%d files': '%d/%d fichiers envoyés',
|
12 |
-
'N/A' : 'Non applicable',
|
13 |
-
'Drag files here.' : 'Déposer les fichiers ici.',
|
14 |
-
'File extension error.': 'Erreur extension fichier',
|
15 |
-
'File size error.': 'Erreur taille fichier.',
|
16 |
-
'Init error.': 'Erreur d\'initialisation.',
|
17 |
-
'HTTP Error.': 'Erreur HTTP.',
|
18 |
-
'Security error.': 'Erreur de sécurité.',
|
19 |
-
'Generic error.': 'Erreur générique.',
|
20 |
-
'IO error.': 'Erreur E/S.',
|
21 |
-
'Stop Upload': 'Arrêter les envois.',
|
22 |
-
'Add Files': 'Ajouter des fichiers',
|
23 |
-
'Start Upload': 'Démarrer les envois.',
|
24 |
-
'%d files queued': '%d fichiers en attente.'
|
25 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/hr.js
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
// Croatian
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files': 'Izaberite datoteke:',
|
4 |
-
'Add files to the upload queue and click the start button.': 'Dodajte datoteke u listu i kliknite Upload.',
|
5 |
-
'Filename': 'Ime datoteke',
|
6 |
-
'Status': 'Status',
|
7 |
-
'Size': 'Veličina',
|
8 |
-
'Add files': 'Dodajte datoteke',
|
9 |
-
'Stop current upload': 'Zaustavi trenutan upload',
|
10 |
-
'Start uploading queue': 'Pokreni Upload',
|
11 |
-
'Uploaded %d/%d files': 'Uploadano %d/%d datoteka',
|
12 |
-
'N/A': 'N/A',
|
13 |
-
'Drag files here.': 'Dovucite datoteke ovdje',
|
14 |
-
'File extension error.': 'Greška ekstenzije datoteke.',
|
15 |
-
'File size error.': 'Greška veličine datoteke.',
|
16 |
-
'Init error.': 'Greška inicijalizacije.',
|
17 |
-
'HTTP Error.': 'HTTP greška.',
|
18 |
-
'Security error.': 'Sigurnosna greška.',
|
19 |
-
'Generic error.': 'Generička greška.',
|
20 |
-
'IO error.': 'I/O greška.',
|
21 |
-
'Stop Upload': 'Zaustavi upload.',
|
22 |
-
'Add Files': 'Dodaj datoteke',
|
23 |
-
'Start Upload': 'Pokreni upload.',
|
24 |
-
'%d files queued': '%d datoteka na čekanju.'
|
25 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/hu.js
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
// Hungarian
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Fájlok kiválasztása',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Válaszd ki a fájlokat, majd kattints az Indítás gombra.',
|
5 |
-
'Filename' : 'Fájlnév',
|
6 |
-
'Status' : 'Állapot',
|
7 |
-
'Size' : 'Méret',
|
8 |
-
'Add files' : 'Hozzáadás',
|
9 |
-
'Stop current upload' : 'Jelenlegi feltöltés megszakítása',
|
10 |
-
'Start uploading queue' : 'Várakozási sor feltöltésének indítása',
|
11 |
-
'Uploaded %d/%d files': 'Feltöltött fájlok: %d/%d',
|
12 |
-
'N/A': 'Nem elérhető',
|
13 |
-
'Drag files here.' : 'Húzd ide a fájlokat.',
|
14 |
-
'Stop upload': 'Feltöltés megszakítása',
|
15 |
-
'Start upload': 'Indítás',
|
16 |
-
'%d files queued': '%d fájl sorbaállítva',
|
17 |
-
'File: %s': 'Fájl: %s',
|
18 |
-
'Close': 'Bezárás',
|
19 |
-
'Using runtime: ': 'Használt runtime: ',
|
20 |
-
'File: %f, size: %s, max file size: %m': 'Fájl: %f, méret: %s, maximális fájlméret: %m',
|
21 |
-
'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'A feltöltés egyszerre csak %d fájlt fogad el, a többi fájl nem lesz feltöltve.',
|
22 |
-
'Upload URL might be wrong or doesn\'t exist': 'A megadott URL hibás vagy nem létezik',
|
23 |
-
'Error: File too large: ': 'Hiba: A fájl túl nagy: ',
|
24 |
-
'Error: Invalid file extension: ': 'Hiba: Érvénytelen fájlkiterjesztés: ',
|
25 |
-
'File extension error.': 'Hibás fájlkiterjesztés.',
|
26 |
-
'File size error.': 'Hibás fájlméret.',
|
27 |
-
'File count error.': 'A fájlok számával kapcsolatos hiba.',
|
28 |
-
'Init error.': 'Init hiba.',
|
29 |
-
'HTTP Error.': 'HTTP hiba.',
|
30 |
-
'Security error.': 'Biztonsági hiba.',
|
31 |
-
'Generic error.': 'Általános hiba.',
|
32 |
-
'IO error.': 'I/O hiba.'
|
33 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/it.js
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
// Italian
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Seleziona i files',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Aggiungi i file alla coda di caricamento e clicca il pulsante di avvio.',
|
5 |
-
'Filename' : 'Nome file',
|
6 |
-
'Status' : 'Stato',
|
7 |
-
'Size' : 'Dimensione',
|
8 |
-
'Add Files' : 'Aggiungi file',
|
9 |
-
'Stop current upload' : 'Interrompi il caricamento',
|
10 |
-
'Start uploading queue' : 'Avvia il caricamento',
|
11 |
-
'Uploaded %d/%d files': 'Caricati %d/%d file',
|
12 |
-
'N/A' : 'N/D',
|
13 |
-
'Drag files here.' : 'Trascina i file qui.',
|
14 |
-
'File extension error.': 'Errore estensione file.',
|
15 |
-
'File size error.': 'Errore dimensione file.',
|
16 |
-
'Init error.': 'Errore inizializzazione.',
|
17 |
-
'HTTP Error.': 'Errore HTTP.',
|
18 |
-
'Security error.': 'Errore sicurezza.',
|
19 |
-
'Generic error.': 'Errore generico.',
|
20 |
-
'IO error.': 'Errore IO.',
|
21 |
-
'Stop Upload': 'Ferma Upload',
|
22 |
-
'Start Upload': 'Inizia Upload',
|
23 |
-
'%d files queued': '%d file in lista'
|
24 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/ja.js
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
// Japanese
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'ファイル選択',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'ファイルをアップロードキューに追加してスタートボタンをクリックしてください',
|
5 |
-
'Filename' : 'ファイル名',
|
6 |
-
'Status' : 'ステータス',
|
7 |
-
'Size' : 'サイズ',
|
8 |
-
'Add Files' : 'ファイルを追加',
|
9 |
-
'Stop Upload' : 'アップロード停止',
|
10 |
-
'Start Upload' : 'アップロード',
|
11 |
-
'Add files' : 'ファイルを追加',
|
12 |
-
'Add files.' : 'ファイルを追加',
|
13 |
-
'Stop current upload' : '現在のアップロードを停止',
|
14 |
-
'Start uploading queue' : 'アップロード',
|
15 |
-
'Stop upload' : 'アップロード停止',
|
16 |
-
'Start upload' : 'アップロード',
|
17 |
-
'Uploaded %d/%d files': 'アップロード中 %d/%d ファイル',
|
18 |
-
'N/A' : 'N/A',
|
19 |
-
'Drag files here.' : 'ここにファイルをドラッグ',
|
20 |
-
'File extension error.': 'ファイル拡張子エラー',
|
21 |
-
'File size error.': 'ファイルサイズエラー',
|
22 |
-
'File count error.': 'ファイル数エラー',
|
23 |
-
'Init error.': 'イニシャライズエラー',
|
24 |
-
'HTTP Error.': 'HTTP エラー',
|
25 |
-
'Security error.': 'セキュリティエラー',
|
26 |
-
'Generic error.': 'エラー',
|
27 |
-
'IO error.': 'IO エラー',
|
28 |
-
'File: %s': 'ファイル: %s',
|
29 |
-
'Close': '閉じる',
|
30 |
-
'%d files queued': '%d ファイルが追加されました',
|
31 |
-
'Using runtime: ': 'モード: ',
|
32 |
-
'File: %f, size: %s, max file size: %m': 'ファイル: %f, サイズ: %s, 最大ファイルサイズ: %m',
|
33 |
-
'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'アップロード可能なファイル数は %d です。余分なファイルは削除されました',
|
34 |
-
'Upload URL might be wrong or doesn\'t exist': 'アップロード先の URL が存在しません',
|
35 |
-
'Error: File too large: ': 'エラー: サイズが大きすぎます: ',
|
36 |
-
'Error: Invalid file extension: ': 'エラー: 拡張子が許可されていません: '
|
37 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/ko.js
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
// Republic of Korea
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : '파일 선택',
|
4 |
-
'Add files to the upload queue and click the start button.' : '파일을 업로드 큐에 추가하여 시작 버튼을 클릭하십시오.',
|
5 |
-
'Filename' : '파일 이름',
|
6 |
-
'Status' : '상태',
|
7 |
-
'Size' : '크기',
|
8 |
-
'Add Files' : '파일 추가',
|
9 |
-
'Stop Upload': '업로드 중지',
|
10 |
-
'Start Upload': '업로드',
|
11 |
-
'Add files': '파일 추가',
|
12 |
-
'Stop current upload': '현재 업로드를 정지',
|
13 |
-
'Start uploading queue': '업로드',
|
14 |
-
'Stop upload': '업로드 중지',
|
15 |
-
'Start upload': '업로드',
|
16 |
-
'Uploaded % d / % d files': '업로드 중 % d / % d 파일',
|
17 |
-
'N / A': 'N / A',
|
18 |
-
'Drag files here': '여기에 파일을 드래그',
|
19 |
-
'File extension error': '파일 확장자 오류',
|
20 |
-
'File size error': '파일 크기 오류',
|
21 |
-
'File count error': '이미지 : 오류',
|
22 |
-
'Init error': '초기화 오류',
|
23 |
-
'HTTP Error': 'HTTP 오류',
|
24 |
-
'Security error': '보안 오류',
|
25 |
-
'Generic error': '오류',
|
26 |
-
'IO error': 'IO 오류',
|
27 |
-
'File : % s': '파일 % s',
|
28 |
-
'Close': '닫기',
|
29 |
-
'% d files queued': '% d 파일이 추가되었습니다',
|
30 |
-
'Using runtime :': '모드',
|
31 |
-
'File : % f, size : % s, max file size : % m': '파일 : % f, 크기 : % s, 최대 파일 크기 : % m',
|
32 |
-
'Upload element accepts only % d file (s) at a time. Extra files were stripped': '업로드 가능한 파일의 수는 % d입니다. 불필요한 파일은 삭제되었습니다 ',
|
33 |
-
'Upload URL might be wrong or doesn \'t exist ':'업로드할 URL이 존재하지 않습니다 ',
|
34 |
-
'Error : File too large :': '오류 : 크기가 너무 큽니다',
|
35 |
-
'Error : Invalid file extension :': '오류 : 확장자가 허용되지 않습니다 :'
|
36 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/lv.js
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
// .lv file like language pack
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Izvēlieties failus',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Pieveinojiet failus rindai un klikšķiniet uz "Sākt augšupielādi" pogas.',
|
5 |
-
'Filename' : 'Faila nosaukums',
|
6 |
-
'Status' : 'Statuss',
|
7 |
-
'Size' : 'Izmērs',
|
8 |
-
'Add files' : 'Pievienot failus',
|
9 |
-
'Stop current upload' : 'Apturēt pašreizējo augšupielādi',
|
10 |
-
'Start uploading queue' : 'Sākt augšupielādi',
|
11 |
-
'Drag files here.' : 'Ievelciet failus šeit',
|
12 |
-
'Start upload' : 'Sākt augšupielādi',
|
13 |
-
'Uploaded %d/%d files': 'Augšupielādēti %d/%d faili',
|
14 |
-
'Stop upload': 'Pārtraukt augšupielādi',
|
15 |
-
'Start upload': 'Sākt augšupielādi',
|
16 |
-
'%d files queued': '%d faili pievienoti rindai',
|
17 |
-
'File: %s': 'Fails: %s',
|
18 |
-
'Close': 'Aizvērt',
|
19 |
-
'Using runtime: ': 'Lieto saskarni: ',
|
20 |
-
'File: %f, size: %s, max file size: %m': 'Fails: %f, izmērs: %s, maksimālais faila izmērs: %m',
|
21 |
-
'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'Iespējams ielādēt tikai %d failus vienā reizē. Atlikušie faili netika pievienoti',
|
22 |
-
'Upload URL might be wrong or doesn\'t exist': 'Augšupielādes URL varētu būt nepareizs vai neeksistē',
|
23 |
-
'Error: File too large: ': 'Kļūda: Fails pārāk liels: ',
|
24 |
-
'Error: Invalid file extension: ': 'Kļūda: Nekorekts faila paplašinājums:',
|
25 |
-
'File extension error.': 'Faila paplašinājuma kļūda.',
|
26 |
-
'File size error.': 'Faila izmēra kļūda.',
|
27 |
-
'File count error.': 'Failu skaita kļūda',
|
28 |
-
'Init error.': 'Inicializācijas kļūda.',
|
29 |
-
'HTTP Error.': 'HTTP kļūda.',
|
30 |
-
'Security error.': 'Drošības kļūda.',
|
31 |
-
'Generic error.': 'Vispārēja rakstura kļūda.',
|
32 |
-
'IO error.': 'Ievades/Izvades kļūda.'
|
33 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/nl.js
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
// Dutch
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Selecteer bestand(en):',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Voeg bestanden toe aan de wachtrij en druk op \'Start\'.',
|
5 |
-
'Filename' : 'Bestandsnaam',
|
6 |
-
'Status' : 'Status',
|
7 |
-
'Size' : 'Grootte',
|
8 |
-
'Add files' : 'Voeg bestanden toe',
|
9 |
-
'Stop current upload' : 'Stop upload',
|
10 |
-
'Start uploading queue' : 'Start upload',
|
11 |
-
'Uploaded %d/%d files': '%d/%d bestanden ge-upload',
|
12 |
-
'N/A' : 'Niet beschikbaar',
|
13 |
-
'Drag files here.' : 'Sleep bestanden hierheen.',
|
14 |
-
'File extension error.': 'Ongeldig bestandstype.',
|
15 |
-
'File size error.': 'Bestandsgrootte Error.',
|
16 |
-
'Init error.': 'Initialisatie error.',
|
17 |
-
'HTTP Error.': 'HTTP Error.',
|
18 |
-
'Security error.': 'Beveiliging error.',
|
19 |
-
'Generic error.': 'Onbekende error.',
|
20 |
-
'IO error.': 'IO error.'
|
21 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/pl.js
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
plupload.addI18n({
|
2 |
-
'Select files' : 'Wybierz pliki:',
|
3 |
-
'Add files to the upload queue and click the start button.' : 'Dodaj pliki i kliknij \'Rozpocznij transfer\'.',
|
4 |
-
'Filename' : 'Nazwa pliku',
|
5 |
-
'Status' : 'Status',
|
6 |
-
'Size' : 'Rozmiar',
|
7 |
-
'Add files' : 'Dodaj pliki',
|
8 |
-
'Stop current upload' : 'Przerwij aktualny transfer',
|
9 |
-
'Start uploading queue' : 'Rozpocznij wysyłanie',
|
10 |
-
'Uploaded %d/%d files': 'Wysłano %d/%d plików',
|
11 |
-
'N/A' : 'Nie dostępne',
|
12 |
-
'Drag files here.' : 'Przeciągnij tu pliki',
|
13 |
-
'File extension error.': 'Nieobsługiwany format pliku.',
|
14 |
-
'File size error.': 'Plik jest zbyt duży.',
|
15 |
-
'Init error.': 'Błąd inicjalizacji.',
|
16 |
-
'HTTP Error.': 'Błąd HTTP.',
|
17 |
-
'Security error.': 'Błąd bezpieczeństwa.',
|
18 |
-
'Generic error.': 'Błąd ogólny.',
|
19 |
-
'IO error.': 'Błąd IO.',
|
20 |
-
'Stop Upload': 'Przerwij transfer.',
|
21 |
-
'Add Files': 'Dodaj pliki',
|
22 |
-
'Start upload': 'Rozpocznij transfer.',
|
23 |
-
'%d files queued': '%d plików w kolejce.'
|
24 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/pt-br.js
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
// Brazilian Portuguese
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Escolha os arquivos',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Adicione os arquivos abaixo e clique no botão "Iniciar o envio".',
|
5 |
-
'Filename' : 'Nome do arquivo',
|
6 |
-
'Status' : 'Status',
|
7 |
-
'Size' : 'Tamanho',
|
8 |
-
'Add Files' : 'Adicionar arquivo(s)',
|
9 |
-
'Stop Upload' : 'Parar o envio',
|
10 |
-
'Start Upload' : 'Iniciar o envio',
|
11 |
-
'Add files' : 'Adicionar arquivo(s)',
|
12 |
-
'Add files.' : 'Adicionar arquivo(s)',
|
13 |
-
'Stop upload' : 'Parar o envio',
|
14 |
-
'Start upload' : 'Iniciar o envio',
|
15 |
-
'Uploaded %d/%d files': 'Enviado(s) %d/%d arquivo(s)',
|
16 |
-
'N/A' : 'N/D',
|
17 |
-
'Drag files here.' : 'Arraste os arquivos pra cá',
|
18 |
-
'File extension error.': 'Tipo de arquivo não permitido.',
|
19 |
-
'File size error.': 'Tamanho de arquivo não permitido.',
|
20 |
-
'File count error.': 'Erro na contagem dos arquivos',
|
21 |
-
'Init error.': 'Erro inicializando.',
|
22 |
-
'HTTP Error.': 'Erro HTTP.',
|
23 |
-
'Security error.': 'Erro de segurança.',
|
24 |
-
'Generic error.': 'Erro genérico.',
|
25 |
-
'IO error.': 'Erro de E/S.',
|
26 |
-
'File: %s': 'Arquivo: %s',
|
27 |
-
'Close': 'Fechar',
|
28 |
-
'%d files queued': '%d arquivo(s)',
|
29 |
-
'Using runtime: ': 'Usando: ',
|
30 |
-
'File: %f, size: %s, max file size: %m': 'Arquivo: %f, tamanho: %s, máximo: %m',
|
31 |
-
'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'Só são aceitos %d arquivos por vez. O que passou disso foi descartado.',
|
32 |
-
'Upload URL might be wrong or doesn\'t exist': 'URL de envio está errada ou não existe',
|
33 |
-
'Error: File too large: ': 'Erro: Arquivo muito grande: ',
|
34 |
-
'Error: Invalid file extension: ': 'Erro: Tipo de arquivo não permitido: '
|
35 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/ro.js
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
// Romanian
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Selectare fişiere',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Adaugă fişiere în lista apoi apasă butonul \'Începe încărcare\'.',
|
5 |
-
'Filename' : 'Nume fişier',
|
6 |
-
'Status' : 'Stare',
|
7 |
-
'Size' : 'Mărime',
|
8 |
-
'Add files' : 'Adăugare fişiere',
|
9 |
-
'Stop current upload' : 'Întrerupe încărcarea curentă',
|
10 |
-
'Start uploading queue' : 'Începe incărcarea',
|
11 |
-
'Uploaded %d/%d files': 'Fişiere încărcate %d/%d',
|
12 |
-
'N/A' : 'N/A',
|
13 |
-
'Drag files here.' : 'Trage aici fişierele',
|
14 |
-
'File extension error.': 'Extensie fişier eronată',
|
15 |
-
'File size error.': 'Eroare dimensiune fişier',
|
16 |
-
'Init error.': 'Eroare iniţializare',
|
17 |
-
'HTTP Error.': 'Eroare HTTP',
|
18 |
-
'Security error.': 'Eroare securitate',
|
19 |
-
'Generic error.': 'Eroare generică',
|
20 |
-
'IO error.': 'Eroare Intrare/Ieşire',
|
21 |
-
'Stop Upload': 'Oprire încărcare',
|
22 |
-
'Start upload': 'Începe încărcare',
|
23 |
-
'%d files queued': '%d fişiere listate'
|
24 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/ru.js
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
// Russian
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Выберите файлы',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Добавьте файлы в очередь и нажмите кнопку "Загрузить файлы".',
|
5 |
-
'Filename' : 'Имя файла',
|
6 |
-
'Status' : 'Статус',
|
7 |
-
'Size' : 'Размер',
|
8 |
-
'Add files' : 'Добавить файлы',
|
9 |
-
'Stop current upload' : 'Остановить загрузку',
|
10 |
-
'Start uploading queue' : 'Загрузить файлы',
|
11 |
-
'Uploaded %d/%d files': 'Загружено %d/%d файлов',
|
12 |
-
'N/A' : 'N/D',
|
13 |
-
'Drag files here.' : 'Перетащите файлы сюда.',
|
14 |
-
'File extension error.': 'Неправильное расширение файла.',
|
15 |
-
'File size error.': 'Неправильный размер файла.',
|
16 |
-
'Init error.': 'Ошибка инициализации.',
|
17 |
-
'HTTP Error.': 'Ошибка HTTP.',
|
18 |
-
'Security error.': 'Ошибка безопасности.',
|
19 |
-
'Generic error.': 'Общая ошибка.',
|
20 |
-
'IO error.': 'Ошибка ввода-вывода.'
|
21 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/sk.js
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
// .po file like language pack
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Vyberte súbory',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Pridajte súbory do zoznamu a potom spustite nahrávanie.',
|
5 |
-
'Filename' : 'Názov súboru',
|
6 |
-
'Status' : 'Stav',
|
7 |
-
'Size' : 'Veľkosť',
|
8 |
-
'Add files' : 'Pridať súbory',
|
9 |
-
'Stop current upload' : 'Zastaviť nahrávanie',
|
10 |
-
'Start uploading queue' : 'Spustiť nahrávanie zoznamu',
|
11 |
-
'Drag files here.' : 'Sem pretiahnite súbory.',
|
12 |
-
'Start upload': 'Spustiť nahrávanie',
|
13 |
-
'Uploaded %d/%d files': 'Nahraných %d/%d súborov',
|
14 |
-
'Using runtime: ': 'K odoslaniu súborov sa použije rozhranie: ',
|
15 |
-
'N/A' : 'N/A',
|
16 |
-
'File extension error.': 'Chybný typ súboru.',
|
17 |
-
'File size error.': 'Súbor je príliš veľký.',
|
18 |
-
'Init error.': 'Chyba inicializácie.',
|
19 |
-
'HTTP Error.': 'HTTP Chyba.',
|
20 |
-
'Security error.': 'Bezpečnostná Chyba.',
|
21 |
-
'Generic error.': 'Chyba.',
|
22 |
-
'IO error.': 'IO Chyba',
|
23 |
-
'Stop Upload': 'Zastaviť nahrávanie',
|
24 |
-
'%d files queued': '%d súborov pridaných do zoznamu'
|
25 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/sr.js
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
// Serbian
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Izaberite fajlove',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Dodajte fajlove u listu i kliknite na dugme Start.',
|
5 |
-
'Filename' : 'Naziv fajla',
|
6 |
-
'Status' : 'Status',
|
7 |
-
'Size' : 'Veličina',
|
8 |
-
'Add Files' : 'Dodaj fajlove',
|
9 |
-
'Stop current upload' : 'Zaustavi upload',
|
10 |
-
'Start uploading queue' : 'Počni upload',
|
11 |
-
'Drag files here.' : 'Prevucite fajlove ovde.',
|
12 |
-
'Start Upload': 'Počni upload',
|
13 |
-
'Uploaded %d/%d files': 'Snimljeno %d/%d fajlova'
|
14 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/i18n/sv.js
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
// .po file like language pack
|
2 |
-
plupload.addI18n({
|
3 |
-
'Select files' : 'Välj filer',
|
4 |
-
'Add files to the upload queue and click the start button.' : 'Lägg till filer till kön och tryck på start.',
|
5 |
-
'Filename' : 'Filnamn',
|
6 |
-
'Status' : 'Status',
|
7 |
-
'Size' : 'Storlek',
|
8 |
-
'Add files' : 'Lägg till filer',
|
9 |
-
'Stop current upload' : 'Stoppa uppladdningen',
|
10 |
-
'Start uploading queue' : 'Starta uppladdningen',
|
11 |
-
'Drag files here.' : 'Dra filer hit'
|
12 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/jquery.plupload.queue/jquery.plupload.queue.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(c){var d={};function a(e){return plupload.translate(e)||e}function b(f,e){e.contents().each(function(g,h){h=c(h);if(!h.is(".plupload")){h.remove()}});e.prepend('<div class="plupload_wrapper plupload_scroll"><div id="'+f+'_container" class="plupload_container"><div class="plupload"><div class="plupload_header"><div class="plupload_header_content"><div class="plupload_header_title">'+a("Select files")+'</div><div class="plupload_header_text">'+a("Add files to the upload queue and click the start button.")+'</div></div></div><div class="plupload_content"><div class="plupload_filelist_header"><div class="plupload_file_name">'+a("Filename")+'</div><div class="plupload_file_action"> </div><div class="plupload_file_status"><span>'+a("Status")+'</span></div><div class="plupload_file_size">'+a("Size")+'</div><div class="plupload_clearer"> </div></div><ul id="'+f+'_filelist" class="plupload_filelist"></ul><div class="plupload_filelist_footer"><div class="plupload_file_name"><div class="plupload_buttons"><a href="#" class="plupload_button plupload_add">'+a("Add files")+'</a><a href="#" class="plupload_button plupload_start">'+a("Start upload")+'</a></div><span class="plupload_upload_status"></span></div><div class="plupload_file_action"></div><div class="plupload_file_status"><span class="plupload_total_status">0%</span></div><div class="plupload_file_size"><span class="plupload_total_file_size">0 b</span></div><div class="plupload_progress"><div class="plupload_progress_container"><div class="plupload_progress_bar"></div></div></div><div class="plupload_clearer"> </div></div></div></div></div><input type="hidden" id="'+f+'_count" name="'+f+'_count" value="0" /></div>')}c.fn.pluploadQueue=function(e){if(e){this.each(function(){var j,i,k;i=c(this);k=i.attr("id");if(!k){k=plupload.guid();i.attr("id",k)}j=new plupload.Uploader(c.extend({dragdrop:true,container:k},e));d[k]=j;function h(l){var n;if(l.status==plupload.DONE){n="plupload_done"}if(l.status==plupload.FAILED){n="plupload_failed"}if(l.status==plupload.QUEUED){n="plupload_delete"}if(l.status==plupload.UPLOADING){n="plupload_uploading"}var m=c("#"+l.id).attr("class",n).find("a").css("display","block");if(l.hint){m.attr("title",l.hint)}}function f(){c("span.plupload_total_status",i).html(j.total.percent+"%");c("div.plupload_progress_bar",i).css("width",j.total.percent+"%");c("span.plupload_upload_status",i).html(a("Uploaded %d/%d files").replace(/%d\/%d/,j.total.uploaded+"/"+j.files.length))}function g(){var m=c("ul.plupload_filelist",i).html(""),n=0,l;c.each(j.files,function(p,o){l="";if(o.status==plupload.DONE){if(o.target_name){l+='<input type="hidden" name="'+k+"_"+n+'_tmpname" value="'+plupload.xmlEncode(o.target_name)+'" />'}l+='<input type="hidden" name="'+k+"_"+n+'_name" value="'+plupload.xmlEncode(o.name)+'" />';l+='<input type="hidden" name="'+k+"_"+n+'_status" value="'+(o.status==plupload.DONE?"done":"failed")+'" />';n++;c("#"+k+"_count").val(n)}m.append('<li id="'+o.id+'"><div class="plupload_file_name"><span>'+o.name+'</span></div><div class="plupload_file_action"><a href="#"></a></div><div class="plupload_file_status">'+o.percent+'%</div><div class="plupload_file_size">'+plupload.formatSize(o.size)+'</div><div class="plupload_clearer"> </div>'+l+"</li>");h(o);c("#"+o.id+".plupload_delete a").click(function(q){c("#"+o.id).remove();j.removeFile(o);q.preventDefault()})});c("span.plupload_total_file_size",i).html(plupload.formatSize(j.total.size));if(j.total.queued===0){c("span.plupload_add_text",i).html(a("Add files."))}else{c("span.plupload_add_text",i).html(j.total.queued+" files queued.")}c("a.plupload_start",i).toggleClass("plupload_disabled",j.files.length==(j.total.uploaded+j.total.failed));m[0].scrollTop=m[0].scrollHeight;f();if(!j.files.length&&j.features.dragdrop&&j.settings.dragdrop){c("#"+k+"_filelist").append('<li class="plupload_droptext">'+a("Drag files here.")+"</li>")}}j.bind("UploadFile",function(l,m){c("#"+m.id).addClass("plupload_current_file")});j.bind("Init",function(l,m){b(k,i);if(!e.unique_names&&e.rename){i.on("click","#"+k+"_filelist div.plupload_file_name span",function(s){var q=c(s.target),o,r,n,p="";o=l.getFile(q.parents("li")[0].id);n=o.name;r=/^(.+)(\.[^.]+)$/.exec(n);if(r){n=r[1];p=r[2]}q.hide().after('<input type="text" />');q.next().val(n).focus().blur(function(){q.show().next().remove()}).keydown(function(u){var t=c(this);if(c.inArray(u.keyCode,[13,27])!==-1){u.preventDefault();if(u.keyCode===13){o.name=t.val()+p;q.html(o.name)}t.blur()}})})}c("a.plupload_add",i).attr("id",k+"_browse");l.settings.browse_button=k+"_browse";if(l.features.dragdrop&&l.settings.dragdrop){l.settings.drop_element=k+"_filelist";c("#"+k+"_filelist").append('<li class="plupload_droptext">'+a("Drag files here.")+"</li>")}c("#"+k+"_container").attr("title","Using runtime: "+m.runtime);c("a.plupload_start",i).click(function(n){if(!c(this).hasClass("plupload_disabled")){j.start()}n.preventDefault()});c("a.plupload_stop",i).click(function(n){n.preventDefault();j.stop()});c("a.plupload_start",i).addClass("plupload_disabled")});j.init();j.bind("Error",function(l,o){var m=o.file,n;if(m){n=o.message;if(o.details){n+=" ("+o.details+")"}if(o.code==plupload.FILE_SIZE_ERROR){alert(a("Error: File too large: ")+m.name)}if(o.code==plupload.FILE_EXTENSION_ERROR){alert(a("Error: Invalid file extension: ")+m.name)}m.hint=n;c("#"+m.id).attr("class","plupload_failed").find("a").css("display","block").attr("title",n)}});j.bind("StateChanged",function(){if(j.state===plupload.STARTED){c("li.plupload_delete a,div.plupload_buttons",i).hide();c("span.plupload_upload_status,div.plupload_progress,a.plupload_stop",i).css("display","block");c("span.plupload_upload_status",i).html("Uploaded "+j.total.uploaded+"/"+j.files.length+" files");if(e.multiple_queues){c("span.plupload_total_status,span.plupload_total_file_size",i).show()}}else{g();c("a.plupload_stop,div.plupload_progress",i).hide();c("a.plupload_delete",i).css("display","block")}});j.bind("QueueChanged",g);j.bind("FileUploaded",function(l,m){h(m)});j.bind("UploadProgress",function(l,m){c("#"+m.id+" div.plupload_file_status",i).html(m.percent+"%");h(m);f();if(e.multiple_queues&&j.total.uploaded+j.total.failed==j.files.length){c(".plupload_buttons,.plupload_upload_status",i).css("display","inline");c(".plupload_start",i).addClass("plupload_disabled");c("span.plupload_total_status,span.plupload_total_file_size",i).hide()}});if(e.setup){e.setup(j)}});return this}else{return d[c(this[0]).attr("id")]}}})(jQuery);
|
|
admin/js/plupload/jquery.ui.plupload/css/jquery.ui.plupload.css
DELETED
@@ -1,147 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Plupload
|
3 |
-
------------------------------------------------------------------- */
|
4 |
-
|
5 |
-
.plupload_button {cursor: pointer;}
|
6 |
-
|
7 |
-
.plupload_wrapper {
|
8 |
-
font: normal 11px Verdana,sans-serif;
|
9 |
-
width: 100%;
|
10 |
-
}
|
11 |
-
|
12 |
-
.plupload .plupload_container input {width: 98%;}
|
13 |
-
.plupload .plupload_filelist_footer {border-width: 1px 0 0 0}
|
14 |
-
.plupload .plupload_filelist_header {border-width: 0 0 1px 0}
|
15 |
-
div.plupload .plupload_file {border-width: 0 0 1px 0}
|
16 |
-
div.plupload div.plupload_header {border-width: 0 0 1px 0; position: relative;}
|
17 |
-
|
18 |
-
.plupload_file .ui-icon {
|
19 |
-
cursor:pointer;
|
20 |
-
}
|
21 |
-
|
22 |
-
.plupload_header_content {
|
23 |
-
background-image: url('../img/plupload.png');
|
24 |
-
background-repeat: no-repeat;
|
25 |
-
background-position: 8px center;
|
26 |
-
min-height: 56px;
|
27 |
-
padding-left: 60px;
|
28 |
-
position:relative;
|
29 |
-
}
|
30 |
-
.plupload_header_content_bw {background-image: url('../img/plupload-bw.png');}
|
31 |
-
.plupload_header_title {
|
32 |
-
font: normal 18px sans-serif;
|
33 |
-
padding: 6px 0 3px;
|
34 |
-
}
|
35 |
-
.plupload_header_text {font: normal 12px sans-serif;}
|
36 |
-
|
37 |
-
.plupload_filelist,
|
38 |
-
.plupload_filelist_content {
|
39 |
-
border-collapse: collapse;
|
40 |
-
margin: 0;
|
41 |
-
padding: 0;
|
42 |
-
width: 100%;
|
43 |
-
-moz-user-select:none;
|
44 |
-
-webkit-user-select:none;
|
45 |
-
user-select:none;
|
46 |
-
}
|
47 |
-
|
48 |
-
.plupload_cell {padding: 8px 6px;}
|
49 |
-
|
50 |
-
.plupload_file {
|
51 |
-
border-left: none;
|
52 |
-
border-right: none;
|
53 |
-
}
|
54 |
-
|
55 |
-
.plupload .ui-sortable-helper,
|
56 |
-
.plupload .ui-sortable .plupload_file {
|
57 |
-
cursor:move;
|
58 |
-
}
|
59 |
-
|
60 |
-
.plupload_scroll {
|
61 |
-
max-height: 180px;
|
62 |
-
min-height: 168px;
|
63 |
-
_height: 168px;
|
64 |
-
overflow-y: auto;
|
65 |
-
}
|
66 |
-
|
67 |
-
.plupload_file_size, .plupload_file_status {text-align: right;}
|
68 |
-
.plupload_file_size, .plupload_file_status {width: 52px;}
|
69 |
-
.plupload_file_action {width: 16px;}
|
70 |
-
.plupload_file_name {
|
71 |
-
overflow: hidden;
|
72 |
-
padding-left: 10px;
|
73 |
-
}
|
74 |
-
|
75 |
-
.plupload_file_rename {
|
76 |
-
width:95%;
|
77 |
-
}
|
78 |
-
|
79 |
-
.plupload_progress {width: 60px;}
|
80 |
-
.plupload_progress_container {padding: 1px;}
|
81 |
-
|
82 |
-
|
83 |
-
/* Floats */
|
84 |
-
|
85 |
-
.plupload_right {float: right;}
|
86 |
-
.plupload_left {float: left;}
|
87 |
-
.plupload_clear,.plupload_clearer {clear: both;}
|
88 |
-
.plupload_clearer, .plupload_progress_bar {
|
89 |
-
display: block;
|
90 |
-
font-size: 0;
|
91 |
-
line-height: 0;
|
92 |
-
}
|
93 |
-
.plupload_clearer {height: 0;}
|
94 |
-
|
95 |
-
/* Misc */
|
96 |
-
.plupload_hidden {display: none;}
|
97 |
-
.plupload_droptext {
|
98 |
-
background: transparent;
|
99 |
-
text-align: center;
|
100 |
-
vertical-align: middle;
|
101 |
-
border: 0;
|
102 |
-
line-height: 165px;
|
103 |
-
}
|
104 |
-
|
105 |
-
.plupload_buttons, .plupload_upload_status {float: left}
|
106 |
-
|
107 |
-
.plupload_message {
|
108 |
-
position: absolute;
|
109 |
-
top: 0px;
|
110 |
-
left: 0px;
|
111 |
-
height: 100%;
|
112 |
-
width: 100%;
|
113 |
-
}
|
114 |
-
|
115 |
-
.plupload_message p {
|
116 |
-
padding:0.7em;
|
117 |
-
margin:0;
|
118 |
-
}
|
119 |
-
|
120 |
-
.plupload_message strong {
|
121 |
-
font-weight: bold;
|
122 |
-
}
|
123 |
-
|
124 |
-
plupload_message i {
|
125 |
-
font-style: italic;
|
126 |
-
}
|
127 |
-
|
128 |
-
.plupload_message p span.ui-icon {
|
129 |
-
float: left;
|
130 |
-
margin-right: 0.3em;
|
131 |
-
}
|
132 |
-
|
133 |
-
.plupload_header_content .ui-state-error,
|
134 |
-
.plupload_header_content .ui-state-highlight {
|
135 |
-
border:none;
|
136 |
-
}
|
137 |
-
|
138 |
-
.plupload_message_close {
|
139 |
-
position:absolute;
|
140 |
-
top:5px;
|
141 |
-
right:5px;
|
142 |
-
cursor:pointer;
|
143 |
-
}
|
144 |
-
|
145 |
-
.plupload .ui-sortable-placeholder {
|
146 |
-
height:35px;
|
147 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/plupload/jquery.ui.plupload/img/plupload-bw.png
DELETED
Binary file
|
admin/js/plupload/jquery.ui.plupload/img/plupload.png
DELETED
Binary file
|
admin/js/plupload/jquery.ui.plupload/jquery.ui.plupload.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(f,a,c,g,e){var h={};function b(i){return c.translate(i)||i}function d(i){i.html('<div class="plupload_wrapper"><div class="ui-widget-content plupload_container"><div class="plupload"><div class="ui-state-default ui-widget-header plupload_header"><div class="plupload_header_content"><div class="plupload_header_title">'+b("Select files")+'</div><div class="plupload_header_text">'+b("Add files to the upload queue and click the start button.")+'</div></div></div><div class="plupload_content"><table class="plupload_filelist"><tr class="ui-widget-header plupload_filelist_header"><td class="plupload_cell plupload_file_name">'+b("Filename")+'</td><td class="plupload_cell plupload_file_status">'+b("Status")+'</td><td class="plupload_cell plupload_file_size">'+b("Size")+'</td><td class="plupload_cell plupload_file_action"> </td></tr></table><div class="plupload_scroll"><table class="plupload_filelist_content"></table></div><table class="plupload_filelist"><tr class="ui-widget-header ui-widget-content plupload_filelist_footer"><td class="plupload_cell plupload_file_name"><div class="plupload_buttons"><!-- Visible --><a class="plupload_button plupload_add">'+b("Add Files")+'</a> <a class="plupload_button plupload_start">'+b("Start Upload")+'</a> <a class="plupload_button plupload_stop plupload_hidden">'+b("Stop Upload")+'</a> </div><div class="plupload_started plupload_hidden"><!-- Hidden --><div class="plupload_progress plupload_right"><div class="plupload_progress_container"></div></div><div class="plupload_cell plupload_upload_status"></div><div class="plupload_clearer"> </div></div></td><td class="plupload_file_status"><span class="plupload_total_status">0%</span></td><td class="plupload_file_size"><span class="plupload_total_file_size">0 kb</span></td><td class="plupload_file_action"></td></tr></table></div></div></div><input class="plupload_count" value="0" type="hidden"></div>')}g.widget("ui.plupload",{contents_bak:"",runtime:null,options:{browse_button_hover:"ui-state-hover",browse_button_active:"ui-state-active",dragdrop:true,multiple_queues:true,buttons:{browse:true,start:true,stop:true},autostart:false,sortable:false,rename:false,max_file_count:0},FILE_COUNT_ERROR:-9001,_create:function(){var i=this,k,j;k=this.element.attr("id");if(!k){k=c.guid();this.element.attr("id",k)}this.id=k;this.contents_bak=this.element.html();d(this.element);this.container=g(".plupload_container",this.element).attr("id",k+"_container");this.filelist=g(".plupload_filelist_content",this.container).attr({id:k+"_filelist",unselectable:"on"});this.browse_button=g(".plupload_add",this.container).attr("id",k+"_browse");this.start_button=g(".plupload_start",this.container).attr("id",k+"_start");this.stop_button=g(".plupload_stop",this.container).attr("id",k+"_stop");if(g.ui.button){this.browse_button.button({icons:{primary:"ui-icon-circle-plus"}});this.start_button.button({icons:{primary:"ui-icon-circle-arrow-e"},disabled:true});this.stop_button.button({icons:{primary:"ui-icon-circle-close"}})}this.progressbar=g(".plupload_progress_container",this.container);if(g.ui.progressbar){this.progressbar.progressbar()}this.counter=g(".plupload_count",this.element).attr({id:k+"_count",name:k+"_count"});j=this.uploader=h[k]=new c.Uploader(g.extend({container:k,browse_button:k+"_browse"},this.options));j.bind("Error",function(l,m){if(m.code===c.INIT_ERROR){i.destroy()}});j.bind("Init",function(l,m){if(!i.options.buttons.browse){i.browse_button.button("disable").hide();l.disableBrowse(true)}if(!i.options.buttons.start){i.start_button.button("disable").hide()}if(!i.options.buttons.stop){i.stop_button.button("disable").hide()}if(!i.options.unique_names&&i.options.rename){i._enableRenaming()}if(j.features.dragdrop&&i.options.dragdrop){i._enableDragAndDrop()}i.container.attr("title",b("Using runtime: ")+(i.runtime=m.runtime));i.start_button.click(function(n){if(!g(this).button("option","disabled")){i.start()}n.preventDefault()});i.stop_button.click(function(n){i.stop();n.preventDefault()})});if(i.options.max_file_count){j.bind("FilesAdded",function(l,n){var o=[],m=n.length;var p=l.files.length+m-i.options.max_file_count;if(p>0){o=n.splice(m-p,p);l.trigger("Error",{code:i.FILE_COUNT_ERROR,message:b("File count error."),file:o})}})}j.init();j.bind("FilesAdded",function(l,m){i._trigger("selected",null,{up:l,files:m});if(i.options.autostart){setTimeout(function(){i.start()},10)}});j.bind("FilesRemoved",function(l,m){i._trigger("removed",null,{up:l,files:m})});j.bind("QueueChanged",function(){i._updateFileList()});j.bind("StateChanged",function(){i._handleState()});j.bind("UploadFile",function(l,m){i._handleFileStatus(m)});j.bind("FileUploaded",function(l,m){i._handleFileStatus(m);i._trigger("uploaded",null,{up:l,file:m})});j.bind("UploadProgress",function(l,m){g("#"+m.id).find(".plupload_file_status").html(m.percent+"%").end().find(".plupload_file_size").html(c.formatSize(m.size));i._handleFileStatus(m);i._updateTotalProgress();i._trigger("progress",null,{up:l,file:m})});j.bind("UploadComplete",function(l,m){i._trigger("complete",null,{up:l,files:m})});j.bind("Error",function(l,p){var n=p.file,o,m;if(n){o="<strong>"+p.message+"</strong>";m=p.details;if(m){o+=" <br /><i>"+p.details+"</i>"}else{switch(p.code){case c.FILE_EXTENSION_ERROR:m=b("File: %s").replace("%s",n.name);break;case c.FILE_SIZE_ERROR:m=b("File: %f, size: %s, max file size: %m").replace(/%([fsm])/g,function(r,q){switch(q){case"f":return n.name;case"s":return n.size;case"m":return c.parseSize(i.options.max_file_size)}});break;case i.FILE_COUNT_ERROR:m=b("Upload element accepts only %d file(s) at a time. Extra files were stripped.").replace("%d",i.options.max_file_count);break;case c.IMAGE_FORMAT_ERROR:m=c.translate("Image format either wrong or not supported.");break;case c.IMAGE_MEMORY_ERROR:m=c.translate("Runtime ran out of available memory.");break;case c.IMAGE_DIMENSIONS_ERROR:m=c.translate("Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.").replace(/%([swh])/g,function(r,q){switch(q){case"s":return l.runtime;case"w":return l.features.maxWidth;case"h":return l.features.maxHeight}});break;case c.HTTP_ERROR:m=b("Upload URL might be wrong or doesn't exist");break}o+=" <br /><i>"+m+"</i>"}i.notify("error",o);i._trigger("error",null,{up:l,file:n,error:o})}})},_setOption:function(j,k){var i=this;if(j=="buttons"&&typeof(k)=="object"){k=g.extend(i.options.buttons,k);if(!k.browse){i.browse_button.button("disable").hide();up.disableBrowse(true)}else{i.browse_button.button("enable").show();up.disableBrowse(false)}if(!k.start){i.start_button.button("disable").hide()}else{i.start_button.button("enable").show()}if(!k.stop){i.stop_button.button("disable").hide()}else{i.start_button.button("enable").show()}}i.uploader.settings[j]=k},start:function(){this.uploader.start();this._trigger("start",null)},stop:function(){this.uploader.stop();this._trigger("stop",null)},getFile:function(j){var i;if(typeof j==="number"){i=this.uploader.files[j]}else{i=this.uploader.getFile(j)}return i},removeFile:function(j){var i=this.getFile(j);if(i){this.uploader.removeFile(i)}},clearQueue:function(){this.uploader.splice()},getUploader:function(){return this.uploader},refresh:function(){this.uploader.refresh()},_handleState:function(){var j=this,i=this.uploader;if(i.state===c.STARTED){g(j.start_button).button("disable");g([]).add(j.stop_button).add(".plupload_started").removeClass("plupload_hidden");g(".plupload_upload_status",j.element).html(b("Uploaded %d/%d files").replace("%d/%d",i.total.uploaded+"/"+i.files.length));g(".plupload_header_content",j.element).addClass("plupload_header_content_bw")}else{g([]).add(j.stop_button).add(".plupload_started").addClass("plupload_hidden");if(j.options.multiple_queues){g(j.start_button).button("enable");g(".plupload_header_content",j.element).removeClass("plupload_header_content_bw")}j._updateFileList()}},_handleFileStatus:function(l){var n,j;if(!g("#"+l.id).length){return}switch(l.status){case c.DONE:n="plupload_done";j="ui-icon ui-icon-circle-check";break;case c.FAILED:n="ui-state-error plupload_failed";j="ui-icon ui-icon-alert";break;case c.QUEUED:n="plupload_delete";j="ui-icon ui-icon-circle-minus";break;case c.UPLOADING:n="ui-state-highlight plupload_uploading";j="ui-icon ui-icon-circle-arrow-w";var i=g(".plupload_scroll",this.container),m=i.scrollTop(),o=i.height(),k=g("#"+l.id).position().top+g("#"+l.id).height();if(o<k){i.scrollTop(m+k-o)}break}n+=" ui-state-default plupload_file";g("#"+l.id).attr("class",n).find(".ui-icon").attr("class",j)},_updateTotalProgress:function(){var i=this.uploader;this.progressbar.progressbar("value",i.total.percent);this.element.find(".plupload_total_status").html(i.total.percent+"%").end().find(".plupload_total_file_size").html(c.formatSize(i.total.size)).end().find(".plupload_upload_status").html(b("Uploaded %d/%d files").replace("%d/%d",i.total.uploaded+"/"+i.files.length))},_updateFileList:function(){var k=this,j=this.uploader,m=this.filelist,l=0,o,n=this.id+"_",i;if(g.ui.sortable&&this.options.sortable){g("tbody.ui-sortable",m).sortable("destroy")}m.empty();g.each(j.files,function(q,p){i="";o=n+l;if(p.status===c.DONE){if(p.target_name){i+='<input type="hidden" name="'+o+'_tmpname" value="'+c.xmlEncode(p.target_name)+'" />'}i+='<input type="hidden" name="'+o+'_name" value="'+c.xmlEncode(p.name)+'" />';i+='<input type="hidden" name="'+o+'_status" value="'+(p.status===c.DONE?"done":"failed")+'" />';l++;k.counter.val(l)}m.append('<tr class="ui-state-default plupload_file" id="'+p.id+'"><td class="plupload_cell plupload_file_name"><span>'+p.name+'</span></td><td class="plupload_cell plupload_file_status">'+p.percent+'%</td><td class="plupload_cell plupload_file_size">'+c.formatSize(p.size)+'</td><td class="plupload_cell plupload_file_action"><div class="ui-icon"></div>'+i+"</td></tr>");k._handleFileStatus(p);g("#"+p.id+".plupload_delete .ui-icon, #"+p.id+".plupload_done .ui-icon").click(function(r){g("#"+p.id).remove();j.removeFile(p);r.preventDefault()});k._trigger("updatelist",null,m)});if(j.total.queued===0){g(".ui-button-text",k.browse_button).html(b("Add Files"))}else{g(".ui-button-text",k.browse_button).html(b("%d files queued").replace("%d",j.total.queued))}if(j.files.length===(j.total.uploaded+j.total.failed)){k.start_button.button("disable")}else{k.start_button.button("enable")}m[0].scrollTop=m[0].scrollHeight;k._updateTotalProgress();if(!j.files.length&&j.features.dragdrop&&j.settings.dragdrop){g("#"+o+"_filelist").append('<tr><td class="plupload_droptext">'+b("Drag files here.")+"</td></tr>")}else{if(k.options.sortable&&g.ui.sortable){k._enableSortingList()}}},_enableRenaming:function(){var i=this;this.filelist.on("click",".plupload_delete .plupload_file_name span",function(o){var m=g(o.target),k,n,j,l="";k=i.uploader.getFile(m.parents("tr")[0].id);j=k.name;n=/^(.+)(\.[^.]+)$/.exec(j);if(n){j=n[1];l=n[2]}m.hide().after('<input class="plupload_file_rename" type="text" />');m.next().val(j).focus().blur(function(){m.show().next().remove()}).keydown(function(q){var p=g(this);if(g.inArray(q.keyCode,[13,27])!==-1){q.preventDefault();if(q.keyCode===13){k.name=p.val()+l;m.html(k.name)}p.blur()}})})},_enableDragAndDrop:function(){this.filelist.append('<tr><td class="plupload_droptext">'+b("Drag files here.")+"</td></tr>");this.filelist.parent().attr("id",this.id+"_dropbox");this.uploader.settings.drop_element=this.options.drop_element=this.id+"_dropbox"},_enableSortingList:function(){var j,i=this;if(g("tbody tr",this.filelist).length<2){return}g("tbody",this.filelist).sortable({containment:"parent",items:".plupload_delete",helper:function(l,k){return k.clone(true).find("td:not(.plupload_file_name)").remove().end().css("width","100%")},stop:function(p,o){var l,n,k,m=[];g.each(g(this).sortable("toArray"),function(q,r){m[m.length]=i.uploader.getFile(r)});m.unshift(m.length);m.unshift(0);Array.prototype.splice.apply(i.uploader.files,m)}})},notify:function(j,k){var i=g('<div class="plupload_message"><span class="plupload_message_close ui-icon ui-icon-circle-close" title="'+b("Close")+'"></span><p><span class="ui-icon"></span>'+k+"</p></div>");i.addClass("ui-state-"+(j==="error"?"error":"highlight")).find("p .ui-icon").addClass("ui-icon-"+(j==="error"?"alert":"info")).end().find(".plupload_message_close").click(function(){i.remove()}).end();g(".plupload_header_content",this.container).append(i)},destroy:function(){g(".plupload_button",this.element).unbind();if(g.ui.button){g(".plupload_add, .plupload_start, .plupload_stop",this.container).button("destroy")}if(g.ui.progressbar){this.progressbar.progressbar("destroy")}if(g.ui.sortable&&this.options.sortable){g("tbody",this.filelist).sortable("destroy")}this.uploader.destroy();this.element.empty().html(this.contents_bak);this.contents_bak="";g.Widget.prototype.destroy.apply(this)}})}(window,document,plupload,jQuery));
|
|
admin/js/plupload/plupload.full.js
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
/*1.5.7*/
|
2 |
-
(function(){var f=0,l=[],n={},j={},a={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},m=/[<>&\"\']/g,b,c=window.setTimeout,d={},e;function h(){this.returnValue=false}function k(){this.cancelBubble=true}(function(o){var p=o.split(/,/),q,s,r;for(q=0;q<p.length;q+=2){r=p[q+1].split(/ /);for(s=0;s<r.length;s++){j[r[s]]=p[q]}}})("application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mpga mpega mp2 mp3,audio/x-wav,wav,audio/mp4,m4a,image/bmp,bmp,image/gif,gif,image/jpeg,jpeg jpg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe m2v,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/3gpp,3gp,video/3gpp2,3g2,video/vnd.rn-realvideo,rv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe");var g={VERSION:"1.5.7",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,IMAGE_FORMAT_ERROR:-700,IMAGE_MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:j,ua:(function(){var s=navigator,r=s.userAgent,t=s.vendor,p,o,q;p=/WebKit/.test(r);q=p&&t.indexOf("Apple")!==-1;o=window.opera&&window.opera.buildNumber;return{windows:navigator.platform.indexOf("Win")!==-1,android:/Android/.test(r),ie:!p&&!o&&(/MSIE/gi).test(r)&&(/Explorer/gi).test(s.appName),webkit:p,gecko:!p&&/Gecko/.test(r),safari:q,opera:!!o}}()),typeOf:function(p){return({}).toString.call(p).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()},extend:function(o){g.each(arguments,function(p,q){if(q>0){g.each(p,function(s,r){o[r]=s})}});return o},cleanName:function(o){var p,q;q=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"];for(p=0;p<q.length;p+=2){o=o.replace(q[p],q[p+1])}o=o.replace(/\s+/g,"_");o=o.replace(/[^a-z0-9_\-\.]+/gi,"");return o},addRuntime:function(o,p){p.name=o;l[o]=p;l.push(p);return p},guid:function(){var o=new Date().getTime().toString(32),p;for(p=0;p<5;p++){o+=Math.floor(Math.random()*65535).toString(32)}return(g.guidPrefix||"p")+o+(f++).toString(32)},buildUrl:function(p,o){var q="";g.each(o,function(s,r){q+=(q?"&":"")+encodeURIComponent(r)+"="+encodeURIComponent(s)});if(q){p+=(p.indexOf("?")>0?"&":"?")+q}return p},each:function(r,s){var q,p,o;if(r){q=r.length;if(q===b){for(p in r){if(r.hasOwnProperty(p)){if(s(r[p],p)===false){return}}}}else{for(o=0;o<q;o++){if(s(r[o],o)===false){return}}}}},formatSize:function(o){if(o===b||/\D/.test(o)){return g.translate("N/A")}if(o>1073741824){return Math.round(o/1073741824,1)+" GB"}if(o>1048576){return Math.round(o/1048576,1)+" MB"}if(o>1024){return Math.round(o/1024,1)+" KB"}return o+" b"},getPos:function(p,t){var u=0,s=0,w,v=document,q,r;p=p;t=t||v.body;function o(C){var A,B,z=0,D=0;if(C){B=C.getBoundingClientRect();A=v.compatMode==="CSS1Compat"?v.documentElement:v.body;z=B.left+A.scrollLeft;D=B.top+A.scrollTop}return{x:z,y:D}}if(p&&p.getBoundingClientRect&&g.ua.ie&&(!v.documentMode||v.documentMode<8)){q=o(p);r=o(t);return{x:q.x-r.x,y:q.y-r.y}}w=p;while(w&&w!=t&&w.nodeType){u+=w.offsetLeft||0;s+=w.offsetTop||0;w=w.offsetParent}w=p.parentNode;while(w&&w!=t&&w.nodeType){u-=w.scrollLeft||0;s-=w.scrollTop||0;w=w.parentNode}return{x:u,y:s}},getSize:function(o){return{w:o.offsetWidth||o.clientWidth,h:o.offsetHeight||o.clientHeight}},parseSize:function(o){var p;if(typeof(o)=="string"){o=/^([0-9]+)([mgk]?)$/.exec(o.toLowerCase().replace(/[^0-9mkg]/g,""));p=o[2];o=+o[1];if(p=="g"){o*=1073741824}if(p=="m"){o*=1048576}if(p=="k"){o*=1024}}return o},xmlEncode:function(o){return o?(""+o).replace(m,function(p){return a[p]?"&"+a[p]+";":p}):o},toArray:function(q){var p,o=[];for(p=0;p<q.length;p++){o[p]=q[p]}return o},inArray:function(q,r){if(r){if(Array.prototype.indexOf){return Array.prototype.indexOf.call(r,q)}for(var o=0,p=r.length;o<p;o++){if(r[o]===q){return o}}}return -1},addI18n:function(o){return g.extend(n,o)},translate:function(o){return n[o]||o},isEmptyObj:function(o){if(o===b){return true}for(var p in o){return false}return true},hasClass:function(q,p){var o;if(q.className==""){return false}o=new RegExp("(^|\\s+)"+p+"(\\s+|$)");return o.test(q.className)},addClass:function(p,o){if(!g.hasClass(p,o)){p.className=p.className==""?o:p.className.replace(/\s+$/,"")+" "+o}},removeClass:function(q,p){var o=new RegExp("(^|\\s+)"+p+"(\\s+|$)");q.className=q.className.replace(o,function(s,r,t){return r===" "&&t===" "?" ":""})},getStyle:function(p,o){if(p.currentStyle){return p.currentStyle[o]}else{if(window.getComputedStyle){return window.getComputedStyle(p,null)[o]}}},addEvent:function(t,o,u){var s,r,q,p;p=arguments[3];o=o.toLowerCase();if(e===b){e="Plupload_"+g.guid()}if(t.addEventListener){s=u;t.addEventListener(o,s,false)}else{if(t.attachEvent){s=function(){var v=window.event;if(!v.target){v.target=v.srcElement}v.preventDefault=h;v.stopPropagation=k;u(v)};t.attachEvent("on"+o,s)}}if(t[e]===b){t[e]=g.guid()}if(!d.hasOwnProperty(t[e])){d[t[e]]={}}r=d[t[e]];if(!r.hasOwnProperty(o)){r[o]=[]}r[o].push({func:s,orig:u,key:p})},removeEvent:function(t,o){var r,u,q;if(typeof(arguments[2])=="function"){u=arguments[2]}else{q=arguments[2]}o=o.toLowerCase();if(t[e]&&d[t[e]]&&d[t[e]][o]){r=d[t[e]][o]}else{return}for(var p=r.length-1;p>=0;p--){if(r[p].key===q||r[p].orig===u){if(t.removeEventListener){t.removeEventListener(o,r[p].func,false)}else{if(t.detachEvent){t.detachEvent("on"+o,r[p].func)}}r[p].orig=null;r[p].func=null;r.splice(p,1);if(u!==b){break}}}if(!r.length){delete d[t[e]][o]}if(g.isEmptyObj(d[t[e]])){delete d[t[e]];try{delete t[e]}catch(s){t[e]=b}}},removeAllEvents:function(p){var o=arguments[1];if(p[e]===b||!p[e]){return}g.each(d[p[e]],function(r,q){g.removeEvent(p,q,o)})}};g.Uploader=function(s){var p={},v,u=[],r,q=false;v=new g.QueueProgress();s=g.extend({chunk_size:0,multipart:true,multi_selection:true,file_data_name:"file",filters:[]},s);function t(){var x,y=0,w;if(this.state==g.STARTED){for(w=0;w<u.length;w++){if(!x&&u[w].status==g.QUEUED){x=u[w];x.status=g.UPLOADING;if(this.trigger("BeforeUpload",x)){this.trigger("UploadFile",x)}}else{y++}}if(y==u.length){this.stop();this.trigger("UploadComplete",u)}}}function o(){var x,w;v.reset();for(x=0;x<u.length;x++){w=u[x];if(w.size!==b){v.size+=w.size;v.loaded+=w.loaded}else{v.size=b}if(w.status==g.DONE){v.uploaded++}else{if(w.status==g.FAILED){v.failed++}else{v.queued++}}}if(v.size===b){v.percent=u.length>0?Math.ceil(v.uploaded/u.length*100):0}else{v.bytesPerSec=Math.ceil(v.loaded/((+new Date()-r||1)/1000));v.percent=v.size>0?Math.ceil(v.loaded/v.size*100):0}}g.extend(this,{state:g.STOPPED,runtime:"",features:{},files:u,settings:s,total:v,id:g.guid(),init:function(){var B=this,C,y,x,A=0,z;if(typeof(s.preinit)=="function"){s.preinit(B)}else{g.each(s.preinit,function(E,D){B.bind(D,E)})}s.page_url=s.page_url||document.location.pathname.replace(/\/[^\/]+$/g,"/");if(!/^(\w+:\/\/|\/)/.test(s.url)){s.url=s.page_url+s.url}s.chunk_size=g.parseSize(s.chunk_size);s.max_file_size=g.parseSize(s.max_file_size);B.bind("FilesAdded",function(D,G){var F,E,I=0,J,H=s.filters;if(H&&H.length){J=[];g.each(H,function(K){g.each(K.extensions.split(/,/),function(L){if(/^\s*\*\s*$/.test(L)){J.push("\\.*")}else{J.push("\\."+L.replace(new RegExp("["+("/^$.*+?|()[]{}\\".replace(/./g,"\\$&"))+"]","g"),"\\$&"))}})});J=new RegExp(J.join("|")+"$","i")}for(F=0;F<G.length;F++){E=G[F];E.loaded=0;E.percent=0;E.status=g.QUEUED;if(J&&!J.test(E.name)){D.trigger("Error",{code:g.FILE_EXTENSION_ERROR,message:g.translate("File extension error."),file:E});continue}if(E.size!==b&&E.size>s.max_file_size){D.trigger("Error",{code:g.FILE_SIZE_ERROR,message:g.translate("File size error."),file:E});continue}u.push(E);I++}if(I){c(function(){B.trigger("QueueChanged");B.refresh()},1)}else{return false}});if(s.unique_names){B.bind("UploadFile",function(D,E){var G=E.name.match(/\.([^.]+)$/),F="tmp";if(G){F=G[1]}E.target_name=E.id+"."+F})}B.bind("UploadProgress",function(D,E){E.percent=E.size>0?Math.ceil(E.loaded/E.size*100):100;o()});B.bind("StateChanged",function(D){if(D.state==g.STARTED){r=(+new Date())}else{if(D.state==g.STOPPED){for(C=D.files.length-1;C>=0;C--){if(D.files[C].status==g.UPLOADING){D.files[C].status=g.QUEUED;o()}}}}});B.bind("QueueChanged",o);B.bind("Error",function(D,E){if(E.file){E.file.status=g.FAILED;o();if(D.state==g.STARTED){c(function(){t.call(B)},1)}}});B.bind("FileUploaded",function(D,E){E.status=g.DONE;E.loaded=E.size;D.trigger("UploadProgress",E);c(function(){t.call(B)},1)});if(s.runtimes){y=[];z=s.runtimes.split(/\s?,\s?/);for(C=0;C<z.length;C++){if(l[z[C]]){y.push(l[z[C]])}}}else{y=l}function w(){var G=y[A++],F,D,E;if(G){F=G.getFeatures();D=B.settings.required_features;if(D){D=D.split(",");for(E=0;E<D.length;E++){if(!F[D[E]]){w();return}}}G.init(B,function(H){if(H&&H.success){B.features=F;B.runtime=G.name;B.trigger("Init",{runtime:G.name});B.trigger("PostInit");B.refresh()}else{w()}})}else{B.trigger("Error",{code:g.INIT_ERROR,message:g.translate("Init error.")})}}w();if(typeof(s.init)=="function"){s.init(B)}else{g.each(s.init,function(E,D){B.bind(D,E)})}},refresh:function(){this.trigger("Refresh")},start:function(){if(u.length&&this.state!=g.STARTED){this.state=g.STARTED;this.trigger("StateChanged");t.call(this)}},stop:function(){if(this.state!=g.STOPPED){this.state=g.STOPPED;this.trigger("CancelUpload");this.trigger("StateChanged")}},disableBrowse:function(){q=arguments[0]!==b?arguments[0]:true;this.trigger("DisableBrowse",q)},getFile:function(x){var w;for(w=u.length-1;w>=0;w--){if(u[w].id===x){return u[w]}}},removeFile:function(x){var w;for(w=u.length-1;w>=0;w--){if(u[w].id===x.id){return this.splice(w,1)[0]}}},splice:function(y,w){var x;x=u.splice(y===b?0:y,w===b?u.length:w);this.trigger("FilesRemoved",x);this.trigger("QueueChanged");return x},trigger:function(x){var z=p[x.toLowerCase()],y,w;if(z){w=Array.prototype.slice.call(arguments);w[0]=this;for(y=0;y<z.length;y++){if(z[y].func.apply(z[y].scope,w)===false){return false}}}return true},hasEventListener:function(w){return !!p[w.toLowerCase()]},bind:function(w,y,x){var z;w=w.toLowerCase();z=p[w]||[];z.push({func:y,scope:x||this});p[w]=z},unbind:function(w){w=w.toLowerCase();var z=p[w],x,y=arguments[1];if(z){if(y!==b){for(x=z.length-1;x>=0;x--){if(z[x].func===y){z.splice(x,1);break}}}else{z=[]}if(!z.length){delete p[w]}}},unbindAll:function(){var w=this;g.each(p,function(y,x){w.unbind(x)})},destroy:function(){this.stop();this.trigger("Destroy");this.unbindAll()}})};g.File=function(r,p,q){var o=this;o.id=r;o.name=p;o.size=q;o.loaded=0;o.percent=0;o.status=0};g.Runtime=function(){this.getFeatures=function(){};this.init=function(o,p){}};g.QueueProgress=function(){var o=this;o.size=0;o.loaded=0;o.uploaded=0;o.failed=0;o.queued=0;o.percent=0;o.bytesPerSec=0;o.reset=function(){o.size=o.loaded=o.uploaded=o.failed=o.queued=o.percent=o.bytesPerSec=0}};g.runtimes={};window.plupload=g})();(function(){if(window.google&&google.gears){return}var a=null;if(typeof GearsFactory!="undefined"){a=new GearsFactory()}else{try{a=new ActiveXObject("Gears.Factory");if(a.getBuildInfo().indexOf("ie_mobile")!=-1){a.privateSetGlobalObject(this)}}catch(b){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}}if(!a){return}if(!window.google){window.google={}}if(!google.gears){google.gears={factory:a}}})();(function(e,b,c,d){var f={};function a(h,k,m){var g,j,l,o;j=google.gears.factory.create("beta.canvas");try{j.decode(h);if(!k.width){k.width=j.width}if(!k.height){k.height=j.height}o=Math.min(k.width/j.width,k.height/j.height);if(o<1){j.resize(Math.round(j.width*o),Math.round(j.height*o))}else{if(!k.quality||m!=="image/jpeg"){return h}}if(k.quality){return j.encode(m,{quality:k.quality/100})}return j.encode(m)}catch(n){}return h}c.runtimes.Gears=c.addRuntime("gears",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(l,n){var m,h,g=false;if(!e.google||!google.gears){return n({success:false})}try{m=google.gears.factory.create("beta.desktop")}catch(k){return n({success:false})}function j(q){var p,o,r=[],s;for(o=0;o<q.length;o++){p=q[o];s=c.guid();f[s]=p.blob;r.push(new c.File(s,p.name,p.blob.length))}l.trigger("FilesAdded",r)}l.bind("PostInit",function(){var p=l.settings,o=b.getElementById(p.drop_element);if(o){c.addEvent(o,"dragover",function(q){m.setDropEffect(q,"copy");q.preventDefault()},l.id);c.addEvent(o,"drop",function(r){var q=m.getDragData(r,"application/x-gears-files");if(q){j(q.files)}r.preventDefault()},l.id);o=0}c.addEvent(b.getElementById(p.browse_button),"click",function(u){var t=[],r,q,s;u.preventDefault();if(g){return}no_type_restriction:for(r=0;r<p.filters.length;r++){s=p.filters[r].extensions.split(",");for(q=0;q<s.length;q++){if(s[q]==="*"){t=[];break no_type_restriction}t.push("."+s[q])}}m.openFiles(j,{singleFile:!p.multi_selection,filter:t})},l.id)});l.bind("CancelUpload",function(){if(h.abort){h.abort()}});l.bind("UploadFile",function(u,r){var w=0,v,s,t=0,q=u.settings.resize,o;if(q&&/\.(png|jpg|jpeg)$/i.test(r.name)){f[r.id]=a(f[r.id],q,/\.png$/i.test(r.name)?"image/png":"image/jpeg")}r.size=f[r.id].length;s=u.settings.chunk_size;o=s>0;v=Math.ceil(r.size/s);if(!o){s=r.size;v=1}function p(){var C,y=u.settings.multipart,x=0,B={name:r.target_name||r.name},z=u.settings.url;function A(E){var D,J="----pluploadboundary"+c.guid(),G="--",I="\r\n",F,H;if(y){h.setRequestHeader("Content-Type","multipart/form-data; boundary="+J);D=google.gears.factory.create("beta.blobbuilder");c.each(c.extend(B,u.settings.multipart_params),function(L,K){D.append(G+J+I+'Content-Disposition: form-data; name="'+K+'"'+I+I);D.append(L+I)});H=c.mimeTypes[r.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";D.append(G+J+I+'Content-Disposition: form-data; name="'+u.settings.file_data_name+'"; filename="'+r.name+'"'+I+"Content-Type: "+H+I+I);D.append(E);D.append(I+G+J+G+I);F=D.getAsBlob();x=F.length-E.length;E=F}h.send(E)}if(r.status==c.DONE||r.status==c.FAILED||u.state==c.STOPPED){return}if(o){B.chunk=w;B.chunks=v}C=Math.min(s,r.size-(w*s));if(!y){z=c.buildUrl(u.settings.url,B)}h=google.gears.factory.create("beta.httprequest");h.open("POST",z);if(!y){h.setRequestHeader("Content-Disposition",'attachment; filename="'+r.name+'"');h.setRequestHeader("Content-Type","application/octet-stream")}c.each(u.settings.headers,function(E,D){h.setRequestHeader(D,E)});h.upload.onprogress=function(D){r.loaded=t+D.loaded-x;u.trigger("UploadProgress",r)};h.onreadystatechange=function(){var D;if(h.readyState==4&&u.state!==c.STOPPED){if(h.status==200){D={chunk:w,chunks:v,response:h.responseText,status:h.status};u.trigger("ChunkUploaded",r,D);if(D.cancelled){r.status=c.FAILED;return}t+=C;if(++w>=v){r.status=c.DONE;u.trigger("FileUploaded",r,{response:h.responseText,status:h.status})}else{p()}}else{u.trigger("Error",{code:c.HTTP_ERROR,message:c.translate("HTTP Error."),file:r,chunk:w,chunks:v,status:h.status})}}};if(w<v){A(f[r.id].slice(w*s,C))}}p()});l.bind("DisableBrowse",function(o,p){g=p});l.bind("Destroy",function(o){var p,q,r={browseButton:o.settings.browse_button,dropElm:o.settings.drop_element};for(p in r){q=b.getElementById(r[p]);if(q){c.removeAllEvents(q,o.id)}}});n({success:true})}})})(window,document,plupload);(function(g,b,d,e){var a={},h={};function c(o){var n,m=typeof o,j,l,k;if(o===e||o===null){return"null"}if(m==="string"){n="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+o.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(r,q){var p=n.indexOf(q);if(p+1){return"\\"+n.charAt(p+1)}r=q.charCodeAt().toString(16);return"\\u"+"0000".substring(r.length)+r})+'"'}if(m=="object"){j=o.length!==e;n="";if(j){for(l=0;l<o.length;l++){if(n){n+=","}n+=c(o[l])}n="["+n+"]"}else{for(k in o){if(o.hasOwnProperty(k)){if(n){n+=","}n+=c(k)+":"+c(o[k])}}n="{"+n+"}"}return n}return""+o}function f(s){var v=false,j=null,o=null,k,l,m,u,n,q=0;try{try{o=new ActiveXObject("AgControl.AgControl");if(o.IsVersionSupported(s)){v=true}o=null}catch(r){var p=navigator.plugins["Silverlight Plug-In"];if(p){k=p.description;if(k==="1.0.30226.2"){k="2.0.30226.2"}l=k.split(".");while(l.length>3){l.pop()}while(l.length<4){l.push(0)}m=s.split(".");while(m.length>4){m.pop()}do{u=parseInt(m[q],10);n=parseInt(l[q],10);q++}while(q<m.length&&u===n);if(u<=n&&!isNaN(u)){v=true}}}}catch(t){v=false}return v}d.silverlight={trigger:function(n,k){var m=a[n],l,j;if(m){j=d.toArray(arguments).slice(1);j[0]="Silverlight:"+k;setTimeout(function(){m.trigger.apply(m,j)},0)}}};d.runtimes.Silverlight=d.addRuntime("silverlight",{getFeatures:function(){return{jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(p,q){var o,m="",n=p.settings.filters,l,k=b.body;if(!f("2.0.31005.0")||(g.opera&&g.opera.buildNumber)){q({success:false});return}h[p.id]=false;a[p.id]=p;o=b.createElement("div");o.id=p.id+"_silverlight_container";d.extend(o.style,{position:"absolute",top:"0px",background:p.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100px",height:"100px",overflow:"hidden",opacity:p.settings.shim_bgcolor||b.documentMode>8?"":0.01});o.className="plupload silverlight";if(p.settings.container){k=b.getElementById(p.settings.container);if(d.getStyle(k,"position")==="static"){k.style.position="relative"}}k.appendChild(o);for(l=0;l<n.length;l++){m+=(m!=""?"|":"")+n[l].title+" | *."+n[l].extensions.replace(/,/g,";*.")}o.innerHTML='<object id="'+p.id+'_silverlight" data="data:application/x-silverlight," type="application/x-silverlight-2" style="outline:none;" width="1024" height="1024"><param name="source" value="'+p.settings.silverlight_xap_url+'"/><param name="background" value="Transparent"/><param name="windowless" value="true"/><param name="enablehtmlaccess" value="true"/><param name="initParams" value="id='+p.id+",filter="+m+",multiselect="+p.settings.multi_selection+'"/></object>';function j(){return b.getElementById(p.id+"_silverlight").content.Upload}p.bind("Silverlight:Init",function(){var r,s={};if(h[p.id]){return}h[p.id]=true;p.bind("Silverlight:StartSelectFiles",function(t){r=[]});p.bind("Silverlight:SelectFile",function(t,w,u,v){var x;x=d.guid();s[x]=w;s[w]=x;r.push(new d.File(x,u,v))});p.bind("Silverlight:SelectSuccessful",function(){if(r.length){p.trigger("FilesAdded",r)}});p.bind("Silverlight:UploadChunkError",function(t,w,u,x,v){p.trigger("Error",{code:d.IO_ERROR,message:"IO Error.",details:v,file:t.getFile(s[w])})});p.bind("Silverlight:UploadFileProgress",function(t,x,u,w){var v=t.getFile(s[x]);if(v.status!=d.FAILED){v.size=w;v.loaded=u;t.trigger("UploadProgress",v)}});p.bind("Refresh",function(t){var u,v,w;u=b.getElementById(t.settings.browse_button);if(u){v=d.getPos(u,b.getElementById(t.settings.container));w=d.getSize(u);d.extend(b.getElementById(t.id+"_silverlight_container").style,{top:v.y+"px",left:v.x+"px",width:w.w+"px",height:w.h+"px"})}});p.bind("Silverlight:UploadChunkSuccessful",function(t,w,u,z,y){var x,v=t.getFile(s[w]);x={chunk:u,chunks:z,response:y};t.trigger("ChunkUploaded",v,x);if(v.status!=d.FAILED&&t.state!==d.STOPPED){j().UploadNextChunk()}if(u==z-1){v.status=d.DONE;t.trigger("FileUploaded",v,{response:y})}});p.bind("Silverlight:UploadSuccessful",function(t,w,u){var v=t.getFile(s[w]);v.status=d.DONE;t.trigger("FileUploaded",v,{response:u})});p.bind("FilesRemoved",function(t,v){var u;for(u=0;u<v.length;u++){j().RemoveFile(s[v[u].id])}});p.bind("UploadFile",function(t,v){var w=t.settings,u=w.resize||{};j().UploadFile(s[v.id],t.settings.url,c({name:v.target_name||v.name,mime:d.mimeTypes[v.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:w.chunk_size,image_width:u.width,image_height:u.height,image_quality:u.quality,multipart:!!w.multipart,multipart_params:w.multipart_params||{},file_data_name:w.file_data_name,headers:w.headers}))});p.bind("CancelUpload",function(){j().CancelUpload()});p.bind("Silverlight:MouseEnter",function(t){var u,v;u=b.getElementById(p.settings.browse_button);v=t.settings.browse_button_hover;if(u&&v){d.addClass(u,v)}});p.bind("Silverlight:MouseLeave",function(t){var u,v;u=b.getElementById(p.settings.browse_button);v=t.settings.browse_button_hover;if(u&&v){d.removeClass(u,v)}});p.bind("Silverlight:MouseLeftButtonDown",function(t){var u,v;u=b.getElementById(p.settings.browse_button);v=t.settings.browse_button_active;if(u&&v){d.addClass(u,v);d.addEvent(b.body,"mouseup",function(){d.removeClass(u,v)})}});p.bind("Sliverlight:StartSelectFiles",function(t){var u,v;u=b.getElementById(p.settings.browse_button);v=t.settings.browse_button_active;if(u&&v){d.removeClass(u,v)}});p.bind("DisableBrowse",function(t,u){j().DisableBrowse(u)});p.bind("Destroy",function(t){var u;d.removeAllEvents(b.body,t.id);delete h[t.id];delete a[t.id];u=b.getElementById(t.id+"_silverlight_container");if(u){u.parentNode.removeChild(u)}});q({success:true})})}})})(window,document,plupload);(function(f,b,d,e){var a={},g={};function c(){var h;try{h=navigator.plugins["Shockwave Flash"];h=h.description}catch(k){try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(j){h="0.0"}}h=h.match(/\d+/g);return parseFloat(h[0]+"."+h[1])}d.flash={trigger:function(k,h,j){setTimeout(function(){var n=a[k],m,l;if(n){n.trigger("Flash:"+h,j)}},0)}};d.runtimes.Flash=d.addRuntime("flash",{getFeatures:function(){return{jpgresize:true,pngresize:true,maxWidth:8091,maxHeight:8091,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(n,p){var l,m,h=0,j=b.body;if(c()<10){p({success:false});return}g[n.id]=false;a[n.id]=n;l=b.getElementById(n.settings.browse_button);m=b.createElement("div");m.id=n.id+"_flash_container";d.extend(m.style,{position:"absolute",top:"0px",background:n.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100%",height:"100%"});m.className="plupload flash";if(n.settings.container){j=b.getElementById(n.settings.container);if(d.getStyle(j,"position")==="static"){j.style.position="relative"}}j.appendChild(m);(function(){var q,r;q='<object id="'+n.id+'_flash" type="application/x-shockwave-flash" data="'+n.settings.flash_swf_url+'" ';if(d.ua.ie){q+='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '}q+='width="100%" height="100%" style="outline:0"><param name="movie" value="'+n.settings.flash_swf_url+'" /><param name="flashvars" value="id='+escape(n.id)+'" /><param name="wmode" value="transparent" /><param name="allowscriptaccess" value="always" /></object>';if(d.ua.ie){r=b.createElement("div");m.appendChild(r);r.outerHTML=q;r=null}else{m.innerHTML=q}}());function o(){return b.getElementById(n.id+"_flash")}function k(){if(h++>5000){p({success:false});return}if(g[n.id]===false){setTimeout(k,1)}}k();l=m=null;n.bind("Destroy",function(q){var r;d.removeAllEvents(b.body,q.id);delete g[q.id];delete a[q.id];r=b.getElementById(q.id+"_flash_container");if(r){r.parentNode.removeChild(r)}});n.bind("Flash:Init",function(){var s={},r;try{o().setFileFilters(n.settings.filters,n.settings.multi_selection)}catch(q){p({success:false});return}if(g[n.id]){return}g[n.id]=true;n.bind("UploadFile",function(t,v){var w=t.settings,u=n.settings.resize||{};o().uploadFile(s[v.id],w.url,{name:v.target_name||v.name,mime:d.mimeTypes[v.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:w.chunk_size,width:u.width,height:u.height,quality:u.quality,multipart:w.multipart,multipart_params:w.multipart_params||{},file_data_name:w.file_data_name,format:/\.(jpg|jpeg)$/i.test(v.name)?"jpg":"png",headers:w.headers,urlstream_upload:w.urlstream_upload})});n.bind("CancelUpload",function(){o().cancelUpload()});n.bind("Flash:UploadProcess",function(u,t){var v=u.getFile(s[t.id]);if(v.status!=d.FAILED){v.loaded=t.loaded;v.size=t.size;u.trigger("UploadProgress",v)}});n.bind("Flash:UploadChunkComplete",function(t,v){var w,u=t.getFile(s[v.id]);w={chunk:v.chunk,chunks:v.chunks,response:v.text};t.trigger("ChunkUploaded",u,w);if(u.status!==d.FAILED&&t.state!==d.STOPPED){o().uploadNextChunk()}if(v.chunk==v.chunks-1){u.status=d.DONE;t.trigger("FileUploaded",u,{response:v.text})}});n.bind("Flash:SelectFiles",function(t,w){var v,u,x=[],y;for(u=0;u<w.length;u++){v=w[u];y=d.guid();s[y]=v.id;s[v.id]=y;x.push(new d.File(y,v.name,v.size))}if(x.length){n.trigger("FilesAdded",x)}});n.bind("Flash:SecurityError",function(t,u){n.trigger("Error",{code:d.SECURITY_ERROR,message:d.translate("Security error."),details:u.message,file:n.getFile(s[u.id])})});n.bind("Flash:GenericError",function(t,u){n.trigger("Error",{code:d.GENERIC_ERROR,message:d.translate("Generic error."),details:u.message,file:n.getFile(s[u.id])})});n.bind("Flash:IOError",function(t,u){n.trigger("Error",{code:d.IO_ERROR,message:d.translate("IO error."),details:u.message,file:n.getFile(s[u.id])})});n.bind("Flash:ImageError",function(t,u){n.trigger("Error",{code:parseInt(u.code,10),message:d.translate("Image error."),file:n.getFile(s[u.id])})});n.bind("Flash:StageEvent:rollOver",function(t){var u,v;u=b.getElementById(n.settings.browse_button);v=t.settings.browse_button_hover;if(u&&v){d.addClass(u,v)}});n.bind("Flash:StageEvent:rollOut",function(t){var u,v;u=b.getElementById(n.settings.browse_button);v=t.settings.browse_button_hover;if(u&&v){d.removeClass(u,v)}});n.bind("Flash:StageEvent:mouseDown",function(t){var u,v;u=b.getElementById(n.settings.browse_button);v=t.settings.browse_button_active;if(u&&v){d.addClass(u,v);d.addEvent(b.body,"mouseup",function(){d.removeClass(u,v)},t.id)}});n.bind("Flash:StageEvent:mouseUp",function(t){var u,v;u=b.getElementById(n.settings.browse_button);v=t.settings.browse_button_active;if(u&&v){d.removeClass(u,v)}});n.bind("Flash:ExifData",function(t,u){n.trigger("ExifData",n.getFile(s[u.id]),u.data)});n.bind("Flash:GpsData",function(t,u){n.trigger("GpsData",n.getFile(s[u.id]),u.data)});n.bind("QueueChanged",function(t){n.refresh()});n.bind("FilesRemoved",function(t,v){var u;for(u=0;u<v.length;u++){o().removeFile(s[v[u].id])}});n.bind("StateChanged",function(t){n.refresh()});n.bind("Refresh",function(t){var u,v,w;o().setFileFilters(n.settings.filters,n.settings.multi_selection);u=b.getElementById(t.settings.browse_button);if(u){v=d.getPos(u,b.getElementById(t.settings.container));w=d.getSize(u);d.extend(b.getElementById(t.id+"_flash_container").style,{top:v.y+"px",left:v.x+"px",width:w.w+"px",height:w.h+"px"})}});n.bind("DisableBrowse",function(t,u){o().disableBrowse(u)});p({success:true})})}})})(window,document,plupload);(function(a){a.runtimes.BrowserPlus=a.addRuntime("browserplus",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(g,j){var e=window.BrowserPlus,h={},d=g.settings,c=d.resize;function f(o){var n,m,k=[],l,p;for(m=0;m<o.length;m++){l=o[m];p=a.guid();h[p]=l;k.push(new a.File(p,l.name,l.size))}if(m){g.trigger("FilesAdded",k)}}function b(){var k=false;g.bind("PostInit",function(){var o,m=d.drop_element,q=g.id+"_droptarget",l=document.getElementById(m),n;function r(t,s){e.DragAndDrop.AddDropTarget({id:t},function(u){e.DragAndDrop.AttachCallbacks({id:t,hover:function(v){if(!v&&s){s()}},drop:function(v){if(s){s()}f(v)}},function(){})})}function p(){document.getElementById(q).style.top="-1000px"}if(l){if(document.attachEvent&&(/MSIE/gi).test(navigator.userAgent)){o=document.createElement("div");o.setAttribute("id",q);a.extend(o.style,{position:"absolute",top:"-1000px",background:"red",filter:"alpha(opacity=0)",opacity:0});document.body.appendChild(o);a.addEvent(l,"dragenter",function(t){var s,u;s=document.getElementById(m);u=a.getPos(s);a.extend(document.getElementById(q).style,{top:u.y+"px",left:u.x+"px",width:s.offsetWidth+"px",height:s.offsetHeight+"px"})});r(q,p)}else{r(m)}}a.addEvent(document.getElementById(d.browse_button),"click",function(y){var s=[],u,t,x=d.filters,w,v;y.preventDefault();if(k){return}no_type_restriction:for(u=0;u<x.length;u++){w=x[u].extensions.split(",");for(t=0;t<w.length;t++){if(w[t]==="*"){s=[];break no_type_restriction}v=a.mimeTypes[w[t]];if(v&&a.inArray(v,s)===-1){s.push(a.mimeTypes[w[t]])}}}e.FileBrowse.OpenBrowseDialog({mimeTypes:s},function(z){if(z.success){f(z.value)}})});l=o=null});g.bind("CancelUpload",function(){e.Uploader.cancel({},function(){})});g.bind("DisableBrowse",function(l,m){k=m});g.bind("UploadFile",function(o,l){var n=h[l.id],t={},m=o.settings.chunk_size,p,q=[];function s(u,w){var v;if(l.status==a.FAILED){return}t.name=l.target_name||l.name;if(m){t.chunk=""+u;t.chunks=""+w}v=q.shift();e.Uploader.upload({url:o.settings.url,files:{file:v},cookies:document.cookies,postvars:a.extend(t,o.settings.multipart_params),progressCallback:function(z){var y,x=0;p[u]=parseInt(z.filePercent*v.size/100,10);for(y=0;y<p.length;y++){x+=p[y]}l.loaded=x;o.trigger("UploadProgress",l)}},function(y){var x,z;if(y.success){x=y.value.statusCode;if(m){o.trigger("ChunkUploaded",l,{chunk:u,chunks:w,response:y.value.body,status:x})}if(q.length>0){s(++u,w)}else{l.status=a.DONE;o.trigger("FileUploaded",l,{response:y.value.body,status:x});if(x>=400){o.trigger("Error",{code:a.HTTP_ERROR,message:a.translate("HTTP Error."),file:l,status:x})}}}else{o.trigger("Error",{code:a.GENERIC_ERROR,message:a.translate("Generic Error."),file:l,details:y.error})}})}function r(u){l.size=u.size;if(m){e.FileAccess.chunk({file:u,chunkSize:m},function(x){if(x.success){var y=x.value,v=y.length;p=Array(v);for(var w=0;w<v;w++){p[w]=0;q.push(y[w])}s(0,v)}})}else{p=Array(1);q.push(u);s(0,1)}}if(c&&/\.(png|jpg|jpeg)$/i.test(l.name)){BrowserPlus.ImageAlter.transform({file:n,quality:c.quality||90,actions:[{scale:{maxwidth:c.width,maxheight:c.height}}]},function(u){if(u.success){r(u.value.file)}})}else{r(n)}});j({success:true})}if(e){e.init(function(l){var k=[{service:"Uploader",version:"3"},{service:"DragAndDrop",version:"1"},{service:"FileBrowse",version:"1"},{service:"FileAccess",version:"2"}];if(c){k.push({service:"ImageAlter",version:"4"})}if(l.success){e.require({services:k},function(m){if(m.success){b()}else{j()}})}else{j()}})}else{j()}}})})(plupload);(function(k,m,l,g){var d={},j;function c(s){var r=s.naturalWidth,u=s.naturalHeight;if(r*u>1024*1024){var t=m.createElement("canvas");t.width=t.height=1;var q=t.getContext("2d");q.drawImage(s,-r+1,0);return q.getImageData(0,0,1,1).data[3]===0}else{return false}}function f(u,r,z){var q=m.createElement("canvas");q.width=1;q.height=z;var A=q.getContext("2d");A.drawImage(u,0,0);var t=A.getImageData(0,0,1,z).data;var x=0;var v=z;var y=z;while(y>x){var s=t[(y-1)*4+3];if(s===0){v=y}else{x=y}y=(v+x)>>1}var w=(y/z);return(w===0)?1:w}function o(K,s,t){var v=K.naturalWidth,z=K.naturalHeight;var E=t.width,B=t.height;var F=s.getContext("2d");F.save();var r=c(K);if(r){v/=2;z/=2}var I=1024;var q=m.createElement("canvas");q.width=q.height=I;var u=q.getContext("2d");var G=f(K,v,z);var A=0;while(A<z){var J=A+I>z?z-A:I;var C=0;while(C<v){var D=C+I>v?v-C:I;u.clearRect(0,0,I,I);u.drawImage(K,-C,-A);var x=(C*E/v)<<0;var y=Math.ceil(D*E/v);var w=(A*B/z/G)<<0;var H=Math.ceil(J*B/z/G);F.drawImage(q,0,0,D,J,x,w,y,H);C+=I}A+=I}F.restore();q=u=null}function p(r,s){var q;if("FileReader" in k){q=new FileReader();q.readAsDataURL(r);q.onload=function(){s(q.result)}}else{return s(r.getAsDataURL())}}function n(r,s){var q;if("FileReader" in k){q=new FileReader();q.readAsBinaryString(r);q.onload=function(){s(q.result)}}else{return s(r.getAsBinary())}}function e(u,s,q,y){var t,r,x,v,w=this;p(d[u.id],function(z){t=m.createElement("canvas");t.style.display="none";m.body.appendChild(t);x=new Image();x.onerror=x.onabort=function(){y({success:false})};x.onload=function(){var F,A,C,B,E;if(!s.width){s.width=x.width}if(!s.height){s.height=x.height}v=Math.min(s.width/x.width,s.height/x.height);if(v<1){F=Math.round(x.width*v);A=Math.round(x.height*v)}else{if(s.quality&&q==="image/jpeg"){F=x.width;A=x.height}else{y({success:false});return}}t.width=F;t.height=A;o(x,t,{width:F,height:A});if(q==="image/jpeg"){B=new h(atob(z.substring(z.indexOf("base64,")+7)));if(B.headers&&B.headers.length){E=new a();if(E.init(B.get("exif")[0])){E.setExif("PixelXDimension",F);E.setExif("PixelYDimension",A);B.set("exif",E.getBinary());if(w.hasEventListener("ExifData")){w.trigger("ExifData",u,E.EXIF())}if(w.hasEventListener("GpsData")){w.trigger("GpsData",u,E.GPS())}}}}if(s.quality&&q==="image/jpeg"){try{z=t.toDataURL(q,s.quality/100)}catch(D){z=t.toDataURL(q)}}else{z=t.toDataURL(q)}z=z.substring(z.indexOf("base64,")+7);z=atob(z);if(B&&B.headers&&B.headers.length){z=B.restore(z);B.purge()}t.parentNode.removeChild(t);y({success:true,data:z})};x.src=z})}l.runtimes.Html5=l.addRuntime("html5",{getFeatures:function(){var v,r,u,t,s,q;r=u=s=q=false;if(k.XMLHttpRequest){v=new XMLHttpRequest();u=!!v.upload;r=!!(v.sendAsBinary||v.upload)}if(r){t=!!(v.sendAsBinary||(k.Uint8Array&&k.ArrayBuffer));s=!!(File&&(File.prototype.getAsDataURL||k.FileReader)&&t);q=!!(File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice))}j=l.ua.safari&&l.ua.windows;return{html5:r,dragdrop:(function(){var w=m.createElement("div");return("draggable" in w)||("ondragstart" in w&&"ondrop" in w)}()),jpgresize:s,pngresize:s,multipart:s||!!k.FileReader||!!k.FormData,canSendBinary:t,cantSendBlobInFormData:!!(l.ua.gecko&&k.FormData&&k.FileReader&&!FileReader.prototype.readAsArrayBuffer)||l.ua.android,progress:u,chunks:q,multi_selection:!(l.ua.safari&&l.ua.windows),triggerDialog:(l.ua.gecko&&k.FormData||l.ua.webkit)}},init:function(s,u){var q,t;function r(z){var x,w,y=[],A,v={};for(w=0;w<z.length;w++){x=z[w];if(v[x.name]&&l.ua.safari&&l.ua.windows){continue}v[x.name]=true;A=l.guid();d[A]=x;y.push(new l.File(A,x.fileName||x.name,x.fileSize||x.size))}if(y.length){s.trigger("FilesAdded",y)}}q=this.getFeatures();if(!q.html5){u({success:false});return}s.bind("Init",function(A){var J,I,F=[],z,G,w=A.settings.filters,x,E,v=m.body,H;J=m.createElement("div");J.id=A.id+"_html5_container";l.extend(J.style,{position:"absolute",background:s.settings.shim_bgcolor||"transparent",width:"100px",height:"100px",overflow:"hidden",zIndex:99999,opacity:s.settings.shim_bgcolor?"":0});J.className="plupload html5";if(s.settings.container){v=m.getElementById(s.settings.container);if(l.getStyle(v,"position")==="static"){v.style.position="relative"}}v.appendChild(J);no_type_restriction:for(z=0;z<w.length;z++){x=w[z].extensions.split(/,/);for(G=0;G<x.length;G++){if(x[G]==="*"){F=[];break no_type_restriction}E=l.mimeTypes[x[G]];if(E&&l.inArray(E,F)===-1){F.push(E)}}}J.innerHTML='<input id="'+s.id+'_html5" style="font-size:999px" type="file" accept="'+F.join(",")+'" '+(s.settings.multi_selection&&s.features.multi_selection?'multiple="multiple"':"")+" />";J.scrollTop=100;H=m.getElementById(s.id+"_html5");if(A.features.triggerDialog){l.extend(H.style,{position:"absolute",width:"100%",height:"100%"})}else{l.extend(H.style,{cssFloat:"right",styleFloat:"right"})}H.onchange=function(){r(this.files);this.value=""};I=m.getElementById(A.settings.browse_button);if(I){var C=A.settings.browse_button_hover,D=A.settings.browse_button_active,B=A.features.triggerDialog?I:J;if(C){l.addEvent(B,"mouseover",function(){l.addClass(I,C)},A.id);l.addEvent(B,"mouseout",function(){l.removeClass(I,C)},A.id)}if(D){l.addEvent(B,"mousedown",function(){l.addClass(I,D)},A.id);l.addEvent(m.body,"mouseup",function(){l.removeClass(I,D)},A.id)}if(A.features.triggerDialog){l.addEvent(I,"click",function(K){var y=m.getElementById(A.id+"_html5");if(y&&!y.disabled){y.click()}K.preventDefault()},A.id)}}});s.bind("PostInit",function(){var v=m.getElementById(s.settings.drop_element);if(v){if(j){l.addEvent(v,"dragenter",function(z){var y,w,x;y=m.getElementById(s.id+"_drop");if(!y){y=m.createElement("input");y.setAttribute("type","file");y.setAttribute("id",s.id+"_drop");y.setAttribute("multiple","multiple");l.addEvent(y,"change",function(){r(this.files);l.removeEvent(y,"change",s.id);y.parentNode.removeChild(y)},s.id);l.addEvent(y,"dragover",function(A){A.stopPropagation()},s.id);v.appendChild(y)}w=l.getPos(v,m.getElementById(s.settings.container));x=l.getSize(v);if(l.getStyle(v,"position")==="static"){l.extend(v.style,{position:"relative"})}l.extend(y.style,{position:"absolute",display:"block",top:0,left:0,width:x.w+"px",height:x.h+"px",opacity:0})},s.id);return}l.addEvent(v,"dragover",function(w){w.preventDefault()},s.id);l.addEvent(v,"drop",function(x){var w=x.dataTransfer;if(w&&w.files){r(w.files)}x.preventDefault()},s.id)}});s.bind("Refresh",function(v){var w,x,y,A,z;w=m.getElementById(s.settings.browse_button);if(w){x=l.getPos(w,m.getElementById(v.settings.container));y=l.getSize(w);A=m.getElementById(s.id+"_html5_container");l.extend(A.style,{top:x.y+"px",left:x.x+"px",width:y.w+"px",height:y.h+"px"});if(s.features.triggerDialog){if(l.getStyle(w,"position")==="static"){l.extend(w.style,{position:"relative"})}z=parseInt(l.getStyle(w,"zIndex"),10);if(isNaN(z)){z=0}l.extend(w.style,{zIndex:z});l.extend(A.style,{zIndex:z-1})}}});s.bind("DisableBrowse",function(v,x){var w=m.getElementById(v.id+"_html5");if(w){w.disabled=x}});s.bind("CancelUpload",function(){if(t&&t.abort){t.abort()}});s.bind("UploadFile",function(v,x){var y=v.settings,B,w;function A(D,G,C){var E;if(File.prototype.slice){try{D.slice();return D.slice(G,C)}catch(F){return D.slice(G,C-G)}}else{if(E=File.prototype.webkitSlice||File.prototype.mozSlice){return E.call(D,G,C)}else{return null}}}function z(C){var F=0,E=0;function D(){var L,P,N,O,K,M,H,G=v.settings.url;function J(S){if(t.sendAsBinary){t.sendAsBinary(S)}else{if(v.features.canSendBinary){var Q=new Uint8Array(S.length);for(var R=0;R<S.length;R++){Q[R]=(S.charCodeAt(R)&255)}t.send(Q.buffer)}}}function I(R){var V=0,W="----pluploadboundary"+l.guid(),T,S="--",U="\r\n",Q="";t=new XMLHttpRequest;if(t.upload){t.upload.onprogress=function(X){x.loaded=Math.min(x.size,E+X.loaded-V);v.trigger("UploadProgress",x)}}t.onreadystatechange=function(){var X,Z;if(t.readyState==4&&v.state!==l.STOPPED){try{X=t.status}catch(Y){X=0}if(X>=400){v.trigger("Error",{code:l.HTTP_ERROR,message:l.translate("HTTP Error."),file:x,status:X})}else{if(N){Z={chunk:F,chunks:N,response:t.responseText,status:X};v.trigger("ChunkUploaded",x,Z);E+=M;if(Z.cancelled){x.status=l.FAILED;return}x.loaded=Math.min(x.size,(F+1)*K)}else{x.loaded=x.size}v.trigger("UploadProgress",x);R=L=T=Q=null;if(!N||++F>=N){x.status=l.DONE;v.trigger("FileUploaded",x,{response:t.responseText,status:X})}else{D()}}}};if(v.settings.multipart&&q.multipart){O.name=x.target_name||x.name;t.open("post",G,true);l.each(v.settings.headers,function(Y,X){t.setRequestHeader(X,Y)});if(typeof(R)!=="string"&&!!k.FormData){T=new FormData();l.each(l.extend(O,v.settings.multipart_params),function(Y,X){T.append(X,Y)});T.append(v.settings.file_data_name,R);t.send(T);return}if(typeof(R)==="string"){t.setRequestHeader("Content-Type","multipart/form-data; boundary="+W);l.each(l.extend(O,v.settings.multipart_params),function(Y,X){Q+=S+W+U+'Content-Disposition: form-data; name="'+X+'"'+U+U;Q+=unescape(encodeURIComponent(Y))+U});H=l.mimeTypes[x.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";Q+=S+W+U+'Content-Disposition: form-data; name="'+v.settings.file_data_name+'"; filename="'+unescape(encodeURIComponent(x.name))+'"'+U+"Content-Type: "+H+U+U+R+U+S+W+S+U;V=Q.length-R.length;R=Q;J(R);return}}G=l.buildUrl(v.settings.url,l.extend(O,v.settings.multipart_params));t.open("post",G,true);t.setRequestHeader("Content-Type","application/octet-stream");l.each(v.settings.headers,function(Y,X){t.setRequestHeader(X,Y)});if(typeof(R)==="string"){J(R)}else{t.send(R)}}if(x.status==l.DONE||x.status==l.FAILED||v.state==l.STOPPED){return}O={name:x.target_name||x.name};if(y.chunk_size&&x.size>y.chunk_size&&(q.chunks||typeof(C)=="string")){K=y.chunk_size;N=Math.ceil(x.size/K);M=Math.min(K,x.size-(F*K));if(typeof(C)=="string"){L=C.substring(F*K,F*K+M)}else{L=A(C,F*K,F*K+M)}O.chunk=F;O.chunks=N}else{M=x.size;L=C}if(v.settings.multipart&&q.multipart&&typeof(L)!=="string"&&k.FileReader&&q.cantSendBlobInFormData&&q.chunks&&v.settings.chunk_size){(function(){var Q=new FileReader();Q.onload=function(){I(Q.result);Q=null};Q.readAsBinaryString(L)}())}else{I(L)}}D()}B=d[x.id];if(q.jpgresize&&v.settings.resize&&/\.(png|jpg|jpeg)$/i.test(x.name)){e.call(v,x,v.settings.resize,/\.png$/i.test(x.name)?"image/png":"image/jpeg",function(C){if(C.success){x.size=C.data.length;z(C.data)}else{if(q.chunks){z(B)}else{n(B,z)}}})}else{if(!q.chunks&&q.jpgresize){n(B,z)}else{z(B)}}});s.bind("Destroy",function(v){var x,y,w=m.body,z={inputContainer:v.id+"_html5_container",inputFile:v.id+"_html5",browseButton:v.settings.browse_button,dropElm:v.settings.drop_element};for(x in z){y=m.getElementById(z[x]);if(y){l.removeAllEvents(y,v.id)}}l.removeAllEvents(m.body,v.id);if(v.settings.container){w=m.getElementById(v.settings.container)}w.removeChild(m.getElementById(z.inputContainer))});u({success:true})}});function b(){var t=false,r;function u(w,y){var v=t?0:-8*(y-1),z=0,x;for(x=0;x<y;x++){z|=(r.charCodeAt(w+x)<<Math.abs(v+x*8))}return z}function q(x,v,w){var w=arguments.length===3?w:r.length-v-1;r=r.substr(0,v)+x+r.substr(w+v)}function s(w,x,z){var A="",v=t?0:-8*(z-1),y;for(y=0;y<z;y++){A+=String.fromCharCode((x>>Math.abs(v+y*8))&255)}q(A,w,z)}return{II:function(v){if(v===g){return t}else{t=v}},init:function(v){t=false;r=v},SEGMENT:function(v,x,w){switch(arguments.length){case 1:return r.substr(v,r.length-v-1);case 2:return r.substr(v,x);case 3:q(w,v,x);break;default:return r}},BYTE:function(v){return u(v,1)},SHORT:function(v){return u(v,2)},LONG:function(v,w){if(w===g){return u(v,4)}else{s(v,w,4)}},SLONG:function(v){var w=u(v,4);return(w>2147483647?w-4294967296:w)},STRING:function(v,w){var x="";for(w+=v;v<w;v++){x+=String.fromCharCode(u(v,1))}return x}}}function h(v){var x={65505:{app:"EXIF",name:"APP1",signature:"Exif\0"},65506:{app:"ICC",name:"APP2",signature:"ICC_PROFILE\0"},65517:{app:"IPTC",name:"APP13",signature:"Photoshop 3.0\0"}},w=[],u,q,s=g,t=0,r;u=new b();u.init(v);if(u.SHORT(0)!==65496){return}q=2;r=Math.min(1048576,v.length);while(q<=r){s=u.SHORT(q);if(s>=65488&&s<=65495){q+=2;continue}if(s===65498||s===65497){break}t=u.SHORT(q+2)+2;if(x[s]&&u.STRING(q+4,x[s].signature.length)===x[s].signature){w.push({hex:s,app:x[s].app.toUpperCase(),name:x[s].name.toUpperCase(),start:q,length:t,segment:u.SEGMENT(q,t)})}q+=t}u.init(null);return{headers:w,restore:function(B){u.init(B);var z=new h(B);if(!z.headers){return false}for(var A=z.headers.length;A>0;A--){var C=z.headers[A-1];u.SEGMENT(C.start,C.length,"")}z.purge();q=u.SHORT(2)==65504?4+u.SHORT(4):2;for(var A=0,y=w.length;A<y;A++){u.SEGMENT(q,0,w[A].segment);q+=w[A].length}return u.SEGMENT()},get:function(A){var B=[];for(var z=0,y=w.length;z<y;z++){if(w[z].app===A.toUpperCase()){B.push(w[z].segment)}}return B},set:function(B,A){var C=[];if(typeof(A)==="string"){C.push(A)}else{C=A}for(var z=ii=0,y=w.length;z<y;z++){if(w[z].app===B.toUpperCase()){w[z].segment=C[ii];w[z].length=C[ii].length;ii++}if(ii>=C.length){break}}},purge:function(){w=[];u.init(null)}}}function a(){var t,q,r={},w;t=new b();q={tiff:{274:"Orientation",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"}};w={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire.",1:"Flash fired.",5:"Strobe return light not detected.",7:"Strobe return light detected.",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}};function s(x,F){var z=t.SHORT(x),C,I,J,E,D,y,A,G,H=[],B={};for(C=0;C<z;C++){A=y=x+12*C+2;J=F[t.SHORT(A)];if(J===g){continue}E=t.SHORT(A+=2);D=t.LONG(A+=2);A+=4;H=[];switch(E){case 1:case 7:if(D>4){A=t.LONG(A)+r.tiffHeader}for(I=0;I<D;I++){H[I]=t.BYTE(A+I)}break;case 2:if(D>4){A=t.LONG(A)+r.tiffHeader}B[J]=t.STRING(A,D-1);continue;case 3:if(D>2){A=t.LONG(A)+r.tiffHeader}for(I=0;I<D;I++){H[I]=t.SHORT(A+I*2)}break;case 4:if(D>1){A=t.LONG(A)+r.tiffHeader}for(I=0;I<D;I++){H[I]=t.LONG(A+I*4)}break;case 5:A=t.LONG(A)+r.tiffHeader;for(I=0;I<D;I++){H[I]=t.LONG(A+I*4)/t.LONG(A+I*4+4)}break;case 9:A=t.LONG(A)+r.tiffHeader;for(I=0;I<D;I++){H[I]=t.SLONG(A+I*4)}break;case 10:A=t.LONG(A)+r.tiffHeader;for(I=0;I<D;I++){H[I]=t.SLONG(A+I*4)/t.SLONG(A+I*4+4)}break;default:continue}G=(D==1?H[0]:H);if(w.hasOwnProperty(J)&&typeof G!="object"){B[J]=w[J][G]}else{B[J]=G}}return B}function v(){var y=g,x=r.tiffHeader;t.II(t.SHORT(x)==18761);if(t.SHORT(x+=2)!==42){return false}r.IFD0=r.tiffHeader+t.LONG(x+=2);y=s(r.IFD0,q.tiff);r.exifIFD=("ExifIFDPointer" in y?r.tiffHeader+y.ExifIFDPointer:g);r.gpsIFD=("GPSInfoIFDPointer" in y?r.tiffHeader+y.GPSInfoIFDPointer:g);return true}function u(z,x,C){var E,B,A,D=0;if(typeof(x)==="string"){var y=q[z.toLowerCase()];for(hex in y){if(y[hex]===x){x=hex;break}}}E=r[z.toLowerCase()+"IFD"];B=t.SHORT(E);for(i=0;i<B;i++){A=E+12*i+2;if(t.SHORT(A)==x){D=A+8;break}}if(!D){return false}t.LONG(D,C);return true}return{init:function(x){r={tiffHeader:10};if(x===g||!x.length){return false}t.init(x);if(t.SHORT(0)===65505&&t.STRING(4,5).toUpperCase()==="EXIF\0"){return v()}return false},EXIF:function(){var y;y=s(r.exifIFD,q.exif);if(y.ExifVersion&&l.typeOf(y.ExifVersion)==="array"){for(var z=0,x="";z<y.ExifVersion.length;z++){x+=String.fromCharCode(y.ExifVersion[z])}y.ExifVersion=x}return y},GPS:function(){var x;x=s(r.gpsIFD,q.gps);if(x.GPSVersionID){x.GPSVersionID=x.GPSVersionID.join(".")}return x},setExif:function(x,y){if(x!=="PixelXDimension"&&x!=="PixelYDimension"){return false}return u("exif",x,y)},getBinary:function(){return t.SEGMENT()}}}})(window,document,plupload);(function(d,a,b,c){function e(f){return a.getElementById(f)}b.runtimes.Html4=b.addRuntime("html4",{getFeatures:function(){return{multipart:true,triggerDialog:(b.ua.gecko&&d.FormData||b.ua.webkit)}},init:function(f,g){f.bind("Init",function(p){var j=a.body,n,h="javascript",k,x,q,z=[],r=/MSIE/.test(navigator.userAgent),t=[],m=p.settings.filters,o,l,s,w;no_type_restriction:for(o=0;o<m.length;o++){l=m[o].extensions.split(/,/);for(w=0;w<l.length;w++){if(l[w]==="*"){t=[];break no_type_restriction}s=b.mimeTypes[l[w]];if(s&&b.inArray(s,t)===-1){t.push(s)}}}t=t.join(",");function v(){var C,A,y,B;q=b.guid();z.push(q);C=a.createElement("form");C.setAttribute("id","form_"+q);C.setAttribute("method","post");C.setAttribute("enctype","multipart/form-data");C.setAttribute("encoding","multipart/form-data");C.setAttribute("target",p.id+"_iframe");C.style.position="absolute";A=a.createElement("input");A.setAttribute("id","input_"+q);A.setAttribute("type","file");A.setAttribute("accept",t);A.setAttribute("size",1);B=e(p.settings.browse_button);if(p.features.triggerDialog&&B){b.addEvent(e(p.settings.browse_button),"click",function(D){if(!A.disabled){A.click()}D.preventDefault()},p.id)}b.extend(A.style,{width:"100%",height:"100%",opacity:0,fontSize:"99px",cursor:"pointer"});b.extend(C.style,{overflow:"hidden"});y=p.settings.shim_bgcolor;if(y){C.style.background=y}if(r){b.extend(A.style,{filter:"alpha(opacity=0)"})}b.addEvent(A,"change",function(G){var E=G.target,D,F=[],H;if(E.value){e("form_"+q).style.top=-1048575+"px";D=E.value.replace(/\\/g,"/");D=D.substring(D.length,D.lastIndexOf("/")+1);F.push(new b.File(q,D));if(!p.features.triggerDialog){b.removeAllEvents(C,p.id)}else{b.removeEvent(B,"click",p.id)}b.removeEvent(A,"change",p.id);v();if(F.length){f.trigger("FilesAdded",F)}}},p.id);C.appendChild(A);j.appendChild(C);p.refresh()}function u(){var y=a.createElement("div");y.innerHTML='<iframe id="'+p.id+'_iframe" name="'+p.id+'_iframe" src="'+h+':""" style="display:none"></iframe>';n=y.firstChild;j.appendChild(n);b.addEvent(n,"load",function(D){var E=D.target,C,A;if(!k){return}try{C=E.contentWindow.document||E.contentDocument||d.frames[E.id].document}catch(B){p.trigger("Error",{code:b.SECURITY_ERROR,message:b.translate("Security error."),file:k});return}A=C.documentElement.innerText||C.documentElement.textContent;if(A){k.status=b.DONE;k.loaded=1025;k.percent=100;p.trigger("UploadProgress",k);p.trigger("FileUploaded",k,{response:A})}},p.id)}if(p.settings.container){j=e(p.settings.container);if(b.getStyle(j,"position")==="static"){j.style.position="relative"}}p.bind("UploadFile",function(y,B){var C,A;if(B.status==b.DONE||B.status==b.FAILED||y.state==b.STOPPED){return}C=e("form_"+B.id);A=e("input_"+B.id);A.setAttribute("name",y.settings.file_data_name);C.setAttribute("action",y.settings.url);b.each(b.extend({name:B.target_name||B.name},y.settings.multipart_params),function(F,D){var E=a.createElement("input");b.extend(E,{type:"hidden",name:D,value:F});C.insertBefore(E,C.firstChild)});k=B;e("form_"+q).style.top=-1048575+"px";C.submit()});p.bind("FileUploaded",function(y){y.refresh()});p.bind("StateChanged",function(y){if(y.state==b.STARTED){u()}else{if(y.state==b.STOPPED){d.setTimeout(function(){b.removeEvent(n,"load",y.id);if(n.parentNode){n.parentNode.removeChild(n)}},0)}}b.each(y.files,function(B,A){if(B.status===b.DONE||B.status===b.FAILED){var C=e("form_"+B.id);if(C){C.parentNode.removeChild(C)}}})});p.bind("Refresh",function(A){var G,B,C,D,y,H,I,F,E;G=e(A.settings.browse_button);if(G){y=b.getPos(G,e(A.settings.container));H=b.getSize(G);I=e("form_"+q);F=e("input_"+q);b.extend(I.style,{top:y.y+"px",left:y.x+"px",width:H.w+"px",height:H.h+"px"});if(A.features.triggerDialog){if(b.getStyle(G,"position")==="static"){b.extend(G.style,{position:"relative"})}E=parseInt(G.style.zIndex,10);if(isNaN(E)){E=0}b.extend(G.style,{zIndex:E});b.extend(I.style,{zIndex:E-1})}C=A.settings.browse_button_hover;D=A.settings.browse_button_active;B=A.features.triggerDialog?G:I;if(C){b.addEvent(B,"mouseover",function(){b.addClass(G,C)},A.id);b.addEvent(B,"mouseout",function(){b.removeClass(G,C)},A.id)}if(D){b.addEvent(B,"mousedown",function(){b.addClass(G,D)},A.id);b.addEvent(a.body,"mouseup",function(){b.removeClass(G,D)},A.id)}}});f.bind("FilesRemoved",function(y,B){var A,C;for(A=0;A<B.length;A++){C=e("form_"+B[A].id);if(C){C.parentNode.removeChild(C)}}});f.bind("DisableBrowse",function(y,B){var A=a.getElementById("input_"+q);if(A){A.disabled=B}});f.bind("Destroy",function(y){var A,B,C,D={inputContainer:"form_"+q,inputFile:"input_"+q,browseButton:y.settings.browse_button};for(A in D){B=e(D[A]);if(B){b.removeAllEvents(B,y.id)}}b.removeAllEvents(a.body,y.id);b.each(z,function(F,E){C=e("form_"+F);if(C){C.parentNode.removeChild(C)}})});v()});g({success:true})}})})(window,document,plupload);
|
|
|
|
admin/js/plupload/plupload.gears.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(){if(window.google&&google.gears){return}var a=null;if(typeof GearsFactory!="undefined"){a=new GearsFactory()}else{try{a=new ActiveXObject("Gears.Factory");if(a.getBuildInfo().indexOf("ie_mobile")!=-1){a.privateSetGlobalObject(this)}}catch(b){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}}if(!a){return}if(!window.google){window.google={}}if(!google.gears){google.gears={factory:a}}})();(function(e,b,c,d){var f={};function a(h,j,l){var g,i,k,n;i=google.gears.factory.create("beta.canvas");try{i.decode(h);if(!j.width){j.width=i.width}if(!j.height){j.height=i.height}n=Math.min(j.width/i.width,j.height/i.height);if(n<1){i.resize(Math.round(i.width*n),Math.round(i.height*n))}else{if(!j.quality||l!=="image/jpeg"){return h}}if(j.quality){return i.encode(l,{quality:j.quality/100})}return i.encode(l)}catch(m){}return h}c.runtimes.Gears=c.addRuntime("gears",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(k,m){var l,h,g=false;if(!e.google||!google.gears){return m({success:false})}try{l=google.gears.factory.create("beta.desktop")}catch(j){return m({success:false})}function i(p){var o,n,q=[],r;for(n=0;n<p.length;n++){o=p[n];r=c.guid();f[r]=o.blob;q.push(new c.File(r,o.name,o.blob.length))}k.trigger("FilesAdded",q)}k.bind("PostInit",function(){var o=k.settings,n=b.getElementById(o.drop_element);if(n){c.addEvent(n,"dragover",function(p){l.setDropEffect(p,"copy");p.preventDefault()},k.id);c.addEvent(n,"drop",function(q){var p=l.getDragData(q,"application/x-gears-files");if(p){i(p.files)}q.preventDefault()},k.id);n=0}c.addEvent(b.getElementById(o.browse_button),"click",function(t){var s=[],q,p,r;t.preventDefault();if(g){return}no_type_restriction:for(q=0;q<o.filters.length;q++){r=o.filters[q].extensions.split(",");for(p=0;p<r.length;p++){if(r[p]==="*"){s=[];break no_type_restriction}s.push("."+r[p])}}l.openFiles(i,{singleFile:!o.multi_selection,filter:s})},k.id)});k.bind("CancelUpload",function(){if(h.abort){h.abort()}});k.bind("UploadFile",function(t,q){var v=0,u,r,s=0,p=t.settings.resize,n;if(p&&/\.(png|jpg|jpeg)$/i.test(q.name)){f[q.id]=a(f[q.id],p,/\.png$/i.test(q.name)?"image/png":"image/jpeg")}q.size=f[q.id].length;r=t.settings.chunk_size;n=r>0;u=Math.ceil(q.size/r);if(!n){r=q.size;u=1}function o(){var B,x=t.settings.multipart,w=0,A={name:q.target_name||q.name},y=t.settings.url;function z(D){var C,I="----pluploadboundary"+c.guid(),F="--",H="\r\n",E,G;if(x){h.setRequestHeader("Content-Type","multipart/form-data; boundary="+I);C=google.gears.factory.create("beta.blobbuilder");c.each(c.extend(A,t.settings.multipart_params),function(K,J){C.append(F+I+H+'Content-Disposition: form-data; name="'+J+'"'+H+H);C.append(K+H)});G=c.mimeTypes[q.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";C.append(F+I+H+'Content-Disposition: form-data; name="'+t.settings.file_data_name+'"; filename="'+q.name+'"'+H+"Content-Type: "+G+H+H);C.append(D);C.append(H+F+I+F+H);E=C.getAsBlob();w=E.length-D.length;D=E}h.send(D)}if(q.status==c.DONE||q.status==c.FAILED||t.state==c.STOPPED){return}if(n){A.chunk=v;A.chunks=u}B=Math.min(r,q.size-(v*r));if(!x){y=c.buildUrl(t.settings.url,A)}h=google.gears.factory.create("beta.httprequest");h.open("POST",y);if(!x){h.setRequestHeader("Content-Disposition",'attachment; filename="'+q.name+'"');h.setRequestHeader("Content-Type","application/octet-stream")}c.each(t.settings.headers,function(D,C){h.setRequestHeader(C,D)});h.upload.onprogress=function(C){q.loaded=s+C.loaded-w;t.trigger("UploadProgress",q)};h.onreadystatechange=function(){var C;if(h.readyState==4&&t.state!==c.STOPPED){if(h.status==200){C={chunk:v,chunks:u,response:h.responseText,status:h.status};t.trigger("ChunkUploaded",q,C);if(C.cancelled){q.status=c.FAILED;return}s+=B;if(++v>=u){q.status=c.DONE;t.trigger("FileUploaded",q,{response:h.responseText,status:h.status})}else{o()}}else{t.trigger("Error",{code:c.HTTP_ERROR,message:c.translate("HTTP Error."),file:q,chunk:v,chunks:u,status:h.status})}}};if(v<u){z(f[q.id].slice(v*r,B))}}o()});k.bind("DisableBrowse",function(n,o){g=o});k.bind("Destroy",function(n){var o,p,q={browseButton:n.settings.browse_button,dropElm:n.settings.drop_element};for(o in q){p=b.getElementById(q[o]);if(p){c.removeAllEvents(p,n.id)}}});m({success:true})}})})(window,document,plupload);
|
|
admin/js/qtip/LICENSE-GPL
DELETED
@@ -1,278 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/qtip/imagesloaded.min.js
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
/* qTip2 v2.1.1 tips viewport modal | qtip2.com | Licensed MIT, GPL | Wed Jul 17 2013 08:33:07 */
|
2 |
-
/*!
|
3 |
-
* imagesLoaded v3.0.2
|
4 |
-
* JavaScript is all like "You images are done yet or what?"
|
5 |
-
*/
|
6 |
-
!function(a){"use strict";function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){return"[object Array]"===i.call(a)}function d(a){var b=[];if(c(a))b=a;else if("number"==typeof a.length)for(var d=0,e=a.length;e>d;d++)b.push(a[d]);else b.push(a);return b}function e(a,c){function e(a,c,g){if(!(this instanceof e))return new e(a,c);"string"==typeof a&&(a=document.querySelectorAll(a)),this.elements=d(a),this.options=b({},this.options),"function"==typeof c?g=c:b(this.options,c),g&&this.on("always",g),this.getImages(),f&&(this.jqDeferred=new f.Deferred);var h=this;setTimeout(function(){h.check()})}function i(a){this.img=a}e.prototype=new a,e.prototype.options={},e.prototype.getImages=function(){this.images=[];for(var a=0,b=this.elements.length;b>a;a++){var c=this.elements[a];"IMG"===c.nodeName&&this.addImage(c);for(var d=c.querySelectorAll("img"),e=0,f=d.length;f>e;e++){var g=d[e];this.addImage(g)}}},e.prototype.addImage=function(a){var b=new i(a);this.images.push(b)},e.prototype.check=function(){function a(a,e){return b.options.debug&&h&&g.log("confirm",a,e),b.progress(a),c++,c===d&&b.complete(),!0}var b=this,c=0,d=this.images.length;if(this.hasAnyBroken=!1,!d)return this.complete(),void 0;for(var e=0;d>e;e++){var f=this.images[e];f.on("confirm",a),f.check()}},e.prototype.progress=function(a){this.hasAnyBroken=this.hasAnyBroken||!a.isLoaded,this.emit("progress",this,a),this.jqDeferred&&this.jqDeferred.notify(this,a)},e.prototype.complete=function(){var a=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emit(a,this),this.emit("always",this),this.jqDeferred){var b=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[b](this)}},f&&(f.fn.imagesLoaded=function(a,b){var c=new e(this,a,b);return c.jqDeferred.promise(f(this))});var j={};return i.prototype=new a,i.prototype.check=function(){var a=j[this.img.src];if(a)return this.useCached(a),void 0;if(j[this.img.src]=this,this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var b=this.proxyImage=new Image;c.bind(b,"load",this),c.bind(b,"error",this),b.src=this.img.src},i.prototype.useCached=function(a){if(a.isConfirmed)this.confirm(a.isLoaded,"cached was confirmed");else{var b=this;a.on("confirm",function(a){return b.confirm(a.isLoaded,"cache emitted confirmed"),!0})}},i.prototype.confirm=function(a,b){this.isConfirmed=!0,this.isLoaded=a,this.emit("confirm",this,b)},i.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},i.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindProxyEvents()},i.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindProxyEvents()},i.prototype.unbindProxyEvents=function(){c.unbind(this.proxyImage,"load",this),c.unbind(this.proxyImage,"error",this)},e}var f=a.jQuery,g=a.console,h="undefined"!=typeof g,i=Object.prototype.toString;"function"==typeof define&&define.amd?define(["eventEmitter","eventie"],e):a.imagesLoaded=e(a.EventEmitter,a.eventie)}(window);
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/qtip/jquery.qtip.css
DELETED
@@ -1,641 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* qTip2 - Pretty powerful tooltips - v2.1.1
|
3 |
-
* http://qtip2.com
|
4 |
-
*
|
5 |
-
* Copyright (c) 2013 Craig Michael Thompson
|
6 |
-
* Released under the MIT, GPL licenses
|
7 |
-
* http://jquery.org/license
|
8 |
-
*
|
9 |
-
* Date: Wed Jul 17 2013 08:33 UTC+0000
|
10 |
-
* Plugins: tips viewport modal
|
11 |
-
* Styles: basic css3
|
12 |
-
*/
|
13 |
-
.qtip{
|
14 |
-
position: absolute;
|
15 |
-
left: -28000px;
|
16 |
-
top: -28000px;
|
17 |
-
display: none;
|
18 |
-
|
19 |
-
max-width: 280px;
|
20 |
-
min-width: 50px;
|
21 |
-
|
22 |
-
font-size: 10.5px;
|
23 |
-
line-height: 12px;
|
24 |
-
|
25 |
-
direction: ltr;
|
26 |
-
|
27 |
-
box-shadow: none;
|
28 |
-
padding: 0;
|
29 |
-
}
|
30 |
-
|
31 |
-
.qtip-content{
|
32 |
-
position: relative;
|
33 |
-
padding: 5px 9px;
|
34 |
-
overflow: hidden;
|
35 |
-
|
36 |
-
text-align: left;
|
37 |
-
word-wrap: break-word;
|
38 |
-
}
|
39 |
-
|
40 |
-
.qtip-titlebar{
|
41 |
-
position: relative;
|
42 |
-
padding: 5px 35px 5px 10px;
|
43 |
-
overflow: hidden;
|
44 |
-
|
45 |
-
border-width: 0 0 1px;
|
46 |
-
font-weight: bold;
|
47 |
-
}
|
48 |
-
|
49 |
-
.qtip-titlebar + .qtip-content{ border-top-width: 0 !important; }
|
50 |
-
|
51 |
-
/* Default close button class */
|
52 |
-
.qtip-close{
|
53 |
-
position: absolute;
|
54 |
-
right: -9px; top: -9px;
|
55 |
-
|
56 |
-
cursor: pointer;
|
57 |
-
outline: medium none;
|
58 |
-
|
59 |
-
border-width: 1px;
|
60 |
-
border-style: solid;
|
61 |
-
border-color: transparent;
|
62 |
-
}
|
63 |
-
|
64 |
-
.qtip-titlebar .qtip-close{
|
65 |
-
right: 4px; top: 50%;
|
66 |
-
margin-top: -9px;
|
67 |
-
}
|
68 |
-
|
69 |
-
* html .qtip-titlebar .qtip-close{ top: 16px; } /* IE fix */
|
70 |
-
|
71 |
-
.qtip-titlebar .ui-icon,
|
72 |
-
.qtip-icon .ui-icon{
|
73 |
-
display: block;
|
74 |
-
text-indent: -1000em;
|
75 |
-
direction: ltr;
|
76 |
-
}
|
77 |
-
|
78 |
-
.qtip-icon, .qtip-icon .ui-icon{
|
79 |
-
-moz-border-radius: 3px;
|
80 |
-
-webkit-border-radius: 3px;
|
81 |
-
border-radius: 3px;
|
82 |
-
text-decoration: none;
|
83 |
-
}
|
84 |
-
|
85 |
-
.qtip-icon .ui-icon{
|
86 |
-
width: 18px;
|
87 |
-
height: 14px;
|
88 |
-
|
89 |
-
line-height: 14px;
|
90 |
-
text-align: center;
|
91 |
-
text-indent: 0;
|
92 |
-
font: normal bold 10px/13px Tahoma,sans-serif;
|
93 |
-
|
94 |
-
color: inherit;
|
95 |
-
background: transparent none no-repeat -100em -100em;
|
96 |
-
}
|
97 |
-
|
98 |
-
/* Applied to 'focused' tooltips e.g. most recently displayed/interacted with */
|
99 |
-
.qtip-focus{}
|
100 |
-
|
101 |
-
/* Applied on hover of tooltips i.e. added/removed on mouseenter/mouseleave respectively */
|
102 |
-
.qtip-hover{}
|
103 |
-
|
104 |
-
/* Default tooltip style */
|
105 |
-
.qtip-default{
|
106 |
-
border-width: 1px;
|
107 |
-
border-style: solid;
|
108 |
-
border-color: #F1D031;
|
109 |
-
|
110 |
-
background-color: #FFFFA3;
|
111 |
-
color: #555;
|
112 |
-
}
|
113 |
-
|
114 |
-
.qtip-default .qtip-titlebar{
|
115 |
-
background-color: #FFEF93;
|
116 |
-
}
|
117 |
-
|
118 |
-
.qtip-default .qtip-icon{
|
119 |
-
border-color: #CCC;
|
120 |
-
background: #F1F1F1;
|
121 |
-
color: #777;
|
122 |
-
}
|
123 |
-
|
124 |
-
.qtip-default .qtip-titlebar .qtip-close{
|
125 |
-
border-color: #AAA;
|
126 |
-
color: #111;
|
127 |
-
}
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
/*! Light tooltip style */
|
132 |
-
.qtip-light{
|
133 |
-
background-color: white;
|
134 |
-
border-color: #E2E2E2;
|
135 |
-
color: #454545;
|
136 |
-
}
|
137 |
-
|
138 |
-
.qtip-light .qtip-titlebar{
|
139 |
-
background-color: #f1f1f1;
|
140 |
-
}
|
141 |
-
|
142 |
-
|
143 |
-
/*! Dark tooltip style */
|
144 |
-
.qtip-dark{
|
145 |
-
background-color: #505050;
|
146 |
-
border-color: #303030;
|
147 |
-
color: #f3f3f3;
|
148 |
-
}
|
149 |
-
|
150 |
-
.qtip-dark .qtip-titlebar{
|
151 |
-
background-color: #404040;
|
152 |
-
}
|
153 |
-
|
154 |
-
.qtip-dark .qtip-icon{
|
155 |
-
border-color: #444;
|
156 |
-
}
|
157 |
-
|
158 |
-
.qtip-dark .qtip-titlebar .ui-state-hover{
|
159 |
-
border-color: #303030;
|
160 |
-
}
|
161 |
-
|
162 |
-
|
163 |
-
/*! Cream tooltip style */
|
164 |
-
.qtip-cream{
|
165 |
-
background-color: #FBF7AA;
|
166 |
-
border-color: #F9E98E;
|
167 |
-
color: #A27D35;
|
168 |
-
}
|
169 |
-
|
170 |
-
.qtip-cream .qtip-titlebar{
|
171 |
-
background-color: #F0DE7D;
|
172 |
-
}
|
173 |
-
|
174 |
-
.qtip-cream .qtip-close .qtip-icon{
|
175 |
-
background-position: -82px 0;
|
176 |
-
}
|
177 |
-
|
178 |
-
|
179 |
-
/*! Red tooltip style */
|
180 |
-
.qtip-red{
|
181 |
-
background-color: #F78B83;
|
182 |
-
border-color: #D95252;
|
183 |
-
color: #912323;
|
184 |
-
}
|
185 |
-
|
186 |
-
.qtip-red .qtip-titlebar{
|
187 |
-
background-color: #F06D65;
|
188 |
-
}
|
189 |
-
|
190 |
-
.qtip-red .qtip-close .qtip-icon{
|
191 |
-
background-position: -102px 0;
|
192 |
-
}
|
193 |
-
|
194 |
-
.qtip-red .qtip-icon{
|
195 |
-
border-color: #D95252;
|
196 |
-
}
|
197 |
-
|
198 |
-
.qtip-red .qtip-titlebar .ui-state-hover{
|
199 |
-
border-color: #D95252;
|
200 |
-
}
|
201 |
-
|
202 |
-
|
203 |
-
/*! Green tooltip style */
|
204 |
-
.qtip-green{
|
205 |
-
background-color: #CAED9E;
|
206 |
-
border-color: #90D93F;
|
207 |
-
color: #3F6219;
|
208 |
-
}
|
209 |
-
|
210 |
-
.qtip-green .qtip-titlebar{
|
211 |
-
background-color: #B0DE78;
|
212 |
-
}
|
213 |
-
|
214 |
-
.qtip-green .qtip-close .qtip-icon{
|
215 |
-
background-position: -42px 0;
|
216 |
-
}
|
217 |
-
|
218 |
-
|
219 |
-
/*! Blue tooltip style */
|
220 |
-
.qtip-blue{
|
221 |
-
background-color: #E5F6FE;
|
222 |
-
border-color: #ADD9ED;
|
223 |
-
color: #5E99BD;
|
224 |
-
}
|
225 |
-
|
226 |
-
.qtip-blue .qtip-titlebar{
|
227 |
-
background-color: #D0E9F5;
|
228 |
-
}
|
229 |
-
|
230 |
-
.qtip-blue .qtip-close .qtip-icon{
|
231 |
-
background-position: -2px 0;
|
232 |
-
}
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
.qtip-shadow{
|
237 |
-
-webkit-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
238 |
-
-moz-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
239 |
-
box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
240 |
-
}
|
241 |
-
|
242 |
-
/* Add rounded corners to your tooltips in: FF3+, Chrome 2+, Opera 10.6+, IE9+, Safari 2+ */
|
243 |
-
.qtip-rounded,
|
244 |
-
.qtip-tipsy,
|
245 |
-
.qtip-bootstrap{
|
246 |
-
-moz-border-radius: 5px;
|
247 |
-
-webkit-border-radius: 5px;
|
248 |
-
border-radius: 5px;
|
249 |
-
}
|
250 |
-
|
251 |
-
.qtip-rounded .qtip-titlebar{
|
252 |
-
-moz-border-radius: 4px 4px 0 0;
|
253 |
-
-webkit-border-radius: 4px 4px 0 0;
|
254 |
-
border-radius: 4px 4px 0 0;
|
255 |
-
}
|
256 |
-
|
257 |
-
/* Youtube tooltip style */
|
258 |
-
.qtip-youtube{
|
259 |
-
-moz-border-radius: 2px;
|
260 |
-
-webkit-border-radius: 2px;
|
261 |
-
border-radius: 2px;
|
262 |
-
|
263 |
-
-webkit-box-shadow: 0 0 3px #333;
|
264 |
-
-moz-box-shadow: 0 0 3px #333;
|
265 |
-
box-shadow: 0 0 3px #333;
|
266 |
-
|
267 |
-
color: white;
|
268 |
-
border-width: 0;
|
269 |
-
|
270 |
-
background: #4A4A4A;
|
271 |
-
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#4A4A4A),color-stop(100%,black));
|
272 |
-
background-image: -webkit-linear-gradient(top,#4A4A4A 0,black 100%);
|
273 |
-
background-image: -moz-linear-gradient(top,#4A4A4A 0,black 100%);
|
274 |
-
background-image: -ms-linear-gradient(top,#4A4A4A 0,black 100%);
|
275 |
-
background-image: -o-linear-gradient(top,#4A4A4A 0,black 100%);
|
276 |
-
}
|
277 |
-
|
278 |
-
.qtip-youtube .qtip-titlebar{
|
279 |
-
background-color: #4A4A4A;
|
280 |
-
background-color: rgba(0,0,0,0);
|
281 |
-
}
|
282 |
-
|
283 |
-
.qtip-youtube .qtip-content{
|
284 |
-
padding: .75em;
|
285 |
-
font: 12px arial,sans-serif;
|
286 |
-
|
287 |
-
filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);
|
288 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);";
|
289 |
-
}
|
290 |
-
|
291 |
-
.qtip-youtube .qtip-icon{
|
292 |
-
border-color: #222;
|
293 |
-
}
|
294 |
-
|
295 |
-
.qtip-youtube .qtip-titlebar .ui-state-hover{
|
296 |
-
border-color: #303030;
|
297 |
-
}
|
298 |
-
|
299 |
-
|
300 |
-
/* jQuery TOOLS Tooltip style */
|
301 |
-
.qtip-jtools{
|
302 |
-
background: #232323;
|
303 |
-
background: rgba(0, 0, 0, 0.7);
|
304 |
-
background-image: -webkit-gradient(linear, left top, left bottom, from(#717171), to(#232323));
|
305 |
-
background-image: -moz-linear-gradient(top, #717171, #232323);
|
306 |
-
background-image: -webkit-linear-gradient(top, #717171, #232323);
|
307 |
-
background-image: -ms-linear-gradient(top, #717171, #232323);
|
308 |
-
background-image: -o-linear-gradient(top, #717171, #232323);
|
309 |
-
|
310 |
-
border: 2px solid #ddd;
|
311 |
-
border: 2px solid rgba(241,241,241,1);
|
312 |
-
|
313 |
-
-moz-border-radius: 2px;
|
314 |
-
-webkit-border-radius: 2px;
|
315 |
-
border-radius: 2px;
|
316 |
-
|
317 |
-
-webkit-box-shadow: 0 0 12px #333;
|
318 |
-
-moz-box-shadow: 0 0 12px #333;
|
319 |
-
box-shadow: 0 0 12px #333;
|
320 |
-
}
|
321 |
-
|
322 |
-
/* IE Specific */
|
323 |
-
.qtip-jtools .qtip-titlebar{
|
324 |
-
background-color: transparent;
|
325 |
-
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A);
|
326 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A)";
|
327 |
-
}
|
328 |
-
.qtip-jtools .qtip-content{
|
329 |
-
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323);
|
330 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323)";
|
331 |
-
}
|
332 |
-
|
333 |
-
.qtip-jtools .qtip-titlebar,
|
334 |
-
.qtip-jtools .qtip-content{
|
335 |
-
background: transparent;
|
336 |
-
color: white;
|
337 |
-
border: 0 dashed transparent;
|
338 |
-
}
|
339 |
-
|
340 |
-
.qtip-jtools .qtip-icon{
|
341 |
-
border-color: #555;
|
342 |
-
}
|
343 |
-
|
344 |
-
.qtip-jtools .qtip-titlebar .ui-state-hover{
|
345 |
-
border-color: #333;
|
346 |
-
}
|
347 |
-
|
348 |
-
|
349 |
-
/* Cluetip style */
|
350 |
-
.qtip-cluetip{
|
351 |
-
-webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
|
352 |
-
-moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
|
353 |
-
box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
|
354 |
-
|
355 |
-
background-color: #D9D9C2;
|
356 |
-
color: #111;
|
357 |
-
border: 0 dashed transparent;
|
358 |
-
}
|
359 |
-
|
360 |
-
.qtip-cluetip .qtip-titlebar{
|
361 |
-
background-color: #87876A;
|
362 |
-
color: white;
|
363 |
-
border: 0 dashed transparent;
|
364 |
-
}
|
365 |
-
|
366 |
-
.qtip-cluetip .qtip-icon{
|
367 |
-
border-color: #808064;
|
368 |
-
}
|
369 |
-
|
370 |
-
.qtip-cluetip .qtip-titlebar .ui-state-hover{
|
371 |
-
border-color: #696952;
|
372 |
-
color: #696952;
|
373 |
-
}
|
374 |
-
|
375 |
-
|
376 |
-
/* Tipsy style */
|
377 |
-
.qtip-tipsy{
|
378 |
-
background: black;
|
379 |
-
background: rgba(0, 0, 0, .87);
|
380 |
-
|
381 |
-
color: white;
|
382 |
-
border: 0 solid transparent;
|
383 |
-
|
384 |
-
font-size: 11px;
|
385 |
-
font-family: 'Lucida Grande', sans-serif;
|
386 |
-
font-weight: bold;
|
387 |
-
line-height: 16px;
|
388 |
-
text-shadow: 0 1px black;
|
389 |
-
}
|
390 |
-
|
391 |
-
.qtip-tipsy .qtip-titlebar{
|
392 |
-
padding: 6px 35px 0 10px;
|
393 |
-
background-color: transparent;
|
394 |
-
}
|
395 |
-
|
396 |
-
.qtip-tipsy .qtip-content{
|
397 |
-
padding: 6px 10px;
|
398 |
-
}
|
399 |
-
|
400 |
-
.qtip-tipsy .qtip-icon{
|
401 |
-
border-color: #222;
|
402 |
-
text-shadow: none;
|
403 |
-
}
|
404 |
-
|
405 |
-
.qtip-tipsy .qtip-titlebar .ui-state-hover{
|
406 |
-
border-color: #303030;
|
407 |
-
}
|
408 |
-
|
409 |
-
|
410 |
-
/* Tipped style */
|
411 |
-
.qtip-tipped{
|
412 |
-
border: 3px solid #959FA9;
|
413 |
-
|
414 |
-
-moz-border-radius: 3px;
|
415 |
-
-webkit-border-radius: 3px;
|
416 |
-
border-radius: 3px;
|
417 |
-
|
418 |
-
background-color: #F9F9F9;
|
419 |
-
color: #454545;
|
420 |
-
|
421 |
-
font-weight: normal;
|
422 |
-
font-family: serif;
|
423 |
-
}
|
424 |
-
|
425 |
-
.qtip-tipped .qtip-titlebar{
|
426 |
-
border-bottom-width: 0;
|
427 |
-
|
428 |
-
color: white;
|
429 |
-
background: #3A79B8;
|
430 |
-
background-image: -webkit-gradient(linear, left top, left bottom, from(#3A79B8), to(#2E629D));
|
431 |
-
background-image: -webkit-linear-gradient(top, #3A79B8, #2E629D);
|
432 |
-
background-image: -moz-linear-gradient(top, #3A79B8, #2E629D);
|
433 |
-
background-image: -ms-linear-gradient(top, #3A79B8, #2E629D);
|
434 |
-
background-image: -o-linear-gradient(top, #3A79B8, #2E629D);
|
435 |
-
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D);
|
436 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D)";
|
437 |
-
}
|
438 |
-
|
439 |
-
.qtip-tipped .qtip-icon{
|
440 |
-
border: 2px solid #285589;
|
441 |
-
background: #285589;
|
442 |
-
}
|
443 |
-
|
444 |
-
.qtip-tipped .qtip-icon .ui-icon{
|
445 |
-
background-color: #FBFBFB;
|
446 |
-
color: #555;
|
447 |
-
}
|
448 |
-
|
449 |
-
|
450 |
-
/**
|
451 |
-
* Twitter Bootstrap style.
|
452 |
-
*
|
453 |
-
* Tested with IE 8, IE 9, Chrome 18, Firefox 9, Opera 11.
|
454 |
-
* Does not work with IE 7.
|
455 |
-
*/
|
456 |
-
.qtip-bootstrap{
|
457 |
-
/** Taken from Bootstrap body */
|
458 |
-
font-size: 14px;
|
459 |
-
line-height: 20px;
|
460 |
-
color: #333333;
|
461 |
-
|
462 |
-
/** Taken from Bootstrap .popover */
|
463 |
-
padding: 1px;
|
464 |
-
background-color: #ffffff;
|
465 |
-
border: 1px solid #ccc;
|
466 |
-
border: 1px solid rgba(0, 0, 0, 0.2);
|
467 |
-
-webkit-border-radius: 6px;
|
468 |
-
-moz-border-radius: 6px;
|
469 |
-
border-radius: 6px;
|
470 |
-
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
471 |
-
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
472 |
-
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
473 |
-
-webkit-background-clip: padding-box;
|
474 |
-
-moz-background-clip: padding;
|
475 |
-
background-clip: padding-box;
|
476 |
-
}
|
477 |
-
|
478 |
-
.qtip-bootstrap .qtip-titlebar{
|
479 |
-
/** Taken from Bootstrap .popover-title */
|
480 |
-
padding: 8px 14px;
|
481 |
-
margin: 0;
|
482 |
-
font-size: 14px;
|
483 |
-
font-weight: normal;
|
484 |
-
line-height: 18px;
|
485 |
-
background-color: #f7f7f7;
|
486 |
-
border-bottom: 1px solid #ebebeb;
|
487 |
-
-webkit-border-radius: 5px 5px 0 0;
|
488 |
-
-moz-border-radius: 5px 5px 0 0;
|
489 |
-
border-radius: 5px 5px 0 0;
|
490 |
-
}
|
491 |
-
|
492 |
-
.qtip-bootstrap .qtip-titlebar .qtip-close{
|
493 |
-
/**
|
494 |
-
* Overrides qTip2:
|
495 |
-
* .qtip-titlebar .qtip-close{
|
496 |
-
* [...]
|
497 |
-
* right: 4px;
|
498 |
-
* top: 50%;
|
499 |
-
* [...]
|
500 |
-
* border-style: solid;
|
501 |
-
* }
|
502 |
-
*/
|
503 |
-
right: 11px;
|
504 |
-
top: 45%;
|
505 |
-
border-style: none;
|
506 |
-
}
|
507 |
-
|
508 |
-
.qtip-bootstrap .qtip-content{
|
509 |
-
/** Taken from Bootstrap .popover-content */
|
510 |
-
padding: 9px 14px;
|
511 |
-
}
|
512 |
-
|
513 |
-
.qtip-bootstrap .qtip-icon{
|
514 |
-
/**
|
515 |
-
* Overrides qTip2:
|
516 |
-
* .qtip-default .qtip-icon {
|
517 |
-
* border-color: #CCC;
|
518 |
-
* background: #F1F1F1;
|
519 |
-
* color: #777;
|
520 |
-
* }
|
521 |
-
*/
|
522 |
-
background: transparent;
|
523 |
-
}
|
524 |
-
|
525 |
-
.qtip-bootstrap .qtip-icon .ui-icon{
|
526 |
-
/**
|
527 |
-
* Overrides qTip2:
|
528 |
-
* .qtip-icon .ui-icon{
|
529 |
-
* width: 18px;
|
530 |
-
* height: 14px;
|
531 |
-
* }
|
532 |
-
*/
|
533 |
-
width: auto;
|
534 |
-
height: auto;
|
535 |
-
|
536 |
-
/* Taken from Bootstrap .close */
|
537 |
-
float: right;
|
538 |
-
font-size: 20px;
|
539 |
-
font-weight: bold;
|
540 |
-
line-height: 18px;
|
541 |
-
color: #000000;
|
542 |
-
text-shadow: 0 1px 0 #ffffff;
|
543 |
-
opacity: 0.2;
|
544 |
-
filter: alpha(opacity=20);
|
545 |
-
}
|
546 |
-
|
547 |
-
.qtip-bootstrap .qtip-icon .ui-icon:hover{
|
548 |
-
/* Taken from Bootstrap .close:hover */
|
549 |
-
color: #000000;
|
550 |
-
text-decoration: none;
|
551 |
-
cursor: pointer;
|
552 |
-
opacity: 0.4;
|
553 |
-
filter: alpha(opacity=40);
|
554 |
-
}
|
555 |
-
|
556 |
-
|
557 |
-
/* IE9 fix - removes all filters */
|
558 |
-
.qtip:not(.ie9haxors) div.qtip-content,
|
559 |
-
.qtip:not(.ie9haxors) div.qtip-titlebar{
|
560 |
-
filter: none;
|
561 |
-
-ms-filter: none;
|
562 |
-
}
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
.qtip .qtip-tip{
|
567 |
-
margin: 0 auto;
|
568 |
-
overflow: hidden;
|
569 |
-
z-index: 10;
|
570 |
-
|
571 |
-
}
|
572 |
-
|
573 |
-
/* Opera bug #357 - Incorrect tip position
|
574 |
-
https://github.com/Craga89/qTip2/issues/367 */
|
575 |
-
x:-o-prefocus, .qtip .qtip-tip{
|
576 |
-
visibility: hidden;
|
577 |
-
}
|
578 |
-
|
579 |
-
.qtip .qtip-tip,
|
580 |
-
.qtip .qtip-tip .qtip-vml,
|
581 |
-
.qtip .qtip-tip canvas{
|
582 |
-
position: absolute;
|
583 |
-
|
584 |
-
color: #123456;
|
585 |
-
background: transparent;
|
586 |
-
border: 0 dashed transparent;
|
587 |
-
}
|
588 |
-
|
589 |
-
.qtip .qtip-tip canvas{ top: 0; left: 0; }
|
590 |
-
|
591 |
-
.qtip .qtip-tip .qtip-vml{
|
592 |
-
behavior: url(#default#VML);
|
593 |
-
display: inline-block;
|
594 |
-
visibility: visible;
|
595 |
-
}
|
596 |
-
|
597 |
-
#qtip-overlay{
|
598 |
-
position: fixed;
|
599 |
-
left: -10000em;
|
600 |
-
top: -10000em;
|
601 |
-
}
|
602 |
-
|
603 |
-
/* Applied to modals with show.modal.blur set to true */
|
604 |
-
#qtip-overlay.blurs{ cursor: pointer; }
|
605 |
-
|
606 |
-
/* Change opacity of overlay here */
|
607 |
-
#qtip-overlay div{
|
608 |
-
position: absolute;
|
609 |
-
left: 0; top: 0;
|
610 |
-
width: 100%; height: 100%;
|
611 |
-
|
612 |
-
background-color: black;
|
613 |
-
|
614 |
-
opacity: 0.7;
|
615 |
-
filter:alpha(opacity=70);
|
616 |
-
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
|
617 |
-
}
|
618 |
-
|
619 |
-
/* gMedia styles */
|
620 |
-
.qtip-preview .qtip-content {
|
621 |
-
width: 150px;
|
622 |
-
}
|
623 |
-
|
624 |
-
.qtip-preview .qtip-titlebar {
|
625 |
-
padding: 5px 9px;
|
626 |
-
width: 150px;
|
627 |
-
}
|
628 |
-
|
629 |
-
.fancy-listen .qtip-content {
|
630 |
-
width: 250px;
|
631 |
-
height: 30px;
|
632 |
-
overflow: visible;
|
633 |
-
padding: 1px;
|
634 |
-
}
|
635 |
-
|
636 |
-
.fancy-watch.qtip { max-width: 660px; }
|
637 |
-
.fancy-watch .qtip-content {
|
638 |
-
width: 520px;
|
639 |
-
height: 304px;
|
640 |
-
padding: 1px;
|
641 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/qtip/jquery.qtip.min.js
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
/* qTip2 v2.1.1 tips viewport modal | qtip2.com | Licensed MIT, GPL | Wed Jul 17 2013 08:33:07 */
|
2 |
-
!function(a,b,c){!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery","imagesloaded"],a):jQuery&&!jQuery.fn.qtip&&a(jQuery)}(function(d){function e(a,b,c,e){this.id=c,this.target=a,this.tooltip=D,this.elements=elements={target:a},this._id=Q+"-"+c,this.timers={img:{}},this.options=b,this.plugins={},this.cache=cache={event:{},target:d(),disabled:C,attr:e,onTooltip:C,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=C}function f(a){return a===D||"object"!==d.type(a)}function g(a){return!(d.isFunction(a)||a&&a.attr||a.length||"object"===d.type(a)&&(a.jquery||a.then))}function h(a){var b,c,e,h;return f(a)?C:(f(a.metadata)&&(a.metadata={type:a.metadata}),"content"in a&&(b=a.content,f(b)||b.jquery||b.done?b=a.content={text:c=g(b)?C:b}:c=b.text,"ajax"in b&&(e=b.ajax,h=e&&e.once!==C,delete b.ajax,b.text=function(a,b){var f=c||d(this).attr(b.options.content.attr)||"Loading...",g=d.ajax(d.extend({},e,{context:b})).then(e.success,D,e.error).then(function(a){return a&&h&&b.set("content.text",a),a},function(a,c,d){b.destroyed||0===a.status||b.set("content.text",c+": "+d)});return h?f:(b.set("content.text",f),g)}),"title"in b&&(f(b.title)||(b.button=b.title.button,b.title=b.title.text),g(b.title||C)&&(b.title=C))),"position"in a&&f(a.position)&&(a.position={my:a.position,at:a.position}),"show"in a&&f(a.show)&&(a.show=a.show.jquery?{target:a.show}:a.show===B?{ready:B}:{event:a.show}),"hide"in a&&f(a.hide)&&(a.hide=a.hide.jquery?{target:a.hide}:{event:a.hide}),"style"in a&&f(a.style)&&(a.style={classes:a.style}),d.each(P,function(){this.sanitize&&this.sanitize(a)}),a)}function i(a,b){for(var c,d=0,e=a,f=b.split(".");e=e[f[d++]];)d<f.length&&(c=e);return[c||a,f.pop()]}function j(a,b){var c,d,e;for(c in this.checks)for(d in this.checks[c])(e=new RegExp(d,"i").exec(a))&&(b.push(e),("builtin"===c||this.plugins[c])&&this.checks[c][d].apply(this.plugins[c]||this,b))}function k(a){return T.concat("").join(a?"-"+a+" ":" ")}function l(a){if(this.tooltip.hasClass($))return C;clearTimeout(this.timers.show),clearTimeout(this.timers.hide);var b=d.proxy(function(){this.toggle(B,a)},this);this.options.show.delay>0?this.timers.show=setTimeout(b,this.options.show.delay):b()}function m(a){if(this.tooltip.hasClass($))return C;var b=d(a.relatedTarget),c=b.closest(U)[0]===this.tooltip[0],e=b[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==b[0]&&"mouse"===this.options.position.target&&c||this.options.hide.fixed&&/mouse(out|leave|move)/.test(a.type)&&(c||e))try{a.preventDefault(),a.stopImmediatePropagation()}catch(f){}else{var g=d.proxy(function(){this.toggle(C,a)},this);this.options.hide.delay>0?this.timers.hide=setTimeout(g,this.options.hide.delay):g()}}function n(a){return this.tooltip.hasClass($)||!this.options.hide.inactive?C:(clearTimeout(this.timers.inactive),this.timers.inactive=setTimeout(d.proxy(function(){this.hide(a)},this),this.options.hide.inactive),void 0)}function o(a){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(a)}function p(a,c,e){d(b.body).delegate(a,(c.split?c:c.join(eb+" "))+eb,function(){var a=w.api[d.attr(this,S)];a&&!a.disabled&&e.apply(a,arguments)})}function q(a,c,f){var g,i,j,k,l,m=d(b.body),n=a[0]===b?m:a,o=a.metadata?a.metadata(f.metadata):D,p="html5"===f.metadata.type&&o?o[f.metadata.name]:D,q=a.data(f.metadata.name||"qtipopts");try{q="string"==typeof q?d.parseJSON(q):q}catch(r){}if(k=d.extend(B,{},w.defaults,f,"object"==typeof q?h(q):D,h(p||o)),i=k.position,k.id=c,"boolean"==typeof k.content.text){if(j=a.attr(k.content.attr),k.content.attr===C||!j)return C;k.content.text=j}if(i.container.length||(i.container=m),i.target===C&&(i.target=n),k.show.target===C&&(k.show.target=n),k.show.solo===B&&(k.show.solo=i.container.closest("body")),k.hide.target===C&&(k.hide.target=n),k.position.viewport===B&&(k.position.viewport=i.container),i.container=i.container.eq(0),i.at=new y(i.at,B),i.my=new y(i.my),a.data(Q))if(k.overwrite)a.qtip("destroy");else if(k.overwrite===C)return C;return a.attr(R,c),k.suppress&&(l=a.attr("title"))&&a.removeAttr("title").attr(ab,l).attr("title",""),g=new e(a,k,c,!!j),a.data(Q,g),a.one("remove.qtip-"+c+" removeqtip.qtip-"+c,function(){var a;(a=d(this).data(Q))&&a.destroy()}),g}function r(a){return a.charAt(0).toUpperCase()+a.slice(1)}function s(a,b){var d,e,f=b.charAt(0).toUpperCase()+b.slice(1),g=(b+" "+pb.join(f+" ")+f).split(" "),h=0;if(ob[b])return a.css(ob[b]);for(;d=g[h++];)if((e=a.css(d))!==c)return ob[b]=d,e}function t(a,b){return parseInt(s(a,b),10)}function u(a,b){this._ns="tip",this.options=b,this.offset=b.offset,this.size=[b.width,b.height],this.init(this.qtip=a)}function v(a,b){this.options=b,this._ns="-modal",this.init(this.qtip=a)}var w,x,y,z,A,B=!0,C=!1,D=null,E="x",F="y",G="width",H="height",I="top",J="left",K="bottom",L="right",M="center",N="flipinvert",O="shift",P={},Q="qtip",R="data-hasqtip",S="data-qtip-id",T=["ui-widget","ui-tooltip"],U="."+Q,V="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),W=Q+"-fixed",X=Q+"-default",Y=Q+"-focus",Z=Q+"-hover",$=Q+"-disabled",_="_replacedByqTip",ab="oldtitle";BROWSER={ie:function(){for(var a=3,c=b.createElement("div");(c.innerHTML="<!--[if gt IE "+ ++a+"]><i></i><![endif]-->")&&c.getElementsByTagName("i")[0];);return a>4?a:0/0}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||C},x=e.prototype,x.render=function(a){if(this.rendered||this.destroyed)return this;var b=this,c=this.options,e=this.cache,f=this.elements,g=c.content.text,h=c.content.title,i=c.content.button,j=c.position,k="."+this._id+" ",l=[];return d.attr(this.target[0],"aria-describedby",this._id),this.tooltip=f.tooltip=tooltip=d("<div/>",{id:this._id,"class":[Q,X,c.style.classes,Q+"-pos-"+c.position.my.abbrev()].join(" "),width:c.style.width||"",height:c.style.height||"",tracking:"mouse"===j.target&&j.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":C,"aria-describedby":this._id+"-content","aria-hidden":B}).toggleClass($,this.disabled).attr(S,this.id).data(Q,this).appendTo(j.container).append(f.content=d("<div />",{"class":Q+"-content",id:this._id+"-content","aria-atomic":B})),this.rendered=-1,this.positioning=B,h&&(this._createTitle(),d.isFunction(h)||l.push(this._updateTitle(h,C))),i&&this._createButton(),d.isFunction(g)||l.push(this._updateContent(g,C)),this.rendered=B,this._setWidget(),d.each(c.events,function(a,b){d.isFunction(b)&&tooltip.bind(("toggle"===a?["tooltipshow","tooltiphide"]:["tooltip"+a]).join(k)+k,b)}),d.each(P,function(a){var c;"render"===this.initialize&&(c=this(b))&&(b.plugins[a]=c)}),this._assignEvents(),d.when.apply(d,l).then(function(){b._trigger("render"),b.positioning=C,b.hiddenDuringWait||!c.show.ready&&!a||b.toggle(B,e.event,C),b.hiddenDuringWait=C}),w.api[this.id]=this,this},x.destroy=function(a){function b(){if(!this.destroyed){this.destroyed=B;var a=this.target,b=a.attr(ab);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),d.each(this.plugins,function(){this.destroy&&this.destroy()}),clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this._unassignEvents(),a.removeData(Q).removeAttr(S).removeAttr("aria-describedby"),this.options.suppress&&b&&a.attr("title",b).removeAttr(ab),this._unbind(a),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=D,delete w.api[this.id]}}return this.destroyed?this.target:(a!==B&&this.rendered?(tooltip.one("tooltiphidden",d.proxy(b,this)),!this.triggering&&this.hide()):b.call(this),this.target)},z=x.checks={builtin:{"^id$":function(a,b,c,e){var f=c===B?w.nextid:c,g=Q+"-"+f;f!==C&&f.length>0&&!d("#"+g).length?(this._id=g,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):a[b]=e},"^prerender":function(a,b,c){c&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(a,b,c){this._updateContent(c)},"^content.attr$":function(a,b,c,d){this.options.content.text===this.target.attr(d)&&this._updateContent(this.target.attr(c))},"^content.title$":function(a,b,c){return c?(c&&!this.elements.title&&this._createTitle(),this._updateTitle(c),void 0):this._removeTitle()},"^content.button$":function(a,b,c){this._updateButton(c)},"^content.title.(text|button)$":function(a,b,c){this.set("content."+b,c)},"^position.(my|at)$":function(a,b,c){"string"==typeof c&&(a[b]=new y(c,"at"===b))},"^position.container$":function(a,b,c){this.tooltip.appendTo(c)},"^show.ready$":function(a,b,c){c&&(!this.rendered&&this.render(B)||this.toggle(B))},"^style.classes$":function(a,b,c,d){this.tooltip.removeClass(d).addClass(c)},"^style.width|height":function(a,b,c){this.tooltip.css(b,c)},"^style.widget|content.title":function(){this._setWidget()},"^style.def":function(a,b,c){this.tooltip.toggleClass(X,!!c)},"^events.(render|show|move|hide|focus|blur)$":function(a,b,c){tooltip[(d.isFunction(c)?"":"un")+"bind"]("tooltip"+b,c)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var a=this.options.position;tooltip.attr("tracking","mouse"===a.target&&a.adjust.mouse),this._unassignEvents(),this._assignEvents()}}},x.get=function(a){if(this.destroyed)return this;var b=i(this.options,a.toLowerCase()),c=b[0][b[1]];return c.precedance?c.string():c};var bb=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,cb=/^prerender|show\.ready/i;x.set=function(a,b){if(this.destroyed)return this;var c,e=this.rendered,f=C,g=this.options;return this.checks,"string"==typeof a?(c=a,a={},a[c]=b):a=d.extend({},a),d.each(a,function(b,c){if(!e&&!cb.test(b))return delete a[b],void 0;var h,j=i(g,b.toLowerCase());h=j[0][j[1]],j[0][j[1]]=c&&c.nodeType?d(c):c,f=bb.test(b)||f,a[b]=[j[0],j[1],c,h]}),h(g),this.positioning=B,d.each(a,d.proxy(j,this)),this.positioning=C,this.rendered&&this.tooltip[0].offsetWidth>0&&f&&this.reposition("mouse"===g.position.target?D:this.cache.event),this},x._update=function(a,b){var c=this,e=this.cache;return this.rendered&&a?(d.isFunction(a)&&(a=a.call(this.elements.target,e.event,this)||""),d.isFunction(a.then)?(e.waiting=B,a.then(function(a){return e.waiting=C,c._update(a,b)},D,function(a){return c._update(a,b)})):a===C||!a&&""!==a?C:(a.jquery&&a.length>0?b.children().detach().end().append(a.css({display:"block"})):b.html(a),e.waiting=B,(d.fn.imagesLoaded?b.imagesLoaded():d.Deferred().resolve(d([]))).done(function(a){e.waiting=C,a.length&&c.rendered&&c.tooltip[0].offsetWidth>0&&c.reposition(e.event,!a.length)}).promise())):C},x._updateContent=function(a,b){this._update(a,this.elements.content,b)},x._updateTitle=function(a,b){this._update(a,this.elements.title,b)===C&&this._removeTitle(C)},x._createTitle=function(){var a=this.elements,b=this._id+"-title";a.titlebar&&this._removeTitle(),a.titlebar=d("<div />",{"class":Q+"-titlebar "+(this.options.style.widget?k("header"):"")}).append(a.title=d("<div />",{id:b,"class":Q+"-title","aria-atomic":B})).insertBefore(a.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(a){d(this).toggleClass("ui-state-active ui-state-focus","down"===a.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(a){d(this).toggleClass("ui-state-hover","mouseover"===a.type)}),this.options.content.button&&this._createButton()},x._removeTitle=function(a){var b=this.elements;b.title&&(b.titlebar.remove(),b.titlebar=b.title=b.button=D,a!==C&&this.reposition())},x.reposition=function(c,e){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=B;var f,g,h=this.cache,i=this.tooltip,j=this.options.position,k=j.target,l=j.my,m=j.at,n=j.viewport,o=j.container,p=j.adjust,q=p.method.split(" "),r=i.outerWidth(C),s=i.outerHeight(C),t=0,u=0,v=i.css("position"),w={left:0,top:0},x=i[0].offsetWidth>0,y=c&&"scroll"===c.type,z=d(a),A=o[0].ownerDocument,D=this.mouse;if(d.isArray(k)&&2===k.length)m={x:J,y:I},w={left:k[0],top:k[1]};else if("mouse"===k&&(c&&c.pageX||h.event.pageX))m={x:J,y:I},c=!D||!D.pageX||!p.mouse&&c&&c.pageX?(!c||"resize"!==c.type&&"scroll"!==c.type?c&&c.pageX&&"mousemove"===c.type?c:(!p.mouse||this.options.show.distance)&&h.origin&&h.origin.pageX?h.origin:c:h.event)||c||h.event||D||{}:D,"static"!==v&&(w=o.offset()),A.body.offsetWidth!==(a.innerWidth||A.documentElement.clientWidth)&&(g=d(A.body).offset()),w={left:c.pageX-w.left+(g&&g.left||0),top:c.pageY-w.top+(g&&g.top||0)},p.mouse&&y&&(w.left-=D.scrollX-z.scrollLeft(),w.top-=D.scrollY-z.scrollTop());else{if("event"===k&&c&&c.target&&"scroll"!==c.type&&"resize"!==c.type?h.target=d(c.target):"event"!==k&&(h.target=d(k.jquery?k:elements.target)),k=h.target,k=d(k).eq(0),0===k.length)return this;k[0]===b||k[0]===a?(t=BROWSER.iOS?a.innerWidth:k.width(),u=BROWSER.iOS?a.innerHeight:k.height(),k[0]===a&&(w={top:(n||k).scrollTop(),left:(n||k).scrollLeft()})):P.imagemap&&k.is("area")?f=P.imagemap(this,k,m,P.viewport?q:C):P.svg&&k[0].ownerSVGElement?f=P.svg(this,k,m,P.viewport?q:C):(t=k.outerWidth(C),u=k.outerHeight(C),w=k.offset()),f&&(t=f.width,u=f.height,g=f.offset,w=f.position),w=this.reposition.offset(k,w,o),(BROWSER.iOS>3.1&&BROWSER.iOS<4.1||BROWSER.iOS>=4.3&&BROWSER.iOS<4.33||!BROWSER.iOS&&"fixed"===v)&&(w.left-=z.scrollLeft(),w.top-=z.scrollTop()),(!f||f&&f.adjustable!==C)&&(w.left+=m.x===L?t:m.x===M?t/2:0,w.top+=m.y===K?u:m.y===M?u/2:0)}return w.left+=p.x+(l.x===L?-r:l.x===M?-r/2:0),w.top+=p.y+(l.y===K?-s:l.y===M?-s/2:0),P.viewport?(w.adjusted=P.viewport(this,w,j,t,u,r,s),g&&w.adjusted.left&&(w.left+=g.left),g&&w.adjusted.top&&(w.top+=g.top)):w.adjusted={left:0,top:0},this._trigger("move",[w,n.elem||n],c)?(delete w.adjusted,e===C||!x||isNaN(w.left)||isNaN(w.top)||"mouse"===k||!d.isFunction(j.effect)?i.css(w):d.isFunction(j.effect)&&(j.effect.call(i,this,d.extend({},w)),i.queue(function(a){d(this).css({opacity:"",height:""}),BROWSER.ie&&this.style.removeAttribute("filter"),a()})),this.positioning=C,this):this},x.reposition.offset=function(a,c,e){function f(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}if(!e[0])return c;var g,h,i,j,k=d(a[0].ownerDocument),l=!!BROWSER.ie&&"CSS1Compat"!==b.compatMode,m=e[0];do"static"!==(h=d.css(m,"position"))&&("fixed"===h?(i=m.getBoundingClientRect(),f(k,-1)):(i=d(m).position(),i.left+=parseFloat(d.css(m,"borderLeftWidth"))||0,i.top+=parseFloat(d.css(m,"borderTopWidth"))||0),c.left-=i.left+(parseFloat(d.css(m,"marginLeft"))||0),c.top-=i.top+(parseFloat(d.css(m,"marginTop"))||0),g||"hidden"===(j=d.css(m,"overflow"))||"visible"===j||(g=d(m)));while(m=m.offsetParent);return g&&(g[0]!==k[0]||l)&&f(g,1),c};var db=(y=x.reposition.Corner=function(a,b){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,M).toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.forceY=!!b;var c=a.charAt(0);this.precedance="t"===c||"b"===c?F:E}).prototype;db.invert=function(a,b){this[a]=this[a]===J?L:this[a]===L?J:b||this[a]},db.string=function(){var a=this.x,b=this.y;return a===b?a:this.precedance===F||this.forceY&&"center"!==b?b+" "+a:a+" "+b},db.abbrev=function(){var a=this.string().split(" ");return a[0].charAt(0)+(a[1]&&a[1].charAt(0)||"")},db.clone=function(){return new y(this.string(),this.forceY)},x.toggle=function(a,c){var e=this.cache,f=this.options,g=this.tooltip;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(e.event.type)&&f.show.target.add(c.target).length===f.show.target.length&&g.has(c.relatedTarget).length)return this;e.event=d.extend({},c)}if(this.waiting&&!a&&(this.hiddenDuringWait=B),!this.rendered)return a?this.render(1):this;if(this.destroyed||this.disabled)return this;var h,i,j=a?"show":"hide",k=this.options[j],l=(this.options[a?"hide":"show"],this.options.position),m=this.options.content,n=this.tooltip.css("width"),o=this.tooltip[0].offsetWidth>0,p=a||1===k.target.length,q=!c||k.target.length<2||e.target[0]===c.target;return(typeof a).search("boolean|number")&&(a=!o),h=!g.is(":animated")&&o===a&&q,i=h?D:!!this._trigger(j,[90]),i!==C&&a&&this.focus(c),!i||h?this:(d.attr(g[0],"aria-hidden",!a),a?(e.origin=d.extend({},this.mouse),d.isFunction(m.text)&&this._updateContent(m.text,C),d.isFunction(m.title)&&this._updateTitle(m.title,C),!A&&"mouse"===l.target&&l.adjust.mouse&&(d(b).bind("mousemove."+Q,this._storeMouse),A=B),n||g.css("width",g.outerWidth(C)),this.reposition(c,arguments[2]),n||g.css("width",""),k.solo&&("string"==typeof k.solo?d(k.solo):d(U,k.solo)).not(g).not(k.target).qtip("hide",d.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete e.origin,A&&!d(U+'[tracking="true"]:visible',k.solo).not(g).length&&(d(b).unbind("mousemove."+Q),A=C),this.blur(c)),after=d.proxy(function(){a?(BROWSER.ie&&g[0].style.removeAttribute("filter"),g.css("overflow",""),"string"==typeof k.autofocus&&d(this.options.show.autofocus,g).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):g.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(a?"visible":"hidden")},this),k.effect===C||p===C?(g[j](),after()):d.isFunction(k.effect)?(g.stop(1,1),k.effect.call(g,this),g.queue("fx",function(a){after(),a()})):g.fadeTo(90,a?1:0,after),a&&k.target.trigger("qtip-"+this.id+"-inactive"),this)},x.show=function(a){return this.toggle(B,a)},x.hide=function(a){return this.toggle(C,a)},x.focus=function(a){if(!this.rendered||this.destroyed)return this;var b=d(U),c=this.tooltip,e=parseInt(c[0].style.zIndex,10),f=w.zindex+b.length;return c.hasClass(Y)||this._trigger("focus",[f],a)&&(e!==f&&(b.each(function(){this.style.zIndex>e&&(this.style.zIndex=this.style.zIndex-1)}),b.filter("."+Y).qtip("blur",a)),c.addClass(Y)[0].style.zIndex=f),this},x.blur=function(a){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(Y),this._trigger("blur",[this.tooltip.css("zIndex")],a),this)},x.disable=function(a){return this.destroyed?this:("boolean"!=typeof a&&(a=!(this.tooltip.hasClass($)||this.disabled)),this.rendered&&this.tooltip.toggleClass($,a).attr("aria-disabled",a),this.disabled=!!a,this)},x.enable=function(){return this.disable(C)},x._createButton=function(){var a=this,b=this.elements,c=b.tooltip,e=this.options.content.button,f="string"==typeof e,g=f?e:"Close tooltip";b.button&&b.button.remove(),b.button=e.jquery?e:d("<a />",{"class":"qtip-close "+(this.options.style.widget?"":Q+"-icon"),title:g,"aria-label":g}).prepend(d("<span />",{"class":"ui-icon ui-icon-close",html:"×"})),b.button.appendTo(b.titlebar||c).attr("role","button").click(function(b){return c.hasClass($)||a.hide(b),C})},x._updateButton=function(a){if(!this.rendered)return C;var b=this.elements.button;a?this._createButton():b.remove()},x._setWidget=function(){var a=this.options.style.widget,b=this.elements,c=b.tooltip,d=c.hasClass($);c.removeClass($),$=a?"ui-state-disabled":"qtip-disabled",c.toggleClass($,d),c.toggleClass("ui-helper-reset "+k(),a).toggleClass(X,this.options.style.def&&!a),b.content&&b.content.toggleClass(k("content"),a),b.titlebar&&b.titlebar.toggleClass(k("header"),a),b.button&&b.button.toggleClass(Q+"-icon",!a)},x._storeMouse=function(c){this.mouse={pageX:c.pageX,pageY:c.pageY,type:"mousemove",scrollX:a.pageXOffset||b.body.scrollLeft||b.documentElement.scrollLeft,scrollY:a.pageYOffset||b.body.scrollTop||b.documentElement.scrollTop}},x._bind=function(a,b,c,e,f){var g="."+this._id+(e?"-"+e:"");b.length&&d(a).bind((b.split?b:b.join(g+" "))+g,d.proxy(c,f||this))},x._unbind=function(a,b){d(a).unbind("."+this._id+(b?"-"+b:""))};var eb="."+Q;d(function(){p(U,["mouseenter","mouseleave"],function(a){var b="mouseenter"===a.type,c=d(a.currentTarget),e=d(a.relatedTarget||a.target),f=this.options;b?(this.focus(a),c.hasClass(W)&&!c.hasClass($)&&clearTimeout(this.timers.hide)):"mouse"===f.position.target&&f.hide.event&&f.show.target&&!e.closest(f.show.target[0]).length&&this.hide(a),c.toggleClass(Z,b)}),p("["+S+"]",V,n)}),x._trigger=function(a,b,c){var e=d.Event("tooltip"+a);return e.originalEvent=c&&d.extend({},c)||this.cache.event||D,this.triggering=B,this.tooltip.trigger(e,[this].concat(b||[])),this.triggering=C,!e.isDefaultPrevented()},x._assignEvents=function(){var c=this.options,e=c.position,f=this.tooltip,g=c.show.target,h=c.hide.target,i=e.container,j=e.viewport,k=d(b),p=(d(b.body),d(a)),q=c.show.event?d.trim(""+c.show.event).split(" "):[],r=c.hide.event?d.trim(""+c.hide.event).split(" "):[],s=[];/mouse(out|leave)/i.test(c.hide.event)&&"window"===c.hide.leave&&this._bind(k,["mouseout","blur"],function(a){/select|option/.test(a.target.nodeName)||a.relatedTarget||this.hide(a)}),c.hide.fixed?h=h.add(f.addClass(W)):/mouse(over|enter)/i.test(c.show.event)&&this._bind(h,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+c.hide.event).indexOf("unfocus")>-1&&this._bind(i.closest("html"),["mousedown","touchstart"],function(a){var b=d(a.target),c=this.rendered&&!this.tooltip.hasClass($)&&this.tooltip[0].offsetWidth>0,e=b.parents(U).filter(this.tooltip[0]).length>0;b[0]===this.target[0]||b[0]===this.tooltip[0]||e||this.target.has(b[0]).length||!c||this.hide(a)}),"number"==typeof c.hide.inactive&&(this._bind(g,"qtip-"+this.id+"-inactive",n),this._bind(h.add(f),w.inactiveEvents,n,"-inactive")),r=d.map(r,function(a){var b=d.inArray(a,q);return b>-1&&h.add(g).length===h.length?(s.push(q.splice(b,1)[0]),void 0):a}),this._bind(g,q,l),this._bind(h,r,m),this._bind(g,s,function(a){(this.tooltip[0].offsetWidth>0?m:l).call(this,a)}),this._bind(g.add(f),"mousemove",function(a){if("number"==typeof c.hide.distance){var b=this.cache.origin||{},d=this.options.hide.distance,e=Math.abs;(e(a.pageX-b.pageX)>=d||e(a.pageY-b.pageY)>=d)&&this.hide(a)}this._storeMouse(a)}),"mouse"===e.target&&e.adjust.mouse&&(c.hide.event&&this._bind(g,["mouseenter","mouseleave"],function(a){this.cache.onTarget="mouseenter"===a.type}),this._bind(k,"mousemove",function(a){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass($)&&this.tooltip[0].offsetWidth>0&&this.reposition(a)})),(e.adjust.resize||j.length)&&this._bind(d.event.special.resize?j:p,"resize",o),e.adjust.scroll&&this._bind(p.add(e.container),"scroll",o)},x._unassignEvents=function(){var c=[this.options.show.target[0],this.options.hide.target[0],this.rendered&&this.tooltip[0],this.options.position.container[0],this.options.position.viewport[0],this.options.position.container.closest("html")[0],a,b];this.rendered?this._unbind(d([]).pushStack(d.grep(c,function(a){return"object"==typeof a}))):d(c[0]).unbind("."+this._id+"-create")},w=d.fn.qtip=function(a,b,e){var f=(""+a).toLowerCase(),g=D,i=d.makeArray(arguments).slice(1),j=i[i.length-1],k=this[0]?d.data(this[0],Q):D;return!arguments.length&&k||"api"===f?k:"string"==typeof a?(this.each(function(){var a=d.data(this,Q);if(!a)return B;if(j&&j.timeStamp&&(a.cache.event=j),!b||"option"!==f&&"options"!==f)a[f]&&a[f].apply(a,i);else{if(e===c&&!d.isPlainObject(b))return g=a.get(b),C;a.set(b,e)}}),g!==D?g:this):"object"!=typeof a&&arguments.length?void 0:(k=h(d.extend(B,{},a)),w.bind.call(this,k,j))},w.bind=function(a,b){return this.each(function(e){function f(a){function b(){k.render("object"==typeof a||g.show.ready),h.show.add(h.hide).unbind(j)}return k.disabled?C:(k.cache.event=d.extend({},a),k.cache.target=a?d(a.target):[c],g.show.delay>0?(clearTimeout(k.timers.show),k.timers.show=setTimeout(b,g.show.delay),i.show!==i.hide&&h.hide.bind(i.hide,function(){clearTimeout(k.timers.show)})):b(),void 0)}var g,h,i,j,k,l;return l=d.isArray(a.id)?a.id[e]:a.id,l=!l||l===C||l.length<1||w.api[l]?w.nextid++:l,j=".qtip-"+l+"-create",k=q(d(this),l,a),k===C?B:(w.api[l]=k,g=k.options,d.each(P,function(){"initialize"===this.initialize&&this(k)}),h={show:g.show.target,hide:g.hide.target},i={show:d.trim(""+g.show.event).replace(/ /g,j+" ")+j,hide:d.trim(""+g.hide.event).replace(/ /g,j+" ")+j},/mouse(over|enter)/i.test(i.show)&&!/mouse(out|leave)/i.test(i.hide)&&(i.hide+=" mouseleave"+j),h.show.bind("mousemove"+j,function(a){k._storeMouse(a),k.cache.onTarget=B}),h.show.bind(i.show,f),(g.show.ready||g.prerender)&&f(b),void 0)})},w.api={},d.each({attr:function(a,b){if(this.length){var c=this[0],e="title",f=d.data(c,"qtip");if(a===e&&f&&"object"==typeof f&&f.options.suppress)return arguments.length<2?d.attr(c,ab):(f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",b),this.attr(ab,b))}return d.fn["attr"+_].apply(this,arguments)},clone:function(a){var b=(d([]),d.fn["clone"+_].apply(this,arguments));return a||b.filter("["+ab+"]").attr("title",function(){return d.attr(this,ab)}).removeAttr(ab),b}},function(a,b){if(!b||d.fn[a+_])return B;var c=d.fn[a+_]=d.fn[a];d.fn[a]=function(){return b.apply(this,arguments)||c.apply(this,arguments)}}),d.ui||(d["cleanData"+_]=d.cleanData,d.cleanData=function(a){for(var b,c=0;(b=d(a[c])).length;c++)if(b.attr(R))try{b.triggerHandler("removeqtip")}catch(e){}d["cleanData"+_].apply(this,arguments)}),w.version="2.1.1",w.nextid=0,w.inactiveEvents=V,w.zindex=15e3,w.defaults={prerender:C,id:C,overwrite:B,suppress:B,content:{text:B,attr:"title",title:C,button:C},position:{my:"top left",at:"bottom right",target:C,container:C,viewport:C,adjust:{x:0,y:0,mouse:B,scroll:B,resize:B,method:"flipinvert flipinvert"},effect:function(a,b){d(this).animate(b,{duration:200,queue:C})}},show:{target:C,event:"mouseenter",effect:B,delay:90,solo:C,ready:C,autofocus:C},hide:{target:C,event:"mouseleave",effect:B,delay:0,fixed:C,inactive:C,leave:"window",distance:C},style:{classes:"",widget:C,width:C,height:C,def:B},events:{render:D,move:D,show:D,hide:D,toggle:D,visible:D,hidden:D,focus:D,blur:D}};var fb,gb="margin",hb="border",ib="color",jb="background-color",kb="transparent",lb=" !important",mb=!!b.createElement("canvas").getContext,nb=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,ob={},pb=["Webkit","O","Moz","ms"];mb||(createVML=function(a,b,c){return"<qtipvml:"+a+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(b||"")+' style="behavior: url(#default#VML); '+(c||"")+'" />'}),d.extend(u.prototype,{init:function(a){var b,c;c=this.element=a.elements.tip=d("<div />",{"class":Q+"-tip"}).prependTo(a.tooltip),mb?(b=d("<canvas />").appendTo(this.element)[0].getContext("2d"),b.lineJoin="miter",b.miterLimit=100,b.save()):(b=createVML("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(b+b),a._bind(d("*",c).add(c),["click","mousedown"],function(a){a.stopPropagation()},this._ns)),a._bind(a.tooltip,"tooltipmove",this.reposition,this._ns,this),this.create()},_swapDimensions:function(){this.size[0]=this.options.height,this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width,this.size[1]=this.options.height},_useTitle:function(a){var b=this.qtip.elements.titlebar;return b&&(a.y===I||a.y===M&&this.element.position().top+this.size[1]/2+this.options.offset<b.outerHeight(B))},_parseCorner:function(a){var b=this.qtip.options.position.my;return a===C||b===C?a=C:a===B?a=new y(b.string()):a.string||(a=new y(a),a.fixed=B),a},_parseWidth:function(a,b,c){var d=this.qtip.elements,e=hb+r(b)+"Width";return(c?t(c,e):t(d.content,e)||t(this._useTitle(a)&&d.titlebar||d.content,e)||t(tooltip,e))||0},_parseRadius:function(a){var b=this.qtip.elements,c=hb+r(a.y)+r(a.x)+"Radius";return BROWSER.ie<9?0:t(this._useTitle(a)&&b.titlebar||b.content,c)||t(b.tooltip,c)||0},_invalidColour:function(a,b,c){var d=a.css(b);return!d||c&&d===a.css(c)||nb.test(d)?C:d},_parseColours:function(a){var b=this.qtip.elements,c=this.element.css("cssText",""),e=hb+r(a[a.precedance])+r(ib),f=this._useTitle(a)&&b.titlebar||b.content,g=this._invalidColour,h=[];return h[0]=g(c,jb)||g(f,jb)||g(b.content,jb)||g(tooltip,jb)||c.css(jb),h[1]=g(c,e,ib)||g(f,e,ib)||g(b.content,e,ib)||g(tooltip,e,ib)||tooltip.css(e),d("*",c).add(c).css("cssText",jb+":"+kb+lb+";"+hb+":0"+lb+";"),h},_calculateSize:function(a){var b,c,d,e=a.precedance===F,f=this.options[e?"height":"width"],g=this.options[e?"width":"height"],h="c"===a.abbrev(),i=f*(h?.5:1),j=Math.pow,k=Math.round,l=Math.sqrt(j(i,2)+j(g,2)),m=[this.border/i*l,this.border/g*l];return m[2]=Math.sqrt(j(m[0],2)-j(this.border,2)),m[3]=Math.sqrt(j(m[1],2)-j(this.border,2)),b=l+m[2]+m[3]+(h?0:m[0]),c=b/l,d=[k(c*f),k(c*g)],e?d:d.reverse()},_calculateTip:function(a){var b=this.size[0],c=this.size[1],d=Math.ceil(b/2),e=Math.ceil(c/2),f={br:[0,0,b,c,b,0],bl:[0,0,b,0,0,c],tr:[0,c,b,0,b,c],tl:[0,0,0,c,b,c],tc:[0,c,d,0,b,c],bc:[0,0,b,0,d,c],rc:[0,0,b,e,0,c],lc:[b,0,b,c,0,e]};return f.lt=f.br,f.rt=f.bl,f.lb=f.tr,f.rb=f.tl,f[a.abbrev()]},create:function(){var a=this.corner=(mb||BROWSER.ie)&&this._parseCorner(this.options.corner);return(this.enabled=!!this.corner&&"c"!==this.corner.abbrev())&&(this.qtip.cache.corner=a.clone(),this.update()),this.element.toggle(this.enabled),this.corner},update:function(a,b){if(!this.enabled)return this;var c,e,f,g,h,i,j,k=(this.qtip.elements,this.element),l=k.children(),m=this.options,n=this.size,o=m.mimic,p=Math.round;a||(a=this.qtip.cache.corner||this.corner),o===C?o=a:(o=new y(o),o.precedance=a.precedance,"inherit"===o.x?o.x=a.x:"inherit"===o.y?o.y=a.y:o.x===o.y&&(o[a.precedance]=a[a.precedance])),e=o.precedance,a.precedance===E?this._swapDimensions():this._resetDimensions(),c=this.color=this._parseColours(a),c[1]!==kb?(j=this.border=this._parseWidth(a,a[a.precedance]),m.border&&1>j&&(c[0]=c[1]),this.border=j=m.border!==B?m.border:j):this.border=j=0,g=this._calculateTip(o),i=this.size=this._calculateSize(a),k.css({width:i[0],height:i[1],lineHeight:i[1]+"px"}),h=a.precedance===F?[p(o.x===J?j:o.x===L?i[0]-n[0]-j:(i[0]-n[0])/2),p(o.y===I?i[1]-n[1]:0)]:[p(o.x===J?i[0]-n[0]:0),p(o.y===I?j:o.y===K?i[1]-n[1]-j:(i[1]-n[1])/2)],mb?(l.attr(G,i[0]).attr(H,i[1]),f=l[0].getContext("2d"),f.restore(),f.save(),f.clearRect(0,0,3e3,3e3),f.fillStyle=c[0],f.strokeStyle=c[1],f.lineWidth=2*j,f.translate(h[0],h[1]),f.beginPath(),f.moveTo(g[0],g[1]),f.lineTo(g[2],g[3]),f.lineTo(g[4],g[5]),f.closePath(),j&&("border-box"===tooltip.css("background-clip")&&(f.strokeStyle=c[0],f.stroke()),f.strokeStyle=c[1],f.stroke()),f.fill()):(g="m"+g[0]+","+g[1]+" l"+g[2]+","+g[3]+" "+g[4]+","+g[5]+" xe",h[2]=j&&/^(r|b)/i.test(a.string())?8===BROWSER.ie?2:1:0,l.css({coordsize:n[0]+j+" "+(n[1]+j),antialias:""+(o.string().indexOf(M)>-1),left:h[0]-h[2]*Number(e===E),top:h[1]-h[2]*Number(e===F),width:n[0]+j,height:n[1]+j}).each(function(a){var b=d(this);b[b.prop?"prop":"attr"]({coordsize:n[0]+j+" "+(n[1]+j),path:g,fillcolor:c[0],filled:!!a,stroked:!a}).toggle(!(!j&&!a)),!a&&b.html(createVML("stroke",'weight="'+2*j+'px" color="'+c[1]+'" miterlimit="1000" joinstyle="miter"'))})),b!==C&&this.calculate(a)},calculate:function(a){if(!this.enabled)return C;var b,c,e,f=this,g=this.qtip.elements,h=this.element,i=this.options.offset,j=(this.qtip.tooltip.hasClass("ui-widget"),{});return a=a||this.corner,b=a.precedance,c=this._calculateSize(a),e=[a.x,a.y],b===E&&e.reverse(),d.each(e,function(d,e){var h,k,l;e===M?(h=b===F?J:I,j[h]="50%",j[gb+"-"+h]=-Math.round(c[b===F?0:1]/2)+i):(h=f._parseWidth(a,e,g.tooltip),k=f._parseWidth(a,e,g.content),l=f._parseRadius(a),j[e]=Math.max(-f.border,d?k:i+(l>h?l:-h)))}),j[a[b]]-=c[b===E?0:1],h.css({margin:"",top:"",bottom:"",left:"",right:""}).css(j),j},reposition:function(a,b,d){if(this.enabled){var e,f,g=b.cache,h=this.corner.clone(),i=d.adjusted,j=b.options.position.adjust.method.split(" "),k=j[0],l=j[1]||j[0],m={left:C,top:C,x:0,y:0},n={};this.corner.fixed!==B&&(k===O&&h.precedance===E&&i.left&&h.y!==M?h.precedance=h.precedance===E?F:E:k!==O&&i.left&&(h.x=h.x===M?i.left>0?J:L:h.x===J?L:J),l===O&&h.precedance===F&&i.top&&h.x!==M?h.precedance=h.precedance===F?E:F:l!==O&&i.top&&(h.y=h.y===M?i.top>0?I:K:h.y===I?K:I),h.string()===g.corner.string()||g.cornerTop===i.top&&g.cornerLeft===i.left||this.update(h,C)),e=this.calculate(h,i),e.right!==c&&(e.left=-e.right),e.bottom!==c&&(e.top=-e.bottom),e.user=this.offset,(m.left=k===O&&!!i.left)&&(h.x===M?n[gb+"-left"]=m.x=e[gb+"-left"]-i.left:(f=e.right!==c?[i.left,-e.left]:[-i.left,e.left],(m.x=Math.max(f[0],f[1]))>f[0]&&(d.left-=i.left,m.left=C),n[e.right!==c?L:J]=m.x)),(m.top=l===O&&!!i.top)&&(h.y===M?n[gb+"-top"]=m.y=e[gb+"-top"]-i.top:(f=e.bottom!==c?[i.top,-e.top]:[-i.top,e.top],(m.y=Math.max(f[0],f[1]))>f[0]&&(d.top-=i.top,m.top=C),n[e.bottom!==c?K:I]=m.y)),this.element.css(n).toggle(!(m.x&&m.y||h.x===M&&m.y||h.y===M&&m.x)),d.left-=e.left.charAt?e.user:k!==O||m.top||!m.left&&!m.top?e.left:0,d.top-=e.top.charAt?e.user:l!==O||m.left||!m.left&&!m.top?e.top:0,g.cornerLeft=i.left,g.cornerTop=i.top,g.corner=h.clone()
|
3 |
-
}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),fb=P.tip=function(a){return new u(a,a.options.style.tip)},fb.initialize="render",fb.sanitize=function(a){a.style&&"tip"in a.style&&(opts=a.style.tip,"object"!=typeof opts&&(opts=a.style.tip={corner:opts}),/string|boolean/i.test(typeof opts.corner)||(opts.corner=B))},z.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(a){this.size=size=[a.width,a.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},d.extend(B,w.defaults,{style:{tip:{corner:B,mimic:C,width:6,height:6,border:B,offset:0}}}),P.viewport=function(c,d,e,f,g,h,i){function j(a,b,c,e,f,g,h,i,j){var k=d[f],m=p[a],n=q[a],o=c===O,r=-w.offset[f]+v.offset[f]+v["scroll"+f],s=m===f?j:m===g?-j:-j/2,t=n===f?i:n===g?-i:-i/2,u=y&&y.size?y.size[h]||0:0,x=y&&y.corner&&y.corner.precedance===a&&!o?u:0,z=r-k+x,A=k+j-v[h]-r+x,B=s-(p.precedance===a||m===p[b]?t:0)-(n===M?i/2:0);return o?(x=y&&y.corner&&y.corner.precedance===b?u:0,B=(m===f?1:-1)*s-x,d[f]+=z>0?z:A>0?-A:0,d[f]=Math.max(-w.offset[f]+v.offset[f]+(x&&y.corner[a]===M?y.offset:0),k-B,Math.min(Math.max(-w.offset[f]+v.offset[f]+v[h],k+B),d[f]))):(e*=c===N?2:0,z>0&&(m!==f||A>0)?(d[f]-=B+e,l.invert(a,f)):A>0&&(m!==g||z>0)&&(d[f]-=(m===M?-B:B)+e,l.invert(a,g)),d[f]<r&&-d[f]>A&&(d[f]=k,l=p.clone())),d[f]-k}var k,l,m,n=e.target,o=c.elements.tooltip,p=e.my,q=e.at,r=e.adjust,s=r.method.split(" "),t=s[0],u=s[1]||s[0],v=e.viewport,w=e.container,x=c.cache,y=c.plugins.tip,z={left:0,top:0};return v.jquery&&n[0]!==a&&n[0]!==b.body&&"none"!==r.method?(k="fixed"===o.css("position"),v={elem:v,width:v[0]===a?v.width():v.outerWidth(C),height:v[0]===a?v.height():v.outerHeight(C),scrollleft:k?0:v.scrollLeft(),scrolltop:k?0:v.scrollTop(),offset:v.offset()||{left:0,top:0}},w={elem:w,scrollLeft:w.scrollLeft(),scrollTop:w.scrollTop(),offset:w.offset()||{left:0,top:0}},("shift"!==t||"shift"!==u)&&(l=p.clone()),z={left:"none"!==t?j(E,F,t,r.x,J,L,G,f,h):0,top:"none"!==u?j(F,E,u,r.y,I,K,H,g,i):0},l&&x.lastClass!==(m=Q+"-pos-"+l.abbrev())&&o.removeClass(c.cache.lastClass).addClass(c.cache.lastClass=m),z):z};var qb,rb,sb="qtip-modal",tb="."+sb;rb=function(){function c(a){if(d.expr[":"].focusable)return d.expr[":"].focusable;var b,c,e,f=!isNaN(d.attr(a,"tabindex")),g=a.nodeName&&a.nodeName.toLowerCase();return"area"===g?(b=a.parentNode,c=b.name,a.href&&c&&"map"===b.nodeName.toLowerCase()?(e=d("img[usemap=#"+c+"]")[0],!!e&&e.is(":visible")):!1):/input|select|textarea|button|object/.test(g)?!a.disabled:"a"===g?a.href||f:f}function e(a){l.length<1&&a.length?a.not("body").blur():l.first().focus()}function f(a){if(j.is(":visible")){var b,c=d(a.target),f=g.tooltip,i=c.closest(U);b=i.length<1?C:parseInt(i[0].style.zIndex,10)>parseInt(f[0].style.zIndex,10),b||c.closest(U)[0]===f[0]||e(c),h=a.target===l[l.length-1]}}var g,h,i,j,k=this,l={};d.extend(k,{init:function(){function c(){var a=d(this);j.css({height:a.height(),width:a.width()})}return j=k.elem=d("<div />",{id:"qtip-overlay",html:"<div></div>",mousedown:function(){return C}}).hide(),d(a).bind("resize"+tb,c),c(),d(b.body).bind("focusin"+tb,f),d(b).bind("keydown"+tb,function(a){g&&g.options.show.modal.escape&&27===a.keyCode&&g.hide(a)}),j.bind("click"+tb,function(a){g&&g.options.show.modal.blur&&g.hide(a)}),k},update:function(a){g=a,l=a.options.show.modal.stealfocus!==C?a.tooltip.find("*").filter(function(){return c(this)}):[]},toggle:function(a,c,f){var h=(d(b.body),a.tooltip),l=a.options.show.modal,m=l.effect,n=c?"show":"hide",o=j.is(":visible"),p=d(tb).filter(":visible:not(:animated)").not(h);return k.update(a),c&&l.stealfocus!==C&&e(d(":focus")),j.toggleClass("blurs",l.blur),c&&j.css({left:0,top:0}).appendTo(b.body),j.is(":animated")&&o===c&&i!==C||!c&&p.length?k:(j.stop(B,C),d.isFunction(m)?m.call(j,c):m===C?j[n]():j.fadeTo(parseInt(f,10)||90,c?1:0,function(){c||j.hide()}),c||j.queue(function(a){j.css({left:"",top:""}),d(tb).length||j.detach(),a()}),i=c,g.destroyed&&(g=D),k)}}),k.init()},rb=new rb,d.extend(v.prototype,{init:function(a){var b=a.tooltip;return this.options.on?(a.elements.overlay=rb.elem,b.addClass(sb).css("z-index",P.modal.zindex+d(tb).length),a._bind(b,["tooltipshow","tooltiphide"],function(a,c,e){var f=a.originalEvent;if(a.target===b[0])if(f&&"tooltiphide"===a.type&&/mouse(leave|enter)/.test(f.type)&&d(f.relatedTarget).closest(overlay[0]).length)try{a.preventDefault()}catch(g){}else(!f||f&&!f.solo)&&this.toggle(a,"tooltipshow"===a.type,e)},this._ns,this),a._bind(b,"tooltipfocus",function(a,c){if(!a.isDefaultPrevented()&&a.target===b[0]){var e=d(tb),f=P.modal.zindex+e.length,g=parseInt(b[0].style.zIndex,10);rb.elem[0].style.zIndex=f-1,e.each(function(){this.style.zIndex>g&&(this.style.zIndex-=1)}),e.filter("."+Y).qtip("blur",a.originalEvent),b.addClass(Y)[0].style.zIndex=f,rb.update(c);try{a.preventDefault()}catch(h){}}},this._ns,this),a._bind(b,"tooltiphide",function(a){a.target===b[0]&&d(tb).filter(":visible").not(b).last().qtip("focus",a)},this._ns,this),void 0):this},toggle:function(a,b,c){return a&&a.isDefaultPrevented()?this:(rb.toggle(this.qtip,!!b,c),void 0)},destroy:function(){this.qtip.tooltip.removeClass(sb),this.qtip._unbind(this.qtip.tooltip,this._ns),rb.toggle(this.qtip,C),delete this.qtip.elements.overlay}}),qb=P.modal=function(a){return new v(a,a.options.show.modal)},qb.sanitize=function(a){a.show&&("object"!=typeof a.show.modal?a.show.modal={on:!!a.show.modal}:"undefined"==typeof a.show.modal.on&&(a.show.modal.on=B))},qb.zindex=w.zindex-200,qb.initialize="render",z.modal={"^show.modal.(on|blur)$":function(){this.destroy(),this.init(),this.qtip.elems.overlay.toggle(this.qtip.tooltip[0].offsetWidth>0)}},d.extend(B,w.defaults,{show:{modal:{on:C,effect:B,blur:B,stealfocus:B,escape:B}}})})}(window,document);
|
|
|
|
|
|
admin/js/termbox.js
DELETED
@@ -1,136 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* TermBox v1.0.0
|
3 |
-
*/
|
4 |
-
function gm_array_unique_noempty(a) {
|
5 |
-
var out = [];
|
6 |
-
jQuery.each(a, function (key, val) {
|
7 |
-
val = jQuery.trim(val);
|
8 |
-
if (val && jQuery.inArray(val, out) == -1) {
|
9 |
-
out.push(val);
|
10 |
-
}
|
11 |
-
});
|
12 |
-
return out;
|
13 |
-
}
|
14 |
-
var gmTagBox;
|
15 |
-
(function ($) {
|
16 |
-
gmTagBox = {
|
17 |
-
clean : function (tags) {
|
18 |
-
return tags.replace(/\s*,\s*/g, ",").replace(/,+/g, ",").replace(/[,\s]+$/, "").replace(/^[,\s]+/, "");
|
19 |
-
},
|
20 |
-
parseTags : function (el) {
|
21 |
-
var id = el.id,
|
22 |
-
num = id.split("-check-num-")[1],
|
23 |
-
taxbox = $(el).closest(".tagsdiv"),
|
24 |
-
thetags = taxbox.find(".the-tags"),
|
25 |
-
current_tags = thetags.val().split(","),
|
26 |
-
new_tags = [];
|
27 |
-
delete current_tags[num];
|
28 |
-
$.each(current_tags, function (key, val) {
|
29 |
-
val = $.trim(val);
|
30 |
-
if (val) {
|
31 |
-
new_tags.push(val);
|
32 |
-
}
|
33 |
-
});
|
34 |
-
thetags.val(this.clean(new_tags.join(",")));
|
35 |
-
this.quickClicks(taxbox);
|
36 |
-
return false;
|
37 |
-
},
|
38 |
-
quickClicks: function (el) {
|
39 |
-
var thetags = $(".the-tags", el),
|
40 |
-
tagchecklist = $(".tagchecklist", el),
|
41 |
-
id = $(el).attr("id"),
|
42 |
-
current_tags, disabled;
|
43 |
-
if (!thetags.length) {
|
44 |
-
return;
|
45 |
-
}
|
46 |
-
disabled = thetags.prop("disabled");
|
47 |
-
current_tags = thetags.val().split(",");
|
48 |
-
tagchecklist.empty();
|
49 |
-
$.each(current_tags, function (key, val) {
|
50 |
-
var span, xbutton;
|
51 |
-
val = $.trim(val);
|
52 |
-
if (!val) {
|
53 |
-
return;
|
54 |
-
}
|
55 |
-
span = $("<span />").text(val);
|
56 |
-
if (!disabled) {
|
57 |
-
xbutton = $('<a id="' + id + "-check-num-" + key + '" class="ntdelbutton">X</a>');
|
58 |
-
xbutton.click(function () {
|
59 |
-
gmTagBox.parseTags(this);
|
60 |
-
});
|
61 |
-
span.prepend(" ").prepend(xbutton);
|
62 |
-
}
|
63 |
-
tagchecklist.append(span);
|
64 |
-
});
|
65 |
-
},
|
66 |
-
flushTags : function (el, a, f) {
|
67 |
-
a = a || false;
|
68 |
-
var text, tags = $(".the-tags", el),
|
69 |
-
newtag = $("input.newtag", el),
|
70 |
-
newtags;
|
71 |
-
text = a ? $(a).text() : newtag.val();
|
72 |
-
var tagsval = tags.val();
|
73 |
-
newtags = tagsval ? tagsval + "," + text : text;
|
74 |
-
newtags = this.clean(newtags);
|
75 |
-
newtags = gm_array_unique_noempty(newtags.split(",")).join(",");
|
76 |
-
tags.val(newtags);
|
77 |
-
this.quickClicks(el);
|
78 |
-
if (!a) {
|
79 |
-
newtag.val("");
|
80 |
-
}
|
81 |
-
if ("undefined" == typeof(f)) {
|
82 |
-
newtag.focus();
|
83 |
-
}
|
84 |
-
return false;
|
85 |
-
},
|
86 |
-
init : function () {
|
87 |
-
var t = this,
|
88 |
-
ajaxtag = $("div.ajaxtag");
|
89 |
-
$(".tagsdiv").each(function () {
|
90 |
-
gmTagBox.quickClicks(this);
|
91 |
-
});
|
92 |
-
$("input.tagadd", ajaxtag).click(function () {
|
93 |
-
t.flushTags($(this).closest(".tagsdiv"));
|
94 |
-
});
|
95 |
-
$("div.taghint", ajaxtag).click(function () {
|
96 |
-
$(this).css("visibility", "hidden").parent().siblings(".newtag").focus();
|
97 |
-
});
|
98 |
-
$("input.newtag", ajaxtag).blur(function () {
|
99 |
-
if (this.value == "") {
|
100 |
-
}
|
101 |
-
}).focus(function () {
|
102 |
-
}).keyup(function (e) {
|
103 |
-
if (13 == e.which) {
|
104 |
-
gmTagBox.flushTags($(this).closest(".tagsdiv"));
|
105 |
-
return false;
|
106 |
-
}
|
107 |
-
}).keypress(function (e) {
|
108 |
-
if (13 == e.which) {
|
109 |
-
e.preventDefault();
|
110 |
-
return false;
|
111 |
-
}
|
112 |
-
}).each(function () {
|
113 |
-
var tax = $(this).closest("div.tagsdiv").attr("id");
|
114 |
-
//noinspection JSUnresolvedVariable
|
115 |
-
$(this).suggest(ajaxurl + "?_wpnonce=" + gMediaTermBox.nonce + "&action=gmDoAjax&task=term-search&tax=" + tax, {
|
116 |
-
delay : 500,
|
117 |
-
minchars : 2,
|
118 |
-
multiple : true,
|
119 |
-
multipleSep: ","
|
120 |
-
});
|
121 |
-
});
|
122 |
-
$("#grandMedia").on('click', "#tagcloud-gmedia_tag span", function () {
|
123 |
-
gmTagBox.flushTags($(this).closest("#termsdiv-gmedia_tag").children(".tagsdiv"), this);
|
124 |
-
return false;
|
125 |
-
});
|
126 |
-
$("#grandMedia").on('mousedown', ".plupload_button", function () {
|
127 |
-
$("div.tagsdiv").each(function () {
|
128 |
-
gmTagBox.flushTags(this, false, 1);
|
129 |
-
});
|
130 |
-
});
|
131 |
-
}
|
132 |
-
};
|
133 |
-
})(jQuery);
|
134 |
-
jQuery(document).ready(function () {
|
135 |
-
gmTagBox.init();
|
136 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/labels.php
DELETED
@@ -1,218 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if ( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) ) {
|
3 |
-
die( 'You are not allowed to call this page directly.' );
|
4 |
-
}
|
5 |
-
|
6 |
-
/**
|
7 |
-
* gmTagsCategories()
|
8 |
-
*
|
9 |
-
* @return mixed content
|
10 |
-
*/
|
11 |
-
function gmTagsCategories() {
|
12 |
-
global $gMDb, $grandCore, $grandAdmin;
|
13 |
-
|
14 |
-
$gMediaURL = WP_PLUGIN_URL . '/' . GRAND_FOLDER . '/';
|
15 |
-
$url = $grandCore->get_admin_url();
|
16 |
-
$arg = array(
|
17 |
-
'orderby' => $grandCore->_get( 'orderby', 'name' ),
|
18 |
-
'order' => $grandCore->_get( 'order', 'ASC' ),
|
19 |
-
'search' => $grandCore->_get( 's', '' ),
|
20 |
-
'include' => $grandCore->_req( 'gmSelected', '' ),
|
21 |
-
'number' => 0,
|
22 |
-
'hide_empty' => 0,
|
23 |
-
'page' => 1,
|
24 |
-
);
|
25 |
-
/** @var $orderby
|
26 |
-
* @var $order
|
27 |
-
* @var $search
|
28 |
-
* @var $include
|
29 |
-
* @var $page
|
30 |
-
* @var $number
|
31 |
-
* @var $hide_empty
|
32 |
-
*/
|
33 |
-
extract( $arg );
|
34 |
-
$arg['offset'] = $offset = ( $page - 1 ) * $number;
|
35 |
-
|
36 |
-
$taxonomy = $grandCore->_get( 'tab', 'gmedia_tag' );
|
37 |
-
$gMediaTerms = $gMDb->get_terms( $taxonomy, $arg );
|
38 |
-
|
39 |
-
|
40 |
-
/** @var $orderby
|
41 |
-
* @var $order
|
42 |
-
* @var $search
|
43 |
-
* @var $include
|
44 |
-
*/
|
45 |
-
extract( $arg );
|
46 |
-
|
47 |
-
$gmOptions = get_option( 'gmediaOptions' );
|
48 |
-
if ( isset( $gmOptions['taxonomies'][$taxonomy]['hierarchical'] ) )
|
49 |
-
$children = $gMDb->_get_term_hierarchy( $taxonomy );
|
50 |
-
else
|
51 |
-
$children = array();
|
52 |
-
|
53 |
-
$nonce = wp_create_nonce( 'grandMedia' );
|
54 |
-
$order = $grandCore->_get( 'order', 'ASC' );
|
55 |
-
$sort = 'ASC';
|
56 |
-
$url_param['tab'] = '&tab=';
|
57 |
-
$url_param['orderby'] = '&orderby=' . $orderby;
|
58 |
-
$url_param['order'] = '&order=' . $order;
|
59 |
-
$url_param['s'] = $search ? '&s=' . $search : '';
|
60 |
-
$url_param['filter'] = $include ? '&gmSelected=' . $include : '';
|
61 |
-
$gmSelected = isset( $_COOKIE['gmedia_' . $taxonomy . '_selected_items'] ) ? $_COOKIE['gmedia_' . $taxonomy . '_selected_items'] : '';
|
62 |
-
?>
|
63 |
-
<script type="text/javascript">play_with_page = true;</script>
|
64 |
-
<div class="gMediaLibActions">
|
65 |
-
<div class="cb abut">
|
66 |
-
<div class="dropbut"><input class="doaction" type="checkbox" /></div>
|
67 |
-
<div class="dropbox">
|
68 |
-
<span class="all"><?php _e( 'All', 'gmLang' ); ?></span>
|
69 |
-
<span class="none"><?php _e( 'None', 'gmLang' ); ?></span>
|
70 |
-
<span class="reverse" title="<?php _e( 'Reverse only visible items', 'gmLang' ); ?>"><?php _e( 'Reverse', 'gmLang' ); ?></span>
|
71 |
-
</div>
|
72 |
-
</div>
|
73 |
-
<div class="abuts">
|
74 |
-
<a class="gmTags<?php if ( $taxonomy == 'gmedia_tag' ) echo ' active'; ?>" rel="gmTags" href="<?php echo $url['page'] . $url_param['tab'] . 'gmedia_tag'; ?>"><?php _e( 'Tags', 'gmLang' ); ?></a>
|
75 |
-
<a class="gmCategories<?php if ( $taxonomy == 'gmedia_category' ) echo ' active'; ?>" rel="gmCategories" href="<?php echo $url['page'] . $url_param['tab'] . 'gmedia_category'; ?>"><?php _e( 'Categories', 'gmLang' ); ?></a>
|
76 |
-
</div>
|
77 |
-
<div class="more abut">
|
78 |
-
<div class="dropbut"><?php _e( 'Actions', 'gmLang' ); ?></div>
|
79 |
-
<div class="dropbox">
|
80 |
-
<span class="delete ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="<?php echo $nonce; ?>" data-form="#selectedForm" data-tax="<?php echo $taxonomy; ?>" data-task="terms-delete" data-confirmtxt="<?php _e( "You are about to permanently delete the selected items.\n\r'Cancel' to stop, 'OK' to delete.", "gmLang" ); ?>"><?php _e( 'Delete selected', 'gmLang' ); ?></span>
|
81 |
-
</div>
|
82 |
-
</div>
|
83 |
-
<div class="msg">
|
84 |
-
<span id="selectedItems"><span class="selectedItems"><?php if ( ! empty( $include ) ) {
|
85 |
-
echo count( explode( ',', $include ) );
|
86 |
-
}
|
87 |
-
else {
|
88 |
-
echo '0';
|
89 |
-
} ?></span> <?php _e( 'selected', 'gmLang' ); ?></span>
|
90 |
-
|
91 |
-
<form id="selectedForm" name="selectedForm" style="display: none;" action="<?php echo $url['page'] . $url_param['tab'] . $taxonomy . '&filter=selected'; ?>" method="post">
|
92 |
-
<input type="hidden" id="gmSelected" name="gmSelected" data-key="<?php echo $taxonomy; ?>" value="<?php echo $gmSelected; ?>" />
|
93 |
-
</form>
|
94 |
-
<span class="more">»</span>
|
95 |
-
|
96 |
-
<div class="actions">
|
97 |
-
<span id="showSelected"><?php _e( 'Show only selected items', 'gmLang' ); ?></span>
|
98 |
-
<span id="clearSelected"><?php _e( 'Clear selected items', 'gmLang' ); ?></span>
|
99 |
-
</div>
|
100 |
-
</div>
|
101 |
-
<form action="" method="get">
|
102 |
-
<div class="gmSearch">
|
103 |
-
<?php foreach ( $_GET as $key => $value ) {
|
104 |
-
if ( in_array( $key, array( 's' ) ) ) continue; ?>
|
105 |
-
<input type="hidden" name="<?php echo $key; ?>" value="<?php echo $value; ?>" />
|
106 |
-
<?php } ?>
|
107 |
-
<span class="loading">Loading... </span>
|
108 |
-
<input id="gMediaLibSearch" type="search" name="s" autocomplete="off" placeholder="<?php _e( 'Search...', 'gmLang' ); ?>" value="<?php echo $grandCore->_get( 's', '' ); ?>" />
|
109 |
-
<span class="resetSearch" style="display: none;">reset</span>
|
110 |
-
</div>
|
111 |
-
</form>
|
112 |
-
</div>
|
113 |
-
<div id="gMediaLibTable" class="<?php echo $taxonomy; ?>">
|
114 |
-
<?php if ( $taxonomy == 'gmedia_tag' ) { ?>
|
115 |
-
<form method="post" action="" id="gmAddTerms" name="gmAddTerms">
|
116 |
-
<fieldset class="floatholder tagform">
|
117 |
-
<legend><?php _e( 'Add tags', 'gmLang' ); ?>
|
118 |
-
<span class="howto"><?php _e( 'Separate tags with commas', 'gmLang' ); ?></span></legend>
|
119 |
-
<textarea id="tax-input-gmedia_tag" class="the-tags" cols="20" rows="3" name="terms[<?php echo $taxonomy; ?>]"></textarea>
|
120 |
-
<?php wp_nonce_field( 'grandMedia' ); ?>
|
121 |
-
<input type="submit" value="<?php _e( 'Add', 'gmLang' ); ?>" name="addterms" class="button tagadd">
|
122 |
-
</fieldset>
|
123 |
-
</form>
|
124 |
-
<?php
|
125 |
-
}
|
126 |
-
if ( $taxonomy == 'gmedia_category' ) {
|
127 |
-
?>
|
128 |
-
<form method="post" action="" id="gmAddTerms" name="gmAddTerms">
|
129 |
-
<fieldset class="floatholder categoryform">
|
130 |
-
<legend><?php _e( 'Add category', 'gmLang' ); ?></legend>
|
131 |
-
<div class="set">
|
132 |
-
<label for="tax-input-gmedia_category"><?php _e( 'Name', 'gmLang' ); ?></label>
|
133 |
-
<input type="text" id="tax-input-gmedia_category" class="the-category" name="terms[<?php echo $taxonomy; ?>]" autocomplete="off" value=""<?php $grandCore->qTip( __( "The name is how it appears on your site.", "gmLang" ) ); ?> />
|
134 |
-
<hr class="spacer" />
|
135 |
-
<label for="tax-input-gm_term_global"><?php _e( 'Parent', 'gmLang' ); ?></label>
|
136 |
-
<select id="tax-input-gm_term_global" class="the-category-global" name="gm_term_global"<?php $grandCore->qTip( __( "Categories, unlike tags, can have a hierarchy. You might have a Backgrounds category, and under that have children categories for Abstract and Vintage. Totally optional.", "gmLang" ) ); ?>>
|
137 |
-
<option value="0" selected="selected"><?php _e( 'None', 'gmLang' ); ?></option>
|
138 |
-
<?php $gmAllTerms = $gMDb->get_terms( $taxonomy );
|
139 |
-
if ( count( $gmAllTerms ) ) {
|
140 |
-
$termsHierarr = $grandCore->get_terms_hierarrhically( $taxonomy, $gmAllTerms, $children, $count = 0 );
|
141 |
-
foreach ( $termsHierarr as $termitem ) {
|
142 |
-
if(intval($termitem->level) > 0)
|
143 |
-
continue;
|
144 |
-
|
145 |
-
$pad = str_repeat( '— ', max( 0, $termitem->level ) ); ?>
|
146 |
-
<option value="<?php echo $termitem->term_id; ?>"><?php echo $pad . $termitem->name; ?></option>
|
147 |
-
<?php
|
148 |
-
}
|
149 |
-
} ?>
|
150 |
-
</select>
|
151 |
-
</div>
|
152 |
-
<div class="set liq">
|
153 |
-
<label for="tax-input-gm_term_description"><?php _e( 'Description', 'gmLang' ); ?></label>
|
154 |
-
<textarea id="tax-input-gm_term_description" class="the-category-description" cols="20" rows="3" name="gm_term_description"<?php $grandCore->qTip( __( "The description is not prominent by default; however, some themes may show it.", "gmLang" ) ); ?>></textarea>
|
155 |
-
</div>
|
156 |
-
<?php wp_nonce_field( 'grandMedia' ); ?>
|
157 |
-
<input type="submit" value="<?php _e( 'Add', 'gmLang' ); ?>" name="addterms" class="button categoryadd">
|
158 |
-
</fieldset>
|
159 |
-
</form>
|
160 |
-
<?php } ?>
|
161 |
-
|
162 |
-
<table class="gMediaLibTable" cellspacing="0">
|
163 |
-
<col class="bufer" />
|
164 |
-
<col class="cb" />
|
165 |
-
<col class="id" />
|
166 |
-
<col class="name" />
|
167 |
-
<col class="descr" />
|
168 |
-
<col class="count" />
|
169 |
-
<col class="actions" />
|
170 |
-
<thead>
|
171 |
-
<tr>
|
172 |
-
<th class="bufer"><span></span></th>
|
173 |
-
<th class="cb"><span>#</span></th>
|
174 |
-
<th class="id <?php if ( $orderby == 'ID' ) {
|
175 |
-
echo $sort = $grandCore->_get( 'order', 'DESC' );
|
176 |
-
$sort = ( $sort == 'DESC' ) ? 'ASC' : 'DESC';
|
177 |
-
} ?>">
|
178 |
-
<a href="<?php echo $url['page'] . $url_param['tab'] . $taxonomy . '&orderby=ID&order=' . $sort . $url_param['filter'] . $url_param['s']; $sort = 'ASC'; ?>"><?php _e( 'ID', 'gmLang' ); ?></a>
|
179 |
-
</th>
|
180 |
-
<th class="name <?php if ( $orderby == 'name' ) {
|
181 |
-
echo $order;
|
182 |
-
$sort = ( $order == 'DESC' ) ? 'ASC' : 'DESC';
|
183 |
-
} ?>" title="<?php _e( 'Sort by name', 'gmLang' ); ?>">
|
184 |
-
<a href="<?php echo $url['page'] . $url_param['tab'] . $taxonomy . '&orderby=name&order=' . $sort . $url_param['filter'] . $url_param['s']; $sort = 'ASC'; ?>"><?php _e( 'Name', 'gmLang' ); ?></a>
|
185 |
-
</th>
|
186 |
-
<th class="descr"><span><?php _e( 'Description', 'gmLang' ); ?></span></th>
|
187 |
-
<th class="count <?php if ( $orderby == 'count' ) {
|
188 |
-
echo $order;
|
189 |
-
$sort = ( $order == 'DESC' ) ? 'ASC' : 'DESC';
|
190 |
-
} ?>">
|
191 |
-
<a href="<?php echo $url['page'] . $url_param['tab'] . $taxonomy . '&orderby=count&order=' . $sort . $url_param['filter'] . $url_param['s']; ?>"><?php _e( 'Count', 'gmLang' ); ?></a>
|
192 |
-
</th>
|
193 |
-
<th class="actions"><span><?php _e( 'Actions', 'gmLang' ); ?></span></th>
|
194 |
-
</tr>
|
195 |
-
</thead>
|
196 |
-
<tbody class="gmLib">
|
197 |
-
<?php
|
198 |
-
if ( count( $gMediaTerms ) ) {
|
199 |
-
$filter = ( empty( $_GET['s'] ) && empty( $_REQUEST['gmSelected'] ) ) ? false : true;
|
200 |
-
$count = 0;
|
201 |
-
$termsHierarr = $grandCore->get_terms_hierarrhically( $taxonomy, $gMediaTerms, $children, $count, $offset, $number, 0, 0, $filter );
|
202 |
-
foreach ( $termsHierarr as $termitem ) {
|
203 |
-
$grandAdmin->gm_term_row( $termitem );
|
204 |
-
}
|
205 |
-
}
|
206 |
-
else {
|
207 |
-
echo '<tr class="emptydb"><td colspan="7">' . __( 'No terms in Gmedia Library.', 'gmLang' ) . '</td></tr>';
|
208 |
-
}
|
209 |
-
?>
|
210 |
-
<tr class="noitems">
|
211 |
-
<td colspan="7"><?php _e( 'No results. Type another query.', 'gmLang' ); ?></td>
|
212 |
-
</tr>
|
213 |
-
</tbody>
|
214 |
-
</table>
|
215 |
-
<?php wp_original_referer_field( true, 'previous' ); ?>
|
216 |
-
</div>
|
217 |
-
<?php
|
218 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/library.php
DELETED
@@ -1,314 +0,0 @@
|
|
1 |
-
<?php if ( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) ) {
|
2 |
-
die( 'You are not allowed to call this page directly.' );
|
3 |
-
}
|
4 |
-
|
5 |
-
class grandLibrary {
|
6 |
-
|
7 |
-
var $mode;
|
8 |
-
var $page;
|
9 |
-
var $msg;
|
10 |
-
var $term_id;
|
11 |
-
|
12 |
-
// initiate the manage page
|
13 |
-
function grandLibrary() {
|
14 |
-
global $grandCore;
|
15 |
-
// GET variables
|
16 |
-
$this->mode = $grandCore->_get( 'mode', 'main' );
|
17 |
-
$this->page = $grandCore->_get( 'page', 'GrandMedia' );
|
18 |
-
$this->msg = $grandCore->message( $grandCore->_post( 'gmUpdateMessage' ), $grandCore->_post( 'gmUpdateStatus', false ) );
|
19 |
-
|
20 |
-
$this->processor();
|
21 |
-
}
|
22 |
-
|
23 |
-
// Do diff process before lib shell
|
24 |
-
function processor() {
|
25 |
-
global $grandCore, $gMDb, $grandAdmin;
|
26 |
-
|
27 |
-
// check for correct capability
|
28 |
-
if ( ! current_user_can( 'edit_posts' ) )
|
29 |
-
die( '-1' );
|
30 |
-
|
31 |
-
$gmOptions = get_option( 'gmediaOptions' );
|
32 |
-
switch ( $this->page ) {
|
33 |
-
case 'GrandMedia_Settings':
|
34 |
-
if ( isset( $_POST['gmedia_settings_save'] ) ) {
|
35 |
-
check_admin_referer( 'grandMedia' );
|
36 |
-
$gmOptions = get_option( 'gmediaOptions' );
|
37 |
-
if(isset($_POST['set']['gmedia_key2']) && empty($_POST['set']['gmedia_key2'])){
|
38 |
-
$_POST['set']['gmedia_key'] = '';
|
39 |
-
} else if(empty($_POST['set']['gmedia_key'])){
|
40 |
-
$_POST['set']['gmedia_key2'] = '';
|
41 |
-
$_POST['set']['product_name'] = '';
|
42 |
-
}
|
43 |
-
foreach ( $_POST['set'] as $key => $val ) {
|
44 |
-
$gmOptions[$key] = $val;
|
45 |
-
}
|
46 |
-
update_option( 'gmediaOptions', $gmOptions );
|
47 |
-
|
48 |
-
$this->msg .= $grandCore->message( __( "Settings saved", 'gmLang' ) );
|
49 |
-
}
|
50 |
-
if ( isset( $_GET['settings_default'] ) ) {
|
51 |
-
$this->msg .= $grandCore->message( __( "Default setings loaded", 'gmLang' ), 'info' );
|
52 |
-
}
|
53 |
-
break;
|
54 |
-
case 'GrandMedia_Tags_and_Categories':
|
55 |
-
if ( isset( $_POST['addterms'] ) ) {
|
56 |
-
check_admin_referer( 'grandMedia' );
|
57 |
-
$term_ids = array();
|
58 |
-
$args = array( 'description' => $grandCore->_post( 'gm_term_description', '' ), 'global' => intval( $grandCore->_post( 'gm_term_global', 0 ) ) );
|
59 |
-
foreach ( $_POST['terms'] as $taxonomy => $terms ) {
|
60 |
-
$taxonomy = trim( $taxonomy );
|
61 |
-
if ( isset( $gmOptions['taxonomies'][$taxonomy]['hierarchical'] ) && $gmOptions['taxonomies'][$taxonomy]['hierarchical'] ) {
|
62 |
-
$terms = array( $terms );
|
63 |
-
}
|
64 |
-
else {
|
65 |
-
$terms = explode( ',', $terms );
|
66 |
-
}
|
67 |
-
$terms = array_filter( array_map( 'trim', $terms ) );
|
68 |
-
if ( ! empty( $taxonomy ) && count( $terms ) ) {
|
69 |
-
foreach ( (array) $terms as $term ) {
|
70 |
-
if ( ! strlen( $term ) )
|
71 |
-
continue;
|
72 |
-
|
73 |
-
if ( ! $term_info = $gMDb->term_exists( $term, $taxonomy ) ) {
|
74 |
-
// Skip if a non-existent term ID is passed.
|
75 |
-
if ( is_int( $term ) )
|
76 |
-
continue;
|
77 |
-
$term_info = $gMDb->insert_term( $term, $taxonomy, $args );
|
78 |
-
}
|
79 |
-
if ( ! is_wp_error( $term_info ) ) {
|
80 |
-
$term_ids[] = $term_info['term_id'];
|
81 |
-
}
|
82 |
-
}
|
83 |
-
$this->msg .= $grandCore->message( sprintf( __( "%s terms successfuly added", 'gmLang' ), count( $term_ids ) ), 'info' );
|
84 |
-
}
|
85 |
-
}
|
86 |
-
}
|
87 |
-
if ( isset( $_POST['updateTerm'] ) ) {
|
88 |
-
check_admin_referer( 'grandMedia' );
|
89 |
-
$term_id = $grandCore->_post( 'gmID', '' );
|
90 |
-
$args = array( 'description' => $grandCore->_post( 'gm_term_description', '' ), 'global' => intval( $grandCore->_post( 'gm_term_global', 0 ) ) );
|
91 |
-
foreach ( $_POST['terms'] as $taxonomy => $term ) {
|
92 |
-
$taxonomy = trim( $taxonomy );
|
93 |
-
$args['name'] = trim( $term );
|
94 |
-
if ( ! empty( $taxonomy ) && ! empty( $term_id ) ) {
|
95 |
-
$term_info = $gMDb->update_term( $term_id, $taxonomy, $args );
|
96 |
-
if ( ! is_wp_error( $term_info ) ) {
|
97 |
-
$this->msg .= $grandCore->message( sprintf( __( "Term #%s updated successfuly", 'gmLang' ), $term_info['term_id'] ), 'info' );
|
98 |
-
}
|
99 |
-
else {
|
100 |
-
$this->msg .= $grandCore->message( __( "Error. Can't update term", 'gmLang' ), 'error' );
|
101 |
-
}
|
102 |
-
|
103 |
-
}
|
104 |
-
}
|
105 |
-
}
|
106 |
-
break;
|
107 |
-
case 'GrandMedia_AddMedia':
|
108 |
-
break;
|
109 |
-
case 'GrandMedia_Modules':
|
110 |
-
if ( isset( $_POST['gmedia_module_create'] ) ) {
|
111 |
-
$term = trim( $grandCore->_post( 'name', '' ) );
|
112 |
-
if ( ! empty( $term ) ) {
|
113 |
-
check_admin_referer( 'grandMedia' );
|
114 |
-
$args = array( 'name' => $term, 'description' => $grandCore->_post( 'description', '' ) );
|
115 |
-
$taxonomy = 'gmedia_module';
|
116 |
-
if ( ! $term_info = $gMDb->term_exists( $term, $taxonomy ) ) {
|
117 |
-
$term_info = $gMDb->insert_term( $term, $taxonomy, $args );
|
118 |
-
if ( ! is_wp_error( $term_info ) ) {
|
119 |
-
$default_settings = $grandCore->gm_get_module_settings( $_POST['module_name'] );
|
120 |
-
$default_settings['module_name'] = $_POST['module_name'];
|
121 |
-
$default_settings['last_edited'] = gmdate( 'Y-m-d H:i:s' );
|
122 |
-
if ( isset( $_POST['checkbox'] ) ) {
|
123 |
-
foreach ( $_POST['checkbox'] as $key => $value ) {
|
124 |
-
if ( ! isset( $_POST[$key] ) ) {
|
125 |
-
$_POST[$key] = $_POST['checkbox'][$key];
|
126 |
-
}
|
127 |
-
}
|
128 |
-
unset( $_POST['checkbox'] );
|
129 |
-
}
|
130 |
-
foreach ( $default_settings as $key => $value ) {
|
131 |
-
if ( array_key_exists( $key, $args ) )
|
132 |
-
continue;
|
133 |
-
|
134 |
-
if ( ! isset( $_POST[$key] ) ) {
|
135 |
-
$_POST[$key] = $value;
|
136 |
-
}
|
137 |
-
$gMDb->update_metadata( 'gmedia_term', $term_info['term_id'], $key, $_POST[$key] );
|
138 |
-
}
|
139 |
-
$this->msg .= $grandCore->message( sprintf( __( "%s gallery successfuly added", 'gmLang' ), $term ), 'info' );
|
140 |
-
$this->term_id = $term_info['term_id'];
|
141 |
-
}
|
142 |
-
else {
|
143 |
-
$this->msg .= $grandCore->message( sprintf( __( "Can't create %s gallery", 'gmLang' ), $term ), 'error' );
|
144 |
-
}
|
145 |
-
}
|
146 |
-
else {
|
147 |
-
$this->msg .= $grandCore->message( sprintf( __( "Gallery %s already exists", 'gmLang' ), $term ), 'warning' );
|
148 |
-
}
|
149 |
-
}
|
150 |
-
else {
|
151 |
-
$this->msg .= $grandCore->message( __( "Gallery name is empty", 'gmLang' ), 'error' );
|
152 |
-
}
|
153 |
-
}
|
154 |
-
if ( isset( $_POST['gmedia_module_update'] ) ) {
|
155 |
-
$term = trim( $_POST['name'] );
|
156 |
-
if ( ! empty( $term ) ) {
|
157 |
-
check_admin_referer( 'grandMedia' );
|
158 |
-
$taxonomy = 'gmedia_module';
|
159 |
-
$this->term_id = $term_id = intval( $_POST['term_id'] );
|
160 |
-
$args = array( 'name' => $term, 'description' => $grandCore->_post( 'description', '' ) );
|
161 |
-
if ( $term_id && $term_info = $gMDb->term_exists( $term_id, $taxonomy ) ) {
|
162 |
-
$term_info = $gMDb->update_term( $term_id, $taxonomy, $args );
|
163 |
-
if ( ! is_wp_error( $term_info ) ) {
|
164 |
-
$default_settings = $grandCore->gm_get_module_settings( $_POST['module_name'] );
|
165 |
-
$default_settings['module_name'] = $_POST['module_name'];
|
166 |
-
$default_settings['last_edited'] = gmdate( 'Y-m-d H:i:s' );
|
167 |
-
if ( isset( $_POST['checkbox'] ) ) {
|
168 |
-
foreach ( $_POST['checkbox'] as $key => $value ) {
|
169 |
-
if ( ! isset( $_POST[$key] ) ) {
|
170 |
-
$_POST[$key] = $_POST['checkbox'][$key];
|
171 |
-
}
|
172 |
-
}
|
173 |
-
unset( $_POST['checkbox'] );
|
174 |
-
}
|
175 |
-
foreach ( $default_settings as $key => $value ) {
|
176 |
-
if ( array_key_exists( $key, $args ) )
|
177 |
-
continue;
|
178 |
-
|
179 |
-
if ( ! isset( $_POST[$key] ) ) {
|
180 |
-
$_POST[$key] = $value;
|
181 |
-
}
|
182 |
-
$gMDb->update_metadata( 'gmedia_term', $term_info['term_id'], $key, $_POST[$key] );
|
183 |
-
}
|
184 |
-
$this->msg .= $grandCore->message( sprintf( __( "%s gallery successfuly updated", 'gmLang' ), $term ), 'info' );
|
185 |
-
}
|
186 |
-
else {
|
187 |
-
$this->msg .= $grandCore->message( sprintf( __( "Can't update %s gallery", 'gmLang' ), $term ), 'error' );
|
188 |
-
}
|
189 |
-
}
|
190 |
-
else {
|
191 |
-
$this->msg .= $grandCore->message( sprintf( __( "Update Error. Can't find gallery %s in database", 'gmLang' ), $term ), 'error' );
|
192 |
-
}
|
193 |
-
}
|
194 |
-
else {
|
195 |
-
$this->msg .= $grandCore->message( __( "Gallery name is empty", 'gmLang' ), 'error' );
|
196 |
-
}
|
197 |
-
}
|
198 |
-
if ( isset( $_GET['settings_default'] ) ) {
|
199 |
-
$this->msg .= $grandCore->message( __( "Default setings loaded", 'gmLang' ), 'info' );
|
200 |
-
}
|
201 |
-
break;
|
202 |
-
case 'GrandMedia_WordpressLibrary':
|
203 |
-
if ( isset( $_POST['wpmedia-update'] ) ) {
|
204 |
-
$post['ID'] = $_POST['gmID'];
|
205 |
-
$post['post_title'] = $_POST['gmTitle'];
|
206 |
-
$post['post_content'] = $_POST['gmDescription'];
|
207 |
-
if ( wp_update_post( $post ) ) {
|
208 |
-
$this->msg .= $grandCore->message( sprintf( __( 'Media #%s updated successfully', 'gmLang' ), $post['ID'] ), 'info' );
|
209 |
-
}
|
210 |
-
else {
|
211 |
-
$this->msg .= $grandCore->message( sprintf( __( "Can't update media #%s", 'gmLang' ), $post['ID'] ), 'error' );
|
212 |
-
}
|
213 |
-
}
|
214 |
-
break;
|
215 |
-
case 'GrandMedia':
|
216 |
-
default:
|
217 |
-
break;
|
218 |
-
}
|
219 |
-
$this->shell();
|
220 |
-
}
|
221 |
-
|
222 |
-
// Display shell of plugin
|
223 |
-
function shell() {
|
224 |
-
$sideLinks = $this->sideLinks();
|
225 |
-
?>
|
226 |
-
<div id="grandMedia" class="grandmedia">
|
227 |
-
<div class="grandHeader">
|
228 |
-
<div class="grandLogo">GrandMedia</div>
|
229 |
-
<h2><?php echo $sideLinks['grandTitle']; ?></h2>
|
230 |
-
</div>
|
231 |
-
<div id="gm-message"><?php echo $this->msg; ?></div>
|
232 |
-
<?php echo $sideLinks['sideLinks']; ?>
|
233 |
-
<div class="grandLibrary">
|
234 |
-
<?php $this->controller();
|
235 |
-
|
236 |
-
$params = $_GET;
|
237 |
-
//unset($params["pager"],$params["s"]);
|
238 |
-
if ( isset( $params["filter"] ) && $params["filter"] == 'selected' ) unset( $params["filter"] );
|
239 |
-
$new_query_string = http_build_query( $params );
|
240 |
-
?>
|
241 |
-
<form action="<?php echo admin_url( 'admin.php?' . $new_query_string ); ?>" method="post" style="display: none;" id="gmUpdateContent">
|
242 |
-
<input id="gmUpdateMessage" type="hidden" name="gmUpdateMessage" value="" />
|
243 |
-
<input id="gmUpdateStatus" type="hidden" name="gmUpdateStatus" value="" />
|
244 |
-
</form>
|
245 |
-
</div>
|
246 |
-
<div class="tooltip-file-preview"></div>
|
247 |
-
<div class="tooltip-mediaelement"></div>
|
248 |
-
</div>
|
249 |
-
<?php
|
250 |
-
}
|
251 |
-
|
252 |
-
function sideLinks() {
|
253 |
-
global $submenu, $grandCore;
|
254 |
-
$content['sideLinks'] = '
|
255 |
-
<div class="sideLinks">
|
256 |
-
<div class="gm-bufer"><a class="button-primary" href="' . admin_url( 'admin.php?page=GrandMedia_AddMedia' ) . '"' . $grandCore->qTip( __( "Click to upload media files", "gmLang" ), true ) . '>' . __( 'Add Files...', 'gmLang' ) . '</a></div>
|
257 |
-
<ul>';
|
258 |
-
foreach ( $submenu['gmedia-plugin'] as $menuKey => $menuItem ) {
|
259 |
-
if ( $submenu['gmedia-plugin'][$menuKey][2] == $this->page ) {
|
260 |
-
$iscur = ' class="current"';
|
261 |
-
$content['grandTitle'] = $submenu['gmedia-plugin'][$menuKey][3];
|
262 |
-
}
|
263 |
-
else {
|
264 |
-
$iscur = '';
|
265 |
-
}
|
266 |
-
if($submenu['gmedia-plugin'][$menuKey][2] == 'GrandMedia_AddMedia')
|
267 |
-
continue;
|
268 |
-
|
269 |
-
$content['sideLinks'] .= '
|
270 |
-
<li' . $iscur . '><a href="' . admin_url( 'admin.php?page=' . $submenu['gmedia-plugin'][$menuKey][2] ) . '">' . $submenu['gmedia-plugin'][$menuKey][0] . '</a></li>';
|
271 |
-
}
|
272 |
-
$content['sideLinks'] .= '
|
273 |
-
</ul>
|
274 |
-
</div>';
|
275 |
-
return $content;
|
276 |
-
}
|
277 |
-
|
278 |
-
function controller() {
|
279 |
-
switch ( $this->page ) {
|
280 |
-
case 'GrandMedia_Settings':
|
281 |
-
include_once ( dirname( __FILE__ ) . '/settings.php' );
|
282 |
-
gmSettings();
|
283 |
-
break;
|
284 |
-
case 'GrandMedia_Tags_and_Categories':
|
285 |
-
include_once ( dirname( __FILE__ ) . '/labels.php' );
|
286 |
-
gmTagsCategories();
|
287 |
-
break;
|
288 |
-
case 'GrandMedia_AddMedia':
|
289 |
-
include_once ( dirname( __FILE__ ) . '/addmedia.php' );
|
290 |
-
grandMedia_AddMedia();
|
291 |
-
break;
|
292 |
-
case 'GrandMedia_Modules':
|
293 |
-
include_once ( dirname( __FILE__ ) . '/modules.php' );
|
294 |
-
if ( isset( $_GET['module'] ) ) {
|
295 |
-
gmedia_module_settings( $_GET['module'], $this->term_id );
|
296 |
-
}
|
297 |
-
else {
|
298 |
-
gmedia_manage_modules();
|
299 |
-
}
|
300 |
-
break;
|
301 |
-
case 'GrandMedia_WordpressLibrary':
|
302 |
-
include_once ( dirname( __FILE__ ) . '/wpmedia.php' );
|
303 |
-
grandWPMedia();
|
304 |
-
break;
|
305 |
-
case 'GrandMedia':
|
306 |
-
default:
|
307 |
-
include_once ( dirname( __FILE__ ) . '/gmedia.php' );
|
308 |
-
grandMedia();
|
309 |
-
break;
|
310 |
-
}
|
311 |
-
}
|
312 |
-
|
313 |
-
|
314 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/modules.php
CHANGED
@@ -1,468 +1,189 @@
|
|
1 |
<?php
|
2 |
-
if
|
3 |
-
die(
|
4 |
}
|
5 |
|
6 |
/**
|
7 |
-
*
|
8 |
*
|
9 |
* @return mixed content
|
10 |
*/
|
11 |
-
function
|
12 |
-
global $
|
13 |
-
|
14 |
-
$
|
15 |
-
|
16 |
-
$
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
$arg['offset'] = $offset = ( $page - 1 ) * $number;
|
52 |
-
|
53 |
-
$taxonomy = 'gmedia_module';
|
54 |
-
$gMediaTerms = $gMDb->get_terms( $taxonomy, $arg );
|
55 |
-
|
56 |
-
|
57 |
-
/** @var $orderby
|
58 |
-
* @var $order
|
59 |
-
* @var $search
|
60 |
-
* @var $include
|
61 |
-
*/
|
62 |
-
extract( $arg );
|
63 |
|
64 |
-
|
65 |
-
$
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
$url_param['s'] = $search ? '&s=' . $search : '';
|
71 |
-
?>
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
<col class="descr" />
|
80 |
-
<col class="count" />
|
81 |
-
<col class="last_edited" />
|
82 |
-
<col class="actions" />
|
83 |
-
<thead>
|
84 |
-
<tr>
|
85 |
-
<th class="bufer"><span></span></th>
|
86 |
-
<th class="module_preview"><span><?php _e( 'Preview Image', 'gmLang' ); ?></span></th>
|
87 |
-
<th class="id <?php if ( $orderby == 'id' ) {
|
88 |
-
echo $order;
|
89 |
-
$sort = ( $order == 'DESC' ) ? 'ASC' : 'DESC';
|
90 |
-
} ?>" title="<?php _e( 'Sort by ID', 'gmLang' ); ?>">
|
91 |
-
<a href="<?php echo $url['page'] . $url_param['tab'] . '&orderby=id&order=' . $sort . $url_param['s']; $sort = 'ASC'; ?>"><?php _e( 'ID', 'gmLang' ); ?></a>
|
92 |
-
</th>
|
93 |
-
<th class="name <?php if ( $orderby == 'name' ) {
|
94 |
-
echo $order;
|
95 |
-
$sort = ( $order == 'DESC' ) ? 'ASC' : 'DESC';
|
96 |
-
} ?>" title="<?php _e( 'Sort by name', 'gmLang' ); ?>">
|
97 |
-
<a href="<?php echo $url['page'] . $url_param['tab'] . '&orderby=name&order=' . $sort . $url_param['s']; $sort = 'ASC'; ?>"><?php _e( 'Name', 'gmLang' ); ?></a>
|
98 |
-
</th>
|
99 |
-
<th class="descr"><span><?php _e( 'Description', 'gmLang' ); ?></span></th>
|
100 |
-
<th class="count"><?php _e( 'Count', 'gmLang' ); ?></th>
|
101 |
-
<th class="last_edited"><span><?php _e( 'Last Edited', 'gmLang' ); ?></span></th>
|
102 |
-
<th class="actions"><span><?php _e( 'Actions', 'gmLang' ); ?></span></th>
|
103 |
-
</tr>
|
104 |
-
</thead>
|
105 |
-
<tbody class="gmLib">
|
106 |
-
<?php
|
107 |
-
if ( count( $gMediaTerms ) ) {
|
108 |
-
$filter = ( empty( $arg['search'] ) ) ? false : true;
|
109 |
-
//$count = 0;
|
110 |
-
//$termsHierarr = $grandCore->get_terms_hierarrhically( $taxonomy, $gMediaTerms, $children, $count, $offset, $number, 0, 0, $filter );
|
111 |
-
foreach ( $gMediaTerms as $termitem ) {
|
112 |
-
$grandAdmin->gm_term_row( $termitem );
|
113 |
-
}
|
114 |
-
}
|
115 |
-
else {
|
116 |
-
echo '<tr class="emptydb"><td colspan="8">' . __( 'No Galleries.', 'gmLang' ) . ' <a href="' . admin_url( 'admin.php?page=GrandMedia_Modules&tab=modules' ) . '">' . __( 'Create', 'gmLang' ) . '</a></td></tr>';
|
117 |
-
}
|
118 |
-
?>
|
119 |
-
</tbody>
|
120 |
-
</table>
|
121 |
-
<?php wp_original_referer_field( true, 'previous' ); ?>
|
122 |
</div>
|
123 |
-
|
124 |
-
|
125 |
-
}
|
126 |
-
/* ---------------------------------------MODULES--------------------------------------- */
|
127 |
-
if ( $curr_tab == 'modules' ) {
|
128 |
-
?>
|
129 |
-
<div class="gmediaModules">
|
130 |
<?php
|
131 |
-
//
|
132 |
-
$
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
if ( !empty( $modules_xml ) ) {
|
147 |
-
foreach ( $modules_xml as $m ) {
|
148 |
-
$muid = (string) $m->uid;
|
149 |
-
$type = (string) $m->type;
|
150 |
-
$all_modules[$muid] = get_object_vars( $m );
|
151 |
-
//$modules_by_type[$type][$muid] = $all_modules[$muid];
|
152 |
-
}
|
153 |
-
$modules_xml_message = __( 'All available modules are already installed...', 'flag' );
|
154 |
-
}
|
155 |
-
else {
|
156 |
-
$modules_xml_message = __( 'Error loading remote modules or cURL library is not installed on your server...', 'flag' ) . ' <a class="ext" href="http://codeasily.com/community/topic/gmedia-faq/">' . __( 'more', 'gmLang' ) . '</a>';
|
157 |
-
}
|
158 |
-
|
159 |
-
// plugin's module folder
|
160 |
-
$modules = glob( GRAND_ABSPATH . 'module/*', GLOB_NOSORT );
|
161 |
-
if ( ! empty( $modules ) ) {
|
162 |
-
$modules = array_filter( $modules, 'is_dir' );
|
163 |
-
foreach ( $modules as $moduledir ) {
|
164 |
-
$module = array();
|
165 |
-
include( $moduledir . '/details.php' );
|
166 |
-
$moduledir = basename( $moduledir );
|
167 |
-
if ( ! empty( $module ) ) {
|
168 |
-
$muid = $module['uid'];
|
169 |
-
$available_modules[$muid] = $module;
|
170 |
-
$mclass = $module['type'] . ' ' . $module['status'];
|
171 |
-
$update = '';
|
172 |
-
if ( isset( $all_modules[$muid] ) && (string) $all_modules[$muid]['uid'] == $module['uid'] ) {
|
173 |
-
if ( version_compare( (float) $all_modules[$muid]['version'], (float) $module['version'], '>' ) ) {
|
174 |
-
$update = '<p class="msg">' . __( 'New version available. Module will be updated with latest version of plugin.' ) . '</p>';
|
175 |
-
$mclass .= ' update';
|
176 |
-
}
|
177 |
-
$module['demo'] = $all_modules[$muid]['demo'];
|
178 |
-
unset( $all_modules[$muid] );
|
179 |
-
}
|
180 |
-
?>
|
181 |
-
<div class="module <?php echo $mclass; ?>" id="<?php echo $muid; ?>">
|
182 |
-
<div class="screenshot">
|
183 |
-
<img src="<?php echo plugins_url( GRAND_FOLDER . "/module/$moduledir/screenshot.png" ); ?>" alt="<?php echo $module['title']; ?>" width="320" height="240" />
|
184 |
-
</div>
|
185 |
-
<div class="content">
|
186 |
-
<h3><?php echo $module['title']; ?></h3>
|
187 |
-
<span class="version"><?php echo __( 'Version', 'gmLang' ) . ': ' . $module['version']; ?></span>
|
188 |
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
|
194 |
-
<?php }
|
195 |
-
switch($module['type']){
|
196 |
-
case 'gallery':
|
197 |
-
$create_txt = __( 'Create Gallery', 'gmLang' );
|
198 |
-
break;
|
199 |
-
case 'music':
|
200 |
-
case 'video':
|
201 |
-
$create_txt = __( 'Create Playlist', 'gmLang' );
|
202 |
-
break;
|
203 |
-
default:
|
204 |
-
$create_txt = __( 'Create...', 'gmLang' );
|
205 |
-
}
|
206 |
-
?>
|
207 |
-
<a class="module_create button-primary" href="<?php echo wp_nonce_url( 'admin.php?page=GrandMedia_Modules&module=' . $moduledir, 'grandMedia' ); ?>"><?php echo $create_txt; ?></a>
|
208 |
-
<?php echo $update; ?>
|
209 |
-
</div>
|
210 |
-
</div>
|
211 |
-
</div>
|
212 |
-
<?php
|
213 |
}
|
214 |
-
}
|
215 |
-
}
|
216 |
|
217 |
-
|
218 |
-
|
219 |
-
if ( ! empty( $modules ) ) {
|
220 |
-
$modules = array_filter( $modules, 'is_dir' );
|
221 |
-
foreach ( $modules as $moduledir ) {
|
222 |
-
$module = array();
|
223 |
-
include( $moduledir . '/details.php' );
|
224 |
-
$moduledir = basename( $moduledir );
|
225 |
-
if ( $module ) {
|
226 |
-
$muid = $module['uid'];
|
227 |
-
$available_modules[$muid] = $module;
|
228 |
-
$mclass = $module['type'] . ' ' . $module['status'];
|
229 |
-
$update = '';
|
230 |
-
if ( isset( $all_modules[$muid] ) && (string) $all_modules[$muid]['uid'] == $module['uid'] ) {
|
231 |
-
if ( version_compare( (float) $all_modules[$muid]['version'], (float) $module['version'], '>' ) ) {
|
232 |
-
$update = '| <a class="module_update button button-green ajaxPost" data-action="gmDoAjax" data-_ajax_nonce="' . $nonce . '" data-post="modulezip=' . urlencode($all_modules[$muid]['download']) . '&moduledir=' . $moduledir . '&modulename=' . urlencode($all_modules[$muid]['title']) . '" data-task="gm-update-module" href="'.$all_modules[$muid]['download'].'">' . __( 'Update Module', 'gmLang' ) . " (v{$all_modules[$muid]['version']})</a>";
|
233 |
-
$mclass .= ' module_update';
|
234 |
-
}
|
235 |
-
$module['demo'] = $all_modules[$muid]['demo'];
|
236 |
-
unset( $all_modules[$muid] );
|
237 |
-
}
|
238 |
-
?>
|
239 |
-
<div class="module <?php echo $mclass; ?>" id="<?php echo $muid; ?>">
|
240 |
-
<div class="screenshot">
|
241 |
-
<img src="<?php echo content_url( GRAND_FOLDER . "/module/$moduledir/screenshot.png" ); ?>" alt="<?php echo $module['title']; ?>" width="320" height="240" />
|
242 |
-
</div>
|
243 |
-
<div class="content">
|
244 |
-
<h3><?php echo $module['title']; ?></h3>
|
245 |
-
<span class="version"><?php echo __( 'Version', 'gmLang' ) . ': ' . $module['version']; ?></span>
|
246 |
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
<a class="module_create button-primary" href="<?php echo wp_nonce_url( 'admin.php?page=GrandMedia_Modules&module=' . $moduledir, 'grandMedia' ); ?>"><?php _e( 'Create Gallery', 'gmLang' ) ?></a>
|
256 |
-
<?php echo $update; ?>
|
257 |
-
</div>
|
258 |
-
</div>
|
259 |
-
</div>
|
260 |
-
<?php
|
261 |
}
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
<div class="gMediaLibActions" style="margin-top: 20px;">
|
267 |
-
<div class="msg0"><?php _e( 'Not Installed Modules', 'gmLang' ) ?></div>
|
268 |
-
</div>
|
269 |
-
<div class="gmediaModules">
|
270 |
-
<?php
|
271 |
-
if ( ! empty( $all_modules ) ) {
|
272 |
-
?>
|
273 |
-
<?php foreach ( $all_modules as $module ) { ?>
|
274 |
-
<div class="module <?php echo $module['type'] . ' ' . $module['status']; ?>" id="<?php echo $module['uid']; ?>">
|
275 |
-
<div class="screenshot">
|
276 |
-
<img src="<?php echo $dropbox_public.$module['filename']; ?>.png" alt="<?php echo $module['title']; ?>" width="320" height="240" />
|
277 |
</div>
|
278 |
-
<div class="
|
279 |
-
<
|
280 |
-
<
|
281 |
-
|
282 |
-
<
|
283 |
-
<
|
284 |
-
<?php if(!empty($
|
285 |
-
|
286 |
-
|
|
287 |
<?php } ?>
|
288 |
-
<a class="
|
289 |
-
|
|
|
290 |
</div>
|
291 |
</div>
|
292 |
<?php
|
293 |
}
|
294 |
}
|
295 |
-
else {
|
296 |
-
?>
|
297 |
-
<div class="module nomodules"><?php echo $modules_xml_message; ?></div>
|
298 |
-
<?php
|
299 |
-
}
|
300 |
?>
|
301 |
</div>
|
302 |
-
|
303 |
-
}
|
304 |
-
|
305 |
-
}
|
306 |
-
|
307 |
-
|
308 |
-
/**
|
309 |
-
* gmedia_module_settings()
|
310 |
-
*
|
311 |
-
* @param string $module_folder
|
312 |
-
* @param int $term_id
|
313 |
-
*
|
314 |
-
* @return mixed content
|
315 |
-
*/
|
316 |
-
function gmedia_module_settings( $module_folder, $term_id = 0 ) {
|
317 |
-
global $grandCore, $gMDb;
|
318 |
-
|
319 |
-
// check for correct capability
|
320 |
-
if ( ! current_user_can( 'edit_posts' ) )
|
321 |
-
die( '-1' );
|
322 |
-
|
323 |
-
$url = $grandCore->get_admin_url();
|
324 |
-
$nonce = wp_create_nonce( 'grandMedia' );
|
325 |
-
|
326 |
-
// module folder
|
327 |
-
$module_dir = $grandCore->get_module_path( $module_folder );
|
328 |
-
$module_ot = array();
|
329 |
-
if ( is_dir( $module_dir['path'] ) ) {
|
330 |
-
include( $module_dir['path'] . '/settings.php' );
|
331 |
-
}
|
332 |
-
|
333 |
-
$field_values = array();
|
334 |
-
$submit_name = 'gmedia_module_create';
|
335 |
-
$load_default = 1;
|
336 |
-
$term_id = $term_id ? intval( $term_id ) : $grandCore->_get( 'term_id', 0 );
|
337 |
-
if ( $term_id ) {
|
338 |
-
$load_default = 2;
|
339 |
-
/* get current module meta data */
|
340 |
-
if ( ! isset( $_GET['settings_default'] ) ) {
|
341 |
-
$load_default = 0;
|
342 |
-
$field_values = $gMDb->get_metadata( 'gmedia_term', $term_id );
|
343 |
-
if ( ! empty( $field_values ) ) {
|
344 |
-
$field_values = array_map( array( $grandCore, 'maybe_array_0' ), $field_values );
|
345 |
-
$field_values = array_map( 'maybe_unserialize', $field_values );
|
346 |
-
}
|
347 |
-
} else {
|
348 |
-
$field_values['gMediaQuery'] = $gMDb->get_metadata( 'gmedia_term', $term_id, 'gMediaQuery', true );
|
349 |
-
}
|
350 |
-
$field_values = array_map( 'maybe_unserialize', $field_values );
|
351 |
-
|
352 |
-
$term_general = $gMDb->get_term( $term_id, 'gmedia_module', ARRAY_A );
|
353 |
-
$field_values = array_merge( $term_general, $field_values );
|
354 |
-
$submit_name = 'gmedia_module_update';
|
355 |
-
}
|
356 |
-
include( GRAND_ABSPATH . '/inc/module.settings.php' );
|
357 |
|
358 |
-
$
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
$backlink = remove_query_arg( 'settings_default' );
|
363 |
-
$gm_hash = ' gm_add_hash';
|
364 |
-
}
|
365 |
-
}
|
366 |
-
else {
|
367 |
-
$backlink = $url['page'] . '&tab=modules';
|
368 |
-
}
|
369 |
-
?>
|
370 |
-
<form id="gm_module_settings_form" action="<?php echo $url['page'] . '&module=' . $module_folder . ( $term_id ? '&term_id=' . $term_id : '' ); ?>" method="post">
|
371 |
-
<div class="gMediaLibActions">
|
372 |
-
<div class="abuts">
|
373 |
-
<a class="gm_action_back<?php echo $gm_hash; ?>" href="<?php echo $backlink; ?>"><b>«</b> <?php _e( 'Back', 'gmLang' ); ?>
|
374 |
-
</a>
|
375 |
-
</div>
|
376 |
-
<div class="abuts">
|
377 |
-
<a href="<?php echo remove_query_arg( array( 'doing_wp_cron', '_wpnonce', 'settings_default' ) ) . '&settings_default=' . rand() . '&_wpnonce=' . $nonce; ?>" class="gm_action_button ui-tab-link"><?php _e( 'Load Default Settings', 'gmLang' ); ?></a>
|
378 |
-
<span class="gm_action_button gm_action_submit"><input type="submit" name="<?php echo $submit_name; ?>" value="<?php _e( 'Save', 'gmLang' ); ?>" /></span>
|
379 |
-
</div>
|
380 |
-
<div class="msg0"><?php _e( 'Gallery Settings', 'gmLang' ) ?></div>
|
381 |
</div>
|
382 |
-
<div class="
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
<div
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
/* set default to standard value */
|
408 |
-
if ( $load_default == 1 ) {
|
409 |
-
$field_value = $field['std'];
|
410 |
-
}
|
411 |
-
else {
|
412 |
-
$field_value = isset( $field_values[$field['id']] ) ? $field_values[$field['id']] : $field['std'];
|
413 |
-
}
|
414 |
-
/* build the arguments array */
|
415 |
-
$_args = array(
|
416 |
-
'type' => $field['type'],
|
417 |
-
'field_id' => $field['id'],
|
418 |
-
'field_name' => $field['id'],
|
419 |
-
'field_value' => $field_value,
|
420 |
-
'field_desc' => isset( $field['desc'] ) ? $field['desc'] : '',
|
421 |
-
'field_std' => isset( $field['std'] ) ? $field['std'] : '',
|
422 |
-
'field_class' => isset( $field['class'] ) ? $field['class'] : '',
|
423 |
-
'field_choices' => isset( $field['choices'] ) ? $field['choices'] : array(),
|
424 |
-
'field_settings' => isset( $field['settings'] ) && ! empty( $field['settings'] ) ? $field['settings'] : array(),
|
425 |
-
'param' => isset( $field['param'] ) ? $field['param'] : '',
|
426 |
-
'term_id' => $term_id,
|
427 |
-
'meta' => true
|
428 |
-
);
|
429 |
-
?>
|
430 |
-
<div class="format-settings block-<?php if ( $_args['type'] == 'text' && ! empty( $_args['param'] ) ) {
|
431 |
-
echo $_args['param'];
|
432 |
-
}
|
433 |
-
else {
|
434 |
-
echo $_args['type'];
|
435 |
-
} ?>">
|
436 |
-
<div class="format-setting-label">
|
437 |
-
<?php if ( in_array( $field['type'], array( 'textblock', 'query' ) ) ) { ?>
|
438 |
-
<h3 class="label"><?php echo $field['label']; ?></h3>
|
439 |
-
<?php }
|
440 |
-
else { ?>
|
441 |
-
<label for="<?php echo $_args['field_id']; ?>" class="label"><?php echo $field['label']; ?></label>
|
442 |
-
<?php } ?>
|
443 |
-
</div>
|
444 |
-
<?php gm_return_func_by_type( $_args ); ?>
|
445 |
-
</div>
|
446 |
-
|
447 |
-
<?php } ?>
|
448 |
-
</div>
|
449 |
-
</div>
|
450 |
-
<?php } ?>
|
451 |
-
</div>
|
452 |
-
<div class="clear"></div>
|
453 |
-
</div>
|
454 |
</div>
|
455 |
-
<div class="clear"></div>
|
456 |
</div>
|
457 |
-
|
458 |
-
<input type="hidden" name="module_name" value="<?php echo $module_folder; ?>" />
|
459 |
-
<input type="hidden" name="term_id" value="<?php echo $term_id; ?>" />
|
460 |
-
<?php
|
461 |
-
/* Use nonce for verification */
|
462 |
-
wp_nonce_field( 'grandMedia' );
|
463 |
-
wp_original_referer_field( true, 'previous' );
|
464 |
-
?>
|
465 |
</div>
|
466 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
<?php
|
468 |
}
|
|
1 |
<?php
|
2 |
+
if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])){
|
3 |
+
die('You are not allowed to call this page directly.');
|
4 |
}
|
5 |
|
6 |
/**
|
7 |
+
* gmediaModules()
|
8 |
*
|
9 |
* @return mixed content
|
10 |
*/
|
11 |
+
function gmediaModules(){
|
12 |
+
global $gmCore, $gmProcessor, $gmGallery;
|
13 |
+
|
14 |
+
$url = add_query_arg(array('page' => $gmProcessor->page), admin_url('admin.php'));
|
15 |
+
|
16 |
+
$modules = array();
|
17 |
+
if($plugin_modules = glob(GMEDIA_ABSPATH . 'module/*', GLOB_ONLYDIR | GLOB_NOSORT)){
|
18 |
+
foreach($plugin_modules as $path){
|
19 |
+
$mfold = basename($path);
|
20 |
+
$modules[$mfold] = array(
|
21 |
+
'place' => 'plugin',
|
22 |
+
'module_name' => $mfold,
|
23 |
+
'module_url' => $gmCore->gmedia_url . "/module/{$mfold}",
|
24 |
+
'module_path' => $path
|
25 |
+
);
|
26 |
+
}
|
27 |
+
}
|
28 |
+
if($upload_modules = glob($gmCore->upload['path'].'/'.$gmGallery->options['folder']['module'].'/*', GLOB_ONLYDIR | GLOB_NOSORT)){
|
29 |
+
foreach($upload_modules as $path){
|
30 |
+
$mfold = basename($path);
|
31 |
+
$modules[$mfold] = array(
|
32 |
+
'place' => 'upload',
|
33 |
+
'module_name' => $mfold,
|
34 |
+
'module_url' => $gmCore->upload['url'] . "/{$gmGallery->options['folder']['module']}/{$mfold}",
|
35 |
+
'module_path' => $path
|
36 |
+
);
|
37 |
+
}
|
38 |
+
}
|
39 |
+
// not installed modules
|
40 |
+
$xml = array();
|
41 |
+
$get_xml = wp_remote_get($gmGallery->options['modules_xml']);
|
42 |
+
if(!is_wp_error($get_xml) && (200 == $get_xml['response']['code'])){
|
43 |
+
$xml = @simplexml_load_string($get_xml['body']);
|
44 |
+
} else{
|
45 |
+
$alert = array(__('Error loading remote xml...', 'gmLang'));
|
46 |
+
if(is_wp_error($get_xml)){
|
47 |
+
$alert[] = $get_xml->get_error_message();
|
48 |
+
}
|
49 |
+
echo $gmProcessor->alert('danger', $alert);
|
50 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
+
if(!empty($xml)){
|
53 |
+
foreach($xml as $m){
|
54 |
+
$name = (string)$m->name;
|
55 |
+
$xml_modules[$name] = get_object_vars($m);
|
56 |
+
}
|
57 |
+
}
|
|
|
|
|
58 |
|
59 |
+
?>
|
60 |
+
<div id="gmedia_modules">
|
61 |
+
<div class="panel panel-default">
|
62 |
+
<div class="panel-heading clearfix">
|
63 |
+
<a href="#installModuleModal" class="btn btn-primary pull-right" data-toggle="modal"><?php _e('Install Module ZIP'); ?></a>
|
64 |
+
<h3 class="panel-title"><?php _e('Installed Modules', 'gmLang'); ?></h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
</div>
|
66 |
+
<div class="panel-body" id="gmedia-msg-panel"></div>
|
67 |
+
<div class="panel-body">
|
|
|
|
|
|
|
|
|
|
|
68 |
<?php
|
69 |
+
// installed modules
|
70 |
+
if(!empty($modules)){
|
71 |
+
foreach($modules as $m){
|
72 |
+
/**
|
73 |
+
* @var $place
|
74 |
+
* @var $module_name
|
75 |
+
* @var $module_url
|
76 |
+
* @var $module_path
|
77 |
+
*/
|
78 |
+
extract($m);
|
79 |
+
|
80 |
+
// todo: get broken modules folders and delete them with files in modules root
|
81 |
+
if(!file_exists($module_path . '/index.php')){
|
82 |
+
continue;
|
83 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
+
$module_info = array();
|
86 |
+
include($module_path . '/index.php');
|
87 |
+
if(empty($module_info)){
|
88 |
+
continue;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
}
|
|
|
|
|
90 |
|
91 |
+
$m = isset($xml_modules[$module_name])? array_merge($module_info, $xml_modules[$module_name]) : $module_info;
|
92 |
+
$mclass = ' module-'.$m['type'].' module-'.$m['status'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
+
$update_button = '';
|
95 |
+
if(isset($xml_modules[$module_name])){
|
96 |
+
if(version_compare((float)$xml_modules[$module_name]['version'], (float)$module_info['version'], '>')){
|
97 |
+
$update_button = '<a class="btn btn-warning module_install" data-module="'.$module_name.'" data-loading-text="'.__('Loading...', 'gmLang').'" href="'.esc_url($xml_modules[$module_name]['download']).'">'.__('Update Module', 'gmLang')." (v{$xml_modules[$module_name]['version']})</a>";
|
98 |
+
$mclass .= ' module-update';
|
99 |
+
} else{
|
100 |
+
unset($xml_modules[$module_name]);
|
101 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
103 |
+
?>
|
104 |
+
<div class="media<?php echo $mclass; ?>">
|
105 |
+
<div class="thumbnail pull-left">
|
106 |
+
<img class="media-object" src="<?php echo $module_url.'/screenshot.png'; ?>" alt="<?php echo esc_attr($m['title']); ?>" width="320" height="240"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
</div>
|
108 |
+
<div class="media-body" style="margin-left:340px;">
|
109 |
+
<h4 class="media-heading"><?php echo $m['title']; ?></h4>
|
110 |
+
<p class="version"><?php echo __('Version', 'gmLang') . ': ' . $module_info['version']; ?></p>
|
111 |
+
<div class="description"><?php echo str_replace("\n", '<br />', (string) $m['description']); ?></div>
|
112 |
+
<hr />
|
113 |
+
<p class="buttons">
|
114 |
+
<?php if(!empty($m['demo']) && $m['demo'] != '#'){ ?>
|
115 |
+
<a class="btn btn-default" target="_blank" href="<?php echo $m['demo']; ?>"><?php _e('View Demo', 'gmLang') ?></a>
|
|
|
116 |
<?php } ?>
|
117 |
+
<a class="btn btn-success" href="<?php echo $gmCore->get_admin_url(array('page'=>'GrandMedia_Galleries','gallery_module'=>$module_name), array(), true); ?>"><?php _e('Create Gallery', 'gmLang'); ?></a>
|
118 |
+
<?php echo $update_button; ?>
|
119 |
+
</p>
|
120 |
</div>
|
121 |
</div>
|
122 |
<?php
|
123 |
}
|
124 |
}
|
|
|
|
|
|
|
|
|
|
|
125 |
?>
|
126 |
</div>
|
127 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
|
129 |
+
<?php if(!empty($xml_modules)){ ?>
|
130 |
+
<div class="panel panel-default">
|
131 |
+
<div class="panel-heading clearfix">
|
132 |
+
<h3 class="panel-title"><?php _e('Not Installed Modules', 'gmLang'); ?></h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
</div>
|
134 |
+
<div class="panel-body" id="gmedia-msg-panel"></div>
|
135 |
+
<div class="panel-body">
|
136 |
+
<?php
|
137 |
+
$xml_dirpath = dirname($gmGallery->options['modules_xml']);
|
138 |
+
foreach($xml_modules as $name => $m){
|
139 |
+
if(empty($m)){
|
140 |
+
continue;
|
141 |
+
}
|
142 |
+
$mclass = ' module-'.$m['type'].' module-'.$m['status'];
|
143 |
+
?>
|
144 |
+
<div class="media<?php echo $mclass; ?>">
|
145 |
+
<div class="thumbnail pull-left">
|
146 |
+
<img class="media-object" src="<?php echo $xml_dirpath.'/'.$m['name']; ?>.png" alt="<?php echo esc_attr($m['title']); ?>" width="320" height="240"/>
|
147 |
+
</div>
|
148 |
+
<div class="media-body" style="margin-left:340px;">
|
149 |
+
<h4 class="media-heading"><?php echo $m['title']; ?></h4>
|
150 |
+
<p class="version"><?php echo __('Version', 'gmLang') . ': ' . $m['version']; ?></p>
|
151 |
+
<div class="description"><?php echo str_replace("\n", '<br />', (string) $m['description']); ?></div>
|
152 |
+
<hr />
|
153 |
+
<p class="buttons">
|
154 |
+
<?php if(!empty($m['demo']) && $m['demo'] != '#'){ ?>
|
155 |
+
<a class="btn btn-default" target="_blank" href="<?php echo $m['demo']; ?>"><?php _e('View Demo', 'gmLang') ?></a>
|
156 |
+
<?php } ?>
|
157 |
+
<a class="btn btn-primary module_install" data-module="<?php echo $m['name']; ?>" data-loading-text="<?php _e('Loading...', 'gmLang'); ?>" href="<?php echo $m['download']; ?>"><?php _e('Install Module', 'gmLang'); ?></a>
|
158 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
</div>
|
|
|
160 |
</div>
|
161 |
+
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
</div>
|
163 |
+
</div>
|
164 |
+
<?php } ?>
|
165 |
+
</div>
|
166 |
+
<!-- Modal -->
|
167 |
+
<div class="modal fade gmedia-modal" id="installModuleModal" tabindex="-1" role="dialog" aria-hidden="true">
|
168 |
+
<div class="modal-dialog">
|
169 |
+
<form class="modal-content" method="post" enctype="multipart/form-data" action="<?php echo $url; ?>">
|
170 |
+
<div class="modal-header">
|
171 |
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
172 |
+
<h4 class="modal-title"><?php _e('Install a plugin in .zip format'); ?></h4>
|
173 |
+
</div>
|
174 |
+
<div class="modal-body">
|
175 |
+
<p class="install-help"><?php _e('If you have a module in a .zip format, you may install it by uploading it here.'); ?></p>
|
176 |
+
<?php wp_nonce_field( 'GmediaModule'); ?>
|
177 |
+
<label class="screen-reader-text" for="modulezip"><?php _e('Module zip file'); ?></label>
|
178 |
+
<input type="file" id="modulezip" name="modulezip" />
|
179 |
+
</div>
|
180 |
+
<div class="modal-footer">
|
181 |
+
<button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Cancel', 'gmLang'); ?></button>
|
182 |
+
<button type="submit" class="btn btn-primary"><?php _e('Install', 'gmLang'); ?></button>
|
183 |
+
</div>
|
184 |
+
</form>
|
185 |
+
</div>
|
186 |
+
</div>
|
187 |
<?php
|
188 |
}
|
189 |
+
|
admin/processor.php
ADDED
@@ -0,0 +1,635 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])){
|
2 |
+
die('You are not allowed to call this page directly.');
|
3 |
+
}
|
4 |
+
|
5 |
+
class GmediaProcessor{
|
6 |
+
|
7 |
+
var $mode;
|
8 |
+
var $page;
|
9 |
+
var $msg;
|
10 |
+
var $error;
|
11 |
+
var $term_id;
|
12 |
+
var $selected_items = array();
|
13 |
+
|
14 |
+
// initiate the manage page
|
15 |
+
function __construct(){
|
16 |
+
global $pagenow, $gmCore;
|
17 |
+
// GET variables
|
18 |
+
$this->mode = $gmCore->_get('mode');
|
19 |
+
$this->page = $gmCore->_get('page', 'GrandMedia');
|
20 |
+
|
21 |
+
if('media.php' === $pagenow){
|
22 |
+
add_filter('wp_redirect', array(&$this, 'redirect'), 10, 2);
|
23 |
+
}
|
24 |
+
|
25 |
+
add_action('set_current_user', array(&$this, 'selected_items'));
|
26 |
+
add_action('init', array(&$this, 'processor'));
|
27 |
+
|
28 |
+
}
|
29 |
+
|
30 |
+
function selected_items(){
|
31 |
+
global $user_ID, $gmCore;
|
32 |
+
switch($this->page){
|
33 |
+
case 'GrandMedia':
|
34 |
+
$ckey = "gmedia_u{$user_ID}_library";
|
35 |
+
break;
|
36 |
+
case 'GrandMedia_Terms':
|
37 |
+
$taxonomy = $gmCore->_get('term', 'gmedia_album');
|
38 |
+
$ckey = "gmedia_u{$user_ID}_{$taxonomy}";
|
39 |
+
break;
|
40 |
+
case 'GrandMedia_Galleries':
|
41 |
+
$taxonomy = $gmCore->_get('term', 'gmedia_gallery');
|
42 |
+
$ckey = "gmedia_u{$user_ID}_{$taxonomy}";
|
43 |
+
break;
|
44 |
+
case 'GrandMedia_WordpressLibrary':
|
45 |
+
$ckey = "gmedia_u{$user_ID}_wpmedia";
|
46 |
+
break;
|
47 |
+
default:
|
48 |
+
$ckey = false;
|
49 |
+
break;
|
50 |
+
}
|
51 |
+
|
52 |
+
if($ckey){
|
53 |
+
if(isset($_POST['selected_items'])){
|
54 |
+
$this->selected_items = array_filter(explode(',', $_POST['selected_items']), 'is_numeric');
|
55 |
+
} elseif(isset($_COOKIE[$ckey])){
|
56 |
+
$this->selected_items = array_filter(explode(',', $_COOKIE[$ckey]), 'is_numeric');
|
57 |
+
}
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
function user_options(){
|
62 |
+
global $user_ID, $gmGallery;
|
63 |
+
|
64 |
+
$gm_screen_options = get_user_meta($user_ID, 'gm_screen_options', true);
|
65 |
+
if(!is_array($gm_screen_options)){
|
66 |
+
$gm_screen_options = array();
|
67 |
+
}
|
68 |
+
$gm_screen_options = array_merge($gmGallery->options['gm_screen_options'], $gm_screen_options);
|
69 |
+
|
70 |
+
return $gm_screen_options;
|
71 |
+
}
|
72 |
+
|
73 |
+
// Do diff process before lib shell
|
74 |
+
function processor(){
|
75 |
+
global $gmCore, $gmDB, $gmGallery;
|
76 |
+
|
77 |
+
// check for correct capability
|
78 |
+
//if ( ! current_user_can( 'edit_posts' ) )
|
79 |
+
// die( '-1' );
|
80 |
+
|
81 |
+
$gmOptions = get_option('gmediaOptions');
|
82 |
+
switch($this->page){
|
83 |
+
case 'GrandMedia':
|
84 |
+
if(isset($_POST['quick_gallery'])){
|
85 |
+
do{
|
86 |
+
$gallery = $gmCore->_post('gallery');
|
87 |
+
$gallery['name'] = trim($gallery['name']);
|
88 |
+
if(empty($gallery['name'])){
|
89 |
+
$this->error[] = __('Gallery Name is not specified', 'gmLang');
|
90 |
+
break;
|
91 |
+
}
|
92 |
+
if($gmCore->is_digit($gallery['name'])){
|
93 |
+
$this->error[] = __("Gallery name can't be only digits", 'gmLang');
|
94 |
+
break;
|
95 |
+
}
|
96 |
+
if(empty($gallery['query']['gmedia__in'])){
|
97 |
+
$this->error[] = __('Choose gmedia from library for quick gallery', 'gmLang');
|
98 |
+
break;
|
99 |
+
}
|
100 |
+
$taxonomy = 'gmedia_gallery';
|
101 |
+
if($term_id = $gmDB->term_exists($gallery['name'], $taxonomy)){
|
102 |
+
$this->error[] = __('A term with the name provided already exists', 'gmLang');
|
103 |
+
break;
|
104 |
+
}
|
105 |
+
$term_id = $gmDB->insert_term($gallery['name'], $taxonomy);
|
106 |
+
if(is_wp_error($term_id)){
|
107 |
+
$this->error[] = $term_id->get_error_message();
|
108 |
+
break;
|
109 |
+
}
|
110 |
+
|
111 |
+
$gallery_meta = array(
|
112 |
+
'edited' => gmdate('Y-m-d H:i:s')
|
113 |
+
,'module' => $gallery['module']
|
114 |
+
,'query' => array('gmedia__in' => $gallery['query']['gmedia__in'])
|
115 |
+
,'settings' => array($gallery['module'] => array())
|
116 |
+
);
|
117 |
+
foreach($gallery_meta as $key => $value){
|
118 |
+
$gmDB->add_metadata('gmedia_term', $term_id, $key, $value);
|
119 |
+
}
|
120 |
+
$this->msg[] = sprintf(__('Gallery "%s" successfuly saved. Shortcode: [gmedia id=%d]', 'gmLang'), esc_attr($gallery['name']), $term_id);
|
121 |
+
} while(0);
|
122 |
+
}
|
123 |
+
|
124 |
+
if(isset($_POST['filter_categories'])){
|
125 |
+
if($term = $gmCore->_post('cat')){
|
126 |
+
$location = add_query_arg(array('page' => $this->page, 'mode' => $this->mode, 'category__in' => implode(',', $term)), admin_url('admin.php'));
|
127 |
+
wp_redirect($location);
|
128 |
+
}
|
129 |
+
}
|
130 |
+
if(isset($_POST['filter_albums'])){
|
131 |
+
if($term = $gmCore->_post('alb')){
|
132 |
+
$location = add_query_arg(array('page' => $this->page, 'mode' => $this->mode, 'album__in' => implode(',', $term)), admin_url('admin.php'));
|
133 |
+
wp_redirect($location);
|
134 |
+
}
|
135 |
+
}
|
136 |
+
if(isset($_POST['filter_tags'])){
|
137 |
+
if($term = $gmCore->_post('tag_ids')){
|
138 |
+
$location = add_query_arg(array('page' => $this->page, 'mode' => $this->mode, 'tag__in' => $term), admin_url('admin.php'));
|
139 |
+
wp_redirect($location);
|
140 |
+
}
|
141 |
+
}
|
142 |
+
if(!empty($this->selected_items)){
|
143 |
+
if(isset($_POST['assign_category'])){
|
144 |
+
$term = $gmCore->_post('cat');
|
145 |
+
if(false !== $term){
|
146 |
+
$count = count($this->selected_items);
|
147 |
+
if('0' == $term){
|
148 |
+
foreach($this->selected_items as $item){
|
149 |
+
$gmDB->delete_gmedia_term_relationships($item, 'gmedia_category');
|
150 |
+
}
|
151 |
+
$this->msg[] = sprintf(__('%d items updated with "Uncategorized"', 'gmLang'), $count);
|
152 |
+
} else{
|
153 |
+
foreach($this->selected_items as $item){
|
154 |
+
$result = $gmDB->set_gmedia_terms($item, $term, 'gmedia_category', $append = 0);
|
155 |
+
if(is_wp_error($result)){
|
156 |
+
$this->error[] = $result;
|
157 |
+
$count--;
|
158 |
+
} elseif(!$result){
|
159 |
+
$count--;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
if(isset($gmGallery->options['taxonomies']['gmedia_category'][$term])){
|
163 |
+
$cat_name = $gmGallery->options['taxonomies']['gmedia_category'][$term];
|
164 |
+
$this->msg[] = sprintf(__("Category `%s` assigned to %d images.", 'gmLang'), esc_html($cat_name), $count);
|
165 |
+
} else{
|
166 |
+
$this->error[] = sprintf(__("Category `%s` can't be assigned.", 'gmLang'), $term);;
|
167 |
+
}
|
168 |
+
}
|
169 |
+
}
|
170 |
+
}
|
171 |
+
if(isset($_POST['assign_album'])){
|
172 |
+
$term = $gmCore->_post('alb');
|
173 |
+
if(false !== $term){
|
174 |
+
$count = count($this->selected_items);
|
175 |
+
if('0' == $term){
|
176 |
+
foreach($this->selected_items as $item){
|
177 |
+
$gmDB->delete_gmedia_term_relationships($item, 'gmedia_album');
|
178 |
+
}
|
179 |
+
$this->msg[] = sprintf(__('%d items updated with "No Album"', 'gmLang'), $count);
|
180 |
+
} else{
|
181 |
+
foreach($this->selected_items as $item){
|
182 |
+
$result = $gmDB->set_gmedia_terms($item, $term, 'gmedia_album', $append = 0);
|
183 |
+
if(is_wp_error($result)){
|
184 |
+
$this->error[] = $result;
|
185 |
+
$count--;
|
186 |
+
} elseif(!$result){
|
187 |
+
$count--;
|
188 |
+
}
|
189 |
+
}
|
190 |
+
if($gmCore->is_digit($term)){
|
191 |
+
$alb_name = $gmDB->get_alb_name($term);
|
192 |
+
} else{
|
193 |
+
$alb_name = $term;
|
194 |
+
}
|
195 |
+
$this->msg[] = sprintf(__('Album `%s` assigned to %d items', 'gmLang'), esc_html($alb_name), $count);
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
}
|
200 |
+
if(isset($_POST['add_tags'])){
|
201 |
+
if($term = $gmCore->_post('tag_names')){
|
202 |
+
$term = explode(',', $term);
|
203 |
+
$count = count($this->selected_items);
|
204 |
+
foreach($this->selected_items as $item){
|
205 |
+
$result = $gmDB->set_gmedia_terms($item, $term, 'gmedia_tag', $append = 1);
|
206 |
+
if(is_wp_error($result)){
|
207 |
+
$this->error[] = $result;
|
208 |
+
$count--;
|
209 |
+
} elseif(!$result){
|
210 |
+
$count--;
|
211 |
+
}
|
212 |
+
}
|
213 |
+
$this->msg[] = sprintf(__('%d tags added to %d items', 'gmLang'), count($term), $count);
|
214 |
+
}
|
215 |
+
}
|
216 |
+
if(isset($_POST['delete_tags'])){
|
217 |
+
if($term = $gmCore->_post('tag_id')){
|
218 |
+
$term = array_map('intval', $term);
|
219 |
+
$count = count($this->selected_items);
|
220 |
+
foreach($this->selected_items as $item){
|
221 |
+
$result = $gmDB->set_gmedia_terms($item, $term, 'gmedia_tag', $append = -1);
|
222 |
+
if(is_wp_error($result)){
|
223 |
+
$this->error[] = $result;
|
224 |
+
$count--;
|
225 |
+
} elseif(!$result){
|
226 |
+
$count--;
|
227 |
+
}
|
228 |
+
}
|
229 |
+
$this->msg[] = sprintf(__('%d tags deleted from %d items', 'gmLang'), count($term), $count);
|
230 |
+
}
|
231 |
+
}
|
232 |
+
if('selected' == $gmCore->_get('delete')){
|
233 |
+
global $user_ID;
|
234 |
+
check_admin_referer('gmedia_delete');
|
235 |
+
if(!current_user_can('delete_posts')){
|
236 |
+
wp_die(__('You are not allowed to delete this post.'));
|
237 |
+
}
|
238 |
+
$count = count($this->selected_items);
|
239 |
+
foreach($this->selected_items as $item){
|
240 |
+
if(!$gmDB->delete_gmedia((int)$item)){
|
241 |
+
$this->error[] = "#{$item}: " . __('Error in deleting...', 'gmLang');
|
242 |
+
$count--;
|
243 |
+
}
|
244 |
+
}
|
245 |
+
if($count){
|
246 |
+
$this->msg[] = sprintf(__('%d items deleted successfuly', 'gmLang'), $count);
|
247 |
+
}
|
248 |
+
unset($_COOKIE["gmedia_u{$user_ID}_library"]);
|
249 |
+
setcookie($_COOKIE["gmedia_u{$user_ID}_library"], '', time() - 3600);
|
250 |
+
$this->selected_items = array();
|
251 |
+
}
|
252 |
+
}
|
253 |
+
break;
|
254 |
+
case 'GrandMedia_AddMedia':
|
255 |
+
break;
|
256 |
+
case 'GrandMedia_Terms':
|
257 |
+
$taxonomy = $gmCore->_get('term', 'gmedia_album');
|
258 |
+
if(!empty($this->selected_items)){
|
259 |
+
if('selected' == $gmCore->_get('delete')){
|
260 |
+
global $user_ID;
|
261 |
+
check_admin_referer('gmedia_delete');
|
262 |
+
if(!current_user_can('delete_posts')){
|
263 |
+
wp_die(__('You are not allowed to delete this post.'));
|
264 |
+
}
|
265 |
+
$count = count($this->selected_items);
|
266 |
+
foreach($this->selected_items as $item){
|
267 |
+
$delete = $gmDB->delete_term($item, $taxonomy);
|
268 |
+
if(is_wp_error($delete)){
|
269 |
+
$this->error[] = $delete->get_error_message();
|
270 |
+
$count--;
|
271 |
+
}
|
272 |
+
}
|
273 |
+
if($count){
|
274 |
+
$this->msg[] = sprintf(__('%d items deleted successfuly', 'gmLang'), $count);
|
275 |
+
}
|
276 |
+
unset($_COOKIE["gmedia_u{$user_ID}_{$taxonomy}"]);
|
277 |
+
setcookie($_COOKIE["gmedia_u{$user_ID}_{$taxonomy}"], '', time() - 3600);
|
278 |
+
$this->selected_items = array();
|
279 |
+
}
|
280 |
+
}
|
281 |
+
if(isset($_POST['gmedia_album_save'])){
|
282 |
+
check_admin_referer('GmediaTerms', 'term_save_wpnonce');
|
283 |
+
$edit_term = (int) $gmCore->_get('edit_album');
|
284 |
+
do{
|
285 |
+
$term = $gmCore->_post('term');
|
286 |
+
$term['name'] = trim($term['name']);
|
287 |
+
if(empty($term['name'])){
|
288 |
+
$this->error[] = __('Term Name is not specified', 'gmLang');
|
289 |
+
break;
|
290 |
+
}
|
291 |
+
if($gmCore->is_digit($term['name'])){
|
292 |
+
$this->error[] = __("Term Name can't be only digits", 'gmLang');
|
293 |
+
break;
|
294 |
+
}
|
295 |
+
$taxonomy = 'gmedia_album';
|
296 |
+
if($edit_term && !$gmDB->term_exists($edit_term, $taxonomy)){
|
297 |
+
$this->error[] = __('A term with the id provided do not exists', 'gmLang');
|
298 |
+
$edit_term = false;
|
299 |
+
}
|
300 |
+
if($term_id = $gmDB->term_exists($term['name'], $taxonomy)){
|
301 |
+
if($term_id != $edit_term){
|
302 |
+
$this->error[] = __('A term with the name provided already exists', 'gmLang');
|
303 |
+
break;
|
304 |
+
}
|
305 |
+
}
|
306 |
+
if($edit_term){
|
307 |
+
$term_id = $gmDB->update_term($edit_term, $term['taxonomy'], $term);
|
308 |
+
} else{
|
309 |
+
$term_id = $gmDB->insert_term($term['name'], $term['taxonomy'], array('description' => $term['description'], 'status' => $term['status']));
|
310 |
+
}
|
311 |
+
if(is_wp_error($term_id)){
|
312 |
+
$this->error[] = $term_id->get_error_message();
|
313 |
+
break;
|
314 |
+
}
|
315 |
+
|
316 |
+
$term_meta = array(
|
317 |
+
'orderby' => $term['orderby']
|
318 |
+
,'order' => $term['order']
|
319 |
+
);
|
320 |
+
foreach($term_meta as $key => $value){
|
321 |
+
if($edit_term){
|
322 |
+
$gmDB->update_metadata('gmedia_term', $term_id, $key, $value);
|
323 |
+
} else{
|
324 |
+
$gmDB->add_metadata('gmedia_term', $term_id, $key, $value);
|
325 |
+
}
|
326 |
+
}
|
327 |
+
|
328 |
+
$this->msg[] = sprintf(__('Album `%s` successfuly saved', 'gmLang'), $term['name']);
|
329 |
+
|
330 |
+
} while(0);
|
331 |
+
}
|
332 |
+
if(isset($_POST['gmedia_tag_add'])){
|
333 |
+
check_admin_referer('GmediaTerms', 'term_save_wpnonce');
|
334 |
+
$term = $gmCore->_post('term');
|
335 |
+
$terms = array_filter(array_map('trim', explode(',', $term['name'])));
|
336 |
+
$terms_added = 0; $terms_qty = count($terms);
|
337 |
+
foreach($terms as $term_name){
|
338 |
+
if($gmCore->is_digit($term_name)){ continue; }
|
339 |
+
|
340 |
+
if(!$gmDB->term_exists($term_name, $term['taxonomy'])){
|
341 |
+
$term_id = $gmDB->insert_term($term_name, $term['taxonomy']);
|
342 |
+
if(is_wp_error($term_id)){
|
343 |
+
$this->error[] = $term_id->get_error_message();
|
344 |
+
} else{
|
345 |
+
$this->msg['tag_add'] = sprintf(__('%d of %d tags successfuly added', 'gmLang'), ++$terms_added, $terms_qty);
|
346 |
+
}
|
347 |
+
} else{
|
348 |
+
$this->error['tag_add'] = __('Some of provided tags are already exists', 'gmLang');
|
349 |
+
}
|
350 |
+
}
|
351 |
+
}
|
352 |
+
break;
|
353 |
+
case 'GrandMedia_Galleries':
|
354 |
+
if(isset($_POST['gmedia_gallery_save'])){
|
355 |
+
$edit_gallery = (int) $gmCore->_get('edit_gallery');
|
356 |
+
do{
|
357 |
+
$gallery = $gmCore->_post('gallery');
|
358 |
+
$gallery['name'] = trim($gallery['name']);
|
359 |
+
if(empty($gallery['name'])){
|
360 |
+
$this->error[] = __('Gallery Name is not specified', 'gmLang');
|
361 |
+
break;
|
362 |
+
}
|
363 |
+
if($gmCore->is_digit($gallery['name'])){
|
364 |
+
$this->error[] = __("Gallery name can't be only digits", 'gmLang');
|
365 |
+
break;
|
366 |
+
}
|
367 |
+
if(empty($gallery['module'])){
|
368 |
+
$this->error[] = __('Something goes wrong... Choose module, please', 'gmLang');
|
369 |
+
break;
|
370 |
+
}
|
371 |
+
$term = $gallery['term'];
|
372 |
+
if(!isset($gallery['query'][$term]) || empty($gallery['query'][$term])){
|
373 |
+
$this->error[] = __('Choose gallery source, please (tags, albums, categories...)', 'gmLang');
|
374 |
+
break;
|
375 |
+
}
|
376 |
+
$taxonomy = 'gmedia_gallery';
|
377 |
+
if($edit_gallery && !$gmDB->term_exists($edit_gallery, $taxonomy)){
|
378 |
+
$this->error[] = __('A term with the id provided do not exists', 'gmLang');
|
379 |
+
$edit_gallery = false;
|
380 |
+
}
|
381 |
+
if($term_id = $gmDB->term_exists($gallery['name'], $taxonomy)){
|
382 |
+
if($term_id != $edit_gallery){
|
383 |
+
$this->error[] = __('A term with the name provided already exists', 'gmLang');
|
384 |
+
break;
|
385 |
+
}
|
386 |
+
}
|
387 |
+
if($edit_gallery){
|
388 |
+
$term_id = $gmDB->update_term($edit_gallery, $taxonomy, array('name' => $gallery['name'], 'description' => $gallery['description'], 'status' => $gallery['status']));
|
389 |
+
} else{
|
390 |
+
$term_id = $gmDB->insert_term($gallery['name'], $taxonomy, array('description' => $gallery['description'], 'status' => $gallery['status']));
|
391 |
+
}
|
392 |
+
if(is_wp_error($term_id)){
|
393 |
+
$this->error[] = $term_id->get_error_message();
|
394 |
+
break;
|
395 |
+
}
|
396 |
+
|
397 |
+
$module_settings = $gmCore->_post('module', array());
|
398 |
+
$gallery_meta = array(
|
399 |
+
'edited' => gmdate('Y-m-d H:i:s')
|
400 |
+
,'module' => $gallery['module']
|
401 |
+
,'query' => array($term => $gallery['query'][$term])
|
402 |
+
,'settings' => array($gallery['module'] => $module_settings)
|
403 |
+
);
|
404 |
+
foreach($gallery_meta as $key => $value){
|
405 |
+
if($edit_gallery){
|
406 |
+
$gmDB->update_metadata('gmedia_term', $term_id, $key, $value);
|
407 |
+
} else{
|
408 |
+
$gmDB->add_metadata('gmedia_term', $term_id, $key, $value);
|
409 |
+
}
|
410 |
+
}
|
411 |
+
if($edit_gallery){
|
412 |
+
$this->msg[] = sprintf(__('Gallery #%d successfuly saved', 'gmLang'), $term_id);
|
413 |
+
} else{
|
414 |
+
$location = add_query_arg(array('page' => $this->page, 'edit_gallery' => $term_id, 'message' => 'save'), admin_url('admin.php'));
|
415 |
+
wp_redirect($location);
|
416 |
+
}
|
417 |
+
} while(0);
|
418 |
+
}
|
419 |
+
if(('save' == $gmCore->_get('message')) && ($term_id = $gmCore->_get('edit_gallery'))){
|
420 |
+
$this->msg[] = sprintf(__('Gallery #%d successfuly saved', 'gmLang'), $term_id);
|
421 |
+
}
|
422 |
+
|
423 |
+
if(isset($_POST['gmedia_gallery_reset'])){
|
424 |
+
$edit_gallery = (int) $gmCore->_get('edit_gallery');
|
425 |
+
do{
|
426 |
+
$taxonomy = 'gmedia_gallery';
|
427 |
+
if(!$gmDB->term_exists($edit_gallery, $taxonomy)){
|
428 |
+
$this->error[] = __('A term with the id provided do not exists', 'gmLang');
|
429 |
+
break;
|
430 |
+
}
|
431 |
+
$gallery_settings = $gmDB->get_metadata('gmedia_term', $edit_gallery, 'settings', true);
|
432 |
+
reset($gallery_settings);
|
433 |
+
$gallery_module = key($gallery_settings);
|
434 |
+
$module_path = $gmCore->get_module_path($gallery_module);
|
435 |
+
/**
|
436 |
+
* @var $default_options
|
437 |
+
*/
|
438 |
+
if(file_exists($module_path['path'] . '/settings.php')){
|
439 |
+
include($module_path['path'] . '/settings.php');
|
440 |
+
} else{
|
441 |
+
$this->error[] = sprintf(__('Can\'t load data from `%s` module'), $gallery_module);
|
442 |
+
break;
|
443 |
+
}
|
444 |
+
|
445 |
+
$gallery_meta = array(
|
446 |
+
'edited' => gmdate('Y-m-d H:i:s')
|
447 |
+
,'settings' => array($gallery_module => $default_options)
|
448 |
+
);
|
449 |
+
foreach($gallery_meta as $key => $value){
|
450 |
+
$gmDB->update_metadata('gmedia_term', $edit_gallery, $key, $value);
|
451 |
+
}
|
452 |
+
$this->msg[] = sprintf(__('Gallery settings are reset', 'gmLang'));
|
453 |
+
|
454 |
+
} while(0);
|
455 |
+
|
456 |
+
}
|
457 |
+
|
458 |
+
if(!empty($this->selected_items)){
|
459 |
+
if('selected' == $gmCore->_get('delete')){
|
460 |
+
global $user_ID;
|
461 |
+
check_admin_referer('gmedia_delete');
|
462 |
+
if(!current_user_can('delete_posts')){
|
463 |
+
wp_die(__('You are not allowed to delete this post.'));
|
464 |
+
}
|
465 |
+
$taxonomy = 'gmedia_gallery';
|
466 |
+
$count = count($this->selected_items);
|
467 |
+
foreach($this->selected_items as $item){
|
468 |
+
$delete = $gmDB->delete_term($item, $taxonomy);
|
469 |
+
if(is_wp_error($delete)){
|
470 |
+
$this->error[] = $delete->get_error_message();
|
471 |
+
$count--;
|
472 |
+
}
|
473 |
+
}
|
474 |
+
if($count){
|
475 |
+
$this->msg[] = sprintf(__('%d items deleted successfuly', 'gmLang'), $count);
|
476 |
+
}
|
477 |
+
unset($_COOKIE["gmedia_u{$user_ID}_{$taxonomy}"]);
|
478 |
+
setcookie($_COOKIE["gmedia_u{$user_ID}_{$taxonomy}"], '', time() - 3600);
|
479 |
+
$this->selected_items = array();
|
480 |
+
}
|
481 |
+
}
|
482 |
+
|
483 |
+
break;
|
484 |
+
case 'GrandMedia_Modules':
|
485 |
+
if(isset($_FILES['modulezip']['tmp_name'])){
|
486 |
+
if(!empty($_FILES['modulezip']['tmp_name'])){
|
487 |
+
check_admin_referer('GmediaModule');
|
488 |
+
if(!current_user_can('edit_posts')){
|
489 |
+
wp_die(__('You are not allowed to install modules', 'gmLang'));
|
490 |
+
}
|
491 |
+
|
492 |
+
$to_folder = $gmCore->upload['path'] . '/' . $gmGallery->options['folder']['module'] . '/';
|
493 |
+
$filename = wp_unique_filename($to_folder, $_FILES['modulezip']['name']);
|
494 |
+
|
495 |
+
// Move the file to the modules dir
|
496 |
+
if(false === @move_uploaded_file($_FILES['modulezip']['tmp_name'], $to_folder . $filename)){
|
497 |
+
$this->error[] = sprintf(__('The uploaded file could not be moved to %s', 'flag'), $to_folder . $filename);
|
498 |
+
} else{
|
499 |
+
global $wp_filesystem;
|
500 |
+
// Is a filesystem accessor setup?
|
501 |
+
if(!$wp_filesystem || !is_object($wp_filesystem)){
|
502 |
+
require_once(ABSPATH . 'wp-admin/includes/file.php');
|
503 |
+
WP_Filesystem();
|
504 |
+
}
|
505 |
+
if(!is_object($wp_filesystem)){
|
506 |
+
$result = new WP_Error('fs_unavailable', __('Could not access filesystem.', 'flag'));
|
507 |
+
} elseif($wp_filesystem->errors->get_error_code()){
|
508 |
+
$result = new WP_Error('fs_error', __('Filesystem error', 'flag'), $wp_filesystem->errors);
|
509 |
+
} else{
|
510 |
+
$result = unzip_file($to_folder . $filename, $to_folder);
|
511 |
+
}
|
512 |
+
// Once extracted, delete the package
|
513 |
+
unlink($to_folder . $filename);
|
514 |
+
if(is_wp_error($result)){
|
515 |
+
$this->error[] = $result->get_error_message();
|
516 |
+
} else{
|
517 |
+
$this->msg[] = sprintf(__("The `%s` file unzipped to module's directory", 'flag'), $filename);
|
518 |
+
}
|
519 |
+
}
|
520 |
+
} else{
|
521 |
+
$this->error[] = __('No file specified', 'gmLang');
|
522 |
+
}
|
523 |
+
}
|
524 |
+
break;
|
525 |
+
case 'GrandMedia_Settings':
|
526 |
+
$lk_check = isset($_POST['license-key-activate']);
|
527 |
+
if(isset($_POST['gmedia_settings_save'])){
|
528 |
+
check_admin_referer('GmediaSettings');
|
529 |
+
$set = $gmCore->_post('set', array());
|
530 |
+
if(!empty($set['license_key']) && empty($set['license_key2'])){
|
531 |
+
$lk_check = true;
|
532 |
+
}
|
533 |
+
if(empty($set['license_key']) && !empty($set['license_key2'])){
|
534 |
+
$set['license_name'] = '';
|
535 |
+
$set['license_key'] = '';
|
536 |
+
$set['license_key2'] = '';
|
537 |
+
$this->error[] = __('License Key deactivated', 'gmLang');
|
538 |
+
}
|
539 |
+
foreach($set as $key => $val){
|
540 |
+
$gmGallery->options[$key] = $val;
|
541 |
+
}
|
542 |
+
update_option('gmediaOptions', $gmGallery->options);
|
543 |
+
$this->msg[] .= __('Settings saved', 'gmLang');
|
544 |
+
}
|
545 |
+
|
546 |
+
if($lk_check){
|
547 |
+
check_admin_referer('GmediaSettings');
|
548 |
+
$license_key = $gmCore->_post('set');
|
549 |
+
if(!empty($license_key['license_key'])){
|
550 |
+
global $wp_version;
|
551 |
+
$gmedia_ua = "WordPress/{$wp_version} | ";
|
552 |
+
$gmedia_ua .= 'Gmedia/' . constant('GMEDIA_VERSION');
|
553 |
+
|
554 |
+
$response = wp_remote_post('http://codeasily.com/rest/gmedia-key.php', array(
|
555 |
+
'body' => array('key' => $license_key['license_key'], 'site' => site_url()),
|
556 |
+
'headers' => array(
|
557 |
+
'Content-Type' => 'application/x-www-form-urlencoded; ' . 'charset=' . get_option('blog_charset'),
|
558 |
+
'Host' => 'codeasily.com',
|
559 |
+
'User-Agent' => $gmedia_ua
|
560 |
+
),
|
561 |
+
'httpversion' => '1.0',
|
562 |
+
'timeout' => 10
|
563 |
+
));
|
564 |
+
|
565 |
+
if(is_wp_error($response)){
|
566 |
+
$this->error[] = $response->get_error_message();
|
567 |
+
} else{
|
568 |
+
$result = json_decode($response['body']);
|
569 |
+
if($result->error->code == 200){
|
570 |
+
$gmGallery->options['license_name'] = $result->content;
|
571 |
+
$gmGallery->options['license_key'] = $result->key;
|
572 |
+
$gmGallery->options['license_key2'] = $result->key2;
|
573 |
+
$this->msg[] = __('License Key activated successfully', 'gmLang');
|
574 |
+
} else{
|
575 |
+
$gmGallery->options['license_name'] = '';
|
576 |
+
$gmGallery->options['license_key'] = '';
|
577 |
+
$gmGallery->options['license_key2'] = '';
|
578 |
+
$this->error[] = __('Error', 'gmLang') . ': ' . $result->error->message;
|
579 |
+
}
|
580 |
+
update_option('gmediaOptions', $gmGallery->options);
|
581 |
+
}
|
582 |
+
} else{
|
583 |
+
$this->error[] = __('Empty License Key', 'gmLang');
|
584 |
+
}
|
585 |
+
}
|
586 |
+
|
587 |
+
if(isset($_POST['gmedia_settings_reset'])){
|
588 |
+
check_admin_referer('GmediaSettings');
|
589 |
+
include_once(dirname(dirname(__FILE__)) . '/setup.php');
|
590 |
+
$_temp_options = $gmGallery->options;
|
591 |
+
$gmGallery->options = gmedia_default_options();
|
592 |
+
$gmGallery->options['license_name'] = $_temp_options['license_name'];
|
593 |
+
$gmGallery->options['license_key'] = $_temp_options['license_key'];
|
594 |
+
$gmGallery->options['license_key2'] = $_temp_options['license_key2'];
|
595 |
+
delete_metadata('user', 0, 'gm_screen_options', '', true);
|
596 |
+
update_option('gmediaOptions', $gmGallery->options);
|
597 |
+
$this->msg[] .= __('All settings set to default', 'gmLang');
|
598 |
+
}
|
599 |
+
break;
|
600 |
+
case 'GrandMedia_WordpressLibrary':
|
601 |
+
break;
|
602 |
+
default:
|
603 |
+
break;
|
604 |
+
}
|
605 |
+
}
|
606 |
+
|
607 |
+
function alert($type = 'info', $content = ''){
|
608 |
+
if(empty($content)){
|
609 |
+
return '';
|
610 |
+
} elseif(is_array($content)){
|
611 |
+
$content = implode('<br />', array_filter($content));
|
612 |
+
}
|
613 |
+
$alert = '<div class="alert alert-' . $type . ' alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>' . $content . '</div>';
|
614 |
+
|
615 |
+
return $alert;
|
616 |
+
}
|
617 |
+
|
618 |
+
// redirect to original referer after update
|
619 |
+
function redirect($location, $status){
|
620 |
+
global $pagenow;
|
621 |
+
if('media.php' === $pagenow && isset($_POST['_wp_original_http_referer'])){
|
622 |
+
if(strpos($_POST['_wp_original_http_referer'], 'GrandMedia') !== false){
|
623 |
+
return $_POST['_wp_original_http_referer'];
|
624 |
+
} else{
|
625 |
+
return $location;
|
626 |
+
}
|
627 |
+
}
|
628 |
+
|
629 |
+
return $location;
|
630 |
+
}
|
631 |
+
|
632 |
+
}
|
633 |
+
|
634 |
+
global $gmProcessor;
|
635 |
+
$gmProcessor = new GmediaProcessor();
|
admin/settings.php
CHANGED
@@ -4,70 +4,89 @@ if ( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) ) {
|
|
4 |
}
|
5 |
|
6 |
/**
|
7 |
-
*
|
8 |
*
|
9 |
* @return mixed content
|
10 |
*/
|
11 |
function gmSettings() {
|
12 |
-
global $
|
13 |
-
/*
|
14 |
-
include_once( dirname( dirname( __FILE__ ) ) . '/setup.php' );
|
15 |
-
$grandOptions = grand_default_options();
|
16 |
-
update_option( 'gmediaOptions', $grandOptions );
|
17 |
-
*/
|
18 |
-
$gmOptions = get_option( 'gmediaOptions' );
|
19 |
-
$url = $grandCore->get_admin_url();
|
20 |
-
$nonce = wp_create_nonce( 'grandMedia' );
|
21 |
|
22 |
?>
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
</div>
|
29 |
-
<div class="msg0"><?php _e( 'Gmedia Global Settings', 'gmLang' ) ?></div>
|
30 |
</div>
|
31 |
-
<div class="
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
<div id="console"></div>
|
52 |
-
</div>
|
53 |
-
</div>
|
54 |
-
</div>
|
55 |
-
|
56 |
-
<div id="section_other" class="postbox ui-tabs-panel"><?php _e( 'Under Development', 'gmLang' ) ?></div>
|
57 |
-
|
58 |
</div>
|
59 |
-
<div class="clear"></div>
|
60 |
</div>
|
61 |
-
</
|
62 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
</div>
|
|
|
64 |
</div>
|
65 |
-
<?php
|
66 |
-
/* Use nonce for verification */
|
67 |
-
wp_nonce_field( 'grandMedia' );
|
68 |
-
wp_original_referer_field( true, 'previous' );
|
69 |
-
?>
|
70 |
</div>
|
71 |
-
</form
|
72 |
<?php
|
73 |
}
|
4 |
}
|
5 |
|
6 |
/**
|
7 |
+
* gmSettings()
|
8 |
*
|
9 |
* @return mixed content
|
10 |
*/
|
11 |
function gmSettings() {
|
12 |
+
global $gmCore, $gmGallery;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
?>
|
15 |
+
|
16 |
+
<form class="panel panel-default" method="post">
|
17 |
+
<div class="panel-heading clearfix">
|
18 |
+
<div class="btn-toolbar pull-left">
|
19 |
+
<div class="btn-group">
|
20 |
+
<button type="submit" name="gmedia_settings_reset" class="btn btn-default" data-confirm="<?php _e('Reset all Gmedia settings?') ?>"><?php _e('Reset Settings', 'gmLang'); ?></button>
|
21 |
+
<button type="submit" name="gmedia_settings_save" class="btn btn-primary"><?php _e('Update', 'gmLang'); ?></button>
|
22 |
+
<?php
|
23 |
+
wp_nonce_field('GmediaSettings');
|
24 |
+
?>
|
25 |
+
</div>
|
26 |
</div>
|
|
|
27 |
</div>
|
28 |
+
<div class="panel-body" id="gmedia-msg-panel"></div>
|
29 |
+
<div class="container-fluid">
|
30 |
+
<div class="tabable tabs-left">
|
31 |
+
<ul class="nav nav-tabs" style="padding:10px 0;">
|
32 |
+
<li class="active"><a href="#gmedia_premium" data-toggle="tab"><?php _e('Premium Settings', 'gmLang'); ?></a></li>
|
33 |
+
<li><a href="#gmedia_settings1" data-toggle="tab"><?php _e('Other Settings', 'gmLang'); ?></a></li>
|
34 |
+
</ul>
|
35 |
+
<div class="tab-content" style="padding-top:21px;">
|
36 |
+
<fieldset id="gmedia_premium" class="tab-pane active">
|
37 |
+
<p><?php _e('Enter License Key to remove backlink label from premium gallery modules.') ?></p>
|
38 |
+
<div class="row">
|
39 |
+
<div class="form-group col-xs-5">
|
40 |
+
<label><?php _e( 'License Key', 'gmLang' ) ?>: <?php if(isset($gmGallery->options['license_name'])){ echo '<em>'.$gmGallery->options['license_name'].'</em>'; } ?></label>
|
41 |
+
<input type="text" name="set[license_key]" id="license_key" class="form-control input-sm" value="<?php if(isset($gmGallery->options['license_key'])){ echo $gmGallery->options['license_key']; } ?>"/>
|
42 |
+
<input type="hidden" name="set[license_name]" id="license_name" value="<?php echo $gmGallery->options['license_name']; ?>"/>
|
43 |
+
<input type="hidden" name="set[license_key2]" id="license_key2" value="<?php echo $gmGallery->options['license_key2']; ?>"/>
|
44 |
+
</div>
|
45 |
+
<div class="form-group col-xs-7">
|
46 |
+
<label> </label>
|
47 |
+
<button style="display:block;" class="btn btn-success btn-sm" type="submit" name="license-key-activate"><?php _e('Activate Key', 'gmLang'); ?></button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
</div>
|
|
|
49 |
</div>
|
50 |
+
</fieldset>
|
51 |
+
<fieldset id="gmedia_settings1" class="tab-pane">
|
52 |
+
<div class="form-group">
|
53 |
+
<label><?php _e( 'Delete uploaded files when delete (uninstall) plugin?', 'gmLang' ) ?>:</label>
|
54 |
+
<div class="checkbox" style="margin:0;">
|
55 |
+
<input type="hidden" name="set[uninstall_dropfiles]" value="0"/>
|
56 |
+
<label><input type="checkbox" name="set[uninstall_dropfiles]" value="1" <?php checked($gmGallery->options['uninstall_dropfiles'], '1'); ?> /> <?php _e('delete', 'gmLang'); ?></label>
|
57 |
+
<p class="help-block"><?php _e('Note: Database tables will be deleted anyway', 'gmLang'); ?></p>
|
58 |
+
</div>
|
59 |
+
</div>
|
60 |
+
<div class="form-group">
|
61 |
+
<label><?php _e( 'Forbid theme to format Gmedia shortcode\'s content', 'gmLang' ) ?>:</label>
|
62 |
+
<div class="checkbox" style="margin:0;">
|
63 |
+
<input type="hidden" name="set[shortcode_raw]" value="0"/>
|
64 |
+
<label><input type="checkbox" name="set[shortcode_raw]" value="1" <?php checked($gmGallery->options['shortcode_raw'], '1'); ?> /> <?php _e('Raw output for Gmedia Shortcode', 'gmLang'); ?></label>
|
65 |
+
<p class="help-block"><?php _e('Some themes reformat shortcodes and break it functionality (mostly when you add description to images). Turning this on should solve this problem.', 'gmLang'); ?></p>
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
<p><?php _e('Under constraction...') ?></p>
|
69 |
+
|
70 |
+
<?php
|
71 |
+
if($gmCore->_get('showdb')){
|
72 |
+
global $wpdb, $gmDB;
|
73 |
+
$gmedia = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}gmedia");
|
74 |
+
$terms = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}gmedia_term");
|
75 |
+
$relation = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}gmedia_term_relationships");
|
76 |
+
$images['grand-media'] = glob($gmCore->upload['path'].'/*', GLOB_NOSORT);
|
77 |
+
$images['images'] = glob($gmCore->upload['path'].'/image/*', GLOB_NOSORT);
|
78 |
+
$images['thumbs'] = glob($gmCore->upload['path'].'/thumb/*', GLOB_NOSORT);
|
79 |
+
echo '<pre style="max-height:400px; overflow:auto;">' . print_r($gmedia, true) . '</pre>';
|
80 |
+
echo '<pre style="max-height:400px; overflow:auto;">' . print_r($images, true) . '</pre>';
|
81 |
+
echo '<pre style="max-height:400px; overflow:auto;">' . print_r($terms, true) . '</pre>';
|
82 |
+
echo '<pre style="max-height:400px; overflow:auto;">' . print_r($relation, true) . '</pre>';
|
83 |
+
}
|
84 |
+
?>
|
85 |
+
</fieldset>
|
86 |
</div>
|
87 |
+
<div class="clear"></div>
|
88 |
</div>
|
|
|
|
|
|
|
|
|
|
|
89 |
</div>
|
90 |
+
</form>
|
91 |
<?php
|
92 |
}
|
admin/terms.php
ADDED
@@ -0,0 +1,626 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])){
|
3 |
+
die('You are not allowed to call this page directly.');
|
4 |
+
}
|
5 |
+
|
6 |
+
/**
|
7 |
+
* gmediaTerms()
|
8 |
+
*
|
9 |
+
* @return mixed content
|
10 |
+
*/
|
11 |
+
function gmediaTerms(){
|
12 |
+
global $user_ID, $gmDB, $gmCore, $gmGallery, $gmProcessor;
|
13 |
+
|
14 |
+
$url = add_query_arg(array('page' => $gmProcessor->page), admin_url('admin.php'));
|
15 |
+
|
16 |
+
/* todo: per_page options for gmedia_terms
|
17 |
+
$gm_screen_options = get_user_meta($user_ID, 'gm_screen_options', true);
|
18 |
+
if(!is_array($gm_screen_options)){
|
19 |
+
$gm_screen_options = array();
|
20 |
+
}
|
21 |
+
$gm_screen_options = array_merge($gmGallery->options['gm_screen_options'], $gm_screen_options);
|
22 |
+
*/
|
23 |
+
|
24 |
+
$filter = ('selected' == $gmCore->_req('filter'))? $gmProcessor->selected_items : null;
|
25 |
+
$args = array('orderby' => $gmCore->_get('orderby', 'name'), 'order' => $gmCore->_get('order', 'ASC'),
|
26 |
+
'search' => $gmCore->_get('s', ''), 'number' => $gmCore->_get('number', 30),
|
27 |
+
'hide_empty' => $gmCore->_get('hide_empty', 0), 'page' => $gmCore->_get('pager', 1),
|
28 |
+
'include' => $filter);
|
29 |
+
$args['offset'] = ($args['page'] - 1) * $args['number'];
|
30 |
+
|
31 |
+
$taxonomy = $gmCore->_get('term', 'gmedia_album');
|
32 |
+
if('gmedia_category' == $taxonomy){
|
33 |
+
$args['number'] = '';
|
34 |
+
$args['offset'] = '';
|
35 |
+
$args['search'] = '';
|
36 |
+
$args['include'] = null;
|
37 |
+
}
|
38 |
+
|
39 |
+
$gmediaTerms = $gmDB->get_terms($taxonomy, $args);
|
40 |
+
|
41 |
+
?>
|
42 |
+
<div class="panel panel-default">
|
43 |
+
<div class="panel-heading clearfix">
|
44 |
+
|
45 |
+
<?php if('gmedia_category' != $taxonomy){ ?>
|
46 |
+
<form class="form-inline gmedia-search-form" role="search" method="get">
|
47 |
+
<div class="form-group">
|
48 |
+
<input type="hidden" name="page" value="<?php echo $gmProcessor->page; ?>"/>
|
49 |
+
<input type="hidden" name="term" value="<?php echo $taxonomy; ?>"/>
|
50 |
+
<input id="gmedia-search" class="form-control input-sm" type="text" name="s" placeholder="<?php _e('Search...', 'gmLang'); ?>" value="<?php echo $gmCore->_get('s', ''); ?>"/>
|
51 |
+
</div>
|
52 |
+
<button type="submit" class="btn btn-default input-sm"><span class="glyphicon glyphicon-search"></span></button>
|
53 |
+
</form>
|
54 |
+
<?php echo $gmDB->query_pager(); ?>
|
55 |
+
<?php } ?>
|
56 |
+
|
57 |
+
<div class="btn-toolbar pull-left">
|
58 |
+
<?php if('gmedia_category' != $taxonomy){ ?>
|
59 |
+
<div class="btn-group gm-checkgroup" id="cb_global-btn">
|
60 |
+
<span class="btn btn-default active"><input class="doaction" id="cb_global" data-group="cb_term-object" type="checkbox"/></span>
|
61 |
+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
62 |
+
<span class="caret"></span>
|
63 |
+
<span class="sr-only"><?php _e('Toggle Dropdown', 'gmLang'); ?></span>
|
64 |
+
</button>
|
65 |
+
<ul class="dropdown-menu" role="menu">
|
66 |
+
<li><a data-select="total" href="#"><?php _e('All', 'gmLang'); ?></a></li>
|
67 |
+
<li><a data-select="none" href="#"><?php _e('None', 'gmLang'); ?></a></li>
|
68 |
+
<li class="divider"></li>
|
69 |
+
<li><a data-select="reverse" href="#" title="<?php _e('Reverse only visible items', 'gmLang'); ?>"><?php _e('Reverse', 'gmLang'); ?></a></li>
|
70 |
+
</ul>
|
71 |
+
</div>
|
72 |
+
<?php } ?>
|
73 |
+
|
74 |
+
<div class="btn-group" style="margin-right:20px;">
|
75 |
+
<?php $btn_color = $gmDB->filter? 'warning' : 'primary';
|
76 |
+
$btn_active_title = $gmDB->filter? '" title="'.__('Reset Filter', 'gmLang') : ''; ?>
|
77 |
+
<a class="btn btn<?php echo ('gmedia_album' == $taxonomy)? "-$btn_color active".$btn_active_title : '-default'; ?>" href="<?php echo add_query_arg(array('term' => 'gmedia_album'), $url); ?>"><?php _e('Albums', 'gmLang'); ?></a>
|
78 |
+
<a class="btn btn<?php echo ('gmedia_tag' == $taxonomy)? "-$btn_color active".$btn_active_title : '-default'; ?>" href="<?php echo add_query_arg(array('term' => 'gmedia_tag'), $url); ?>"><?php _e('Tags', 'gmLang'); ?></a>
|
79 |
+
<a class="btn btn<?php echo ('gmedia_category' == $taxonomy)? "-primary active" : '-default'; ?>" href="<?php echo add_query_arg(array('term' => 'gmedia_category'), $url); ?>"><?php _e('Categories', 'gmLang'); ?></a>
|
80 |
+
</div>
|
81 |
+
|
82 |
+
<?php if('gmedia_category' != $taxonomy){ ?>
|
83 |
+
<div class="btn-group">
|
84 |
+
<a class="btn btn-default" href="#"><?php _e('Action', 'gmLang'); ?></a>
|
85 |
+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
86 |
+
<span class="caret"></span>
|
87 |
+
<span class="sr-only"><?php _e('Toggle Dropdown', 'gmLang'); ?></span>
|
88 |
+
</button>
|
89 |
+
<?php
|
90 |
+
$rel_selected_show = 'rel-selected-show';
|
91 |
+
$rel_selected_hide = 'rel-selected-hide';
|
92 |
+
?>
|
93 |
+
<ul class="dropdown-menu" role="menu">
|
94 |
+
<li class="dropdown-header <?php echo $rel_selected_hide; ?>"><span><?php _e("Select items to see more actions", "gmLang"); ?></span></li>
|
95 |
+
<li class="<?php echo $rel_selected_show; ?>"><a href="<?php echo wp_nonce_url($gmCore->get_admin_url(array('delete' => 'selected'), array('filter')), 'gmedia_delete') ?>" class="gmedia-delete" data-confirm="<?php _e("You are about to permanently delete the selected items.\n\r'Cancel' to stop, 'OK' to delete.", "gmLang"); ?>"><?php _e('Delete Selected Items', 'gmLang'); ?></a></li>
|
96 |
+
<?php do_action('gmedia_term_action_list'); ?>
|
97 |
+
</ul>
|
98 |
+
</div>
|
99 |
+
|
100 |
+
<form class="btn-group" id="gm-selected-btn" name="gm-selected-form" action="<?php echo add_query_arg(array('term' => $taxonomy, 'filter' => 'selected'), $url); ?>" method="post">
|
101 |
+
<button type="submit" class="btn btn<?php echo ('selected' == $gmCore->_req('filter'))? '-success' : '-info' ?>"><?php printf(__('%s selected', 'gmLang'), '<span id="gm-selected-qty">' . count($gmProcessor->selected_items) . '</span>'); ?></button>
|
102 |
+
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown"><span class="caret"></span> <span class="sr-only"><?php _e('Toggle Dropdown', 'gmLang'); ?></span></button>
|
103 |
+
<input type="hidden" id="gm-selected" data-userid="<?php echo $user_ID; ?>" data-key="<?php echo $taxonomy; ?>" name="selected_items" value="<?php echo implode(',', $gmProcessor->selected_items); ?>"/>
|
104 |
+
<ul class="dropdown-menu" role="menu">
|
105 |
+
<li><a id="gm-selected-show" href="#show"><?php _e('Show only selected items', 'gmLang'); ?></a></li>
|
106 |
+
<li><a id="gm-selected-clear" href="#clear"><?php _e('Clear selected items', 'gmLang'); ?></a></li>
|
107 |
+
</ul>
|
108 |
+
</form>
|
109 |
+
<?php } ?>
|
110 |
+
|
111 |
+
</div>
|
112 |
+
</div>
|
113 |
+
|
114 |
+
|
115 |
+
<?php if('gmedia_album' == $taxonomy){ ?>
|
116 |
+
<form method="post" id="gmedia-edit-term" name="gmAddTerms" class="panel-body" style="padding-bottom:0; border-bottom:1px solid #ddd;">
|
117 |
+
<div class="row">
|
118 |
+
<div class="col-xs-6">
|
119 |
+
<div class="form-group">
|
120 |
+
<label><?php _e('Name', 'gmLang'); ?></label>
|
121 |
+
<input type="text" class="form-control input-sm" name="term[name]" placeholder="<?php _e('Album Name', 'gmLang'); ?>" required/>
|
122 |
+
</div>
|
123 |
+
<div class="form-group">
|
124 |
+
<label><?php _e('Description', 'gmLang'); ?></label>
|
125 |
+
<textarea class="form-control input-sm" style="height:53px;" rows="2" name="term[description]"></textarea>
|
126 |
+
</div>
|
127 |
+
</div>
|
128 |
+
<div class="col-xs-6">
|
129 |
+
<div class="form-group row">
|
130 |
+
<div class="col-xs-6">
|
131 |
+
<label><?php _e('Order gmedia', 'gmLang'); ?></label>
|
132 |
+
<select name="term[orderby]" class="form-control input-sm">
|
133 |
+
<option value="custom"><?php _e('user defined', 'gmLang'); ?></option>
|
134 |
+
<option selected="selected" value="ID"><?php _e('by ID', 'gmLang'); ?></option>
|
135 |
+
<option value="title"><?php _e('by title', 'gmLang'); ?></option>
|
136 |
+
<option value="date"><?php _e('by date', 'gmLang'); ?></option>
|
137 |
+
<option value="modified"><?php _e('by last modified date', 'gmLang'); ?></option>
|
138 |
+
<option value="rand"><?php _e('Random', 'gmLang'); ?></option>
|
139 |
+
</select>
|
140 |
+
</div>
|
141 |
+
<div class="col-xs-6">
|
142 |
+
<label><?php _e('Sort order', 'gmLang'); ?></label>
|
143 |
+
<select name="term[order]" class="form-control input-sm">
|
144 |
+
<option value="ASC"><?php _e('ASC', 'gmLang'); ?></option>
|
145 |
+
<option selected="selected" value="DESC"><?php _e('DESC', 'gmLang'); ?></option>
|
146 |
+
</select>
|
147 |
+
</div>
|
148 |
+
</div>
|
149 |
+
<div class="row">
|
150 |
+
<div class="form-group col-xs-6">
|
151 |
+
<label><?php _e('Status', 'gmLang'); ?></label>
|
152 |
+
<select name="term[status]" class="form-control input-sm">
|
153 |
+
<option selected="selected" value="public"><?php _e('Public', 'gmLang'); ?></option>
|
154 |
+
<option value="private"><?php _e('Private', 'gmLang'); ?></option>
|
155 |
+
<option value="draft"><?php _e('Draft', 'gmLang'); ?></option>
|
156 |
+
</select>
|
157 |
+
</div>
|
158 |
+
<div class="form-group col-xs-6">
|
159 |
+
<label> </label>
|
160 |
+
<?php
|
161 |
+
wp_original_referer_field(true, 'previous');
|
162 |
+
wp_nonce_field('GmediaTerms', 'term_save_wpnonce');
|
163 |
+
?>
|
164 |
+
<input type="hidden" name="term[taxonomy]" value="gmedia_album"/>
|
165 |
+
<button style="display:block" type="submit" class="btn btn-primary btn-sm" name="gmedia_album_save"><?php _e('Add New Album', 'gmLang'); ?></button>
|
166 |
+
</div>
|
167 |
+
</div>
|
168 |
+
</div>
|
169 |
+
</div>
|
170 |
+
</form>
|
171 |
+
<form class="list-group" id="gm-list-table" style="margin-bottom:4px;">
|
172 |
+
<?php
|
173 |
+
if(count($gmediaTerms)){
|
174 |
+
foreach($gmediaTerms as $item){
|
175 |
+
$termItems = array();
|
176 |
+
$per_page = 10;
|
177 |
+
if($item->count){
|
178 |
+
$args = array('no_found_rows' => true, 'per_page' => $per_page, 'album__in' => array($item->term_id));
|
179 |
+
$termItems = $gmDB->get_gmedias($args);
|
180 |
+
}
|
181 |
+
$is_selected = in_array($item->term_id, $gmProcessor->selected_items)? true : false;
|
182 |
+
?>
|
183 |
+
<div class="list-group-item term-list-item">
|
184 |
+
<div class="row cb_term-object">
|
185 |
+
<div class="term_id">#<?php echo $item->term_id; ?></div>
|
186 |
+
<div class="col-xs-5 term-label">
|
187 |
+
<div class="checkbox">
|
188 |
+
<input name="doaction[]" type="checkbox"<?php echo $is_selected? ' checked="checked"' : ''; ?> value="<?php echo $item->term_id; ?>"/>
|
189 |
+
<a href="<?php echo add_query_arg(array('edit_album' => $item->term_id), $url); ?>"><?php echo esc_html($item->name); ?></a>
|
190 |
+
<?php if($item->count){ ?>
|
191 |
+
<a href="<?php echo $gmCore->get_admin_url(array('page' => 'GrandMedia', 'alb' => $item->term_id), array(), true); ?>" class="badge pull-right"><?php echo $item->count; ?></a>
|
192 |
+
<?php } else{ ?>
|
193 |
+
<span class="badge pull-right"><?php echo $item->count; ?></span>
|
194 |
+
<?php } ?>
|
195 |
+
</div>
|
196 |
+
</div>
|
197 |
+
<div class="col-xs-7 term-images">
|
198 |
+
<?php if(!empty($termItems)){
|
199 |
+
foreach($termItems as $i){
|
200 |
+
?>
|
201 |
+
<img style="z-index:<?php echo $per_page--; ?>;" src="<?php echo $gmCore->gm_get_media_image($i, 'thumb', false); ?>" alt="<?php echo $i->ID; ?>" title="<?php echo esc_attr($i->title); ?>"/>
|
202 |
+
<?php
|
203 |
+
}
|
204 |
+
}
|
205 |
+
if(count($termItems) < $item->count){
|
206 |
+
echo '...';
|
207 |
+
}
|
208 |
+
?>
|
209 |
+
</div>
|
210 |
+
</div>
|
211 |
+
<?php if(!empty($item->description)){ ?>
|
212 |
+
<div class="term-description"><?php echo esc_html($item->description); ?></div>
|
213 |
+
<?php } ?>
|
214 |
+
</div>
|
215 |
+
<?php
|
216 |
+
}
|
217 |
+
} else{
|
218 |
+
?>
|
219 |
+
<div class="list-group-item">
|
220 |
+
<div class="well well-lg text-center">
|
221 |
+
<h4><?php _e('No items to show.', 'gmLang'); ?></h4>
|
222 |
+
</div>
|
223 |
+
</div>
|
224 |
+
<?php } ?>
|
225 |
+
<?php
|
226 |
+
wp_original_referer_field(true, 'previous');
|
227 |
+
wp_nonce_field('GmediaTerms');
|
228 |
+
?>
|
229 |
+
</form>
|
230 |
+
|
231 |
+
|
232 |
+
<?php } elseif('gmedia_tag' == $taxonomy){ ?>
|
233 |
+
<form method="post" id="gmedia-edit-term" name="gmAddTerms" class="panel-body" style="padding-bottom:0; border-bottom:1px solid #ddd;">
|
234 |
+
<div class="row">
|
235 |
+
<div class="form-group col-xs-9">
|
236 |
+
<label><?php _e('Tags', 'gmLang'); ?> <small class="text-muted">(<?php _e('you can type multiple tags separated by comma') ?>)</small></label>
|
237 |
+
<input type="text" class="form-control input-sm" name="term[name]" placeholder="<?php _e('Tag Names', 'gmLang'); ?>" required/>
|
238 |
+
</div>
|
239 |
+
<div class="col-xs-3" style="padding-top:24px;">
|
240 |
+
<?php
|
241 |
+
wp_original_referer_field(true, 'previous');
|
242 |
+
wp_nonce_field('GmediaTerms', 'term_save_wpnonce');
|
243 |
+
?>
|
244 |
+
<input type="hidden" name="term[taxonomy]" value="gmedia_tag"/>
|
245 |
+
<button type="submit" class="btn btn-primary btn-sm" name="gmedia_tag_add"><?php _e('Add New Tags', 'gmLang'); ?></button>
|
246 |
+
</div>
|
247 |
+
</div>
|
248 |
+
</form>
|
249 |
+
<form class="list-group" id="gm-list-table" style="margin-bottom:4px;">
|
250 |
+
<?php
|
251 |
+
if(count($gmediaTerms)){
|
252 |
+
foreach($gmediaTerms as $item){
|
253 |
+
$termItems = array();
|
254 |
+
$per_page = 5;
|
255 |
+
if($item->count){
|
256 |
+
$args = array('no_found_rows' => true, 'per_page' => $per_page, 'tag_id' => $item->term_id);
|
257 |
+
$termItems = $gmDB->get_gmedias($args);
|
258 |
+
}
|
259 |
+
$is_selected = in_array($item->term_id, $gmProcessor->selected_items)? true : false;
|
260 |
+
?>
|
261 |
+
<div class="list-group-item term-list-item">
|
262 |
+
<div class="row cb_term-object" id="tag_<?php echo $item->term_id; ?>">
|
263 |
+
<div class="term_id">#<?php echo $item->term_id; ?></div>
|
264 |
+
<div class="col-xs-5 term-label">
|
265 |
+
<div class="checkbox">
|
266 |
+
<input name="doaction[]" type="checkbox"<?php echo $is_selected? ' checked="checked"' : ''; ?> value="<?php echo $item->term_id; ?>"/>
|
267 |
+
<a class="edit_tag_link" href="#tag_<?php echo $item->term_id; ?>"><?php echo esc_html($item->name); ?></a>
|
268 |
+
<span class="edit_tag_form" style="display:none;"><input class="edit_tag_input" type="text" data-tag_id="<?php echo $item->term_id; ?>" name="gmedia_tag_name[<?php echo $item->term_id; ?>]" value="<?php echo esc_attr($item->name); ?>" placeholder="<?php echo esc_attr($item->name); ?>"/><a href="#tag_<?php echo $item->term_id; ?>" class="edit_tag_save btn btn-link glyphicon glyphicon-pencil"></a></span>
|
269 |
+
<?php if($item->count){ ?>
|
270 |
+
<a href="<?php echo $gmCore->get_admin_url(array('page' => 'GrandMedia', 'tag_id' => $item->term_id), array(), true); ?>" class="badge pull-right"><?php echo $item->count; ?></a>
|
271 |
+
<?php } else{ ?>
|
272 |
+
<span class="badge pull-right"><?php echo $item->count; ?></span>
|
273 |
+
<?php } ?>
|
274 |
+
</div>
|
275 |
+
</div>
|
276 |
+
<div class="col-xs-7 term-images">
|
277 |
+
<?php if(!empty($termItems)){
|
278 |
+
foreach($termItems as $i){
|
279 |
+
?>
|
280 |
+
<img style="z-index:<?php echo $per_page--; ?>;" src="<?php echo $gmCore->gm_get_media_image($i, 'thumb', false); ?>" alt="<?php echo $i->ID; ?>" title="<?php echo esc_attr($i->title); ?>"/>
|
281 |
+
<?php
|
282 |
+
}
|
283 |
+
}
|
284 |
+
if(count($termItems) < $item->count){
|
285 |
+
echo '...';
|
286 |
+
}
|
287 |
+
?>
|
288 |
+
</div>
|
289 |
+
</div>
|
290 |
+
</div>
|
291 |
+
<?php } ?>
|
292 |
+
<script type="text/javascript">
|
293 |
+
jQuery(function($){
|
294 |
+
$('#gm-list-table').data('edit',false);
|
295 |
+
$('input.edit_tag_input').keypress(function(e){
|
296 |
+
var charCode = e.charCode || e.keyCode || e.which;
|
297 |
+
if (charCode == 13) {
|
298 |
+
e.preventDefault();
|
299 |
+
$(this).next().click();
|
300 |
+
}
|
301 |
+
});
|
302 |
+
$('.edit_tag_link').click(function(e){
|
303 |
+
e.preventDefault();
|
304 |
+
var id = $(this).attr('href');
|
305 |
+
$(this).hide();
|
306 |
+
$(id).find('.edit_tag_form').show().find('input').focus();
|
307 |
+
$('#gm-list-table').data('edit',true);
|
308 |
+
});
|
309 |
+
$('.edit_tag_save').click(function(e){
|
310 |
+
var id = $(this).attr('href');
|
311 |
+
var inp = $(id).find('.edit_tag_form input');
|
312 |
+
var new_tag_name = $.trim(inp.val());
|
313 |
+
if(('' == new_tag_name) || $.isNumeric()){
|
314 |
+
inp.val(inp.attr('placeholder'));
|
315 |
+
$(id).find('.edit_tag_form').hide();
|
316 |
+
$(id).find('.edit_tag_link').show();
|
317 |
+
return;
|
318 |
+
}
|
319 |
+
var post_data = {
|
320 |
+
action: 'gmedia_tag_edit', tag_id: inp.data('tag_id'), tag_name: new_tag_name, _wpnonce: $('#_wpnonce').val()
|
321 |
+
};
|
322 |
+
$.post(ajaxurl, post_data, function(data, textStatus, jqXHR){
|
323 |
+
console.log(data);
|
324 |
+
//new_tag_name = new_tag_name.replace(/&/g, '&').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>');
|
325 |
+
inp.attr('placeholder', new_tag_name);
|
326 |
+
$(id).find('.edit_tag_form').hide();
|
327 |
+
$(id).find('.edit_tag_link').text(new_tag_name).show();
|
328 |
+
});
|
329 |
+
});
|
330 |
+
$('.edit_tag_input').blur(function(e){
|
331 |
+
var t = $(this);
|
332 |
+
var id = t.data('tag_id');
|
333 |
+
t.val(t.attr('placeholder'));
|
334 |
+
$('#tag_'+id).find('.edit_tag_form').hide();
|
335 |
+
$('#tag_'+id).find('.edit_tag_link').show();
|
336 |
+
});
|
337 |
+
});
|
338 |
+
</script>
|
339 |
+
<?php } else{
|
340 |
+
?>
|
341 |
+
<div class="list-group-item">
|
342 |
+
<div class="well well-lg text-center">
|
343 |
+
<h4><?php _e('No items to show.', 'gmLang'); ?></h4>
|
344 |
+
</div>
|
345 |
+
</div>
|
346 |
+
<?php } ?>
|
347 |
+
<?php
|
348 |
+
wp_original_referer_field(true, 'previous');
|
349 |
+
wp_nonce_field('GmediaTerms');
|
350 |
+
?>
|
351 |
+
</form>
|
352 |
+
|
353 |
+
|
354 |
+
<?php } elseif('gmedia_category' == $taxonomy){ ?>
|
355 |
+
<div class="panel-body"></div>
|
356 |
+
<div class="list-group" id="gm-list-table" style="margin-bottom:4px;">
|
357 |
+
<?php
|
358 |
+
$gmediaCategories = $gmGallery->options['taxonomies']['gmedia_category'];
|
359 |
+
foreach($gmediaTerms as $item){
|
360 |
+
$cat[$item->name] = $item;
|
361 |
+
}
|
362 |
+
unset($gmediaTerms);
|
363 |
+
|
364 |
+
foreach($gmediaCategories as $name => $title){
|
365 |
+
$termItems = array();
|
366 |
+
$per_page = 10;
|
367 |
+
if(isset($cat[$name])){
|
368 |
+
$count = $cat[$name]->count;
|
369 |
+
$term_id = $cat[$name]->term_id;
|
370 |
+
if($count){
|
371 |
+
$args = array('no_found_rows' => true, 'per_page' => $per_page, 'category__in' => array($term_id));
|
372 |
+
$termItems = $gmDB->get_gmedias($args);
|
373 |
+
}
|
374 |
+
} else {
|
375 |
+
$count = 0;
|
376 |
+
$term_id = '##';
|
377 |
+
}
|
378 |
+
?>
|
379 |
+
<div class="list-group-item term-list-item">
|
380 |
+
<div class="row cb_term-object">
|
381 |
+
<div class="term_id">#<?php echo $term_id; ?></div>
|
382 |
+
<div class="col-xs-5" style="padding-top:10px; padding-bottom:10px;">
|
383 |
+
<?php echo esc_html($title); ?>
|
384 |
+
<?php if($count){ ?>
|
385 |
+
<a href="<?php echo $gmCore->get_admin_url(array('page' => 'GrandMedia', 'cat' => $term_id), array(), true); ?>" class="badge pull-right"><?php echo $count; ?></a>
|
386 |
+
<?php } else{ ?>
|
387 |
+
<span class="badge pull-right"><?php echo $count; ?></span>
|
388 |
+
<?php } ?>
|
389 |
+
</div>
|
390 |
+
<div class="col-xs-7 term-images">
|
391 |
+
<?php if(!empty($termItems)){
|
392 |
+
foreach($termItems as $i){
|
393 |
+
?>
|
394 |
+
<img style="z-index:<?php echo $per_page--; ?>;" src="<?php echo $gmCore->gm_get_media_image($i, 'thumb', false); ?>" alt="<?php echo $i->ID; ?>" title="<?php echo esc_attr($i->title); ?>"/>
|
395 |
+
<?php
|
396 |
+
}
|
397 |
+
}
|
398 |
+
if(count($termItems) < $count){
|
399 |
+
echo '...';
|
400 |
+
}
|
401 |
+
?>
|
402 |
+
</div>
|
403 |
+
</div>
|
404 |
+
</div>
|
405 |
+
<?php } ?>
|
406 |
+
</div>
|
407 |
+
<?php } ?>
|
408 |
+
|
409 |
+
</div>
|
410 |
+
|
411 |
+
<?php
|
412 |
+
}
|
413 |
+
|
414 |
+
|
415 |
+
/**
|
416 |
+
* gmediaAlbumEdit()
|
417 |
+
*
|
418 |
+
* @return mixed content
|
419 |
+
*/
|
420 |
+
function gmediaAlbumEdit(){
|
421 |
+
global $gmDB, $gmCore, $gmGallery, $gmProcessor;
|
422 |
+
|
423 |
+
$url = add_query_arg(array('page' => $gmProcessor->page), admin_url('admin.php'));
|
424 |
+
|
425 |
+
$taxonomy = 'gmedia_album';
|
426 |
+
$term_id = $gmCore->_get('edit_album');
|
427 |
+
|
428 |
+
$term = $gmDB->get_term($term_id, $taxonomy);
|
429 |
+
|
430 |
+
if(!empty($term) && !is_wp_error($term)){
|
431 |
+
|
432 |
+
$term_meta = $gmDB->get_metadata('gmedia_term', $term->term_id);
|
433 |
+
$term_meta = array_map('reset', $term_meta);
|
434 |
+
$term_meta = array_merge( array('orderby' => 'ID', 'order' => 'DESC'), $term_meta);
|
435 |
+
$per_page = 30;
|
436 |
+
$pager = '';
|
437 |
+
$mousesort = ('drag-n-drop' === $gmCore->_get('sort'))? true : false;
|
438 |
+
|
439 |
+
$termItems = array();
|
440 |
+
if($term->count){
|
441 |
+
$args = array('album__in' => $term->term_id, 'orderby' => $term_meta['orderby'], 'order' => $term_meta['order']);
|
442 |
+
if($mousesort){
|
443 |
+
$args = array_merge($args, array('nopaging' => 1));
|
444 |
+
} else{
|
445 |
+
$args = array_merge($args, array('per_page' => $per_page, 'page' => $gmCore->_get('pager', 1)));
|
446 |
+
}
|
447 |
+
$termItems = $gmDB->get_gmedias($args);
|
448 |
+
|
449 |
+
if(!$mousesort){
|
450 |
+
$pager = $gmDB->query_pager();
|
451 |
+
}
|
452 |
+
}
|
453 |
+
|
454 |
+
?>
|
455 |
+
<div class="panel panel-default">
|
456 |
+
<div class="panel-heading clearfix">
|
457 |
+
<div class="btn-toolbar pull-left">
|
458 |
+
<div class="btn-group" style="margin-right:20px;">
|
459 |
+
<a class="btn btn-primary active" href="<?php echo add_query_arg(array('term' => 'gmedia_album'), $url); ?>"><?php _e('Albums', 'gmLang'); ?></a>
|
460 |
+
<a class="btn btn-default" href="<?php echo add_query_arg(array('term' => 'gmedia_tag'), $url); ?>"><?php _e('Tags', 'gmLang'); ?></a>
|
461 |
+
<a class="btn btn-default" href="<?php echo add_query_arg(array('term' => 'gmedia_category'), $url); ?>"><?php _e('Categories', 'gmLang'); ?></a>
|
462 |
+
</div>
|
463 |
+
|
464 |
+
<div class="btn-group">
|
465 |
+
<a class="btn btn-default" href="#"><?php _e('Action', 'gmLang'); ?></a>
|
466 |
+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
467 |
+
<span class="caret"></span>
|
468 |
+
<span class="sr-only"><?php _e('Toggle Dropdown', 'gmLang'); ?></span>
|
469 |
+
</button>
|
470 |
+
<ul class="dropdown-menu" role="menu">
|
471 |
+
<?php if($mousesort){ ?>
|
472 |
+
<li><a href="<?php echo $gmCore->get_admin_url(array(), array('sort')); ?>"><?php _e('Disable Drag and Drop Sorting', 'gmLang'); ?></a></li>
|
473 |
+
<?php } else { ?>
|
474 |
+
<li><a href="<?php echo $gmCore->get_admin_url(array('sort' => 'drag-n-drop'), array('pager')); ?>"><?php _e('Enable Drag and Drop Sorting', 'gmLang'); ?></a></li>
|
475 |
+
<?php } ?>
|
476 |
+
<li><a href="<?php echo add_query_arg(array('page' => 'GrandMedia', 'alb' => $term->term_id), admin_url('admin.php')); ?>"><?php _e('Show Album in Gmedia Library', 'gmLang'); ?></a></li>
|
477 |
+
</ul>
|
478 |
+
</div>
|
479 |
+
</div>
|
480 |
+
|
481 |
+
<?php echo $pager; ?>
|
482 |
+
|
483 |
+
</div>
|
484 |
+
|
485 |
+
<form method="post" id="gmedia-edit-term" name="gmEditTerm" class="panel-body">
|
486 |
+
<h4 style="margin-top:0;"><?php _e('Edit Album'); ?>: <em><?php echo esc_html($term->name); ?></em></h4>
|
487 |
+
<div class="row" style="border-bottom:1px solid #ddd; margin-bottom:15px;">
|
488 |
+
<div class="col-xs-6">
|
489 |
+
<div class="form-group">
|
490 |
+
<label><?php _e('Name', 'gmLang'); ?></label>
|
491 |
+
<input type="text" class="form-control input-sm" name="term[name]" value="<?php echo esc_attr($term->name); ?>" placeholder="<?php _e('Album Name', 'gmLang'); ?>" required/>
|
492 |
+
</div>
|
493 |
+
<div class="form-group">
|
494 |
+
<label><?php _e('Description', 'gmLang'); ?></label>
|
495 |
+
<textarea class="form-control input-sm" style="height:53px;" rows="2" name="term[description]"><?php echo $term->description; ?></textarea>
|
496 |
+
</div>
|
497 |
+
</div>
|
498 |
+
<div class="col-xs-6">
|
499 |
+
<div class="form-group row">
|
500 |
+
<div class="col-xs-6">
|
501 |
+
<label><?php _e('Order gmedia', 'gmLang'); ?></label>
|
502 |
+
<select name="term[orderby]" class="form-control input-sm">
|
503 |
+
<option value="custom"<?php selected($term_meta['orderby'], 'custom'); ?>><?php _e('user defined', 'gmLang'); ?></option>
|
504 |
+
<option value="ID"<?php selected($term_meta['orderby'], 'ID'); ?>><?php _e('by ID', 'gmLang'); ?></option>
|
505 |
+
<option value="title"<?php selected($term_meta['orderby'], 'title'); ?>><?php _e('by title', 'gmLang'); ?></option>
|
506 |
+
<option value="date"<?php selected($term_meta['orderby'], 'date'); ?>><?php _e('by date', 'gmLang'); ?></option>
|
507 |
+
<option value="modified"<?php selected($term_meta['orderby'], 'modified'); ?>><?php _e('by last modified date', 'gmLang'); ?></option>
|
508 |
+
<option value="rand"<?php selected($term_meta['orderby'], 'rand'); ?>><?php _e('Random', 'gmLang'); ?></option>
|
509 |
+
</select>
|
510 |
+
</div>
|
511 |
+
<div class="col-xs-6">
|
512 |
+
<label><?php _e('Sort order', 'gmLang'); ?></label>
|
513 |
+
<select name="term[order]" class="form-control input-sm">
|
514 |
+
<option value="ASC"<?php selected($term_meta['order'], 'ASC'); ?>><?php _e('ASC', 'gmLang'); ?></option>
|
515 |
+
<option value="DESC"<?php selected($term_meta['order'], 'DESC'); ?>><?php _e('DESC', 'gmLang'); ?></option>
|
516 |
+
</select>
|
517 |
+
</div>
|
518 |
+
</div>
|
519 |
+
<div class="row">
|
520 |
+
<div class="form-group col-xs-6">
|
521 |
+
<label><?php _e('Status', 'gmLang'); ?></label>
|
522 |
+
<select name="term[status]" class="form-control input-sm">
|
523 |
+
<option value="public"<?php selected($term->status, 'public'); ?>><?php _e('Public', 'gmLang'); ?></option>
|
524 |
+
<?php /* ?>
|
525 |
+
<option value="private"<?php selected($term->status, 'private'); ?>><?php _e('Private', 'gmLang'); ?></option>
|
526 |
+
<option value="draft"<?php selected($term->status, 'draft'); ?>><?php _e('Draft', 'gmLang'); ?></option>
|
527 |
+
<?php */ ?>
|
528 |
+
</select>
|
529 |
+
</div>
|
530 |
+
<div class="form-group col-xs-6">
|
531 |
+
<label><?php echo __('ID', 'gmLang').": {$term->term_id}"; ?></label>
|
532 |
+
<?php wp_nonce_field('GmediaTerms', 'term_save_wpnonce'); ?>
|
533 |
+
<input type="hidden" name="term[term_id]" value="<?php echo $term->term_id; ?>"/>
|
534 |
+
<input type="hidden" name="term[taxonomy]" value="gmedia_album"/>
|
535 |
+
<button style="display:block" type="submit" class="btn btn-primary btn-sm" name="gmedia_album_save"><?php _e('Update', 'gmLang'); ?></button>
|
536 |
+
</div>
|
537 |
+
</div>
|
538 |
+
</div>
|
539 |
+
</div>
|
540 |
+
|
541 |
+
<div class="termItems clearfix" id="termItems">
|
542 |
+
<?php if(!empty($termItems)){
|
543 |
+
foreach($termItems as $item){ ?>
|
544 |
+
<div class="gm-img-thumbnail" data-gmid="<?php echo $item->ID; ?>">
|
545 |
+
<img style="height:80px; width:auto;" src="<?php echo $gmCore->gm_get_media_image($item, 'thumb', false); ?>" alt="<?php echo $item->ID; ?>" title="<?php echo esc_attr($item->title); ?>"/>
|
546 |
+
<input type="text" name="term[gmedia_ids][<?php echo $item->ID; ?>]" value="<?php echo isset($item->gmedia_order)? $item->gmedia_order : '0'; ?>"/>
|
547 |
+
<span class="label label-default">ID: <?php echo $item->ID; ?></span>
|
548 |
+
</div>
|
549 |
+
<?php }
|
550 |
+
} ?>
|
551 |
+
|
552 |
+
</div>
|
553 |
+
<script type="text/javascript">
|
554 |
+
jQuery(function($){
|
555 |
+
var inputs = $('#gmedia-edit-term').find('input, select').keypress(function(e){
|
556 |
+
var charCode = e.charCode || e.keyCode || e.which;
|
557 |
+
if (charCode == 13) {
|
558 |
+
e.preventDefault();
|
559 |
+
var nextInput = inputs.get(inputs.index(this) + 1);
|
560 |
+
if (nextInput) {
|
561 |
+
nextInput.focus();
|
562 |
+
} else{
|
563 |
+
$(this).blur();
|
564 |
+
}
|
565 |
+
}
|
566 |
+
});
|
567 |
+
|
568 |
+
var img_order_asc = <?php echo ('ASC' == $term_meta['order'])? 'true' : 'false'; ?>;
|
569 |
+
var sortdiv = $('#termItems');
|
570 |
+
var items = $('.gm-img-thumbnail', sortdiv);
|
571 |
+
|
572 |
+
<?php if($mousesort){ ?>
|
573 |
+
sortdiv.sortable({
|
574 |
+
items: '.gm-img-thumbnail',
|
575 |
+
handle: 'img',
|
576 |
+
placeholder: 'gm-img-thumbnail ui-highlight-placeholder',
|
577 |
+
forcePlaceholderSize: true,
|
578 |
+
//revert: true,
|
579 |
+
stop: function( event, ui ) {
|
580 |
+
items = $('.gm-img-thumbnail',this);
|
581 |
+
var qty = items.length - 1;
|
582 |
+
items.each(function(i){
|
583 |
+
var order = img_order_asc? i : (qty - i);
|
584 |
+
$(this).find('input').val(order);
|
585 |
+
});
|
586 |
+
}
|
587 |
+
});
|
588 |
+
|
589 |
+
<?php } ?>
|
590 |
+
|
591 |
+
$('input',items).on('change',function(){
|
592 |
+
sortdiv.css({height:sortdiv.height()});
|
593 |
+
var items = $('.gm-img-thumbnail', sortdiv);
|
594 |
+
|
595 |
+
var new_order = $.isNumeric($(this).val()) ? parseInt($(this).val()) : -1,
|
596 |
+
new_index;
|
597 |
+
$(this).val(new_order).closest('.gm-img-thumbnail').css({zIndex:1000});
|
598 |
+
|
599 |
+
var ipos = [];
|
600 |
+
items.each(function(i,el){
|
601 |
+
var pos = $(el).position();
|
602 |
+
$.data(el,'pos',pos);
|
603 |
+
ipos[i] = pos;
|
604 |
+
});
|
605 |
+
|
606 |
+
items.tsort('input',{useVal:true, order:(img_order_asc? 'asc' : 'desc')}).each(function(i,el){
|
607 |
+
var from = $.data(el,'pos');
|
608 |
+
var to = ipos[i];
|
609 |
+
$(el).css({position:'absolute',top:from.top,left:from.left}).animate({top:to.top,left:to.left},500);
|
610 |
+
}).promise().done(function(){
|
611 |
+
items.removeAttr('style');
|
612 |
+
sortdiv.removeAttr('style');
|
613 |
+
});
|
614 |
+
|
615 |
+
$(this).val( ((new_order < 0)? 0 : new_order)).focus();
|
616 |
+
});
|
617 |
+
});
|
618 |
+
</script>
|
619 |
+
</form>
|
620 |
+
<div class="panel-body"><?php echo $pager; ?><div class="well well-sm pull-left" style="margin:0;"><?php printf(__('Total items: %d'), $term->count); ?></div></div>
|
621 |
+
</div>
|
622 |
+
<?php
|
623 |
+
} else{
|
624 |
+
|
625 |
+
}
|
626 |
+
}
|
admin/upload.php
CHANGED
@@ -1,247 +1,284 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* upload.php
|
4 |
-
*
|
5 |
* Copyright 2009, Moxiecode Systems AB
|
6 |
* Released under GPL License.
|
7 |
-
*
|
8 |
* License: http://www.plupload.com/license
|
9 |
* Contributing: http://www.plupload.com/contributing
|
10 |
*/
|
11 |
|
12 |
-
ini_set(
|
13 |
-
ini_set(
|
14 |
|
15 |
-
preg_match(
|
16 |
-
require_once(
|
17 |
|
18 |
/** WordPress Image Administration API */
|
19 |
-
require_once(
|
20 |
|
21 |
// HTTP headers for no cache etc
|
22 |
nocache_headers();
|
23 |
|
24 |
-
if
|
25 |
-
wp_die(
|
|
|
26 |
|
27 |
-
check_admin_referer(
|
28 |
|
29 |
// 5 minutes execution time
|
30 |
-
@set_time_limit(
|
31 |
|
32 |
-
//
|
33 |
-
|
34 |
|
35 |
$return = '';
|
36 |
// Get parameters
|
37 |
-
if
|
38 |
-
$return = json_encode(
|
39 |
-
die(
|
40 |
}
|
41 |
|
42 |
-
global $
|
43 |
-
$
|
44 |
-
$
|
45 |
|
46 |
// Look for the content type header
|
47 |
$contentType = '';
|
48 |
-
if
|
49 |
$contentType = $_SERVER["HTTP_CONTENT_TYPE"];
|
|
|
50 |
|
51 |
-
if
|
52 |
$contentType = $_SERVER["CONTENT_TYPE"];
|
|
|
53 |
|
54 |
// Handle non multipart uploads older WebKit versions didn't support multipart in HTML5
|
55 |
-
if
|
56 |
-
if
|
57 |
$file_tmp = $_FILES['file']['tmp_name'];
|
|
|
|
|
|
|
58 |
}
|
59 |
-
|
60 |
-
$return = json_encode( array( "error" => array( "code" => 103, "message" => __( "Failed to move uploaded file.", 'gmLang' ) ), "id" => $fileName ) );
|
61 |
-
die( $return );
|
62 |
-
}
|
63 |
-
}
|
64 |
-
else {
|
65 |
$file_tmp = "php://input";
|
66 |
}
|
67 |
|
68 |
-
|
69 |
|
70 |
/** Write the file
|
71 |
*
|
72 |
* @param string $file_tmp
|
73 |
-
* @param array $
|
74 |
-
* @param string $
|
75 |
*/
|
76 |
-
function
|
77 |
-
global $
|
78 |
-
$
|
79 |
-
$
|
80 |
-
$
|
81 |
-
$
|
82 |
-
$chunk = isset( $_REQUEST["chunk"] ) ? intval( $_REQUEST["chunk"] ) : 0;
|
83 |
-
$chunks = isset( $_REQUEST["chunks"] ) ? intval( $_REQUEST["chunks"] ) : 0;
|
84 |
-
$targetDir = $uploads['path'] . $gmOptions['folder'][$targetFile['folder']];
|
85 |
-
$url = $uploads['url'] . $gmOptions['folder'][$targetFile['folder']] . '/' . $targetFile['name'];
|
86 |
-
$file = $targetDir . '/' . $targetFile['name'];
|
87 |
|
88 |
// try to make grand-media dir if not exists
|
89 |
-
if
|
90 |
-
$return = json_encode(
|
91 |
-
die(
|
92 |
}
|
93 |
// Check if grand-media dir is writable
|
94 |
-
if
|
95 |
-
@chmod(
|
96 |
-
if
|
97 |
-
$return = json_encode(
|
98 |
-
die(
|
99 |
}
|
100 |
}
|
101 |
// Remove old temp files
|
102 |
-
if
|
103 |
-
while
|
104 |
-
$tmpfilePath = $
|
105 |
|
106 |
// Remove temp file if it is older than the max age and is not the current file
|
107 |
-
if
|
108 |
-
@unlink(
|
109 |
}
|
110 |
}
|
111 |
|
112 |
-
closedir(
|
113 |
-
}
|
114 |
-
|
115 |
-
$return
|
116 |
-
die( $return );
|
117 |
}
|
118 |
|
119 |
// Open temp file
|
120 |
-
$out = fopen(
|
121 |
-
if
|
122 |
// Read binary input stream and append it to temp file
|
123 |
-
$in = fopen(
|
124 |
|
125 |
-
if
|
126 |
-
while
|
127 |
-
fwrite(
|
128 |
}
|
|
|
|
|
|
|
129 |
}
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
133 |
}
|
134 |
-
|
135 |
-
|
136 |
-
if ( strpos( $contentType, "multipart" ) !== false ) {
|
137 |
-
@unlink( $file_tmp );
|
138 |
-
}
|
139 |
-
if ( ! $chunks || $chunk == ( $chunks - 1 ) ) {
|
140 |
// Strip the temp .part suffix off
|
141 |
-
rename(
|
142 |
|
143 |
-
$
|
144 |
|
145 |
$size = false;
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
if
|
155 |
-
@chmod(
|
156 |
-
if
|
157 |
-
@unlink(
|
158 |
-
$return = json_encode(
|
159 |
-
die(
|
160 |
}
|
161 |
}
|
162 |
-
if(
|
163 |
-
$
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
|
|
|
|
|
|
|
|
168 |
}
|
169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
|
|
176 |
}
|
177 |
|
178 |
-
$
|
179 |
-
$saved = $editor->save( $dest_file );
|
180 |
|
181 |
-
if
|
182 |
-
|
183 |
-
|
184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
}
|
186 |
-
|
187 |
-
|
188 |
-
$
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
}
|
|
|
|
|
194 |
}
|
195 |
-
|
196 |
-
else
|
197 |
-
@unlink(
|
198 |
-
$return = json_encode(
|
199 |
-
die(
|
200 |
}
|
201 |
}
|
202 |
|
203 |
// Write media data to DB
|
204 |
-
$
|
|
|
205 |
// TODO Option to set title empty string or from metadata or from filename or both
|
206 |
-
$title = $
|
207 |
// use image exif/iptc data for title and caption defaults if possible
|
208 |
-
if
|
209 |
-
$image_meta = @wp_read_image_metadata(
|
210 |
-
if
|
211 |
-
$
|
212 |
-
|
|
|
213 |
$title = $image_meta['title'];
|
|
|
214 |
}
|
215 |
|
216 |
$post_data = array();
|
217 |
-
if
|
218 |
-
parse_str(
|
|
|
|
|
|
|
|
|
|
|
219 |
|
220 |
// Construct the media array
|
221 |
-
$media_data = array(
|
222 |
-
|
223 |
-
'gmuid' => $targetFile['name'],
|
224 |
-
'title' => $title,
|
225 |
-
'description' => $content
|
226 |
-
);
|
227 |
-
$media_data = wp_parse_args( $media_data, $post_data );
|
228 |
|
|
|
229 |
// Save the data
|
230 |
-
$id = $
|
231 |
-
$
|
232 |
|
233 |
-
$return = json_encode(
|
234 |
-
die(
|
235 |
-
}
|
236 |
-
|
237 |
-
$return
|
238 |
-
die( $return );
|
239 |
}
|
240 |
-
}
|
241 |
-
|
242 |
-
$return
|
243 |
-
die( $return );
|
244 |
}
|
245 |
}
|
246 |
|
247 |
-
die(
|
1 |
<?php
|
2 |
/**
|
3 |
* upload.php
|
|
|
4 |
* Copyright 2009, Moxiecode Systems AB
|
5 |
* Released under GPL License.
|
|
|
6 |
* License: http://www.plupload.com/license
|
7 |
* Contributing: http://www.plupload.com/contributing
|
8 |
*/
|
9 |
|
10 |
+
ini_set('display_errors', 0);
|
11 |
+
ini_set('error_reporting', 0);
|
12 |
|
13 |
+
preg_match('|^(.*?/)(grand-media)/|i', str_replace('\\', '/', __FILE__), $_m);
|
14 |
+
require_once($_m[1] . 'grand-media/config.php');
|
15 |
|
16 |
/** WordPress Image Administration API */
|
17 |
+
require_once(ABSPATH . 'wp-admin/includes/image.php');
|
18 |
|
19 |
// HTTP headers for no cache etc
|
20 |
nocache_headers();
|
21 |
|
22 |
+
if(!current_user_can('upload_files')){
|
23 |
+
wp_die(__('You do not have permission to upload files.'));
|
24 |
+
}
|
25 |
|
26 |
+
check_admin_referer('grandMedia');
|
27 |
|
28 |
// 5 minutes execution time
|
29 |
+
@set_time_limit(5 * 60);
|
30 |
|
31 |
+
// fake upload time
|
32 |
+
usleep(10);
|
33 |
|
34 |
$return = '';
|
35 |
// Get parameters
|
36 |
+
if(!isset($_REQUEST["name"])){
|
37 |
+
$return = json_encode(array("error" => array("code" => 100, "message" => __("No file name.", 'gmLang')), "id" => $_REQUEST["name"]));
|
38 |
+
die($return);
|
39 |
}
|
40 |
|
41 |
+
global $gmCore;
|
42 |
+
$filename = $_REQUEST["name"];
|
43 |
+
$fileinfo = $gmCore->fileinfo($filename);
|
44 |
|
45 |
// Look for the content type header
|
46 |
$contentType = '';
|
47 |
+
if(isset($_SERVER["HTTP_CONTENT_TYPE"])){
|
48 |
$contentType = $_SERVER["HTTP_CONTENT_TYPE"];
|
49 |
+
}
|
50 |
|
51 |
+
if(isset($_SERVER["CONTENT_TYPE"])){
|
52 |
$contentType = $_SERVER["CONTENT_TYPE"];
|
53 |
+
}
|
54 |
|
55 |
// Handle non multipart uploads older WebKit versions didn't support multipart in HTML5
|
56 |
+
if(strpos($contentType, "multipart") !== false){
|
57 |
+
if(isset($_FILES['file']['tmp_name']) && is_uploaded_file($_FILES['file']['tmp_name'])){
|
58 |
$file_tmp = $_FILES['file']['tmp_name'];
|
59 |
+
} else{
|
60 |
+
$return = json_encode(array("error" => array("code" => 103, "message" => __("Failed to move uploaded file.", 'gmLang')), "id" => $filename));
|
61 |
+
die($return);
|
62 |
}
|
63 |
+
} else{
|
|
|
|
|
|
|
|
|
|
|
64 |
$file_tmp = "php://input";
|
65 |
}
|
66 |
|
67 |
+
gmedia_upload_handler($file_tmp, $fileinfo, $contentType);
|
68 |
|
69 |
/** Write the file
|
70 |
*
|
71 |
* @param string $file_tmp
|
72 |
+
* @param array $fileinfo
|
73 |
+
* @param string $content_type
|
74 |
*/
|
75 |
+
function gmedia_upload_handler($file_tmp, $fileinfo, $content_type){
|
76 |
+
global $gmGallery, $gmCore;
|
77 |
+
$cleanup_dir = true; // Remove old files
|
78 |
+
$file_age = 5 * 3600; // Temp file age in seconds
|
79 |
+
$chunk = (int) $gmCore->_req('chunk', 0);
|
80 |
+
$chunks = (int) $gmCore->_req('chunks', 0);
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
// try to make grand-media dir if not exists
|
83 |
+
if(!wp_mkdir_p($fileinfo['dirpath'])){
|
84 |
+
$return = json_encode(array("error" => array("code" => 100, "message" => sprintf(__('Unable to create directory %s. Is its parent directory writable by the server?', 'gmLang'), $fileinfo['dirpath'])), "id" => $fileinfo['basename']));
|
85 |
+
die($return);
|
86 |
}
|
87 |
// Check if grand-media dir is writable
|
88 |
+
if(!is_writable($fileinfo['dirpath'])){
|
89 |
+
@chmod($fileinfo['dirpath'], 0755);
|
90 |
+
if(!is_writable($fileinfo['dirpath'])){
|
91 |
+
$return = json_encode(array("error" => array("code" => 100, "message" => sprintf(__('Directory %s or its subfolders are not writable by the server.', 'gmLang'), dirname($fileinfo['dirpath']))), "id" => $fileinfo['basename']));
|
92 |
+
die($return);
|
93 |
}
|
94 |
}
|
95 |
// Remove old temp files
|
96 |
+
if($cleanup_dir && is_dir($fileinfo['dirpath']) && ($_dir = opendir($fileinfo['dirpath']))){
|
97 |
+
while(($_file = readdir($_dir)) !== false){
|
98 |
+
$tmpfilePath = $fileinfo['dirpath'] . DIRECTORY_SEPARATOR . $_file;
|
99 |
|
100 |
// Remove temp file if it is older than the max age and is not the current file
|
101 |
+
if(preg_match('/\.part$/', $_file) && (filemtime($tmpfilePath) < time() - $file_age) && ($tmpfilePath != $fileinfo['filepath'] . '.part')){
|
102 |
+
@unlink($tmpfilePath);
|
103 |
}
|
104 |
}
|
105 |
|
106 |
+
closedir($_dir);
|
107 |
+
} else{
|
108 |
+
$return = json_encode(array("error" => array("code" => 100, "message" => sprintf(__('Failed to open directory: %s', 'gmLang'), $fileinfo['dirpath'])), "id" => $fileinfo['basename']));
|
109 |
+
die($return);
|
|
|
110 |
}
|
111 |
|
112 |
// Open temp file
|
113 |
+
$out = fopen($fileinfo['filepath'] . '.part', $chunk == 0? "wb" : "ab");
|
114 |
+
if($out){
|
115 |
// Read binary input stream and append it to temp file
|
116 |
+
$in = fopen($file_tmp, "rb");
|
117 |
|
118 |
+
if($in){
|
119 |
+
while($buff = fread($in, 4096)){
|
120 |
+
fwrite($out, $buff);
|
121 |
}
|
122 |
+
} else{
|
123 |
+
$return = json_encode(array("error" => array("code" => 101, "message" => __("Failed to open input stream.", 'gmLang')), "id" => $fileinfo['basename']));
|
124 |
+
die($return);
|
125 |
}
|
126 |
+
fclose($in);
|
127 |
+
fclose($out);
|
128 |
+
if(strpos($content_type, "multipart") !== false){
|
129 |
+
@unlink($file_tmp);
|
130 |
}
|
131 |
+
if(!$chunks || $chunk == ($chunks - 1)){
|
132 |
+
sleep(1);
|
|
|
|
|
|
|
|
|
133 |
// Strip the temp .part suffix off
|
134 |
+
rename($fileinfo['filepath'] . '.part', $fileinfo['filepath']);
|
135 |
|
136 |
+
$gmCore->file_chmod($fileinfo['filepath']);
|
137 |
|
138 |
$size = false;
|
139 |
+
$is_webimage = false;
|
140 |
+
if('image' == $fileinfo['dirname']){
|
141 |
+
$size = @getimagesize($fileinfo['filepath']);
|
142 |
+
if($size && file_is_displayable_image($fileinfo['filepath'])){
|
143 |
+
if(!wp_mkdir_p($fileinfo['dirpath_thumb'])){
|
144 |
+
$return = json_encode(array("error" => array("code" => 100, "message" => sprintf(__('Unable to create directory %s. Is its parent directory writable by the server?', 'gmLang'), $fileinfo['dirpath_thumb'])), "id" => $fileinfo['basename']));
|
145 |
+
die($return);
|
146 |
+
}
|
147 |
+
if(!is_writable($fileinfo['dirpath_thumb'])){
|
148 |
+
@chmod($fileinfo['dirpath_thumb'], 0755);
|
149 |
+
if(!is_writable($fileinfo['dirpath_thumb'])){
|
150 |
+
@unlink($fileinfo['filepath']);
|
151 |
+
$return = json_encode(array("error" => array("code" => 100, "message" => sprintf(__('Directory %s is not writable by the server.', 'gmLang'), $fileinfo['dirpath_thumb'])), "id" => $fileinfo['basename']));
|
152 |
+
die($return);
|
153 |
}
|
154 |
}
|
155 |
+
if(!wp_mkdir_p($fileinfo['dirpath_original'])){
|
156 |
+
$return = json_encode(array("error" => array("code" => 100, "message" => sprintf(__('Unable to create directory %s. Is its parent directory writable by the server?', 'gmLang'), $fileinfo['dirpath_original'])), "id" => $fileinfo['basename']));
|
157 |
+
die($return);
|
158 |
+
}
|
159 |
+
if(!is_writable($fileinfo['dirpath_original'])){
|
160 |
+
@chmod($fileinfo['dirpath_original'], 0755);
|
161 |
+
if(!is_writable($fileinfo['dirpath_original'])){
|
162 |
+
@unlink($fileinfo['filepath']);
|
163 |
+
$return = json_encode(array("error" => array("code" => 100, "message" => sprintf(__('Directory %s is not writable by the server.', 'gmLang'), $fileinfo['dirpath_original'])), "id" => $fileinfo['basename']));
|
164 |
+
die($return);
|
165 |
}
|
166 |
+
}
|
167 |
+
|
168 |
+
// Optimized image
|
169 |
+
$webimg = $gmGallery->options['image'];
|
170 |
+
$thumbimg = $gmGallery->options['thumb'];
|
171 |
+
|
172 |
+
$webimg['resize'] = (($webimg['width'] < $size[0]) || ($webimg['height'] < $size[1]))? true : false;
|
173 |
+
$thumbimg['resize'] = (($thumbimg['width'] < $size[0]) || ($thumbimg['height'] < $size[1]))? true : false;
|
174 |
+
|
175 |
+
if($webimg['resize']){
|
176 |
+
rename($fileinfo['filepath'], $fileinfo['filepath_original']);
|
177 |
+
} else{
|
178 |
+
copy($fileinfo['filepath'], $fileinfo['filepath_original']);
|
179 |
+
}
|
180 |
|
181 |
+
if($webimg['resize'] || $thumbimg['resize']){
|
182 |
+
$editor = wp_get_image_editor($fileinfo['filepath_original']);
|
183 |
+
if(is_wp_error($editor)){
|
184 |
+
@unlink($fileinfo['filepath_original']);
|
185 |
+
$return = json_encode(array("error" => array("code" => $editor->get_error_code(), "message" => $editor->get_error_message()), "id" => $fileinfo['basename'], "tip" => 'wp_get_image_editor'));
|
186 |
+
die($return);
|
187 |
}
|
188 |
|
189 |
+
$crop = 0;
|
|
|
190 |
|
191 |
+
if($webimg['resize']){
|
192 |
+
$editor->set_quality($webimg['quality']);
|
193 |
+
|
194 |
+
$resized = $editor->resize($webimg['width'], $webimg['height'], $webimg['crop']);
|
195 |
+
if(is_wp_error($resized)){
|
196 |
+
@unlink($fileinfo['filepath_original']);
|
197 |
+
$return = json_encode(array("error" => array("code" => $resized->get_error_code(), "message" => $resized->get_error_message()), "id" => $fileinfo['basename'], "tip" => "editor->resize->webimage({$webimg['width']}, {$webimg['height']}, {$webimg['crop']})"));
|
198 |
+
die($return);
|
199 |
+
}
|
200 |
+
|
201 |
+
$saved = $editor->save($fileinfo['filepath']);
|
202 |
+
if(is_wp_error($saved)){
|
203 |
+
@unlink($fileinfo['filepath_original']);
|
204 |
+
$return = json_encode(array("error" => array("code" => $saved->get_error_code(), "message" => $saved->get_error_message()), "id" => $fileinfo['basename'], "tip" => 'editor->save->webimage'));
|
205 |
+
die($return);
|
206 |
+
}
|
207 |
}
|
208 |
+
|
209 |
+
// Thumbnail
|
210 |
+
$editor->set_quality($thumbimg['quality']);
|
211 |
+
|
212 |
+
$resized = $editor->resize($thumbimg['width'], $thumbimg['height'], $thumbimg['crop']);
|
213 |
+
if(is_wp_error($resized)){
|
214 |
+
@unlink($fileinfo['filepath']);
|
215 |
+
@unlink($fileinfo['filepath_original']);
|
216 |
+
$return = json_encode(array("error" => array("code" => $resized->get_error_code(), "message" => $resized->get_error_message()), "id" => $fileinfo['basename'], "tip" => "editor->resize->thumb({$thumbimg['width']}, {$thumbimg['height']}, {$thumbimg['crop']})"));
|
217 |
+
die($return);
|
218 |
+
}
|
219 |
+
|
220 |
+
$saved = $editor->save($fileinfo['filepath_thumb']);
|
221 |
+
if(is_wp_error($saved)){
|
222 |
+
@unlink($fileinfo['filepath']);
|
223 |
+
@unlink($fileinfo['filepath_original']);
|
224 |
+
$return = json_encode(array("error" => array("code" => $saved->get_error_code(), "message" => $saved->get_error_message()), "id" => $fileinfo['basename'], "tip" => 'editor->save->thumb'));
|
225 |
+
die($return);
|
226 |
}
|
227 |
+
} else{
|
228 |
+
copy($fileinfo['filepath'], $fileinfo['filepath_thumb']);
|
229 |
}
|
230 |
+
$is_webimage = true;
|
231 |
+
} else{
|
232 |
+
@unlink($fileinfo['filepath']);
|
233 |
+
$return = json_encode(array("error" => array("code" => 104, "message" => __("Could not read image size. Invalid image was deleted.", 'gmLang')), "id" => $fileinfo['basename']));
|
234 |
+
die($return);
|
235 |
}
|
236 |
}
|
237 |
|
238 |
// Write media data to DB
|
239 |
+
$link = '';
|
240 |
+
$description = '';
|
241 |
// TODO Option to set title empty string or from metadata or from filename or both
|
242 |
+
$title = $fileinfo['title'];
|
243 |
// use image exif/iptc data for title and caption defaults if possible
|
244 |
+
if($size){
|
245 |
+
$image_meta = @wp_read_image_metadata($fileinfo['filepath_original']);
|
246 |
+
if(trim($image_meta['caption'])){
|
247 |
+
$description = $image_meta['caption'];
|
248 |
+
}
|
249 |
+
if(trim($image_meta['title']) && !is_numeric(sanitize_title($image_meta['title']))){
|
250 |
$title = $image_meta['title'];
|
251 |
+
}
|
252 |
}
|
253 |
|
254 |
$post_data = array();
|
255 |
+
if(isset($_REQUEST['params'])){
|
256 |
+
parse_str($_REQUEST['params'], $post_data);
|
257 |
+
|
258 |
+
if(!$is_webimage){
|
259 |
+
unset($post_data['terms']['gmedia_category']);
|
260 |
+
}
|
261 |
+
}
|
262 |
|
263 |
// Construct the media array
|
264 |
+
$media_data = array('mime_type' => $fileinfo['mime_type'], 'gmuid' => $fileinfo['basename'], 'title' => $title, 'link' => $link, 'description' => $description);
|
265 |
+
$media_data = wp_parse_args($media_data, $post_data);
|
|
|
|
|
|
|
|
|
|
|
266 |
|
267 |
+
global $gmDB;
|
268 |
// Save the data
|
269 |
+
$id = $gmDB->insert_gmedia($media_data);
|
270 |
+
$gmDB->update_metadata($meta_type = 'gmedia', $id, $meta_key = '_metadata', $gmDB->generate_gmedia_metadata($id, $fileinfo));
|
271 |
|
272 |
+
$return = json_encode(array("success" => array("code" => 200, "message" => sprintf(__('File uploaded successful. Assigned ID: %s', 'gmLang'), $id)), "id" => $fileinfo['basename']));
|
273 |
+
die($return);
|
274 |
+
} else{
|
275 |
+
$return = json_encode(array("success" => array("code" => 199, "message" => $chunk . '/' . $chunks), "id" => $fileinfo['basename']));
|
276 |
+
die($return);
|
|
|
277 |
}
|
278 |
+
} else{
|
279 |
+
$return = json_encode(array("error" => array("code" => 102, "message" => __("Failed to open output stream.", 'gmLang')), "id" => $fileinfo['basename']));
|
280 |
+
die($return);
|
|
|
281 |
}
|
282 |
}
|
283 |
|
284 |
+
die($return);
|
admin/wpmedia.php
CHANGED
@@ -1,198 +1,242 @@
|
|
1 |
<?php
|
2 |
-
if
|
3 |
-
die(
|
4 |
}
|
5 |
|
6 |
/**
|
7 |
-
*
|
8 |
*
|
9 |
* @return mixed content
|
10 |
*/
|
11 |
-
function grandWPMedia()
|
12 |
-
global $
|
13 |
-
$gmOptions = get_option( 'gmediaOptions' );
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
$
|
18 |
-
|
19 |
-
|
20 |
-
'order' => $grandCore->_get( 'order', '' ),
|
21 |
-
'limit' => $gmOptions['per_page_wpmedia'],
|
22 |
-
'filter' => $grandCore->_get( 'filter', '' ),
|
23 |
-
's' => $grandCore->_get( 's', '' )
|
24 |
-
);
|
25 |
-
$wpMediaLib = $gMDb->get_wp_media_lib( $arg );
|
26 |
-
/** @var $mime_type
|
27 |
-
* @var $orderby
|
28 |
-
* @var $order
|
29 |
-
* @var $filter
|
30 |
-
* @var $s
|
31 |
-
*/
|
32 |
-
extract( $arg );
|
33 |
-
$media = $mCount = array(
|
34 |
-
'all' => '',
|
35 |
-
'image' => '',
|
36 |
-
'audio' => '',
|
37 |
-
'video' => '',
|
38 |
-
'application' => ''
|
39 |
-
);
|
40 |
-
if ( count( $wpMediaLib ) ) {
|
41 |
-
foreach ( $wpMediaLib as $item ) {
|
42 |
-
$type = explode( '/', $item->post_mime_type );
|
43 |
-
$mCount[$type[0]] ++;
|
44 |
-
$mCount['all'] ++;
|
45 |
-
}
|
46 |
}
|
47 |
-
$
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
56 |
}
|
57 |
?>
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
if
|
101 |
-
?>
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
<?php
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
echo '0';
|
118 |
-
} ?></span> <?php _e( 'selected', 'gmLang' ); ?></span>
|
119 |
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
|
125 |
-
<div class="actions">
|
126 |
-
<span id="showSelected"><?php _e( 'Show only selected items', 'gmLang' ); ?></span>
|
127 |
-
<span id="clearSelected"><?php _e( 'Clear selected items', 'gmLang' ); ?></span>
|
128 |
</div>
|
|
|
129 |
</div>
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
</div>
|
140 |
-
</form>
|
141 |
-
</div>
|
142 |
-
<div id="gMediaLibTable">
|
143 |
-
<table class="gMediaLibTable" cellspacing="0">
|
144 |
-
<col class="bufer" />
|
145 |
-
<col class="cb" />
|
146 |
-
<col class="id" />
|
147 |
-
<col class="file" />
|
148 |
-
<col class="type" />
|
149 |
-
<col class="title" />
|
150 |
-
<col class="descr" />
|
151 |
-
<col class="actions" />
|
152 |
<thead>
|
153 |
<tr>
|
154 |
-
<th class="bufer"><span></span></th>
|
155 |
<th class="cb"><span>#</span></th>
|
156 |
-
<th class="id
|
157 |
-
|
158 |
-
|
159 |
-
} ?>">
|
160 |
-
<a href="<?php echo $url['page'] . $url_param['mime_type'] . '&orderby=ID&order=' . $sort . $url_param['filter'] . $url_param['s']; $sort = 'ASC'; ?>"><?php _e( 'ID', 'gmLang' ); ?></a>
|
161 |
</th>
|
162 |
-
<th class="file <?php
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
<a href="<?php echo $url['page'] . $url_param['mime_type'] . '&orderby=filename&order=' . $sort . $url_param['filter'] . $url_param['s']; $sort = 'ASC'; ?>"><?php _e( 'File', 'gmLang' ); ?></a>
|
167 |
</th>
|
168 |
-
<th class="type"><span><?php _e(
|
169 |
-
<th class="title
|
170 |
-
|
171 |
-
|
172 |
-
} ?>">
|
173 |
-
<a href="<?php echo $url['page'] . $url_param['mime_type'] . '&orderby=title&order=' . $sort . $url_param['filter'] . $url_param['s']; ?>"><?php _e( 'Title', 'gmLang' ); ?></a>
|
174 |
</th>
|
175 |
-
<th class="descr"><span><?php _e(
|
176 |
-
<th class="actions"><span><?php _e( 'Actions', 'gmLang' ); ?></span></th>
|
177 |
</tr>
|
178 |
</thead>
|
179 |
-
<tbody
|
180 |
-
<?php
|
181 |
-
|
182 |
-
|
183 |
-
|
|
|
|
|
|
|
|
|
184 |
}
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
</tbody>
|
194 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
</div>
|
196 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
<?php
|
198 |
}
|
1 |
<?php
|
2 |
+
if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])){
|
3 |
+
die('You are not allowed to call this page directly.');
|
4 |
}
|
5 |
|
6 |
/**
|
7 |
+
* grandWPMedia()
|
8 |
*
|
9 |
* @return mixed content
|
10 |
*/
|
11 |
+
function grandWPMedia(){
|
12 |
+
global $user_ID, $gmDB, $gmCore, $gmProcessor, $gmGallery;
|
|
|
13 |
|
14 |
+
$url = add_query_arg(array('page' => $gmProcessor->page, 'mode' => $gmProcessor->mode), admin_url('admin.php'));
|
15 |
+
|
16 |
+
$gm_screen_options = get_user_meta($user_ID, 'gm_screen_options', true);
|
17 |
+
if(!is_array($gm_screen_options)){
|
18 |
+
$gm_screen_options = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
}
|
20 |
+
$gm_screen_options = array_merge($gmGallery->options['gm_screen_options'], $gm_screen_options);
|
21 |
+
|
22 |
+
$arg = array('mime_type' => $gmCore->_get('mime_type', ''), 'orderby' => $gmCore->_get('orderby', $gm_screen_options['orderby_wpmedia']),
|
23 |
+
'order' => $gmCore->_get('order', $gm_screen_options['sortorder_wpmedia']), 'limit' => $gm_screen_options['per_page_wpmedia'], 'filter' => $gmCore->_get('filter', ''),
|
24 |
+
's' => $gmCore->_get('s', ''));
|
25 |
+
$wpMediaLib = $gmDB->get_wp_media_lib($arg);
|
26 |
+
|
27 |
+
$gm_qty = array('total' => '', 'image' => '', 'audio' => '', 'video' => '', 'text' => '', 'application' => '', 'other' => '');
|
28 |
+
|
29 |
+
$gmDbCount = $gmDB->count_wp_media($arg);
|
30 |
+
foreach($gmDbCount as $key => $value){
|
31 |
+
$gm_qty[$key] = '<span class="badge pull-right">' . (int)$value . '</span>';
|
32 |
}
|
33 |
?>
|
34 |
+
<div class="panel panel-default">
|
35 |
+
<div class="panel-heading clearfix">
|
36 |
+
<form class="form-inline gmedia-search-form" role="search">
|
37 |
+
<div class="form-group">
|
38 |
+
<?php foreach($_GET as $key => $value){
|
39 |
+
if(in_array($key, array('page', 'mime_type'))){
|
40 |
+
?>
|
41 |
+
<input type="hidden" name="<?php echo $key; ?>" value="<?php echo $value; ?>"/>
|
42 |
+
<?php
|
43 |
+
}
|
44 |
+
} ?>
|
45 |
+
<input id="gmedia-search" class="form-control input-sm" type="text" name="s" placeholder="<?php _e('Search...', 'gmLang'); ?>" value="<?php echo $gmCore->_get('s', ''); ?>"/>
|
46 |
+
</div>
|
47 |
+
<button type="submit" class="btn btn-default input-sm"><span class="glyphicon glyphicon-search"></span>
|
48 |
+
</button>
|
49 |
+
</form>
|
50 |
+
<?php echo $gmDB->query_pager(); ?>
|
51 |
+
|
52 |
+
<div class="btn-toolbar pull-left">
|
53 |
+
<?php if(!$gmProcessor->mode){ ?>
|
54 |
+
<div class="btn-group gm-checkgroup" id="cb_global-btn">
|
55 |
+
<span class="btn btn-default active"><input class="doaction" id="cb_global" data-group="cb_media-object" type="checkbox"/></span>
|
56 |
+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
57 |
+
<span class="caret"></span>
|
58 |
+
<span class="sr-only"><?php _e('Toggle Dropdown', 'gmLang'); ?></span></button>
|
59 |
+
<ul class="dropdown-menu" role="menu">
|
60 |
+
<li><a data-select="total" href="#"><?php _e('All', 'gmLang'); ?></a></li>
|
61 |
+
<li><a data-select="none" href="#"><?php _e('None', 'gmLang'); ?></a></li>
|
62 |
+
<li class="divider"></li>
|
63 |
+
<li><a data-select="image" href="#"><?php _e('Images', 'gmLang'); ?></a></li>
|
64 |
+
<li><a data-select="audio" href="#"><?php _e('Audio', 'gmLang'); ?></a></li>
|
65 |
+
<li><a data-select="video" href="#"><?php _e('Video', 'gmLang'); ?></a></li>
|
66 |
+
<li class="divider"></li>
|
67 |
+
<li>
|
68 |
+
<a data-select="reverse" href="#" title="<?php _e('Reverse only visible items', 'gmLang'); ?>"><?php _e('Reverse', 'gmLang'); ?></a>
|
69 |
+
</li>
|
70 |
+
</ul>
|
71 |
+
</div>
|
72 |
+
<?php } ?>
|
73 |
+
|
74 |
+
<div class="btn-group">
|
75 |
+
<?php $curr_mime = explode(',', $gmCore->_get('mime_type', 'total')); ?>
|
76 |
+
<?php if($gmDB->filter){ ?>
|
77 |
+
<a class="btn btn-warning" title="<?php _e('Reset Filter', 'gmLang'); ?>" rel="total" href="<?php echo $url; ?>"><?php _e('Filter', 'gmLang'); ?></a>
|
78 |
+
<?php } else{ ?>
|
79 |
+
<button type="button" class="btn btn-default"><?php _e('Filter', 'gmLang'); ?></button>
|
80 |
+
<?php } ?>
|
81 |
+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
82 |
+
<span class="caret"></span>
|
83 |
+
<span class="sr-only"><?php _e('Toggle Dropdown', 'gmLang'); ?></span>
|
84 |
+
</button>
|
85 |
+
<ul class="dropdown-menu" role="menu">
|
86 |
+
<li role="presentation" class="dropdown-header"><?php _e('TYPE', 'gmLang'); ?></li>
|
87 |
+
<li class="total<?php if(in_array('total', $curr_mime)){
|
88 |
+
echo ' active';
|
89 |
+
} ?>"><a rel="total" href="<?php echo $gmCore->get_admin_url(array(), array('mime_type', 'pager')); ?>"><?php _e('All', 'gmLang');
|
90 |
+
echo $gm_qty['total']; ?></a></li>
|
91 |
+
<li class="image<?php if(in_array('image', $curr_mime)){
|
92 |
+
echo ' active';
|
93 |
+
}
|
94 |
+
if(!$gmDbCount['image']){
|
95 |
+
echo ' disabled';
|
96 |
+
} ?>">
|
97 |
+
<a rel="image" href="<?php echo $gmCore->get_admin_url(array('mime_type' => 'image'), array('pager')); ?>"><?php _e('Images', 'gmLang');
|
98 |
+
echo $gm_qty['image']; ?></a></li>
|
99 |
+
<li class="audio<?php if(in_array('audio', $curr_mime)){
|
100 |
+
echo ' active';
|
101 |
+
}
|
102 |
+
if(!$gmDbCount['audio']){
|
103 |
+
echo ' disabled';
|
104 |
+
} ?>">
|
105 |
+
<a rel="audio" href="<?php echo $gmCore->get_admin_url(array('mime_type' => 'audio'), array('pager')); ?>"><?php _e('Audio', 'gmLang');
|
106 |
+
echo $gm_qty['audio']; ?></a></li>
|
107 |
+
<li class="video<?php if(in_array('video', $curr_mime)){
|
108 |
+
echo ' active';
|
109 |
+
}
|
110 |
+
if(!$gmDbCount['video']){
|
111 |
+
echo ' disabled';
|
112 |
+
} ?>">
|
113 |
+
<a rel="video" href="<?php echo $gmCore->get_admin_url(array('mime_type' => 'video'), array('pager')); ?>"><?php _e('Video', 'gmLang');
|
114 |
+
echo $gm_qty['video']; ?></a></li>
|
115 |
+
<li class="application<?php if(in_array('application', $curr_mime) || in_array('text', $curr_mime)){
|
116 |
+
echo ' active';
|
117 |
+
}
|
118 |
+
if(!$gmDbCount['application']){
|
119 |
+
echo ' disabled';
|
120 |
+
} ?>">
|
121 |
+
<a rel="application" href="<?php echo $gmCore->get_admin_url(array('mime_type' => 'application,text'), array('pager')); ?>"><?php _e('Other', 'gmLang');
|
122 |
+
echo $gm_qty['other']; ?></a></li>
|
123 |
+
<?php do_action('gmedia_wp_filter_list'); ?>
|
124 |
+
</ul>
|
125 |
+
</div>
|
126 |
+
|
127 |
+
<div class="btn-group">
|
128 |
+
<a class="btn btn-default" href="#"><?php _e('Action', 'gmLang'); ?></a>
|
129 |
+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
130 |
+
<span class="caret"></span>
|
131 |
+
<span class="sr-only"><?php _e('Toggle Dropdown', 'gmLang'); ?></span></button>
|
132 |
<?php
|
133 |
+
$rel_selected_show = 'rel-selected-show';
|
134 |
+
$rel_selected_hide = 'rel-selected-hide';
|
135 |
+
?>
|
136 |
+
<ul class="dropdown-menu" role="menu">
|
137 |
+
<li class="<?php echo $rel_selected_show; ?>"><a href="#importModal" data-modal="import-wpmedia" data-action="gmedia_import_modal" class="gmedia-modal"><?php _e('Import to Gmedia Library...', 'gmLang'); ?></a></li>
|
138 |
+
<!-- <li class="divider <?php echo $rel_selected_hide; ?>"></li> -->
|
139 |
+
<li class="dropdown-header <?php echo $rel_selected_hide; ?>"><span><?php _e("Select items to see more actions", "gmLang"); ?></span></li>
|
140 |
+
<?php do_action('gmedia_action_list'); ?>
|
141 |
+
</ul>
|
142 |
+
</div>
|
|
|
|
|
143 |
|
144 |
+
<form class="btn-group" id="gm-selected-btn" name="gm-selected-form" action="<?php echo add_query_arg(array('filter' => 'selected'), $url); ?>" method="post">
|
145 |
+
<button type="submit" class="btn btn<?php echo ('selected' == $gmCore->_req('filter'))? '-success' : '-info' ?>"><?php printf(__('%s selected', 'gmLang'), '<span id="gm-selected-qty">' . count($gmProcessor->selected_items) . '</span>'); ?></button>
|
146 |
+
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
|
147 |
+
<span class="caret"></span>
|
148 |
+
<span class="sr-only"><?php _e('Toggle Dropdown', 'gmLang'); ?></span></button>
|
149 |
+
<input type="hidden" id="gm-selected" data-userid="<?php echo $user_ID; ?>" data-key="wpmedia" name="selected_items" value="<?php echo implode(',', $gmProcessor->selected_items); ?>"/>
|
150 |
+
<ul class="dropdown-menu" role="menu">
|
151 |
+
<li><a id="gm-selected-show" href="#show"><?php _e('Show only selected items', 'gmLang'); ?></a></li>
|
152 |
+
<li><a id="gm-selected-clear" href="#clear"><?php _e('Clear selected items', 'gmLang'); ?></a></li>
|
153 |
+
</ul>
|
154 |
+
</form>
|
155 |
|
|
|
|
|
|
|
156 |
</div>
|
157 |
+
|
158 |
</div>
|
159 |
+
<div class="panel-body"></div>
|
160 |
+
<?php if(!empty($wpMediaLib)){ ?>
|
161 |
+
<table class="table table-striped table-hover table-condenced" cellspacing="0">
|
162 |
+
<col class="cb" style="width:40px;"/>
|
163 |
+
<col class="id" style="width:80px;"/>
|
164 |
+
<col class="file" style="width:100px;"/>
|
165 |
+
<col class="type" style="width:80px;"/>
|
166 |
+
<col class="title"/>
|
167 |
+
<col class="descr hidden-xs"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
<thead>
|
169 |
<tr>
|
|
|
170 |
<th class="cb"><span>#</span></th>
|
171 |
+
<th class="id">
|
172 |
+
<?php $new_order = ('ID' == $arg['orderby'])? (('DESC' == $arg['order'])? 'ASC' : 'DESC') : 'DESC'; ?>
|
173 |
+
<a href="<?php echo $gmCore->get_admin_url(array('orderby' => 'ID', 'order' => $new_order)); ?>"><?php _e('ID', 'gmLang'); ?></a>
|
|
|
|
|
174 |
</th>
|
175 |
+
<th class="file" title="<?php _e('Sort by filename', 'gmLang'); ?>">
|
176 |
+
<?php $new_order = ('filename' == $arg['orderby'])? (('DESC' == $arg['order'])? 'ASC' : 'DESC') : 'DESC'; ?>
|
177 |
+
<a href="<?php echo $gmCore->get_admin_url(array('orderby' => 'filename',
|
178 |
+
'order' => $new_order)); ?>"><?php _e('File', 'gmLang'); ?></a>
|
|
|
179 |
</th>
|
180 |
+
<th class="type"><span><?php _e('Type', 'gmLang'); ?></span></th>
|
181 |
+
<th class="title">
|
182 |
+
<?php $new_order = ('title' == $arg['orderby'])? (('DESC' == $arg['order'])? 'ASC' : 'DESC') : 'DESC'; ?>
|
183 |
+
<a href="<?php echo $gmCore->get_admin_url(array('orderby' => 'title', 'order' => $new_order)); ?>"><?php _e('Title', 'gmLang'); ?></a>
|
|
|
|
|
184 |
</th>
|
185 |
+
<th class="descr hidden-xs"><span><?php _e('Description', 'gmLang'); ?></span></th>
|
|
|
186 |
</tr>
|
187 |
</thead>
|
188 |
+
<tbody>
|
189 |
+
<?php foreach($wpMediaLib as $item){
|
190 |
+
$is_selected = in_array($item->ID, $gmProcessor->selected_items)? true : false;
|
191 |
+
$image = wp_get_attachment_image( $item->ID, array( 50, 50 ), false );
|
192 |
+
if ( ! $image ) {
|
193 |
+
if ( $src = wp_mime_type_icon( $item->ID ) ) {
|
194 |
+
$src_image = $gmCore->gmedia_url . '/admin/images/' . wp_basename( $src );
|
195 |
+
$image = '<img src="' . $src_image . '" width="50" height="50" alt="icon" title="' . esc_attr($item->post_title) . '"/>';
|
196 |
+
}
|
197 |
}
|
198 |
+
$item_url = wp_get_attachment_url( $item->ID );
|
199 |
+
$file_info = pathinfo( $item_url );
|
200 |
+
$type = explode( '/', $item->post_mime_type );
|
201 |
+
?>
|
202 |
+
<tr data-id="<?php echo $item->ID; ?>">
|
203 |
+
<td class="cb">
|
204 |
+
<span class="cb_media-object"><input name="doaction[]" type="checkbox" data-type="<?php echo $type[0]; ?>" value="<?php echo $item->ID; ?>"<?php echo $is_selected? ' checked="checked"' : ''; ?>/></span>
|
205 |
+
</td>
|
206 |
+
<td class="id"><span><?php echo $item->ID; ?></span></td>
|
207 |
+
<td class="file"><span><a href="<?php echo admin_url( 'media.php?action=edit&attachment_id=' . $item->ID ); ?>"><?php echo $image; ?></a></span></td>
|
208 |
+
<td class="type"><span><?php echo $file_info['extension']; ?></span></td>
|
209 |
+
<td class="title"><span><?php echo esc_html($item->post_title); ?></span></td>
|
210 |
+
<td class="descr hidden-xs">
|
211 |
+
<div><?php echo esc_html($item->post_content); ?></div>
|
212 |
+
</td>
|
213 |
+
</tr>
|
214 |
+
<?php } ?>
|
215 |
</tbody>
|
216 |
</table>
|
217 |
+
<?php } else{ ?>
|
218 |
+
<div class="panel-body">
|
219 |
+
<div class="well well-lg text-center">
|
220 |
+
<h4><?php _e('No items to show.', 'gmLang'); ?></h4>
|
221 |
+
</div>
|
222 |
+
</div>
|
223 |
+
<?php } ?>
|
224 |
+
<?php
|
225 |
+
wp_original_referer_field(true, 'previous');
|
226 |
+
wp_nonce_field('GmediaGallery');
|
227 |
+
?>
|
228 |
</div>
|
229 |
+
|
230 |
+
<script type="text/javascript">
|
231 |
+
function gmedia_import_done(){
|
232 |
+
if(jQuery('#import_window').is(':visible')){
|
233 |
+
jQuery('#import-done').button('complete').prop('disabled', false);
|
234 |
+
}
|
235 |
+
}
|
236 |
+
</script>
|
237 |
+
<div class="modal fade gmedia-modal" id="importModal" tabindex="-1" role="dialog" aria-hidden="true">
|
238 |
+
<div class="modal-dialog"></div>
|
239 |
+
</div>
|
240 |
+
|
241 |
<?php
|
242 |
}
|
assets/bootstrap-datetimepicker/bootstrap-datetimepicker.css
ADDED
@@ -0,0 +1,204 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Datetimepicker for Bootstrap v3
|
3 |
+
* https://github.com/Eonasdan/bootstrap-datetimepicker/
|
4 |
+
*/
|
5 |
+
.bootstrap-datetimepicker-widget {
|
6 |
+
top: 0;
|
7 |
+
left: 0;
|
8 |
+
width: 250px;
|
9 |
+
padding: 4px;
|
10 |
+
margin-top: 1px;
|
11 |
+
z-index: 99999 !important;
|
12 |
+
border-radius: 4px;
|
13 |
+
}
|
14 |
+
.bootstrap-datetimepicker-widget.timepicker-sbs {
|
15 |
+
width: 600px;
|
16 |
+
}
|
17 |
+
.bootstrap-datetimepicker-widget.bottom:before {
|
18 |
+
content: '';
|
19 |
+
display: inline-block;
|
20 |
+
border-left: 7px solid transparent;
|
21 |
+
border-right: 7px solid transparent;
|
22 |
+
border-bottom: 7px solid #ccc;
|
23 |
+
border-bottom-color: rgba(0, 0, 0, 0.2);
|
24 |
+
position: absolute;
|
25 |
+
top: -7px;
|
26 |
+
left: 7px;
|
27 |
+
}
|
28 |
+
.bootstrap-datetimepicker-widget.bottom:after {
|
29 |
+
content: '';
|
30 |
+
display: inline-block;
|
31 |
+
border-left: 6px solid transparent;
|
32 |
+
border-right: 6px solid transparent;
|
33 |
+
border-bottom: 6px solid white;
|
34 |
+
position: absolute;
|
35 |
+
top: -6px;
|
36 |
+
left: 8px;
|
37 |
+
}
|
38 |
+
.bootstrap-datetimepicker-widget.top:before {
|
39 |
+
content: '';
|
40 |
+
display: inline-block;
|
41 |
+
border-left: 7px solid transparent;
|
42 |
+
border-right: 7px solid transparent;
|
43 |
+
border-top: 7px solid #ccc;
|
44 |
+
border-top-color: rgba(0, 0, 0, 0.2);
|
45 |
+
position: absolute;
|
46 |
+
bottom: -7px;
|
47 |
+
left: 6px;
|
48 |
+
}
|
49 |
+
.bootstrap-datetimepicker-widget.top:after {
|
50 |
+
content: '';
|
51 |
+
display: inline-block;
|
52 |
+
border-left: 6px solid transparent;
|
53 |
+
border-right: 6px solid transparent;
|
54 |
+
border-top: 6px solid white;
|
55 |
+
position: absolute;
|
56 |
+
bottom: -6px;
|
57 |
+
left: 7px;
|
58 |
+
}
|
59 |
+
.bootstrap-datetimepicker-widget .dow {
|
60 |
+
width: 14.2857%;
|
61 |
+
}
|
62 |
+
.bootstrap-datetimepicker-widget.pull-right:before {
|
63 |
+
left: auto;
|
64 |
+
right: 6px;
|
65 |
+
}
|
66 |
+
.bootstrap-datetimepicker-widget.pull-right:after {
|
67 |
+
left: auto;
|
68 |
+
right: 7px;
|
69 |
+
}
|
70 |
+
.bootstrap-datetimepicker-widget > ul {
|
71 |
+
list-style-type: none;
|
72 |
+
margin: 0;
|
73 |
+
}
|
74 |
+
.bootstrap-datetimepicker-widget .timepicker-hour,
|
75 |
+
.bootstrap-datetimepicker-widget .timepicker-minute,
|
76 |
+
.bootstrap-datetimepicker-widget .timepicker-second {
|
77 |
+
width: 100%;
|
78 |
+
font-weight: bold;
|
79 |
+
font-size: 1.2em;
|
80 |
+
}
|
81 |
+
.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator {
|
82 |
+
width: 4px;
|
83 |
+
padding: 0;
|
84 |
+
margin: 0;
|
85 |
+
}
|
86 |
+
.bootstrap-datetimepicker-widget .datepicker > div {
|
87 |
+
display: none;
|
88 |
+
}
|
89 |
+
.bootstrap-datetimepicker-widget .picker-switch {
|
90 |
+
text-align: center;
|
91 |
+
}
|
92 |
+
.bootstrap-datetimepicker-widget table {
|
93 |
+
width: 100%;
|
94 |
+
margin: 0;
|
95 |
+
}
|
96 |
+
.bootstrap-datetimepicker-widget td,
|
97 |
+
.bootstrap-datetimepicker-widget th {
|
98 |
+
text-align: center;
|
99 |
+
width: 20px;
|
100 |
+
height: 20px;
|
101 |
+
border-radius: 4px;
|
102 |
+
}
|
103 |
+
.bootstrap-datetimepicker-widget td.day:hover,
|
104 |
+
.bootstrap-datetimepicker-widget td.hour:hover,
|
105 |
+
.bootstrap-datetimepicker-widget td.minute:hover,
|
106 |
+
.bootstrap-datetimepicker-widget td.second:hover {
|
107 |
+
background: #eeeeee;
|
108 |
+
cursor: pointer;
|
109 |
+
}
|
110 |
+
.bootstrap-datetimepicker-widget td.old,
|
111 |
+
.bootstrap-datetimepicker-widget td.new {
|
112 |
+
color: #999999;
|
113 |
+
}
|
114 |
+
.bootstrap-datetimepicker-widget td.today {
|
115 |
+
position: relative;
|
116 |
+
}
|
117 |
+
.bootstrap-datetimepicker-widget td.today:before {
|
118 |
+
content: '';
|
119 |
+
display: inline-block;
|
120 |
+
border-left: 7px solid transparent;
|
121 |
+
border-bottom: 7px solid #428bca;
|
122 |
+
border-top-color: rgba(0, 0, 0, 0.2);
|
123 |
+
position: absolute;
|
124 |
+
bottom: 4px;
|
125 |
+
right: 4px;
|
126 |
+
}
|
127 |
+
.bootstrap-datetimepicker-widget td.active,
|
128 |
+
.bootstrap-datetimepicker-widget td.active:hover {
|
129 |
+
background-color: #428bca;
|
130 |
+
color: #fff;
|
131 |
+
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
132 |
+
}
|
133 |
+
.bootstrap-datetimepicker-widget td.active.today:before {
|
134 |
+
border-bottom-color: #fff;
|
135 |
+
}
|
136 |
+
.bootstrap-datetimepicker-widget td.disabled,
|
137 |
+
.bootstrap-datetimepicker-widget td.disabled:hover {
|
138 |
+
background: none;
|
139 |
+
color: #999999;
|
140 |
+
cursor: not-allowed;
|
141 |
+
}
|
142 |
+
.bootstrap-datetimepicker-widget td span {
|
143 |
+
display: block;
|
144 |
+
width: 47px;
|
145 |
+
height: 54px;
|
146 |
+
line-height: 54px;
|
147 |
+
float: left;
|
148 |
+
margin: 2px;
|
149 |
+
cursor: pointer;
|
150 |
+
border-radius: 4px;
|
151 |
+
}
|
152 |
+
.bootstrap-datetimepicker-widget td span:hover {
|
153 |
+
background: #eeeeee;
|
154 |
+
}
|
155 |
+
.bootstrap-datetimepicker-widget td span.active {
|
156 |
+
background-color: #428bca;
|
157 |
+
color: #fff;
|
158 |
+
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
159 |
+
}
|
160 |
+
.bootstrap-datetimepicker-widget td span.old {
|
161 |
+
color: #999999;
|
162 |
+
}
|
163 |
+
.bootstrap-datetimepicker-widget td span.disabled,
|
164 |
+
.bootstrap-datetimepicker-widget td span.disabled:hover {
|
165 |
+
background: none;
|
166 |
+
color: #999999;
|
167 |
+
cursor: not-allowed;
|
168 |
+
}
|
169 |
+
.bootstrap-datetimepicker-widget th.switch {
|
170 |
+
width: 145px;
|
171 |
+
}
|
172 |
+
.bootstrap-datetimepicker-widget th.next,
|
173 |
+
.bootstrap-datetimepicker-widget th.prev {
|
174 |
+
font-size: 21px;
|
175 |
+
}
|
176 |
+
.bootstrap-datetimepicker-widget th.disabled,
|
177 |
+
.bootstrap-datetimepicker-widget th.disabled:hover {
|
178 |
+
background: none;
|
179 |
+
color: #999999;
|
180 |
+
cursor: not-allowed;
|
181 |
+
}
|
182 |
+
.bootstrap-datetimepicker-widget thead tr:first-child th {
|
183 |
+
cursor: pointer;
|
184 |
+
}
|
185 |
+
.bootstrap-datetimepicker-widget thead tr:first-child th:hover {
|
186 |
+
background: #eeeeee;
|
187 |
+
}
|
188 |
+
.input-group.date .input-group-addon span {
|
189 |
+
display: block;
|
190 |
+
cursor: pointer;
|
191 |
+
width: 16px;
|
192 |
+
height: 16px;
|
193 |
+
}
|
194 |
+
.bootstrap-datetimepicker-widget.left-oriented:before {
|
195 |
+
left: auto;
|
196 |
+
right: 6px;
|
197 |
+
}
|
198 |
+
.bootstrap-datetimepicker-widget.left-oriented:after {
|
199 |
+
left: auto;
|
200 |
+
right: 7px;
|
201 |
+
}
|
202 |
+
.bootstrap-datetimepicker-widget ul.list-unstyled li div.timepicker div.timepicker-picker table.table-condensed tbody > tr > td {
|
203 |
+
padding: 0px !important;
|
204 |
+
}
|
assets/bootstrap-datetimepicker/bootstrap-datetimepicker.js
ADDED
@@ -0,0 +1,1160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Version 3.0.0
|
3 |
+
=========================================================
|
4 |
+
bootstrap-datetimepicker.js
|
5 |
+
https://github.com/Eonasdan/bootstrap-datetimepicker
|
6 |
+
=========================================================
|
7 |
+
The MIT License (MIT)
|
8 |
+
|
9 |
+
Copyright (c) 2014 Jonathan Peterson
|
10 |
+
|
11 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
12 |
+
of this software and associated documentation files (the "Software"), to deal
|
13 |
+
in the Software without restriction, including without limitation the rights
|
14 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
15 |
+
copies of the Software, and to permit persons to whom the Software is
|
16 |
+
furnished to do so, subject to the following conditions:
|
17 |
+
|
18 |
+
The above copyright notice and this permission notice shall be included in
|
19 |
+
all copies or substantial portions of the Software.
|
20 |
+
|
21 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
26 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
27 |
+
THE SOFTWARE.
|
28 |
+
*/
|
29 |
+
; (function (factory) {
|
30 |
+
if (typeof define === 'function' && define.amd) {
|
31 |
+
// AMD is used - Register as an anonymous module.
|
32 |
+
define(['jquery', 'moment'], factory);
|
33 |
+
} else {
|
34 |
+
// AMD is not used - Attempt to fetch dependencies from scope.
|
35 |
+
if (!jQuery) {
|
36 |
+
throw 'bootstrap-datetimepicker requires jQuery to be loaded first';
|
37 |
+
} else if (!moment) {
|
38 |
+
throw 'bootstrap-datetimepicker requires moment.js to be loaded first';
|
39 |
+
} else {
|
40 |
+
factory(jQuery, moment);
|
41 |
+
}
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
(function ($, moment) {
|
46 |
+
if (typeof moment === 'undefined') {
|
47 |
+
alert("momentjs is requried");
|
48 |
+
throw new Error('momentjs is required');
|
49 |
+
};
|
50 |
+
|
51 |
+
var dpgId = 0,
|
52 |
+
|
53 |
+
pMoment = moment,
|
54 |
+
|
55 |
+
// ReSharper disable once InconsistentNaming
|
56 |
+
DateTimePicker = function (element, options) {
|
57 |
+
var defaults = {
|
58 |
+
pickDate: true,
|
59 |
+
pickTime: true,
|
60 |
+
useMinutes: true,
|
61 |
+
useSeconds: false,
|
62 |
+
useCurrent: true,
|
63 |
+
minuteStepping: 1,
|
64 |
+
minDate: new pMoment({ y: 1900 }),
|
65 |
+
maxDate: new pMoment().add(100, "y"),
|
66 |
+
showToday: true,
|
67 |
+
collapse: true,
|
68 |
+
language: "en",
|
69 |
+
defaultDate: "",
|
70 |
+
disabledDates: false,
|
71 |
+
enabledDates: false,
|
72 |
+
icons: {},
|
73 |
+
useStrict: false,
|
74 |
+
direction: "auto",
|
75 |
+
sideBySide: false,
|
76 |
+
daysOfWeekDisabled: false
|
77 |
+
},
|
78 |
+
|
79 |
+
icons = {
|
80 |
+
time: 'glyphicon glyphicon-time',
|
81 |
+
date: 'glyphicon glyphicon-calendar',
|
82 |
+
up: 'glyphicon glyphicon-chevron-up',
|
83 |
+
down: 'glyphicon glyphicon-chevron-down'
|
84 |
+
},
|
85 |
+
|
86 |
+
picker = this,
|
87 |
+
|
88 |
+
init = function () {
|
89 |
+
|
90 |
+
var icon = false, i, dDate, longDateFormat;
|
91 |
+
picker.options = $.extend({}, defaults, options);
|
92 |
+
picker.options.icons = $.extend({}, icons, picker.options.icons);
|
93 |
+
|
94 |
+
picker.element = $(element);
|
95 |
+
|
96 |
+
dataToOptions();
|
97 |
+
|
98 |
+
if (!(picker.options.pickTime || picker.options.pickDate))
|
99 |
+
throw new Error('Must choose at least one picker');
|
100 |
+
|
101 |
+
picker.id = dpgId++;
|
102 |
+
pMoment.lang(picker.options.language);
|
103 |
+
picker.date = pMoment();
|
104 |
+
picker.unset = false;
|
105 |
+
picker.isInput = picker.element.is('input');
|
106 |
+
picker.component = false;
|
107 |
+
|
108 |
+
if (picker.element.hasClass('input-group')) {
|
109 |
+
if (picker.element.find('.datepickerbutton').size() == 0) {//in case there is more then one 'input-group-addon' Issue #48
|
110 |
+
picker.component = picker.element.find("[class^='input-group-']");
|
111 |
+
}
|
112 |
+
else {
|
113 |
+
picker.component = picker.element.find('.datepickerbutton');
|
114 |
+
}
|
115 |
+
}
|
116 |
+
picker.format = picker.options.format;
|
117 |
+
|
118 |
+
longDateFormat = pMoment()._lang._longDateFormat;
|
119 |
+
|
120 |
+
if (!picker.format) {
|
121 |
+
picker.format = (picker.options.pickDate ? longDateFormat.L : '');
|
122 |
+
if (picker.options.pickDate && picker.options.pickTime) picker.format += ' ';
|
123 |
+
picker.format += (picker.options.pickTime ? longDateFormat.LT : '');
|
124 |
+
if (picker.options.useSeconds) {
|
125 |
+
if (~longDateFormat.LT.indexOf(' A')) {
|
126 |
+
picker.format = picker.format.split(" A")[0] + ":ss A";
|
127 |
+
}
|
128 |
+
else {
|
129 |
+
picker.format += ':ss';
|
130 |
+
}
|
131 |
+
}
|
132 |
+
}
|
133 |
+
picker.use24hours = picker.format.toLowerCase().indexOf("a") < 1;
|
134 |
+
|
135 |
+
if (picker.component) icon = picker.component.find('span');
|
136 |
+
|
137 |
+
if (picker.options.pickTime) {
|
138 |
+
if (icon) icon.addClass(picker.options.icons.time);
|
139 |
+
}
|
140 |
+
if (picker.options.pickDate) {
|
141 |
+
if (icon) {
|
142 |
+
icon.removeClass(picker.options.icons.time);
|
143 |
+
icon.addClass(picker.options.icons.date);
|
144 |
+
}
|
145 |
+
}
|
146 |
+
|
147 |
+
picker.widget = $(getTemplate()).appendTo('body');
|
148 |
+
|
149 |
+
if (picker.options.useSeconds && !picker.use24hours) {
|
150 |
+
picker.widget.width(300);
|
151 |
+
}
|
152 |
+
|
153 |
+
picker.minViewMode = picker.options.minViewMode || 0;
|
154 |
+
if (typeof picker.minViewMode === 'string') {
|
155 |
+
switch (picker.minViewMode) {
|
156 |
+
case 'months':
|
157 |
+
picker.minViewMode = 1;
|
158 |
+
break;
|
159 |
+
case 'years':
|
160 |
+
picker.minViewMode = 2;
|
161 |
+
break;
|
162 |
+
default:
|
163 |
+
picker.minViewMode = 0;
|
164 |
+
break;
|
165 |
+
}
|
166 |
+
}
|
167 |
+
picker.viewMode = picker.options.viewMode || 0;
|
168 |
+
if (typeof picker.viewMode === 'string') {
|
169 |
+
switch (picker.viewMode) {
|
170 |
+
case 'months':
|
171 |
+
picker.viewMode = 1;
|
172 |
+
break;
|
173 |
+
case 'years':
|
174 |
+
picker.viewMode = 2;
|
175 |
+
break;
|
176 |
+
default:
|
177 |
+
picker.viewMode = 0;
|
178 |
+
break;
|
179 |
+
}
|
180 |
+
}
|
181 |
+
|
182 |
+
picker.options.disabledDates = indexGivenDates(picker.options.disabledDates);
|
183 |
+
picker.options.enabledDates = indexGivenDates(picker.options.enabledDates);
|
184 |
+
|
185 |
+
picker.startViewMode = picker.viewMode;
|
186 |
+
picker.setMinDate(picker.options.minDate);
|
187 |
+
picker.setMaxDate(picker.options.maxDate);
|
188 |
+
fillDow();
|
189 |
+
fillMonths();
|
190 |
+
fillHours();
|
191 |
+
fillMinutes();
|
192 |
+
fillSeconds();
|
193 |
+
update();
|
194 |
+
showMode();
|
195 |
+
attachDatePickerEvents();
|
196 |
+
if (picker.options.defaultDate !== "" && getPickerInput().val() == "") picker.setValue(picker.options.defaultDate);
|
197 |
+
if (picker.options.minuteStepping !== 1) {
|
198 |
+
var rMinutes = picker.date.minutes();
|
199 |
+
var rInterval = picker.options.minuteStepping;
|
200 |
+
picker.date.minutes((Math.round(rMinutes / rInterval) * rInterval) % 60)
|
201 |
+
.seconds(0);
|
202 |
+
}
|
203 |
+
},
|
204 |
+
|
205 |
+
getPickerInput = function () {
|
206 |
+
if (picker.isInput) {
|
207 |
+
return picker.element;
|
208 |
+
} else {
|
209 |
+
return dateStr = picker.element.find('input');
|
210 |
+
}
|
211 |
+
},
|
212 |
+
|
213 |
+
dataToOptions = function () {
|
214 |
+
var eData
|
215 |
+
if (picker.element.is('input')) {
|
216 |
+
eData = picker.element.data();
|
217 |
+
}
|
218 |
+
else {
|
219 |
+
eData = picker.element.data();
|
220 |
+
}
|
221 |
+
if (eData.dateFormat !== undefined) picker.options.format = eData.dateFormat;
|
222 |
+
if (eData.datePickdate !== undefined) picker.options.pickDate = eData.datePickdate;
|
223 |
+
if (eData.datePicktime !== undefined) picker.options.pickTime = eData.datePicktime;
|
224 |
+
if (eData.dateUseminutes !== undefined) picker.options.useMinutes = eData.dateUseminutes;
|
225 |
+
if (eData.dateUseseconds !== undefined) picker.options.useSeconds = eData.dateUseseconds;
|
226 |
+
if (eData.dateUsecurrent !== undefined) picker.options.useCurrent = eData.dateUsecurrent;
|
227 |
+
if (eData.dateMinutestepping !== undefined) picker.options.minuteStepping = eData.dateMinutestepping;
|
228 |
+
if (eData.dateMindate !== undefined) picker.options.minDate = eData.dateMindate;
|
229 |
+
if (eData.dateMaxdate !== undefined) picker.options.maxDate = eData.dateMaxdate;
|
230 |
+
if (eData.dateShowtoday !== undefined) picker.options.showToday = eData.dateShowtoday;
|
231 |
+
if (eData.dateCollapse !== undefined) picker.options.collapse = eData.dateCollapse;
|
232 |
+
if (eData.dateLanguage !== undefined) picker.options.language = eData.dateLanguage;
|
233 |
+
if (eData.dateDefaultdate !== undefined) picker.options.defaultDate = eData.dateDefaultdate;
|
234 |
+
if (eData.dateDisableddates !== undefined) picker.options.disabledDates = eData.dateDisableddates;
|
235 |
+
if (eData.dateEnableddates !== undefined) picker.options.enabledDates = eData.dateEnableddates;
|
236 |
+
if (eData.dateIcons !== undefined) picker.options.icons = eData.dateIcons;
|
237 |
+
if (eData.dateUsestrict !== undefined) picker.options.useStrict = eData.dateUsestrict;
|
238 |
+
if (eData.dateDirection !== undefined) picker.options.direction = eData.dateDirection;
|
239 |
+
if (eData.dateSidebyside !== undefined) picker.options.sideBySide = eData.dateSidebyside;
|
240 |
+
},
|
241 |
+
|
242 |
+
place = function () {
|
243 |
+
var position = 'absolute',
|
244 |
+
offset = picker.component ? picker.component.offset() : picker.element.offset(), $window = $(window);
|
245 |
+
picker.width = picker.component ? picker.component.outerWidth() : picker.element.outerWidth();
|
246 |
+
offset.top = offset.top + picker.element.outerHeight();
|
247 |
+
|
248 |
+
var placePosition;
|
249 |
+
if (picker.options.direction === 'up') {
|
250 |
+
placePosition = 'top'
|
251 |
+
} else if (picker.options.direction === 'bottom') {
|
252 |
+
placePosition = 'bottom'
|
253 |
+
} else if (picker.options.direction === 'auto') {
|
254 |
+
if (offset.top + picker.widget.height() > $window.height() + $window.scrollTop() && picker.widget.height() + picker.element.outerHeight() < offset.top) {
|
255 |
+
placePosition = 'top';
|
256 |
+
} else {
|
257 |
+
placePosition = 'bottom';
|
258 |
+
}
|
259 |
+
};
|
260 |
+
if (placePosition === 'top') {
|
261 |
+
offset.top -= picker.widget.height() + picker.element.outerHeight() + 15;
|
262 |
+
picker.widget.addClass('top').removeClass('bottom');
|
263 |
+
} else {
|
264 |
+
offset.top += 1;
|
265 |
+
picker.widget.addClass('bottom').removeClass('top');
|
266 |
+
}
|
267 |
+
|
268 |
+
if (picker.options.width !== undefined) {
|
269 |
+
picker.widget.width(picker.options.width);
|
270 |
+
}
|
271 |
+
|
272 |
+
if (picker.options.orientation === 'left') {
|
273 |
+
picker.widget.addClass('left-oriented');
|
274 |
+
offset.left = offset.left - picker.widget.width() + 20;
|
275 |
+
}
|
276 |
+
|
277 |
+
if (isInFixed()) {
|
278 |
+
position = 'fixed';
|
279 |
+
offset.top -= $window.scrollTop();
|
280 |
+
offset.left -= $window.scrollLeft();
|
281 |
+
}
|
282 |
+
|
283 |
+
if ($window.width() < offset.left + picker.widget.outerWidth()) {
|
284 |
+
offset.right = $window.width() - offset.left - picker.width;
|
285 |
+
offset.left = 'auto';
|
286 |
+
picker.widget.addClass('pull-right');
|
287 |
+
} else {
|
288 |
+
offset.right = 'auto';
|
289 |
+
picker.widget.removeClass('pull-right');
|
290 |
+
}
|
291 |
+
|
292 |
+
picker.widget.css({
|
293 |
+
position: position,
|
294 |
+
top: offset.top,
|
295 |
+
left: offset.left,
|
296 |
+
right: offset.right
|
297 |
+
});
|
298 |
+
},
|
299 |
+
|
300 |
+
notifyChange = function (oldDate, eventType) {
|
301 |
+
if (pMoment(picker.date).isSame(pMoment(oldDate))) return;
|
302 |
+
picker.element.trigger({
|
303 |
+
type: 'dp.change',
|
304 |
+
date: pMoment(picker.date),
|
305 |
+
oldDate: pMoment(oldDate)
|
306 |
+
});
|
307 |
+
|
308 |
+
if (eventType !== 'change')
|
309 |
+
picker.element.change();
|
310 |
+
},
|
311 |
+
|
312 |
+
notifyError = function (date) {
|
313 |
+
picker.element.trigger({
|
314 |
+
type: 'dp.error',
|
315 |
+
date: pMoment(date)
|
316 |
+
});
|
317 |
+
},
|
318 |
+
|
319 |
+
update = function (newDate) {
|
320 |
+
pMoment.lang(picker.options.language);
|
321 |
+
var dateStr = newDate;
|
322 |
+
if (!dateStr) {
|
323 |
+
dateStr = getPickerInput().val()
|
324 |
+
if (dateStr) picker.date = pMoment(dateStr, picker.format, picker.options.useStrict);
|
325 |
+
if (!picker.date) picker.date = pMoment();
|
326 |
+
}
|
327 |
+
picker.viewDate = pMoment(picker.date).startOf("month");
|
328 |
+
fillDate();
|
329 |
+
fillTime();
|
330 |
+
},
|
331 |
+
|
332 |
+
fillDow = function () {
|
333 |
+
pMoment.lang(picker.options.language);
|
334 |
+
var html = $('<tr>'), weekdaysMin = pMoment.weekdaysMin(), i;
|
335 |
+
if (pMoment()._lang._week.dow == 0) { // starts on Sunday
|
336 |
+
for (i = 0; i < 7; i++) {
|
337 |
+
html.append('<th class="dow">' + weekdaysMin[i] + '</th>');
|
338 |
+
}
|
339 |
+
} else {
|
340 |
+
for (i = 1; i < 8; i++) {
|
341 |
+
if (i == 7) {
|
342 |
+
html.append('<th class="dow">' + weekdaysMin[0] + '</th>');
|
343 |
+
} else {
|
344 |
+
html.append('<th class="dow">' + weekdaysMin[i] + '</th>');
|
345 |
+
}
|
346 |
+
}
|
347 |
+
}
|
348 |
+
picker.widget.find('.datepicker-days thead').append(html);
|
349 |
+
},
|
350 |
+
|
351 |
+
fillMonths = function () {
|
352 |
+
pMoment.lang(picker.options.language);
|
353 |
+
var html = '', i = 0, monthsShort = pMoment.monthsShort();
|
354 |
+
while (i < 12) {
|
355 |
+
html += '<span class="month">' + monthsShort[i++] + '</span>';
|
356 |
+
}
|
357 |
+
picker.widget.find('.datepicker-months td').append(html);
|
358 |
+
},
|
359 |
+
|
360 |
+
fillDate = function () {
|
361 |
+
pMoment.lang(picker.options.language);
|
362 |
+
var year = picker.viewDate.year(),
|
363 |
+
month = picker.viewDate.month(),
|
364 |
+
startYear = picker.options.minDate.year(),
|
365 |
+
startMonth = picker.options.minDate.month(),
|
366 |
+
endYear = picker.options.maxDate.year(),
|
367 |
+
endMonth = picker.options.maxDate.month(),
|
368 |
+
prevMonth, nextMonth, html = [], row, clsName, i, days, yearCont, currentYear, months = pMoment.months();
|
369 |
+
|
370 |
+
picker.widget.find('.datepicker-days').find('.disabled').removeClass('disabled');
|
371 |
+
picker.widget.find('.datepicker-months').find('.disabled').removeClass('disabled');
|
372 |
+
picker.widget.find('.datepicker-years').find('.disabled').removeClass('disabled');
|
373 |
+
|
374 |
+
picker.widget.find('.datepicker-days th:eq(1)').text(
|
375 |
+
months[month] + ' ' + year);
|
376 |
+
|
377 |
+
prevMonth = pMoment(picker.viewDate).subtract("months", 1);
|
378 |
+
days = prevMonth.daysInMonth();
|
379 |
+
prevMonth.date(days).startOf('week');
|
380 |
+
if ((year == startYear && month <= startMonth) || year < startYear) {
|
381 |
+
picker.widget.find('.datepicker-days th:eq(0)').addClass('disabled');
|
382 |
+
}
|
383 |
+
if ((year == endYear && month >= endMonth) || year > endYear) {
|
384 |
+
picker.widget.find('.datepicker-days th:eq(2)').addClass('disabled');
|
385 |
+
}
|
386 |
+
|
387 |
+
nextMonth = pMoment(prevMonth).add(42, "d");
|
388 |
+
while (prevMonth.isBefore(nextMonth)) {
|
389 |
+
if (prevMonth.weekday() === pMoment().startOf('week').weekday()) {
|
390 |
+
row = $('<tr>');
|
391 |
+
html.push(row);
|
392 |
+
}
|
393 |
+
clsName = '';
|
394 |
+
if (prevMonth.year() < year || (prevMonth.year() == year && prevMonth.month() < month)) {
|
395 |
+
clsName += ' old';
|
396 |
+
} else if (prevMonth.year() > year || (prevMonth.year() == year && prevMonth.month() > month)) {
|
397 |
+
clsName += ' new';
|
398 |
+
}
|
399 |
+
if (prevMonth.isSame(pMoment({ y: picker.date.year(), M: picker.date.month(), d: picker.date.date() }))) {
|
400 |
+
clsName += ' active';
|
401 |
+
}
|
402 |
+
if (isInDisableDates(prevMonth) || !isInEnableDates(prevMonth)) {
|
403 |
+
clsName += ' disabled';
|
404 |
+
}
|
405 |
+
if (picker.options.showToday === true) {
|
406 |
+
if (prevMonth.isSame(pMoment(), 'day')) {
|
407 |
+
clsName += ' today';
|
408 |
+
}
|
409 |
+
}
|
410 |
+
if (picker.options.daysOfWeekDisabled) {
|
411 |
+
for (i in picker.options.daysOfWeekDisabled) {
|
412 |
+
if (prevMonth.day() == picker.options.daysOfWeekDisabled[i]) {
|
413 |
+
clsName += ' disabled';
|
414 |
+
break;
|
415 |
+
}
|
416 |
+
}
|
417 |
+
}
|
418 |
+
row.append('<td class="day' + clsName + '">' + prevMonth.date() + '</td>');
|
419 |
+
prevMonth.add(1, "d");
|
420 |
+
}
|
421 |
+
picker.widget.find('.datepicker-days tbody').empty().append(html);
|
422 |
+
currentYear = picker.date.year(), months = picker.widget.find('.datepicker-months')
|
423 |
+
.find('th:eq(1)').text(year).end().find('span').removeClass('active');
|
424 |
+
if (currentYear === year) {
|
425 |
+
months.eq(picker.date.month()).addClass('active');
|
426 |
+
}
|
427 |
+
if (currentYear - 1 < startYear) {
|
428 |
+
picker.widget.find('.datepicker-months th:eq(0)').addClass('disabled');
|
429 |
+
}
|
430 |
+
if (currentYear + 1 > endYear) {
|
431 |
+
picker.widget.find('.datepicker-months th:eq(2)').addClass('disabled');
|
432 |
+
}
|
433 |
+
for (i = 0; i < 12; i++) {
|
434 |
+
if ((year == startYear && startMonth > i) || (year < startYear)) {
|
435 |
+
$(months[i]).addClass('disabled');
|
436 |
+
} else if ((year == endYear && endMonth < i) || (year > endYear)) {
|
437 |
+
$(months[i]).addClass('disabled');
|
438 |
+
}
|
439 |
+
}
|
440 |
+
|
441 |
+
html = '';
|
442 |
+
year = parseInt(year / 10, 10) * 10;
|
443 |
+
yearCont = picker.widget.find('.datepicker-years').find(
|
444 |
+
'th:eq(1)').text(year + '-' + (year + 9)).end().find('td');
|
445 |
+
picker.widget.find('.datepicker-years').find('th').removeClass('disabled');
|
446 |
+
if (startYear > year) {
|
447 |
+
picker.widget.find('.datepicker-years').find('th:eq(0)').addClass('disabled');
|
448 |
+
}
|
449 |
+
if (endYear < year + 9) {
|
450 |
+
picker.widget.find('.datepicker-years').find('th:eq(2)').addClass('disabled');
|
451 |
+
}
|
452 |
+
year -= 1;
|
453 |
+
for (i = -1; i < 11; i++) {
|
454 |
+
html += '<span class="year' + (i === -1 || i === 10 ? ' old' : '') + (currentYear === year ? ' active' : '') + ((year < startYear || year > endYear) ? ' disabled' : '') + '">' + year + '</span>';
|
455 |
+
year += 1;
|
456 |
+
}
|
457 |
+
yearCont.html(html);
|
458 |
+
},
|
459 |
+
|
460 |
+
fillHours = function () {
|
461 |
+
pMoment.lang(picker.options.language);
|
462 |
+
var table = picker.widget.find('.timepicker .timepicker-hours table'), html = '', current, i, j;
|
463 |
+
table.parent().hide();
|
464 |
+
if (picker.use24hours) {
|
465 |
+
current = 0;
|
466 |
+
for (i = 0; i < 6; i += 1) {
|
467 |
+
html += '<tr>';
|
468 |
+
for (j = 0; j < 4; j += 1) {
|
469 |
+
html += '<td class="hour">' + padLeft(current.toString()) + '</td>';
|
470 |
+
current++;
|
471 |
+
}
|
472 |
+
html += '</tr>';
|
473 |
+
}
|
474 |
+
}
|
475 |
+
else {
|
476 |
+
current = 1;
|
477 |
+
for (i = 0; i < 3; i += 1) {
|
478 |
+
html += '<tr>';
|
479 |
+
for (j = 0; j < 4; j += 1) {
|
480 |
+
html += '<td class="hour">' + padLeft(current.toString()) + '</td>';
|
481 |
+
current++;
|
482 |
+
}
|
483 |
+
html += '</tr>';
|
484 |
+
}
|
485 |
+
}
|
486 |
+
table.html(html);
|
487 |
+
},
|
488 |
+
|
489 |
+
fillMinutes = function () {
|
490 |
+
var table = picker.widget.find('.timepicker .timepicker-minutes table'), html = '', current = 0, i, j, step = picker.options.minuteStepping;
|
491 |
+
table.parent().hide();
|
492 |
+
if (step = 1) step = 5;
|
493 |
+
for (i = 0; i < Math.ceil(60 / step / 4) ; i++) {
|
494 |
+
html += '<tr>';
|
495 |
+
for (j = 0; j < 4; j += 1) {
|
496 |
+
if (current < 60) {
|
497 |
+
html += '<td class="minute">' + padLeft(current.toString()) + '</td>';
|
498 |
+
current += step;
|
499 |
+
} else {
|
500 |
+
html += '<td></td>';
|
501 |
+
}
|
502 |
+
}
|
503 |
+
html += '</tr>';
|
504 |
+
}
|
505 |
+
table.html(html);
|
506 |
+
},
|
507 |
+
|
508 |
+
fillSeconds = function () {
|
509 |
+
var table = picker.widget.find('.timepicker .timepicker-seconds table'), html = '', current = 0, i, j;
|
510 |
+
table.parent().hide();
|
511 |
+
for (i = 0; i < 3; i++) {
|
512 |
+
html += '<tr>';
|
513 |
+
for (j = 0; j < 4; j += 1) {
|
514 |
+
html += '<td class="second">' + padLeft(current.toString()) + '</td>';
|
515 |
+
current += 5;
|
516 |
+
}
|
517 |
+
html += '</tr>';
|
518 |
+
}
|
519 |
+
table.html(html);
|
520 |
+
},
|
521 |
+
|
522 |
+
fillTime = function () {
|
523 |
+
if (!picker.date) return;
|
524 |
+
var timeComponents = picker.widget.find('.timepicker span[data-time-component]'),
|
525 |
+
hour = picker.date.hours(),
|
526 |
+
period = 'AM';
|
527 |
+
if (!picker.use24hours) {
|
528 |
+
if (hour >= 12) period = 'PM';
|
529 |
+
if (hour === 0) hour = 12;
|
530 |
+
else if (hour != 12) hour = hour % 12;
|
531 |
+
picker.widget.find('.timepicker [data-action=togglePeriod]').text(period);
|
532 |
+
}
|
533 |
+
timeComponents.filter('[data-time-component=hours]').text(padLeft(hour));
|
534 |
+
timeComponents.filter('[data-time-component=minutes]').text(padLeft(picker.date.minutes()));
|
535 |
+
timeComponents.filter('[data-time-component=seconds]').text(padLeft(picker.date.second()));
|
536 |
+
},
|
537 |
+
|
538 |
+
click = function (e) {
|
539 |
+
e.stopPropagation();
|
540 |
+
e.preventDefault();
|
541 |
+
picker.unset = false;
|
542 |
+
var target = $(e.target).closest('span, td, th'), month, year, step, day, oldDate = pMoment(picker.date);
|
543 |
+
if (target.length === 1) {
|
544 |
+
if (!target.is('.disabled')) {
|
545 |
+
switch (target[0].nodeName.toLowerCase()) {
|
546 |
+
case 'th':
|
547 |
+
switch (target[0].className) {
|
548 |
+
case 'switch':
|
549 |
+
showMode(1);
|
550 |
+
break;
|
551 |
+
case 'prev':
|
552 |
+
case 'next':
|
553 |
+
step = dpGlobal.modes[picker.viewMode].navStep;
|
554 |
+
if (target[0].className === 'prev') step = step * -1;
|
555 |
+
picker.viewDate.add(step, dpGlobal.modes[picker.viewMode].navFnc);
|
556 |
+
fillDate();
|
557 |
+
break;
|
558 |
+
}
|
559 |
+
break;
|
560 |
+
case 'span':
|
561 |
+
if (target.is('.month')) {
|
562 |
+
month = target.parent().find('span').index(target);
|
563 |
+
picker.viewDate.month(month);
|
564 |
+
} else {
|
565 |
+
year = parseInt(target.text(), 10) || 0;
|
566 |
+
picker.viewDate.year(year);
|
567 |
+
}
|
568 |
+
if (picker.viewMode === picker.minViewMode) {
|
569 |
+
picker.date = pMoment({
|
570 |
+
y: picker.viewDate.year(),
|
571 |
+
M: picker.viewDate.month(),
|
572 |
+
d: picker.viewDate.date(),
|
573 |
+
h: picker.date.hours(),
|
574 |
+
m: picker.date.minutes(),
|
575 |
+
s: picker.date.seconds()
|
576 |
+
});
|
577 |
+
notifyChange(oldDate, e.type);
|
578 |
+
set();
|
579 |
+
}
|
580 |
+
showMode(-1);
|
581 |
+
fillDate();
|
582 |
+
break;
|
583 |
+
case 'td':
|
584 |
+
if (target.is('.day')) {
|
585 |
+
day = parseInt(target.text(), 10) || 1;
|
586 |
+
month = picker.viewDate.month();
|
587 |
+
year = picker.viewDate.year();
|
588 |
+
if (target.is('.old')) {
|
589 |
+
if (month === 0) {
|
590 |
+
month = 11;
|
591 |
+
year -= 1;
|
592 |
+
} else {
|
593 |
+
month -= 1;
|
594 |
+
}
|
595 |
+
} else if (target.is('.new')) {
|
596 |
+
if (month == 11) {
|
597 |
+
month = 0;
|
598 |
+
year += 1;
|
599 |
+
} else {
|
600 |
+
month += 1;
|
601 |
+
}
|
602 |
+
}
|
603 |
+
picker.date = pMoment({
|
604 |
+
y: year,
|
605 |
+
M: month,
|
606 |
+
d: day,
|
607 |
+
h: picker.date.hours(),
|
608 |
+
m: picker.date.minutes(),
|
609 |
+
s: picker.date.seconds()
|
610 |
+
}
|
611 |
+
);
|
612 |
+
picker.viewDate = pMoment({
|
613 |
+
y: year, M: month, d: Math.min(28, day)
|
614 |
+
});
|
615 |
+
fillDate();
|
616 |
+
set();
|
617 |
+
notifyChange(oldDate, e.type);
|
618 |
+
}
|
619 |
+
break;
|
620 |
+
}
|
621 |
+
}
|
622 |
+
}
|
623 |
+
},
|
624 |
+
|
625 |
+
actions = {
|
626 |
+
incrementHours: function () {
|
627 |
+
checkDate("add", "hours", 1);
|
628 |
+
},
|
629 |
+
|
630 |
+
incrementMinutes: function () {
|
631 |
+
checkDate("add", "minutes", picker.options.minuteStepping);
|
632 |
+
},
|
633 |
+
|
634 |
+
incrementSeconds: function () {
|
635 |
+
checkDate("add", "seconds", 1);
|
636 |
+
},
|
637 |
+
|
638 |
+
decrementHours: function () {
|
639 |
+
checkDate("subtract", "hours", 1);
|
640 |
+
},
|
641 |
+
|
642 |
+
decrementMinutes: function () {
|
643 |
+
checkDate("subtract", "minutes", picker.options.minuteStepping);
|
644 |
+
},
|
645 |
+
|
646 |
+
decrementSeconds: function () {
|
647 |
+
checkDate("subtract", "seconds", 1);
|
648 |
+
},
|
649 |
+
|
650 |
+
togglePeriod: function () {
|
651 |
+
var hour = picker.date.hours();
|
652 |
+
if (hour >= 12) hour -= 12;
|
653 |
+
else hour += 12;
|
654 |
+
picker.date.hours(hour);
|
655 |
+
},
|
656 |
+
|
657 |
+
showPicker: function () {
|
658 |
+
picker.widget.find('.timepicker > div:not(.timepicker-picker)').hide();
|
659 |
+
picker.widget.find('.timepicker .timepicker-picker').show();
|
660 |
+
},
|
661 |
+
|
662 |
+
showHours: function () {
|
663 |
+
picker.widget.find('.timepicker .timepicker-picker').hide();
|
664 |
+
picker.widget.find('.timepicker .timepicker-hours').show();
|
665 |
+
},
|
666 |
+
|
667 |
+
showMinutes: function () {
|
668 |
+
picker.widget.find('.timepicker .timepicker-picker').hide();
|
669 |
+
picker.widget.find('.timepicker .timepicker-minutes').show();
|
670 |
+
},
|
671 |
+
|
672 |
+
showSeconds: function () {
|
673 |
+
picker.widget.find('.timepicker .timepicker-picker').hide();
|
674 |
+
picker.widget.find('.timepicker .timepicker-seconds').show();
|
675 |
+
},
|
676 |
+
|
677 |
+
selectHour: function (e) {
|
678 |
+
var period = picker.widget.find('.timepicker [data-action=togglePeriod]').text(), hour = parseInt($(e.target).text(), 10);
|
679 |
+
if (period == "PM") hour += 12
|
680 |
+
picker.date.hours(hour);
|
681 |
+
actions.showPicker.call(picker);
|
682 |
+
},
|
683 |
+
|
684 |
+
selectMinute: function (e) {
|
685 |
+
picker.date.minutes(parseInt($(e.target).text(), 10));
|
686 |
+
actions.showPicker.call(picker);
|
687 |
+
},
|
688 |
+
|
689 |
+
selectSecond: function (e) {
|
690 |
+
picker.date.seconds(parseInt($(e.target).text(), 10));
|
691 |
+
actions.showPicker.call(picker);
|
692 |
+
}
|
693 |
+
},
|
694 |
+
|
695 |
+
doAction = function (e) {
|
696 |
+
var oldDate = pMoment(picker.date), action = $(e.currentTarget).data('action'), rv = actions[action].apply(picker, arguments);
|
697 |
+
stopEvent(e);
|
698 |
+
if (!picker.date) picker.date = pMoment({ y: 1970 });
|
699 |
+
set();
|
700 |
+
fillTime();
|
701 |
+
notifyChange(oldDate, e.type);
|
702 |
+
return rv;
|
703 |
+
},
|
704 |
+
|
705 |
+
stopEvent = function (e) {
|
706 |
+
e.stopPropagation();
|
707 |
+
e.preventDefault();
|
708 |
+
},
|
709 |
+
|
710 |
+
change = function (e) {
|
711 |
+
pMoment.lang(picker.options.language);
|
712 |
+
var input = $(e.target), oldDate = pMoment(picker.date), newDate = pMoment(input.val(), picker.format, picker.options.useStrict);
|
713 |
+
if (newDate.isValid() && !isInDisableDates(newDate) && isInEnableDates(newDate)) {
|
714 |
+
update();
|
715 |
+
picker.setValue(newDate);
|
716 |
+
notifyChange(oldDate, e.type);
|
717 |
+
set();
|
718 |
+
}
|
719 |
+
else {
|
720 |
+
picker.viewDate = oldDate;
|
721 |
+
notifyChange(oldDate, e.type);
|
722 |
+
notifyError(newDate);
|
723 |
+
picker.unset = true;
|
724 |
+
}
|
725 |
+
},
|
726 |
+
|
727 |
+
showMode = function (dir) {
|
728 |
+
if (dir) {
|
729 |
+
picker.viewMode = Math.max(picker.minViewMode, Math.min(2, picker.viewMode + dir));
|
730 |
+
}
|
731 |
+
var f = dpGlobal.modes[picker.viewMode].clsName;
|
732 |
+
picker.widget.find('.datepicker > div').hide().filter('.datepicker-' + dpGlobal.modes[picker.viewMode].clsName).show();
|
733 |
+
},
|
734 |
+
|
735 |
+
attachDatePickerEvents = function () {
|
736 |
+
var $this, $parent, expanded, closed, collapseData;
|
737 |
+
picker.widget.on('click', '.datepicker *', $.proxy(click, this)); // this handles date picker clicks
|
738 |
+
picker.widget.on('click', '[data-action]', $.proxy(doAction, this)); // this handles time picker clicks
|
739 |
+
picker.widget.on('mousedown', $.proxy(stopEvent, this));
|
740 |
+
if (picker.options.pickDate && picker.options.pickTime) {
|
741 |
+
picker.widget.on('click.togglePicker', '.accordion-toggle', function (e) {
|
742 |
+
e.stopPropagation();
|
743 |
+
$this = $(this);
|
744 |
+
$parent = $this.closest('ul');
|
745 |
+
expanded = $parent.find('.in');
|
746 |
+
closed = $parent.find('.collapse:not(.in)');
|
747 |
+
|
748 |
+
if (expanded && expanded.length) {
|
749 |
+
collapseData = expanded.data('collapse');
|
750 |
+
if (collapseData && collapseData.date - transitioning) return;
|
751 |
+
expanded.collapse('hide');
|
752 |
+
closed.collapse('show');
|
753 |
+
$this.find('span').toggleClass(picker.options.icons.time + ' ' + picker.options.icons.date);
|
754 |
+
picker.element.find('.input-group-addon span').toggleClass(picker.options.icons.time + ' ' + picker.options.icons.date);
|
755 |
+
}
|
756 |
+
});
|
757 |
+
}
|
758 |
+
if (picker.isInput) {
|
759 |
+
picker.element.on({
|
760 |
+
'focus': $.proxy(picker.show, this),
|
761 |
+
'change': $.proxy(change, this),
|
762 |
+
'blur': $.proxy(picker.hide, this)
|
763 |
+
});
|
764 |
+
} else {
|
765 |
+
picker.element.on({
|
766 |
+
'change': $.proxy(change, this)
|
767 |
+
}, 'input');
|
768 |
+
if (picker.component) {
|
769 |
+
picker.component.on('click', $.proxy(picker.show, this));
|
770 |
+
} else {
|
771 |
+
picker.element.on('click', $.proxy(picker.show, this));
|
772 |
+
}
|
773 |
+
}
|
774 |
+
},
|
775 |
+
|
776 |
+
attachDatePickerGlobalEvents = function () {
|
777 |
+
$(window).on(
|
778 |
+
'resize.datetimepicker' + picker.id, $.proxy(place, this));
|
779 |
+
if (!picker.isInput) {
|
780 |
+
$(document).on(
|
781 |
+
'mousedown.datetimepicker' + picker.id, $.proxy(picker.hide, this));
|
782 |
+
}
|
783 |
+
},
|
784 |
+
|
785 |
+
detachDatePickerEvents = function () {
|
786 |
+
picker.widget.off('click', '.datepicker *', picker.click);
|
787 |
+
picker.widget.off('click', '[data-action]');
|
788 |
+
picker.widget.off('mousedown', picker.stopEvent);
|
789 |
+
if (picker.options.pickDate && picker.options.pickTime) {
|
790 |
+
picker.widget.off('click.togglePicker');
|
791 |
+
}
|
792 |
+
if (picker.isInput) {
|
793 |
+
picker.element.off({
|
794 |
+
'focus': picker.show,
|
795 |
+
'change': picker.change
|
796 |
+
});
|
797 |
+
} else {
|
798 |
+
picker.element.off({
|
799 |
+
'change': picker.change
|
800 |
+
}, 'input');
|
801 |
+
if (picker.component) {
|
802 |
+
picker.component.off('click', picker.show);
|
803 |
+
} else {
|
804 |
+
picker.element.off('click', picker.show);
|
805 |
+
}
|
806 |
+
}
|
807 |
+
},
|
808 |
+
|
809 |
+
detachDatePickerGlobalEvents = function () {
|
810 |
+
$(window).off('resize.datetimepicker' + picker.id);
|
811 |
+
if (!picker.isInput) {
|
812 |
+
$(document).off('mousedown.datetimepicker' + picker.id);
|
813 |
+
}
|
814 |
+
},
|
815 |
+
|
816 |
+
isInFixed = function () {
|
817 |
+
if (picker.element) {
|
818 |
+
var parents = picker.element.parents(), inFixed = false, i;
|
819 |
+
for (i = 0; i < parents.length; i++) {
|
820 |
+
if ($(parents[i]).css('position') == 'fixed') {
|
821 |
+
inFixed = true;
|
822 |
+
break;
|
823 |
+
}
|
824 |
+
}
|
825 |
+
;
|
826 |
+
return inFixed;
|
827 |
+
} else {
|
828 |
+
return false;
|
829 |
+
}
|
830 |
+
},
|
831 |
+
|
832 |
+
set = function () {
|
833 |
+
pMoment.lang(picker.options.language);
|
834 |
+
var formatted = '', input;
|
835 |
+
if (!picker.unset) formatted = pMoment(picker.date).format(picker.format);
|
836 |
+
getPickerInput().val(formatted);
|
837 |
+
picker.element.data('date', formatted);
|
838 |
+
if (!picker.options.pickTime) picker.hide();
|
839 |
+
},
|
840 |
+
|
841 |
+
checkDate = function (direction, unit, amount) {
|
842 |
+
pMoment.lang(picker.options.language);
|
843 |
+
var newDate;
|
844 |
+
if (direction == "add") {
|
845 |
+
newDate = pMoment(picker.date);
|
846 |
+
if (newDate.hours() == 23) newDate.add(amount, unit);
|
847 |
+
newDate.add(amount, unit);
|
848 |
+
}
|
849 |
+
else {
|
850 |
+
newDate = pMoment(picker.date).subtract(amount, unit);
|
851 |
+
}
|
852 |
+
if (isInDisableDates(pMoment(newDate.subtract(amount, unit))) || isInDisableDates(newDate)) {
|
853 |
+
notifyError(newDate.format(picker.format));
|
854 |
+
return;
|
855 |
+
}
|
856 |
+
|
857 |
+
if (direction == "add") {
|
858 |
+
picker.date.add(amount, unit);
|
859 |
+
}
|
860 |
+
else {
|
861 |
+
picker.date.subtract(amount, unit);
|
862 |
+
}
|
863 |
+
picker.unset = false;
|
864 |
+
},
|
865 |
+
|
866 |
+
isInDisableDates = function (date) {
|
867 |
+
pMoment.lang(picker.options.language);
|
868 |
+
if (date.isAfter(picker.options.maxDate) || date.isBefore(picker.options.minDate)) return true;
|
869 |
+
if (picker.options.disabledDates === false) {
|
870 |
+
return false;
|
871 |
+
}
|
872 |
+
return picker.options.disabledDates[pMoment(date).format("YYYY-MM-DD")] === true;
|
873 |
+
},
|
874 |
+
isInEnableDates = function (date) {
|
875 |
+
pMoment.lang(picker.options.language);
|
876 |
+
if (picker.options.enabledDates === false) {
|
877 |
+
return true;
|
878 |
+
}
|
879 |
+
return picker.options.enabledDates[pMoment(date).format("YYYY-MM-DD")] === true;
|
880 |
+
},
|
881 |
+
|
882 |
+
indexGivenDates = function (givenDatesArray) {
|
883 |
+
// Store given enabledDates and disabledDates as keys.
|
884 |
+
// This way we can check their existence in O(1) time instead of looping through whole array.
|
885 |
+
// (for example: picker.options.enabledDates['2014-02-27'] === true)
|
886 |
+
var givenDatesIndexed = {};
|
887 |
+
var givenDatesCount = 0;
|
888 |
+
for (i = 0; i < givenDatesArray.length; i++) {
|
889 |
+
dDate = pMoment(givenDatesArray[i]);
|
890 |
+
if (dDate.isValid()) {
|
891 |
+
givenDatesIndexed[dDate.format("YYYY-MM-DD")] = true;
|
892 |
+
givenDatesCount++;
|
893 |
+
}
|
894 |
+
}
|
895 |
+
if (givenDatesCount > 0) {
|
896 |
+
return givenDatesIndexed;
|
897 |
+
}
|
898 |
+
return false;
|
899 |
+
},
|
900 |
+
|
901 |
+
padLeft = function (string) {
|
902 |
+
string = string.toString();
|
903 |
+
if (string.length >= 2) return string;
|
904 |
+
else return '0' + string;
|
905 |
+
},
|
906 |
+
|
907 |
+
getTemplate = function () {
|
908 |
+
if (picker.options.pickDate && picker.options.pickTime) {
|
909 |
+
var ret = '';
|
910 |
+
ret = '<div class="bootstrap-datetimepicker-widget' + (picker.options.sideBySide ? ' timepicker-sbs' : '') + ' dropdown-menu" style="z-index:9999 !important;">';
|
911 |
+
if (picker.options.sideBySide) {
|
912 |
+
ret += '<div class="row">' +
|
913 |
+
'<div class="col-sm-6 datepicker">' + dpGlobal.template + '</div>' +
|
914 |
+
'<div class="col-sm-6 timepicker">' + tpGlobal.getTemplate() + '</div>' +
|
915 |
+
'</div>';
|
916 |
+
} else {
|
917 |
+
ret += '<ul class="list-unstyled">' +
|
918 |
+
'<li' + (picker.options.collapse ? ' class="collapse in"' : '') + '>' +
|
919 |
+
'<div class="datepicker">' + dpGlobal.template + '</div>' +
|
920 |
+
'</li>' +
|
921 |
+
'<li class="picker-switch accordion-toggle"><a class="btn" style="width:100%"><span class="' + picker.options.icons.time + '"></span></a></li>' +
|
922 |
+
'<li' + (picker.options.collapse ? ' class="collapse"' : '') + '>' +
|
923 |
+
'<div class="timepicker">' + tpGlobal.getTemplate() + '</div>' +
|
924 |
+
'</li>' +
|
925 |
+
'</ul>';
|
926 |
+
}
|
927 |
+
ret += '</div>';
|
928 |
+
return ret;
|
929 |
+
} else if (picker.options.pickTime) {
|
930 |
+
return (
|
931 |
+
'<div class="bootstrap-datetimepicker-widget dropdown-menu">' +
|
932 |
+
'<div class="timepicker">' + tpGlobal.getTemplate() + '</div>' +
|
933 |
+
'</div>'
|
934 |
+
);
|
935 |
+
} else {
|
936 |
+
return (
|
937 |
+
'<div class="bootstrap-datetimepicker-widget dropdown-menu">' +
|
938 |
+
'<div class="datepicker">' + dpGlobal.template + '</div>' +
|
939 |
+
'</div>'
|
940 |
+
);
|
941 |
+
}
|
942 |
+
},
|
943 |
+
|
944 |
+
dpGlobal = {
|
945 |
+
modes: [
|
946 |
+
{
|
947 |
+
clsName: 'days',
|
948 |
+
navFnc: 'month',
|
949 |
+
navStep: 1
|
950 |
+
},
|
951 |
+
{
|
952 |
+
clsName: 'months',
|
953 |
+
navFnc: 'year',
|
954 |
+
navStep: 1
|
955 |
+
},
|
956 |
+
{
|
957 |
+
clsName: 'years',
|
958 |
+
navFnc: 'year',
|
959 |
+
navStep: 10
|
960 |
+
}],
|
961 |
+
headTemplate:
|
962 |
+
'<thead>' +
|
963 |
+
'<tr>' +
|
964 |
+
'<th class="prev">‹</th><th colspan="5" class="switch"></th><th class="next">›</th>' +
|
965 |
+
'</tr>' +
|
966 |
+
'</thead>',
|
967 |
+
contTemplate:
|
968 |
+
'<tbody><tr><td colspan="7"></td></tr></tbody>'
|
969 |
+
},
|
970 |
+
|
971 |
+
tpGlobal = {
|
972 |
+
hourTemplate: '<span data-action="showHours" data-time-component="hours" class="timepicker-hour"></span>',
|
973 |
+
minuteTemplate: '<span data-action="showMinutes" data-time-component="minutes" class="timepicker-minute"></span>',
|
974 |
+
secondTemplate: '<span data-action="showSeconds" data-time-component="seconds" class="timepicker-second"></span>'
|
975 |
+
};
|
976 |
+
|
977 |
+
dpGlobal.template =
|
978 |
+
'<div class="datepicker-days">' +
|
979 |
+
'<table class="table-condensed">' + dpGlobal.headTemplate + '<tbody></tbody></table>' +
|
980 |
+
'</div>' +
|
981 |
+
'<div class="datepicker-months">' +
|
982 |
+
'<table class="table-condensed">' + dpGlobal.headTemplate + dpGlobal.contTemplate + '</table>' +
|
983 |
+
'</div>' +
|
984 |
+
'<div class="datepicker-years">' +
|
985 |
+
'<table class="table-condensed">' + dpGlobal.headTemplate + dpGlobal.contTemplate + '</table>' +
|
986 |
+
'</div>';
|
987 |
+
|
988 |
+
tpGlobal.getTemplate = function () {
|
989 |
+
return (
|
990 |
+
'<div class="timepicker-picker">' +
|
991 |
+
'<table class="table-condensed">' +
|
992 |
+
'<tr>' +
|
993 |
+
'<td><a href="#" class="btn" data-action="incrementHours"><span class="' + picker.options.icons.up + '"></span></a></td>' +
|
994 |
+
'<td class="separator"></td>' +
|
995 |
+
'<td>' + (picker.options.useMinutes ? '<a href="#" class="btn" data-action="incrementMinutes"><span class="' + picker.options.icons.up + '"></span></a>' : '') + '</td>' +
|
996 |
+
(picker.options.useSeconds ?
|
997 |
+
'<td class="separator"></td><td><a href="#" class="btn" data-action="incrementSeconds"><span class="' + picker.options.icons.up + '"></span></a></td>' : '') +
|
998 |
+
(picker.use24hours ? '' : '<td class="separator"></td>') +
|
999 |
+
'</tr>' +
|
1000 |
+
'<tr>' +
|
1001 |
+
'<td>' + tpGlobal.hourTemplate + '</td> ' +
|
1002 |
+
'<td class="separator">:</td>' +
|
1003 |
+
'<td>' + (picker.options.useMinutes ? tpGlobal.minuteTemplate : '<span class="timepicker-minute">00</span>') + '</td> ' +
|
1004 |
+
(picker.options.useSeconds ?
|
1005 |
+
'<td class="separator">:</td><td>' + tpGlobal.secondTemplate + '</td>' : '') +
|
1006 |
+
(picker.use24hours ? '' : '<td class="separator"></td>' +
|
1007 |
+
'<td><button type="button" class="btn btn-primary" data-action="togglePeriod"></button></td>') +
|
1008 |
+
'</tr>' +
|
1009 |
+
'<tr>' +
|
1010 |
+
'<td><a href="#" class="btn" data-action="decrementHours"><span class="' + picker.options.icons.down + '"></span></a></td>' +
|
1011 |
+
'<td class="separator"></td>' +
|
1012 |
+
'<td>' + (picker.options.useMinutes ? '<a href="#" class="btn" data-action="decrementMinutes"><span class="' + picker.options.icons.down + '"></span></a>' : '') + '</td>' +
|
1013 |
+
(picker.options.useSeconds ?
|
1014 |
+
'<td class="separator"></td><td><a href="#" class="btn" data-action="decrementSeconds"><span class="' + picker.options.icons.down + '"></span></a></td>' : '') +
|
1015 |
+
(picker.use24hours ? '' : '<td class="separator"></td>') +
|
1016 |
+
'</tr>' +
|
1017 |
+
'</table>' +
|
1018 |
+
'</div>' +
|
1019 |
+
'<div class="timepicker-hours" data-action="selectHour">' +
|
1020 |
+
'<table class="table-condensed"></table>' +
|
1021 |
+
'</div>' +
|
1022 |
+
'<div class="timepicker-minutes" data-action="selectMinute">' +
|
1023 |
+
'<table class="table-condensed"></table>' +
|
1024 |
+
'</div>' +
|
1025 |
+
(picker.options.useSeconds ?
|
1026 |
+
'<div class="timepicker-seconds" data-action="selectSecond"><table class="table-condensed"></table></div>' : '')
|
1027 |
+
);
|
1028 |
+
};
|
1029 |
+
|
1030 |
+
picker.destroy = function () {
|
1031 |
+
detachDatePickerEvents();
|
1032 |
+
detachDatePickerGlobalEvents();
|
1033 |
+
picker.widget.remove();
|
1034 |
+
picker.element.removeData('DateTimePicker');
|
1035 |
+
if (picker.component)
|
1036 |
+
picker.component.removeData('DateTimePicker');
|
1037 |
+
};
|
1038 |
+
|
1039 |
+
picker.show = function (e) {
|
1040 |
+
if (picker.options.useCurrent === true) {
|
1041 |
+
if (getPickerInput().val() == '') {
|
1042 |
+
picker.setValue(pMoment().format(picker.format))
|
1043 |
+
};
|
1044 |
+
}
|
1045 |
+
picker.widget.show();
|
1046 |
+
picker.height = picker.component ? picker.component.outerHeight() : picker.element.outerHeight();
|
1047 |
+
place();
|
1048 |
+
picker.element.trigger({
|
1049 |
+
type: 'dp.show',
|
1050 |
+
date: pMoment(picker.date)
|
1051 |
+
});
|
1052 |
+
attachDatePickerGlobalEvents();
|
1053 |
+
if (e) {
|
1054 |
+
stopEvent(e);
|
1055 |
+
}
|
1056 |
+
},
|
1057 |
+
|
1058 |
+
picker.disable = function () {
|
1059 |
+
var input = picker.element.find('input');
|
1060 |
+
if (input.prop('disabled')) return;
|
1061 |
+
|
1062 |
+
input.prop('disabled', true);
|
1063 |
+
detachDatePickerEvents();
|
1064 |
+
},
|
1065 |
+
|
1066 |
+
picker.enable = function () {
|
1067 |
+
var input = picker.element.find('input');
|
1068 |
+
if (!input.prop('disabled')) return;
|
1069 |
+
|
1070 |
+
input.prop('disabled', false);
|
1071 |
+
attachDatePickerEvents();
|
1072 |
+
},
|
1073 |
+
|
1074 |
+
picker.hide = function (event) {
|
1075 |
+
if (event && $(event.target).is(picker.element.attr("id")))
|
1076 |
+
return;
|
1077 |
+
// Ignore event if in the middle of a picker transition
|
1078 |
+
var collapse = picker.widget.find('.collapse'), i, collapseData;
|
1079 |
+
for (i = 0; i < collapse.length; i++) {
|
1080 |
+
collapseData = collapse.eq(i).data('collapse');
|
1081 |
+
if (collapseData && collapseData.date - transitioning)
|
1082 |
+
return;
|
1083 |
+
}
|
1084 |
+
picker.widget.hide();
|
1085 |
+
picker.viewMode = picker.startViewMode;
|
1086 |
+
showMode();
|
1087 |
+
picker.element.trigger({
|
1088 |
+
type: 'dp.hide',
|
1089 |
+
date: pMoment(picker.date)
|
1090 |
+
});
|
1091 |
+
detachDatePickerGlobalEvents();
|
1092 |
+
},
|
1093 |
+
|
1094 |
+
picker.setValue = function (newDate) {
|
1095 |
+
pMoment.lang(picker.options.language);
|
1096 |
+
if (!newDate) {
|
1097 |
+
picker.unset = true;
|
1098 |
+
set();
|
1099 |
+
} else {
|
1100 |
+
picker.unset = false;
|
1101 |
+
}
|
1102 |
+
if (!pMoment.isMoment(newDate)) newDate = pMoment(newDate);
|
1103 |
+
if (newDate.isValid()) {
|
1104 |
+
picker.date = newDate;
|
1105 |
+
set();
|
1106 |
+
picker.viewDate = pMoment({ y: picker.date.year(), M: picker.date.month() });
|
1107 |
+
fillDate();
|
1108 |
+
fillTime();
|
1109 |
+
}
|
1110 |
+
else {
|
1111 |
+
notifyError(newDate);
|
1112 |
+
}
|
1113 |
+
},
|
1114 |
+
|
1115 |
+
picker.getDate = function () {
|
1116 |
+
if (picker.unset) return null;
|
1117 |
+
return picker.date;
|
1118 |
+
},
|
1119 |
+
|
1120 |
+
picker.setDate = function (date) {
|
1121 |
+
var oldDate = pMoment(picker.date);
|
1122 |
+
if (!date) {
|
1123 |
+
picker.setValue(null);
|
1124 |
+
} else {
|
1125 |
+
picker.setValue(date);
|
1126 |
+
}
|
1127 |
+
notifyChange(oldDate, "function");
|
1128 |
+
},
|
1129 |
+
|
1130 |
+
picker.setDisabledDates = function (dates) {
|
1131 |
+
picker.options.disabledDates = indexGivenDates(dates);
|
1132 |
+
if (picker.viewDate) update();
|
1133 |
+
},
|
1134 |
+
picker.setEnabledDates = function (dates) {
|
1135 |
+
picker.options.enabledDates = indexGivenDates(dates);
|
1136 |
+
if (picker.viewDate) update();
|
1137 |
+
},
|
1138 |
+
|
1139 |
+
picker.setMaxDate = function (date) {
|
1140 |
+
if (date == undefined) return;
|
1141 |
+
picker.options.maxDate = pMoment(date);
|
1142 |
+
if (picker.viewDate) update();
|
1143 |
+
},
|
1144 |
+
|
1145 |
+
picker.setMinDate = function (date) {
|
1146 |
+
if (date == undefined) return;
|
1147 |
+
picker.options.minDate = pMoment(date);
|
1148 |
+
if (picker.viewDate) update();
|
1149 |
+
};
|
1150 |
+
|
1151 |
+
init();
|
1152 |
+
};
|
1153 |
+
|
1154 |
+
$.fn.datetimepicker = function (options) {
|
1155 |
+
return this.each(function () {
|
1156 |
+
var $this = $(this), data = $this.data('DateTimePicker');
|
1157 |
+
if (!data) $this.data('DateTimePicker', new DateTimePicker(this, options));
|
1158 |
+
});
|
1159 |
+
};
|
1160 |
+
}));
|
assets/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Datetimepicker for Bootstrap v3
|
3 |
+
* https://github.com/Eonasdan/bootstrap-datetimepicker/
|
4 |
+
*/
|
5 |
+
.bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:99999!important;border-radius:4px}.bootstrap-datetimepicker-widget.timepicker-sbs{width:600px}.bootstrap-datetimepicker-widget.bottom:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:7px}.bootstrap-datetimepicker-widget.bottom:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:8px}.bootstrap-datetimepicker-widget.top:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.top:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff;position:absolute;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget .dow{width:14.2857%}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-weight:bold;font-size:1.2em}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;width:20px;height:20px;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#999}.bootstrap-datetimepicker-widget td.today{position:relative}.bootstrap-datetimepicker-widget td.today:before{content:'';display:inline-block;border-left:7px solid transparent;border-bottom:7px solid #428bca;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:4px;right:4px}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td.active.today:before{border-bottom-color:#fff}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:block;width:47px;height:54px;line-height:54px;float:left;margin:2px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{background:none;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-group.date .input-group-addon span{display:block;cursor:pointer;width:16px;height:16px}.bootstrap-datetimepicker-widget.left-oriented:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.left-oriented:after{left:auto;right:7px}.bootstrap-datetimepicker-widget ul.list-unstyled li div.timepicker div.timepicker-picker table.table-condensed tbody>tr>td{padding:0!important}
|
assets/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Version 3.0.0
|
3 |
+
=========================================================
|
4 |
+
bootstrap-datetimepicker.js
|
5 |
+
https://github.com/Eonasdan/bootstrap-datetimepicker
|
6 |
+
=========================================================
|
7 |
+
The MIT License (MIT)
|
8 |
+
|
9 |
+
Copyright (c) 2014 Jonathan Peterson
|
10 |
+
|
11 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
12 |
+
of this software and associated documentation files (the "Software"), to deal
|
13 |
+
in the Software without restriction, including without limitation the rights
|
14 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
15 |
+
copies of the Software, and to permit persons to whom the Software is
|
16 |
+
furnished to do so, subject to the following conditions:
|
17 |
+
|
18 |
+
The above copyright notice and this permission notice shall be included in
|
19 |
+
all copies or substantial portions of the Software.
|
20 |
+
|
21 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
26 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
27 |
+
THE SOFTWARE.
|
28 |
+
*/
|
29 |
+
(function(n){if(typeof define=="function"&&define.amd)define(["jquery","moment"],n);else if(jQuery)if(moment)n(jQuery,moment);else throw"bootstrap-datetimepicker requires moment.js to be loaded first";else throw"bootstrap-datetimepicker requires jQuery to be loaded first";})(function(n,t){if(typeof t=="undefined"){alert("momentjs is requried");throw new Error("momentjs is required");}var u=0,r=t,f=function(t,f){var st={pickDate:!0,pickTime:!0,useMinutes:!0,useSeconds:!1,useCurrent:!0,minuteStepping:1,minDate:new r({y:1900}),maxDate:(new r).add(100,"y"),showToday:!0,collapse:!0,language:"en",defaultDate:"",disabledDates:!1,enabledDates:!1,icons:{},useStrict:!1,direction:"auto",sideBySide:!1,daysOfWeekDisabled:!1},ht={time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down"},e=this,ct=function(){var i=!1,o,h,s;if(e.options=n.extend({},st,f),e.options.icons=n.extend({},ht,e.options.icons),e.element=n(t),lt(),!(e.options.pickTime||e.options.pickDate))throw new Error("Must choose at least one picker");if(e.id=u++,r.lang(e.options.language),e.date=r(),e.unset=!1,e.isInput=e.element.is("input"),e.component=!1,e.element.hasClass("input-group")&&(e.component=e.element.find(".datepickerbutton").size()==0?e.element.find("[class^='input-group-']"):e.element.find(".datepickerbutton")),e.format=e.options.format,o=r()._lang._longDateFormat,e.format||(e.format=e.options.pickDate?o.L:"",e.options.pickDate&&e.options.pickTime&&(e.format+=" "),e.format+=e.options.pickTime?o.LT:"",e.options.useSeconds&&(~o.LT.indexOf(" A")?e.format=e.format.split(" A")[0]+":ss A":e.format+=":ss")),e.use24hours=e.format.toLowerCase().indexOf("a")<1,e.component&&(i=e.component.find("span")),e.options.pickTime&&i&&i.addClass(e.options.icons.time),e.options.pickDate&&i&&(i.removeClass(e.options.icons.time),i.addClass(e.options.icons.date)),e.widget=n(ni()).appendTo("body"),e.options.useSeconds&&!e.use24hours&&e.widget.width(300),e.minViewMode=e.options.minViewMode||0,typeof e.minViewMode=="string")switch(e.minViewMode){case"months":e.minViewMode=1;break;case"years":e.minViewMode=2;break;default:e.minViewMode=0}if(e.viewMode=e.options.viewMode||0,typeof e.viewMode=="string")switch(e.viewMode){case"months":e.viewMode=1;break;case"years":e.viewMode=2;break;default:e.viewMode=0}e.options.disabledDates=d(e.options.disabledDates);e.options.enabledDates=d(e.options.enabledDates);e.startViewMode=e.viewMode;e.setMinDate(e.options.minDate);e.setMaxDate(e.options.maxDate);at();vt();yt();pt();wt();l();b();ut();e.options.defaultDate!==""&&p().val()==""&&e.setValue(e.options.defaultDate);e.options.minuteStepping!==1&&(h=e.date.minutes(),s=e.options.minuteStepping,e.date.minutes(Math.round(h/s)*s%60).seconds(0))},p=function(){return e.isInput?e.element:dateStr=e.element.find("input")},lt=function(){var n;n=e.element.is("input")?e.element.data():e.element.data();n.dateFormat!==undefined&&(e.options.format=n.dateFormat);n.datePickdate!==undefined&&(e.options.pickDate=n.datePickdate);n.datePicktime!==undefined&&(e.options.pickTime=n.datePicktime);n.dateUseminutes!==undefined&&(e.options.useMinutes=n.dateUseminutes);n.dateUseseconds!==undefined&&(e.options.useSeconds=n.dateUseseconds);n.dateUsecurrent!==undefined&&(e.options.useCurrent=n.dateUsecurrent);n.dateMinutestepping!==undefined&&(e.options.minuteStepping=n.dateMinutestepping);n.dateMindate!==undefined&&(e.options.minDate=n.dateMindate);n.dateMaxdate!==undefined&&(e.options.maxDate=n.dateMaxdate);n.dateShowtoday!==undefined&&(e.options.showToday=n.dateShowtoday);n.dateCollapse!==undefined&&(e.options.collapse=n.dateCollapse);n.dateLanguage!==undefined&&(e.options.language=n.dateLanguage);n.dateDefaultdate!==undefined&&(e.options.defaultDate=n.dateDefaultdate);n.dateDisableddates!==undefined&&(e.options.disabledDates=n.dateDisableddates);n.dateEnableddates!==undefined&&(e.options.enabledDates=n.dateEnableddates);n.dateIcons!==undefined&&(e.options.icons=n.dateIcons);n.dateUsestrict!==undefined&&(e.options.useStrict=n.dateUsestrict);n.dateDirection!==undefined&&(e.options.direction=n.dateDirection);n.dateSidebyside!==undefined&&(e.options.sideBySide=n.dateSidebyside)},it=function(){var u="absolute",t=e.component?e.component.offset():e.element.offset(),i=n(window),r;e.width=e.component?e.component.outerWidth():e.element.outerWidth();t.top=t.top+e.element.outerHeight();e.options.direction==="up"?r="top":e.options.direction==="bottom"?r="bottom":e.options.direction==="auto"&&(r=t.top+e.widget.height()>i.height()+i.scrollTop()&&e.widget.height()+e.element.outerHeight()<t.top?"top":"bottom");r==="top"?(t.top-=e.widget.height()+e.element.outerHeight()+15,e.widget.addClass("top").removeClass("bottom")):(t.top+=1,e.widget.addClass("bottom").removeClass("top"));e.options.width!==undefined&&e.widget.width(e.options.width);e.options.orientation==="left"&&(e.widget.addClass("left-oriented"),t.left=t.left-e.widget.width()+20);gt()&&(u="fixed",t.top-=i.scrollTop(),t.left-=i.scrollLeft());i.width()<t.left+e.widget.outerWidth()?(t.right=i.width()-t.left-e.width,t.left="auto",e.widget.addClass("pull-right")):(t.right="auto",e.widget.removeClass("pull-right"));e.widget.css({position:u,top:t.top,left:t.left,right:t.right})},c=function(n,t){r(e.date).isSame(r(n))||(e.element.trigger({type:"dp.change",date:r(e.date),oldDate:r(n)}),t!=="change"&&e.element.change())},g=function(n){e.element.trigger({type:"dp.error",date:r(n)})},l=function(n){r.lang(e.options.language);var t=n;t||(t=p().val(),t&&(e.date=r(t,e.format,e.options.useStrict)),e.date||(e.date=r()));e.viewDate=r(e.date).startOf("month");y();nt()},at=function(){r.lang(e.options.language);var i=n("<tr>"),u=r.weekdaysMin(),t;if(r()._lang._week.dow==0)for(t=0;t<7;t++)i.append('<th class="dow">'+u[t]+"<\/th>");else for(t=1;t<8;t++)t==7?i.append('<th class="dow">'+u[0]+"<\/th>"):i.append('<th class="dow">'+u[t]+"<\/th>");e.widget.find(".datepicker-days thead").append(i)},vt=function(){r.lang(e.options.language);for(var n="",t=0,i=r.monthsShort();t<12;)n+='<span class="month">'+i[t++]+"<\/span>";e.widget.find(".datepicker-months td").append(n)},y=function(){r.lang(e.options.language);var t=e.viewDate.year(),h=e.viewDate.month(),o=e.options.minDate.year(),y=e.options.minDate.month(),s=e.options.maxDate.year(),p=e.options.maxDate.month(),i,w,c=[],v,f,u,b,d,l,a=r.months();for(e.widget.find(".datepicker-days").find(".disabled").removeClass("disabled"),e.widget.find(".datepicker-months").find(".disabled").removeClass("disabled"),e.widget.find(".datepicker-years").find(".disabled").removeClass("disabled"),e.widget.find(".datepicker-days th:eq(1)").text(a[h]+" "+t),i=r(e.viewDate).subtract("months",1),b=i.daysInMonth(),i.date(b).startOf("week"),(t==o&&h<=y||t<o)&&e.widget.find(".datepicker-days th:eq(0)").addClass("disabled"),(t==s&&h>=p||t>s)&&e.widget.find(".datepicker-days th:eq(2)").addClass("disabled"),w=r(i).add(42,"d");i.isBefore(w);){if(i.weekday()===r().startOf("week").weekday()&&(v=n("<tr>"),c.push(v)),f="",i.year()<t||i.year()==t&&i.month()<h?f+=" old":(i.year()>t||i.year()==t&&i.month()>h)&&(f+=" new"),i.isSame(r({y:e.date.year(),M:e.date.month(),d:e.date.date()}))&&(f+=" active"),(k(i)||!ot(i))&&(f+=" disabled"),e.options.showToday===!0&&i.isSame(r(),"day")&&(f+=" today"),e.options.daysOfWeekDisabled)for(u in e.options.daysOfWeekDisabled)if(i.day()==e.options.daysOfWeekDisabled[u]){f+=" disabled";break}v.append('<td class="day'+f+'">'+i.date()+"<\/td>");i.add(1,"d")}for(e.widget.find(".datepicker-days tbody").empty().append(c),l=e.date.year(),a=e.widget.find(".datepicker-months").find("th:eq(1)").text(t).end().find("span").removeClass("active"),l===t&&a.eq(e.date.month()).addClass("active"),l-1<o&&e.widget.find(".datepicker-months th:eq(0)").addClass("disabled"),l+1>s&&e.widget.find(".datepicker-months th:eq(2)").addClass("disabled"),u=0;u<12;u++)t==o&&y>u||t<o?n(a[u]).addClass("disabled"):(t==s&&p<u||t>s)&&n(a[u]).addClass("disabled");for(c="",t=parseInt(t/10,10)*10,d=e.widget.find(".datepicker-years").find("th:eq(1)").text(t+"-"+(t+9)).end().find("td"),e.widget.find(".datepicker-years").find("th").removeClass("disabled"),o>t&&e.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled"),s<t+9&&e.widget.find(".datepicker-years").find("th:eq(2)").addClass("disabled"),t-=1,u=-1;u<11;u++)c+='<span class="year'+(u===-1||u===10?" old":"")+(l===t?" active":"")+(t<o||t>s?" disabled":"")+'">'+t+"<\/span>",t+=1;d.html(c)},yt=function(){r.lang(e.options.language);var f=e.widget.find(".timepicker .timepicker-hours table"),n="",t,i,u;if(f.parent().hide(),e.use24hours)for(t=0,i=0;i<6;i+=1){for(n+="<tr>",u=0;u<4;u+=1)n+='<td class="hour">'+s(t.toString())+"<\/td>",t++;n+="<\/tr>"}else for(t=1,i=0;i<3;i+=1){for(n+="<tr>",u=0;u<4;u+=1)n+='<td class="hour">'+s(t.toString())+"<\/td>",t++;n+="<\/tr>"}f.html(n)},pt=function(){var f=e.widget.find(".timepicker .timepicker-minutes table"),n="",i=0,r,u,t=e.options.minuteStepping;for(f.parent().hide(),(t=1)&&(t=5),r=0;r<Math.ceil(15/t);r++){for(n+="<tr>",u=0;u<4;u+=1)i<60?(n+='<td class="minute">'+s(i.toString())+"<\/td>",i+=t):n+="<td><\/td>";n+="<\/tr>"}f.html(n)},wt=function(){var r=e.widget.find(".timepicker .timepicker-seconds table"),n="",u=0,t,i;for(r.parent().hide(),t=0;t<3;t++){for(n+="<tr>",i=0;i<4;i+=1)n+='<td class="second">'+s(u.toString())+"<\/td>",u+=5;n+="<\/tr>"}r.html(n)},nt=function(){if(e.date){var t=e.widget.find(".timepicker span[data-time-component]"),n=e.date.hours(),i="AM";e.use24hours||(n>=12&&(i="PM"),n===0?n=12:n!=12&&(n=n%12),e.widget.find(".timepicker [data-action=togglePeriod]").text(i));t.filter("[data-time-component=hours]").text(s(n));t.filter("[data-time-component=minutes]").text(s(e.date.minutes()));t.filter("[data-time-component=seconds]").text(s(e.date.second()))}},bt=function(t){t.stopPropagation();t.preventDefault();e.unset=!1;var i=n(t.target).closest("span, td, th"),u,f,s,h,l=r(e.date);if(i.length===1&&!i.is(".disabled"))switch(i[0].nodeName.toLowerCase()){case"th":switch(i[0].className){case"switch":b(1);break;case"prev":case"next":s=o.modes[e.viewMode].navStep;i[0].className==="prev"&&(s=s*-1);e.viewDate.add(s,o.modes[e.viewMode].navFnc);y()}break;case"span":i.is(".month")?(u=i.parent().find("span").index(i),e.viewDate.month(u)):(f=parseInt(i.text(),10)||0,e.viewDate.year(f));e.viewMode===e.minViewMode&&(e.date=r({y:e.viewDate.year(),M:e.viewDate.month(),d:e.viewDate.date(),h:e.date.hours(),m:e.date.minutes(),s:e.date.seconds()}),c(l,t.type),a());b(-1);y();break;case"td":i.is(".day")&&(h=parseInt(i.text(),10)||1,u=e.viewDate.month(),f=e.viewDate.year(),i.is(".old")?u===0?(u=11,f-=1):u-=1:i.is(".new")&&(u==11?(u=0,f+=1):u+=1),e.date=r({y:f,M:u,d:h,h:e.date.hours(),m:e.date.minutes(),s:e.date.seconds()}),e.viewDate=r({y:f,M:u,d:Math.min(28,h)}),y(),a(),c(l,t.type))}},w={incrementHours:function(){v("add","hours",1)},incrementMinutes:function(){v("add","minutes",e.options.minuteStepping)},incrementSeconds:function(){v("add","seconds",1)},decrementHours:function(){v("subtract","hours",1)},decrementMinutes:function(){v("subtract","minutes",e.options.minuteStepping)},decrementSeconds:function(){v("subtract","seconds",1)},togglePeriod:function(){var n=e.date.hours();n>=12?n-=12:n+=12;e.date.hours(n)},showPicker:function(){e.widget.find(".timepicker > div:not(.timepicker-picker)").hide();e.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){e.widget.find(".timepicker .timepicker-picker").hide();e.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){e.widget.find(".timepicker .timepicker-picker").hide();e.widget.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){e.widget.find(".timepicker .timepicker-picker").hide();e.widget.find(".timepicker .timepicker-seconds").show()},selectHour:function(t){var r=e.widget.find(".timepicker [data-action=togglePeriod]").text(),i=parseInt(n(t.target).text(),10);r=="PM"&&(i+=12);e.date.hours(i);w.showPicker.call(e)},selectMinute:function(t){e.date.minutes(parseInt(n(t.target).text(),10));w.showPicker.call(e)},selectSecond:function(t){e.date.seconds(parseInt(n(t.target).text(),10));w.showPicker.call(e)}},kt=function(t){var i=r(e.date),u=n(t.currentTarget).data("action"),f=w[u].apply(e,arguments);return tt(t),e.date||(e.date=r({y:1970})),a(),nt(),c(i,t.type),f},tt=function(n){n.stopPropagation();n.preventDefault()},rt=function(t){r.lang(e.options.language);var f=n(t.target),u=r(e.date),i=r(f.val(),e.format,e.options.useStrict);i.isValid()&&!k(i)&&ot(i)?(l(),e.setValue(i),c(u,t.type),a()):(e.viewDate=u,c(u,t.type),g(i),e.unset=!0)},b=function(n){n&&(e.viewMode=Math.max(e.minViewMode,Math.min(2,e.viewMode+n)));var t=o.modes[e.viewMode].clsName;e.widget.find(".datepicker > div").hide().filter(".datepicker-"+o.modes[e.viewMode].clsName).show()},ut=function(){var i,r,t,f,u;e.widget.on("click",".datepicker *",n.proxy(bt,this));e.widget.on("click","[data-action]",n.proxy(kt,this));e.widget.on("mousedown",n.proxy(tt,this));if(e.options.pickDate&&e.options.pickTime)e.widget.on("click.togglePicker",".accordion-toggle",function(o){if(o.stopPropagation(),i=n(this),r=i.closest("ul"),t=r.find(".in"),f=r.find(".collapse:not(.in)"),t&&t.length){if(u=t.data("collapse"),u&&u.date-transitioning)return;t.collapse("hide");f.collapse("show");i.find("span").toggleClass(e.options.icons.time+" "+e.options.icons.date);e.element.find(".input-group-addon span").toggleClass(e.options.icons.time+" "+e.options.icons.date)}});if(e.isInput)e.element.on({focus:n.proxy(e.show,this),change:n.proxy(rt,this),blur:n.proxy(e.hide,this)});else{e.element.on({change:n.proxy(rt,this)},"input");if(e.component)e.component.on("click",n.proxy(e.show,this));else e.element.on("click",n.proxy(e.show,this))}},dt=function(){n(window).on("resize.datetimepicker"+e.id,n.proxy(it,this));if(!e.isInput)n(document).on("mousedown.datetimepicker"+e.id,n.proxy(e.hide,this))},ft=function(){e.widget.off("click",".datepicker *",e.click);e.widget.off("click","[data-action]");e.widget.off("mousedown",e.stopEvent);e.options.pickDate&&e.options.pickTime&&e.widget.off("click.togglePicker");e.isInput?e.element.off({focus:e.show,change:e.change}):(e.element.off({change:e.change},"input"),e.component?e.component.off("click",e.show):e.element.off("click",e.show))},et=function(){n(window).off("resize.datetimepicker"+e.id);e.isInput||n(document).off("mousedown.datetimepicker"+e.id)},gt=function(){if(e.element){for(var i=e.element.parents(),r=!1,t=0;t<i.length;t++)if(n(i[t]).css("position")=="fixed"){r=!0;break}return r}return!1},a=function(){r.lang(e.options.language);var n="";e.unset||(n=r(e.date).format(e.format));p().val(n);e.element.data("date",n);e.options.pickTime||e.hide()},v=function(n,t,i){r.lang(e.options.language);var u;if(n=="add"?(u=r(e.date),u.hours()==23&&u.add(i,t),u.add(i,t)):u=r(e.date).subtract(i,t),k(r(u.subtract(i,t)))||k(u)){g(u.format(e.format));return}n=="add"?e.date.add(i,t):e.date.subtract(i,t);e.unset=!1},k=function(n){return(r.lang(e.options.language),n.isAfter(e.options.maxDate)||n.isBefore(e.options.minDate))?!0:e.options.disabledDates===!1?!1:e.options.disabledDates[r(n).format("YYYY-MM-DD")]===!0},ot=function(n){return(r.lang(e.options.language),e.options.enabledDates===!1)?!0:e.options.enabledDates[r(n).format("YYYY-MM-DD")]===!0},d=function(n){var t={},u=0;for(i=0;i<n.length;i++)dDate=r(n[i]),dDate.isValid()&&(t[dDate.format("YYYY-MM-DD")]=!0,u++);return u>0?t:!1},s=function(n){return n=n.toString(),n.length>=2?n:"0"+n},ni=function(){if(e.options.pickDate&&e.options.pickTime){var n="";return n='<div class="bootstrap-datetimepicker-widget'+(e.options.sideBySide?" timepicker-sbs":"")+' dropdown-menu" style="z-index:9999 !important;">',n+=e.options.sideBySide?'<div class="row"><div class="col-sm-6 datepicker">'+o.template+'<\/div><div class="col-sm-6 timepicker">'+h.getTemplate()+"<\/div><\/div>":'<ul class="list-unstyled"><li'+(e.options.collapse?' class="collapse in"':"")+'><div class="datepicker">'+o.template+'<\/div><\/li><li class="picker-switch accordion-toggle"><a class="btn" style="width:100%"><span class="'+e.options.icons.time+'"><\/span><\/a><\/li><li'+(e.options.collapse?' class="collapse"':"")+'><div class="timepicker">'+h.getTemplate()+"<\/div><\/li><\/ul>",n+"<\/div>"}return e.options.pickTime?'<div class="bootstrap-datetimepicker-widget dropdown-menu"><div class="timepicker">'+h.getTemplate()+"<\/div><\/div>":'<div class="bootstrap-datetimepicker-widget dropdown-menu"><div class="datepicker">'+o.template+"<\/div><\/div>"},o={modes:[{clsName:"days",navFnc:"month",navStep:1},{clsName:"months",navFnc:"year",navStep:1},{clsName:"years",navFnc:"year",navStep:10}],headTemplate:'<thead><tr><th class="prev">‹<\/th><th colspan="5" class="switch"><\/th><th class="next">›<\/th><\/tr><\/thead>',contTemplate:'<tbody><tr><td colspan="7"><\/td><\/tr><\/tbody>'},h={hourTemplate:'<span data-action="showHours" data-time-component="hours" class="timepicker-hour"><\/span>',minuteTemplate:'<span data-action="showMinutes" data-time-component="minutes" class="timepicker-minute"><\/span>',secondTemplate:'<span data-action="showSeconds" data-time-component="seconds" class="timepicker-second"><\/span>'};o.template='<div class="datepicker-days"><table class="table-condensed">'+o.headTemplate+'<tbody><\/tbody><\/table><\/div><div class="datepicker-months"><table class="table-condensed">'+o.headTemplate+o.contTemplate+'<\/table><\/div><div class="datepicker-years"><table class="table-condensed">'+o.headTemplate+o.contTemplate+"<\/table><\/div>";h.getTemplate=function(){return'<div class="timepicker-picker"><table class="table-condensed"><tr><td><a href="#" class="btn" data-action="incrementHours"><span class="'+e.options.icons.up+'"><\/span><\/a><\/td><td class="separator"><\/td><td>'+(e.options.useMinutes?'<a href="#" class="btn" data-action="incrementMinutes"><span class="'+e.options.icons.up+'"><\/span><\/a>':"")+"<\/td>"+(e.options.useSeconds?'<td class="separator"><\/td><td><a href="#" class="btn" data-action="incrementSeconds"><span class="'+e.options.icons.up+'"><\/span><\/a><\/td>':"")+(e.use24hours?"":'<td class="separator"><\/td>')+"<\/tr><tr><td>"+h.hourTemplate+'<\/td> <td class="separator">:<\/td><td>'+(e.options.useMinutes?h.minuteTemplate:'<span class="timepicker-minute">00<\/span>')+"<\/td> "+(e.options.useSeconds?'<td class="separator">:<\/td><td>'+h.secondTemplate+"<\/td>":"")+(e.use24hours?"":'<td class="separator"><\/td><td><button type="button" class="btn btn-primary" data-action="togglePeriod"><\/button><\/td>')+'<\/tr><tr><td><a href="#" class="btn" data-action="decrementHours"><span class="'+e.options.icons.down+'"><\/span><\/a><\/td><td class="separator"><\/td><td>'+(e.options.useMinutes?'<a href="#" class="btn" data-action="decrementMinutes"><span class="'+e.options.icons.down+'"><\/span><\/a>':"")+"<\/td>"+(e.options.useSeconds?'<td class="separator"><\/td><td><a href="#" class="btn" data-action="decrementSeconds"><span class="'+e.options.icons.down+'"><\/span><\/a><\/td>':"")+(e.use24hours?"":'<td class="separator"><\/td>')+'<\/tr><\/table><\/div><div class="timepicker-hours" data-action="selectHour"><table class="table-condensed"><\/table><\/div><div class="timepicker-minutes" data-action="selectMinute"><table class="table-condensed"><\/table><\/div>'+(e.options.useSeconds?'<div class="timepicker-seconds" data-action="selectSecond"><table class="table-condensed"><\/table><\/div>':"")};e.destroy=function(){ft();et();e.widget.remove();e.element.removeData("DateTimePicker");e.component&&e.component.removeData("DateTimePicker")};e.show=function(n){e.options.useCurrent===!0&&p().val()==""&&e.setValue(r().format(e.format));e.widget.show();e.height=e.component?e.component.outerHeight():e.element.outerHeight();it();e.element.trigger({type:"dp.show",date:r(e.date)});dt();n&&tt(n)};e.disable=function(){var n=e.element.find("input");n.prop("disabled")||(n.prop("disabled",!0),ft())};e.enable=function(){var n=e.element.find("input");n.prop("disabled")&&(n.prop("disabled",!1),ut())};e.hide=function(t){if(!t||!n(t.target).is(e.element.attr("id"))){for(var f=e.widget.find(".collapse"),u,i=0;i<f.length;i++)if(u=f.eq(i).data("collapse"),u&&u.date-transitioning)return;e.widget.hide();e.viewMode=e.startViewMode;b();e.element.trigger({type:"dp.hide",date:r(e.date)});et()}};e.setValue=function(n){r.lang(e.options.language);n?e.unset=!1:(e.unset=!0,a());r.isMoment(n)||(n=r(n));n.isValid()?(e.date=n,a(),e.viewDate=r({y:e.date.year(),M:e.date.month()}),y(),nt()):g(n)};e.getDate=function(){return e.unset?null:e.date};e.setDate=function(n){var t=r(e.date);n?e.setValue(n):e.setValue(null);c(t,"function")};e.setDisabledDates=function(n){e.options.disabledDates=d(n);e.viewDate&&l()};e.setEnabledDates=function(n){e.options.enabledDates=d(n);e.viewDate&&l()};e.setMaxDate=function(n){n!=undefined&&(e.options.maxDate=r(n),e.viewDate&&l())};e.setMinDate=function(n){n!=undefined&&(e.options.minDate=r(n),e.viewDate&&l())};ct()};n.fn.datetimepicker=function(t){return this.each(function(){var i=n(this),r=i.data("DateTimePicker");r||i.data("DateTimePicker",new f(this,t))})}});
|
assets/bootstrap-datetimepicker/moment.min.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
//! moment.js
|
2 |
+
//! version : 2.5.1
|
3 |
+
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
4 |
+
//! license : MIT
|
5 |
+
//! momentjs.com
|
6 |
+
(function(a){function b(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function c(a,b){return function(c){return k(a.call(this,c),b)}}function d(a,b){return function(c){return this.lang().ordinal(a.call(this,c),b)}}function e(){}function f(a){w(a),h(this,a)}function g(a){var b=q(a),c=b.year||0,d=b.month||0,e=b.week||0,f=b.day||0,g=b.hour||0,h=b.minute||0,i=b.second||0,j=b.millisecond||0;this._milliseconds=+j+1e3*i+6e4*h+36e5*g,this._days=+f+7*e,this._months=+d+12*c,this._data={},this._bubble()}function h(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return b.hasOwnProperty("toString")&&(a.toString=b.toString),b.hasOwnProperty("valueOf")&&(a.valueOf=b.valueOf),a}function i(a){var b,c={};for(b in a)a.hasOwnProperty(b)&&qb.hasOwnProperty(b)&&(c[b]=a[b]);return c}function j(a){return 0>a?Math.ceil(a):Math.floor(a)}function k(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function l(a,b,c,d){var e,f,g=b._milliseconds,h=b._days,i=b._months;g&&a._d.setTime(+a._d+g*c),(h||i)&&(e=a.minute(),f=a.hour()),h&&a.date(a.date()+h*c),i&&a.month(a.month()+i*c),g&&!d&&db.updateOffset(a),(h||i)&&(a.minute(e),a.hour(f))}function m(a){return"[object Array]"===Object.prototype.toString.call(a)}function n(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function o(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&s(a[d])!==s(b[d]))&&g++;return g+f}function p(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=Tb[a]||Ub[b]||b}return a}function q(a){var b,c,d={};for(c in a)a.hasOwnProperty(c)&&(b=p(c),b&&(d[b]=a[c]));return d}function r(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}db[b]=function(e,f){var g,h,i=db.fn._lang[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=db().utc().set(d,a);return i.call(db.fn._lang,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function s(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function t(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function u(a){return v(a)?366:365}function v(a){return a%4===0&&a%100!==0||a%400===0}function w(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[jb]<0||a._a[jb]>11?jb:a._a[kb]<1||a._a[kb]>t(a._a[ib],a._a[jb])?kb:a._a[lb]<0||a._a[lb]>23?lb:a._a[mb]<0||a._a[mb]>59?mb:a._a[nb]<0||a._a[nb]>59?nb:a._a[ob]<0||a._a[ob]>999?ob:-1,a._pf._overflowDayOfYear&&(ib>b||b>kb)&&(b=kb),a._pf.overflow=b)}function x(a){return null==a._isValid&&(a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===a._pf.charsLeftOver&&0===a._pf.unusedTokens.length)),a._isValid}function y(a){return a?a.toLowerCase().replace("_","-"):a}function z(a,b){return b._isUTC?db(a).zone(b._offset||0):db(a).local()}function A(a,b){return b.abbr=a,pb[a]||(pb[a]=new e),pb[a].set(b),pb[a]}function B(a){delete pb[a]}function C(a){var b,c,d,e,f=0,g=function(a){if(!pb[a]&&rb)try{require("./lang/"+a)}catch(b){}return pb[a]};if(!a)return db.fn._lang;if(!m(a)){if(c=g(a))return c;a=[a]}for(;f<a.length;){for(e=y(a[f]).split("-"),b=e.length,d=y(a[f+1]),d=d?d.split("-"):null;b>0;){if(c=g(e.slice(0,b).join("-")))return c;if(d&&d.length>=b&&o(e,d,!0)>=b-1)break;b--}f++}return db.fn._lang}function D(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function E(a){var b,c,d=a.match(vb);for(b=0,c=d.length;c>b;b++)d[b]=Yb[d[b]]?Yb[d[b]]:D(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function F(a,b){return a.isValid()?(b=G(b,a.lang()),Vb[b]||(Vb[b]=E(b)),Vb[b](a)):a.lang().invalidDate()}function G(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(wb.lastIndex=0;d>=0&&wb.test(a);)a=a.replace(wb,c),wb.lastIndex=0,d-=1;return a}function H(a,b){var c,d=b._strict;switch(a){case"DDDD":return Ib;case"YYYY":case"GGGG":case"gggg":return d?Jb:zb;case"Y":case"G":case"g":return Lb;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?Kb:Ab;case"S":if(d)return Gb;case"SS":if(d)return Hb;case"SSS":if(d)return Ib;case"DDD":return yb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Cb;case"a":case"A":return C(b._l)._meridiemParse;case"X":return Fb;case"Z":case"ZZ":return Db;case"T":return Eb;case"SSSS":return Bb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?Hb:xb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return xb;default:return c=new RegExp(P(O(a.replace("\\","")),"i"))}}function I(a){a=a||"";var b=a.match(Db)||[],c=b[b.length-1]||[],d=(c+"").match(Qb)||["-",0,0],e=+(60*d[1])+s(d[2]);return"+"===d[0]?-e:e}function J(a,b,c){var d,e=c._a;switch(a){case"M":case"MM":null!=b&&(e[jb]=s(b)-1);break;case"MMM":case"MMMM":d=C(c._l).monthsParse(b),null!=d?e[jb]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[kb]=s(b));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=s(b));break;case"YY":e[ib]=s(b)+(s(b)>68?1900:2e3);break;case"YYYY":case"YYYYY":case"YYYYYY":e[ib]=s(b);break;case"a":case"A":c._isPm=C(c._l).isPM(b);break;case"H":case"HH":case"h":case"hh":e[lb]=s(b);break;case"m":case"mm":e[mb]=s(b);break;case"s":case"ss":e[nb]=s(b);break;case"S":case"SS":case"SSS":case"SSSS":e[ob]=s(1e3*("0."+b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=I(b);break;case"w":case"ww":case"W":case"WW":case"d":case"dd":case"ddd":case"dddd":case"e":case"E":a=a.substr(0,1);case"gg":case"gggg":case"GG":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=b)}}function K(a){var b,c,d,e,f,g,h,i,j,k,l=[];if(!a._d){for(d=M(a),a._w&&null==a._a[kb]&&null==a._a[jb]&&(f=function(b){var c=parseInt(b,10);return b?b.length<3?c>68?1900+c:2e3+c:c:null==a._a[ib]?db().weekYear():a._a[ib]},g=a._w,null!=g.GG||null!=g.W||null!=g.E?h=Z(f(g.GG),g.W||1,g.E,4,1):(i=C(a._l),j=null!=g.d?V(g.d,i):null!=g.e?parseInt(g.e,10)+i._week.dow:0,k=parseInt(g.w,10)||1,null!=g.d&&j<i._week.dow&&k++,h=Z(f(g.gg),k,j,i._week.doy,i._week.dow)),a._a[ib]=h.year,a._dayOfYear=h.dayOfYear),a._dayOfYear&&(e=null==a._a[ib]?d[ib]:a._a[ib],a._dayOfYear>u(e)&&(a._pf._overflowDayOfYear=!0),c=U(e,0,a._dayOfYear),a._a[jb]=c.getUTCMonth(),a._a[kb]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=l[b]=d[b];for(;7>b;b++)a._a[b]=l[b]=null==a._a[b]?2===b?1:0:a._a[b];l[lb]+=s((a._tzm||0)/60),l[mb]+=s((a._tzm||0)%60),a._d=(a._useUTC?U:T).apply(null,l)}}function L(a){var b;a._d||(b=q(a._i),a._a=[b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond],K(a))}function M(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function N(a){a._a=[],a._pf.empty=!0;var b,c,d,e,f,g=C(a._l),h=""+a._i,i=h.length,j=0;for(d=G(a._f,g).match(vb)||[],b=0;b<d.length;b++)e=d[b],c=(h.match(H(e,a))||[])[0],c&&(f=h.substr(0,h.indexOf(c)),f.length>0&&a._pf.unusedInput.push(f),h=h.slice(h.indexOf(c)+c.length),j+=c.length),Yb[e]?(c?a._pf.empty=!1:a._pf.unusedTokens.push(e),J(e,c,a)):a._strict&&!c&&a._pf.unusedTokens.push(e);a._pf.charsLeftOver=i-j,h.length>0&&a._pf.unusedInput.push(h),a._isPm&&a._a[lb]<12&&(a._a[lb]+=12),a._isPm===!1&&12===a._a[lb]&&(a._a[lb]=0),K(a),w(a)}function O(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function P(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(a){var c,d,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,a._d=new Date(0/0),void 0;for(f=0;f<a._f.length;f++)g=0,c=h({},a),c._pf=b(),c._f=a._f[f],N(c),x(c)&&(g+=c._pf.charsLeftOver,g+=10*c._pf.unusedTokens.length,c._pf.score=g,(null==e||e>g)&&(e=g,d=c));h(a,d||c)}function R(a){var b,c,d=a._i,e=Mb.exec(d);if(e){for(a._pf.iso=!0,b=0,c=Ob.length;c>b;b++)if(Ob[b][1].exec(d)){a._f=Ob[b][0]+(e[6]||" ");break}for(b=0,c=Pb.length;c>b;b++)if(Pb[b][1].exec(d)){a._f+=Pb[b][0];break}d.match(Db)&&(a._f+="Z"),N(a)}else a._d=new Date(d)}function S(b){var c=b._i,d=sb.exec(c);c===a?b._d=new Date:d?b._d=new Date(+d[1]):"string"==typeof c?R(b):m(c)?(b._a=c.slice(0),K(b)):n(c)?b._d=new Date(+c):"object"==typeof c?L(b):b._d=new Date(c)}function T(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function U(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function V(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function W(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function X(a,b,c){var d=hb(Math.abs(a)/1e3),e=hb(d/60),f=hb(e/60),g=hb(f/24),h=hb(g/365),i=45>d&&["s",d]||1===e&&["m"]||45>e&&["mm",e]||1===f&&["h"]||22>f&&["hh",f]||1===g&&["d"]||25>=g&&["dd",g]||45>=g&&["M"]||345>g&&["MM",hb(g/30)]||1===h&&["y"]||["yy",h];return i[2]=b,i[3]=a>0,i[4]=c,W.apply({},i)}function Y(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=db(a).add("d",f),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function Z(a,b,c,d,e){var f,g,h=U(a,0,1).getUTCDay();return c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:u(a-1)+g}}function $(a){var b=a._i,c=a._f;return null===b?db.invalid({nullInput:!0}):("string"==typeof b&&(a._i=b=C().preparse(b)),db.isMoment(b)?(a=i(b),a._d=new Date(+b._d)):c?m(c)?Q(a):N(a):S(a),new f(a))}function _(a,b){db.fn[a]=db.fn[a+"s"]=function(a){var c=this._isUTC?"UTC":"";return null!=a?(this._d["set"+c+b](a),db.updateOffset(this),this):this._d["get"+c+b]()}}function ab(a){db.duration.fn[a]=function(){return this._data[a]}}function bb(a,b){db.duration.fn["as"+a]=function(){return+this/b}}function cb(a){var b=!1,c=db;"undefined"==typeof ender&&(a?(gb.moment=function(){return!b&&console&&console.warn&&(b=!0,console.warn("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.")),c.apply(null,arguments)},h(gb.moment,c)):gb.moment=db)}for(var db,eb,fb="2.5.1",gb=this,hb=Math.round,ib=0,jb=1,kb=2,lb=3,mb=4,nb=5,ob=6,pb={},qb={_isAMomentObject:null,_i:null,_f:null,_l:null,_strict:null,_isUTC:null,_offset:null,_pf:null,_lang:null},rb="undefined"!=typeof module&&module.exports&&"undefined"!=typeof require,sb=/^\/?Date\((\-?\d+)/i,tb=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,ub=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,vb=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,wb=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,xb=/\d\d?/,yb=/\d{1,3}/,zb=/\d{1,4}/,Ab=/[+\-]?\d{1,6}/,Bb=/\d+/,Cb=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Db=/Z|[\+\-]\d\d:?\d\d/gi,Eb=/T/i,Fb=/[\+\-]?\d+(\.\d{1,3})?/,Gb=/\d/,Hb=/\d\d/,Ib=/\d{3}/,Jb=/\d{4}/,Kb=/[+-]?\d{6}/,Lb=/[+-]?\d+/,Mb=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Nb="YYYY-MM-DDTHH:mm:ssZ",Ob=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],Pb=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Qb=/([\+\-]|\d\d)/gi,Rb="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),Sb={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},Tb={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},Ub={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},Vb={},Wb="DDD w W M D d".split(" "),Xb="M D H h m s w W".split(" "),Yb={M:function(){return this.month()+1},MMM:function(a){return this.lang().monthsShort(this,a)},MMMM:function(a){return this.lang().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.lang().weekdaysMin(this,a)},ddd:function(a){return this.lang().weekdaysShort(this,a)},dddd:function(a){return this.lang().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return k(this.year()%100,2)},YYYY:function(){return k(this.year(),4)},YYYYY:function(){return k(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+k(Math.abs(a),6)},gg:function(){return k(this.weekYear()%100,2)},gggg:function(){return k(this.weekYear(),4)},ggggg:function(){return k(this.weekYear(),5)},GG:function(){return k(this.isoWeekYear()%100,2)},GGGG:function(){return k(this.isoWeekYear(),4)},GGGGG:function(){return k(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return s(this.milliseconds()/100)},SS:function(){return k(s(this.milliseconds()/10),2)},SSS:function(){return k(this.milliseconds(),3)},SSSS:function(){return k(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+k(s(a/60),2)+":"+k(s(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+k(s(a/60),2)+k(s(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},Zb=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];Wb.length;)eb=Wb.pop(),Yb[eb+"o"]=d(Yb[eb],eb);for(;Xb.length;)eb=Xb.pop(),Yb[eb+eb]=c(Yb[eb],2);for(Yb.DDDD=c(Yb.DDD,3),h(e.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b,c,d;for(this._monthsParse||(this._monthsParse=[]),b=0;12>b;b++)if(this._monthsParse[b]||(c=db.utc([2e3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=db([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return Y(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),db=function(c,d,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=c,g._f=d,g._l=e,g._strict=f,g._isUTC=!1,g._pf=b(),$(g)},db.utc=function(c,d,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=c,g._f=d,g._strict=f,g._pf=b(),$(g).utc()},db.unix=function(a){return db(1e3*a)},db.duration=function(a,b){var c,d,e,f=a,h=null;return db.isDuration(a)?f={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(f={},b?f[b]=a:f.milliseconds=a):(h=tb.exec(a))?(c="-"===h[1]?-1:1,f={y:0,d:s(h[kb])*c,h:s(h[lb])*c,m:s(h[mb])*c,s:s(h[nb])*c,ms:s(h[ob])*c}):(h=ub.exec(a))&&(c="-"===h[1]?-1:1,e=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*c},f={y:e(h[2]),M:e(h[3]),d:e(h[4]),h:e(h[5]),m:e(h[6]),s:e(h[7]),w:e(h[8])}),d=new g(f),db.isDuration(a)&&a.hasOwnProperty("_lang")&&(d._lang=a._lang),d},db.version=fb,db.defaultFormat=Nb,db.updateOffset=function(){},db.lang=function(a,b){var c;return a?(b?A(y(a),b):null===b?(B(a),a="en"):pb[a]||C(a),c=db.duration.fn._lang=db.fn._lang=C(a),c._abbr):db.fn._lang._abbr},db.langData=function(a){return a&&a._lang&&a._lang._abbr&&(a=a._lang._abbr),C(a)},db.isMoment=function(a){return a instanceof f||null!=a&&a.hasOwnProperty("_isAMomentObject")},db.isDuration=function(a){return a instanceof g},eb=Zb.length-1;eb>=0;--eb)r(Zb[eb]);for(db.normalizeUnits=function(a){return p(a)},db.invalid=function(a){var b=db.utc(0/0);return null!=a?h(b._pf,a):b._pf.userInvalidated=!0,b},db.parseZone=function(a){return db(a).parseZone()},h(db.fn=f.prototype,{clone:function(){return db(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=db(this).utc();return 0<a.year()&&a.year()<=9999?F(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):F(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return x(this)},isDSTShifted:function(){return this._a?this.isValid()&&o(this._a,(this._isUTC?db.utc(this._a):db(this._a)).toArray())>0:!1},parsingFlags:function(){return h({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(a){var b=F(this,a||db.defaultFormat);return this.lang().postformat(b)},add:function(a,b){var c;return c="string"==typeof a?db.duration(+b,a):db.duration(a,b),l(this,c,1),this},subtract:function(a,b){var c;return c="string"==typeof a?db.duration(+b,a):db.duration(a,b),l(this,c,-1),this},diff:function(a,b,c){var d,e,f=z(a,this),g=6e4*(this.zone()-f.zone());return b=p(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+f.daysInMonth()),e=12*(this.year()-f.year())+(this.month()-f.month()),e+=(this-db(this).startOf("month")-(f-db(f).startOf("month")))/d,e-=6e4*(this.zone()-db(this).startOf("month").zone()-(f.zone()-db(f).startOf("month").zone()))/d,"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:j(e)},from:function(a,b){return db.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!b)},fromNow:function(a){return this.from(db(),a)},calendar:function(){var a=z(db(),this).startOf("day"),b=this.diff(a,"days",!0),c=-6>b?"sameElse":-1>b?"lastWeek":0>b?"lastDay":1>b?"sameDay":2>b?"nextDay":7>b?"nextWeek":"sameElse";return this.format(this.lang().calendar(c,this))},isLeapYear:function(){return v(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=V(a,this.lang()),this.add({d:a-b})):b},month:function(a){var b,c=this._isUTC?"UTC":"";return null!=a?"string"==typeof a&&(a=this.lang().monthsParse(a),"number"!=typeof a)?this:(b=this.date(),this.date(1),this._d["set"+c+"Month"](a),this.date(Math.min(b,this.daysInMonth())),db.updateOffset(this),this):this._d["get"+c+"Month"]()},startOf:function(a){switch(a=p(a)){case"year":this.month(0);case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),this},endOf:function(a){return a=p(a),this.startOf(a).add("isoWeek"===a?"week":a,1).subtract("ms",1)},isAfter:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)>+db(a).startOf(b)},isBefore:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)<+db(a).startOf(b)},isSame:function(a,b){return b=b||"ms",+this.clone().startOf(b)===+z(a,this).startOf(b)},min:function(a){return a=db.apply(null,arguments),this>a?this:a},max:function(a){return a=db.apply(null,arguments),a>this?this:a},zone:function(a){var b=this._offset||0;return null==a?this._isUTC?b:this._d.getTimezoneOffset():("string"==typeof a&&(a=I(a)),Math.abs(a)<16&&(a=60*a),this._offset=a,this._isUTC=!0,b!==a&&l(this,db.duration(b-a,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?db(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return t(this.year(),this.month())},dayOfYear:function(a){var b=hb((db(this).startOf("day")-db(this).startOf("year"))/864e5)+1;return null==a?b:this.add("d",a-b)},quarter:function(){return Math.ceil((this.month()+1)/3)},weekYear:function(a){var b=Y(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==a?b:this.add("y",a-b)},isoWeekYear:function(a){var b=Y(this,1,4).year;return null==a?b:this.add("y",a-b)},week:function(a){var b=this.lang().week(this);return null==a?b:this.add("d",7*(a-b))},isoWeek:function(a){var b=Y(this,1,4).week;return null==a?b:this.add("d",7*(a-b))},weekday:function(a){var b=(this.day()+7-this.lang()._week.dow)%7;return null==a?b:this.add("d",a-b)},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},get:function(a){return a=p(a),this[a]()},set:function(a,b){return a=p(a),"function"==typeof this[a]&&this[a](b),this},lang:function(b){return b===a?this._lang:(this._lang=C(b),this)}}),eb=0;eb<Rb.length;eb++)_(Rb[eb].toLowerCase().replace(/s$/,""),Rb[eb]);_("year","FullYear"),db.fn.days=db.fn.day,db.fn.months=db.fn.month,db.fn.weeks=db.fn.week,db.fn.isoWeeks=db.fn.isoWeek,db.fn.toJSON=db.fn.toISOString,h(db.duration.fn=g.prototype,{_bubble:function(){var a,b,c,d,e=this._milliseconds,f=this._days,g=this._months,h=this._data;h.milliseconds=e%1e3,a=j(e/1e3),h.seconds=a%60,b=j(a/60),h.minutes=b%60,c=j(b/60),h.hours=c%24,f+=j(c/24),h.days=f%30,g+=j(f/30),h.months=g%12,d=j(g/12),h.years=d},weeks:function(){return j(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*s(this._months/12)},humanize:function(a){var b=+this,c=X(b,!a,this.lang());return a&&(c=this.lang().pastFuture(b,c)),this.lang().postformat(c)},add:function(a,b){var c=db.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=db.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=p(a),this[a.toLowerCase()+"s"]()},as:function(a){return a=p(a),this["as"+a.charAt(0).toUpperCase()+a.slice(1)+"s"]()},lang:db.fn.lang,toIsoString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"}});for(eb in Sb)Sb.hasOwnProperty(eb)&&(bb(eb,Sb[eb]),ab(eb.toLowerCase()));bb("Weeks",6048e5),db.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},db.lang("en",{ordinal:function(a){var b=a%10,c=1===s(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),rb?(module.exports=db,cb(!0)):"function"==typeof define&&define.amd?define("moment",function(b,c,d){return d.config&&d.config()&&d.config().noGlobal!==!0&&cb(d.config().noGlobal===a),db}):cb()}).call(this);
|
assets/bootstrap/css/bootstrap-theme.css
ADDED
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Bootstrap v3.0.3 (http://getbootstrap.com)
|
3 |
+
* Copyright 2013 Twitter, Inc.
|
4 |
+
* Licensed under http://www.apache.org/licenses/LICENSE-2.0
|
5 |
+
*/
|
6 |
+
|
7 |
+
.btn-default,
|
8 |
+
.btn-primary,
|
9 |
+
.btn-success,
|
10 |
+
.btn-info,
|
11 |
+
.btn-warning,
|
12 |
+
.btn-danger {
|
13 |
+
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
|
14 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
|
15 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
|
16 |
+
}
|
17 |
+
|
18 |
+
.btn-default:active,
|
19 |
+
.btn-primary:active,
|
20 |
+
.btn-success:active,
|
21 |
+
.btn-info:active,
|
22 |
+
.btn-warning:active,
|
23 |
+
.btn-danger:active,
|
24 |
+
.btn-default.active,
|
25 |
+
.btn-primary.active,
|
26 |
+
.btn-success.active,
|
27 |
+
.btn-info.active,
|
28 |
+
.btn-warning.active,
|
29 |
+
.btn-danger.active {
|
30 |
+
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
31 |
+
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
32 |
+
}
|
33 |
+
|
34 |
+
.btn:active,
|
35 |
+
.btn.active {
|
36 |
+
background-image: none;
|
37 |
+
}
|
38 |
+
|
39 |
+
.btn-default {
|
40 |
+
text-shadow: 0 1px 0 #fff;
|
41 |
+
background-image: -webkit-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);
|
42 |
+
background-image: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);
|
43 |
+
background-repeat: repeat-x;
|
44 |
+
border-color: #dbdbdb;
|
45 |
+
border-color: #ccc;
|
46 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
|
47 |
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
48 |
+
}
|
49 |
+
|
50 |
+
.btn-default:hover,
|
51 |
+
.btn-default:focus {
|
52 |
+
background-color: #e0e0e0;
|
53 |
+
background-position: 0 -15px;
|
54 |
+
}
|
55 |
+
|
56 |
+
.btn-default:active,
|
57 |
+
.btn-default.active {
|
58 |
+
background-color: #e0e0e0;
|
59 |
+
border-color: #dbdbdb;
|
60 |
+
}
|
61 |
+
|
62 |
+
.btn-primary {
|
63 |
+
background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%);
|
64 |
+
background-image: linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%);
|
65 |
+
background-repeat: repeat-x;
|
66 |
+
border-color: #2b669a;
|
67 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);
|
68 |
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
69 |
+
}
|
70 |
+
|
71 |
+
.btn-primary:hover,
|
72 |
+
.btn-primary:focus {
|
73 |
+
background-color: #2d6ca2;
|
74 |
+
background-position: 0 -15px;
|
75 |
+
}
|
76 |
+
|
77 |
+
.btn-primary:active,
|
78 |
+
.btn-primary.active {
|
79 |
+
background-color: #2d6ca2;
|
80 |
+
border-color: #2b669a;
|
81 |
+
}
|
82 |
+
|
83 |
+
.btn-success {
|
84 |
+
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
85 |
+
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
|
86 |
+
background-repeat: repeat-x;
|
87 |
+
border-color: #3e8f3e;
|
88 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
|
89 |
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
90 |
+
}
|
91 |
+
|
92 |
+
.btn-success:hover,
|
93 |
+
.btn-success:focus {
|
94 |
+
background-color: #419641;
|
95 |
+
background-position: 0 -15px;
|
96 |
+
}
|
97 |
+
|
98 |
+
.btn-success:active,
|
99 |
+
.btn-success.active {
|
100 |
+
background-color: #419641;
|
101 |
+
border-color: #3e8f3e;
|
102 |
+
}
|
103 |
+
|
104 |
+
.btn-warning {
|
105 |
+
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
106 |
+
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
|
107 |
+
background-repeat: repeat-x;
|
108 |
+
border-color: #e38d13;
|
109 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
|
110 |
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
111 |
+
}
|
112 |
+
|
113 |
+
.btn-warning:hover,
|
114 |
+
.btn-warning:focus {
|
115 |
+
background-color: #eb9316;
|
116 |
+
background-position: 0 -15px;
|
117 |
+
}
|
118 |
+
|
119 |
+
.btn-warning:active,
|
120 |
+
.btn-warning.active {
|
121 |
+
background-color: #eb9316;
|
122 |
+
border-color: #e38d13;
|
123 |
+
}
|
124 |
+
|
125 |
+
.btn-danger {
|
126 |
+
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
127 |
+
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
|
128 |
+
background-repeat: repeat-x;
|
129 |
+
border-color: #b92c28;
|
130 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
|
131 |
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
132 |
+
}
|
133 |
+
|
134 |
+
.btn-danger:hover,
|
135 |
+
.btn-danger:focus {
|
136 |
+
background-color: #c12e2a;
|
137 |
+
background-position: 0 -15px;
|
138 |
+
}
|
139 |
+
|
140 |
+
.btn-danger:active,
|
141 |
+
.btn-danger.active {
|
142 |
+
background-color: #c12e2a;
|
143 |
+
border-color: #b92c28;
|
144 |
+
}
|
145 |
+
|
146 |
+
.btn-info {
|
147 |
+
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
148 |
+
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
|
149 |
+
background-repeat: repeat-x;
|
150 |
+
border-color: #28a4c9;
|
151 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
|
152 |
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
153 |
+
}
|
154 |
+
|
155 |
+
.btn-info:hover,
|
156 |
+
.btn-info:focus {
|
157 |
+
background-color: #2aabd2;
|
158 |
+
background-position: 0 -15px;
|
159 |
+
}
|
160 |
+
|
161 |
+
.btn-info:active,
|
162 |
+
.btn-info.active {
|
163 |
+
background-color: #2aabd2;
|
164 |
+
border-color: #28a4c9;
|
165 |
+
}
|
166 |
+
|
167 |
+
.thumbnail,
|
168 |
+
.img-thumbnail {
|
169 |
+
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
170 |
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
171 |
+
}
|
172 |
+
|
173 |
+
.dropdown-menu > li > a:hover,
|
174 |
+
.dropdown-menu > li > a:focus {
|
175 |
+
background-color: #e8e8e8;
|
176 |
+
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
177 |
+
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
178 |
+
background-repeat: repeat-x;
|
179 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
180 |
+
}
|
181 |
+
|
182 |
+
.dropdown-menu > .active > a,
|
183 |
+
.dropdown-menu > .active > a:hover,
|
184 |
+
.dropdown-menu > .active > a:focus {
|
185 |
+
background-color: #357ebd;
|
186 |
+
background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);
|
187 |
+
background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
|
188 |
+
background-repeat: repeat-x;
|
189 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
|
190 |
+
}
|
191 |
+
|
192 |
+
.navbar-default {
|
193 |
+
background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);
|
194 |
+
background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
|
195 |
+
background-repeat: repeat-x;
|
196 |
+
border-radius: 4px;
|
197 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
|
198 |
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
199 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
|
200 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
|
201 |
+
}
|
202 |
+
|
203 |
+
.navbar-default .navbar-nav > .active > a {
|
204 |
+
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%);
|
205 |
+
background-image: linear-gradient(to bottom, #ebebeb 0%, #f3f3f3 100%);
|
206 |
+
background-repeat: repeat-x;
|
207 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);
|
208 |
+
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);
|
209 |
+
box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);
|
210 |
+
}
|
211 |
+
|
212 |
+
.navbar-brand,
|
213 |
+
.navbar-nav > li > a {
|
214 |
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
|
215 |
+
}
|
216 |
+
|
217 |
+
.navbar-inverse {
|
218 |
+
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222222 100%);
|
219 |
+
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);
|
220 |
+
background-repeat: repeat-x;
|
221 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
|
222 |
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
223 |
+
}
|
224 |
+
|
225 |
+
.navbar-inverse .navbar-nav > .active > a {
|
226 |
+
background-image: -webkit-linear-gradient(top, #222222 0%, #282828 100%);
|
227 |
+
background-image: linear-gradient(to bottom, #222222 0%, #282828 100%);
|
228 |
+
background-repeat: repeat-x;
|
229 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);
|
230 |
+
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);
|
231 |
+
box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);
|
232 |
+
}
|
233 |
+
|
234 |
+
.navbar-inverse .navbar-brand,
|
235 |
+
.navbar-inverse .navbar-nav > li > a {
|
236 |
+
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
237 |
+
}
|
238 |
+
|
239 |
+
.navbar-static-top,
|
240 |
+
.navbar-fixed-top,
|
241 |
+
.navbar-fixed-bottom {
|
242 |
+
border-radius: 0;
|
243 |
+
}
|
244 |
+
|
245 |
+
.alert {
|
246 |
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
|
247 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
|
248 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
|
249 |
+
}
|
250 |
+
|
251 |
+
.alert-success {
|
252 |
+
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
253 |
+
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
|
254 |
+
background-repeat: repeat-x;
|
255 |
+
border-color: #b2dba1;
|
256 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
|
257 |
+
}
|
258 |
+
|
259 |
+
.alert-info {
|
260 |
+
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
261 |
+
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
|
262 |
+
background-repeat: repeat-x;
|
263 |
+
border-color: #9acfea;
|
264 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
|
265 |
+
}
|
266 |
+
|
267 |
+
.alert-warning {
|
268 |
+
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
269 |
+
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
|
270 |
+
background-repeat: repeat-x;
|
271 |
+
border-color: #f5e79e;
|
272 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
|
273 |
+
}
|
274 |
+
|
275 |
+
.alert-danger {
|
276 |
+
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
277 |
+
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
|
278 |
+
background-repeat: repeat-x;
|
279 |
+
border-color: #dca7a7;
|
280 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
|
281 |
+
}
|
282 |
+
|
283 |
+
.progress {
|
284 |
+
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
285 |
+
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
|
286 |
+
background-repeat: repeat-x;
|
287 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
|
288 |
+
}
|
289 |
+
|
290 |
+
.progress-bar {
|
291 |
+
background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%);
|
292 |
+
background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%);
|
293 |
+
background-repeat: repeat-x;
|
294 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);
|
295 |
+
}
|
296 |
+
|
297 |
+
.progress-bar-success {
|
298 |
+
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
299 |
+
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
|
300 |
+
background-repeat: repeat-x;
|
301 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
|
302 |
+
}
|
303 |
+
|
304 |
+
.progress-bar-info {
|
305 |
+
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
306 |
+
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
|
307 |
+
background-repeat: repeat-x;
|
308 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
|
309 |
+
}
|
310 |
+
|
311 |
+
.progress-bar-warning {
|
312 |
+
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
313 |
+
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
|
314 |
+
background-repeat: repeat-x;
|
315 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
|
316 |
+
}
|
317 |
+
|
318 |
+
.progress-bar-danger {
|
319 |
+
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
320 |
+
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
|
321 |
+
background-repeat: repeat-x;
|
322 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
|
323 |
+
}
|
324 |
+
|
325 |
+
.list-group {
|
326 |
+
border-radius: 4px;
|
327 |
+
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
328 |
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
329 |
+
}
|
330 |
+
|
331 |
+
.list-group-item.active,
|
332 |
+
.list-group-item.active:hover,
|
333 |
+
.list-group-item.active:focus {
|
334 |
+
text-shadow: 0 -1px 0 #3071a9;
|
335 |
+
background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%);
|
336 |
+
background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%);
|
337 |
+
background-repeat: repeat-x;
|
338 |
+
border-color: #3278b3;
|
339 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);
|
340 |
+
}
|
341 |
+
|
342 |
+
.panel {
|
343 |
+
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
344 |
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
345 |
+
}
|
346 |
+
|
347 |
+
.panel-default > .panel-heading {
|
348 |
+
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
349 |
+
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
350 |
+
background-repeat: repeat-x;
|
351 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
352 |
+
}
|
353 |
+
|
354 |
+
.panel-primary > .panel-heading {
|
355 |
+
background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);
|
356 |
+
background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
|
357 |
+
background-repeat: repeat-x;
|
358 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
|
359 |
+
}
|
360 |
+
|
361 |
+
.panel-success > .panel-heading {
|
362 |
+
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
363 |
+
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
|
364 |
+
background-repeat: repeat-x;
|
365 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
|
366 |
+
}
|
367 |
+
|
368 |
+
.panel-info > .panel-heading {
|
369 |
+
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
370 |
+
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
|
371 |
+
background-repeat: repeat-x;
|
372 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
|
373 |
+
}
|
374 |
+
|
375 |
+
.panel-warning > .panel-heading {
|
376 |
+
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
377 |
+
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
|
378 |
+
background-repeat: repeat-x;
|
379 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
|
380 |
+
}
|
381 |
+
|
382 |
+
.panel-danger > .panel-heading {
|
383 |
+
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
384 |
+
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
|
385 |
+
background-repeat: repeat-x;
|
386 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
|
387 |
+
}
|
388 |
+
|
389 |
+
.well {
|
390 |
+
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
391 |
+
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
|
392 |
+
background-repeat: repeat-x;
|
393 |
+
border-color: #dcdcdc;
|
394 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
|
395 |
+
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
|
396 |
+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
|
397 |
+
}
|
assets/bootstrap/css/bootstrap-theme.min.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Bootstrap v3.1.0 (http://getbootstrap.com)
|
3 |
+
* Copyright 2011-2014 Twitter, Inc.
|
4 |
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
5 |
+
*/
|
6 |
+
|
7 |
+
.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn:active,.btn.active{background-image:none}.btn-default{background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;text-shadow:0 1px 0 #fff;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-primary{background-image:-webkit-linear-gradient(top,#428bca 0,#2d6ca2 100%);background-image:linear-gradient(to bottom,#428bca 0,#2d6ca2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#2b669a}.btn-primary:hover,.btn-primary:focus{background-color:#2d6ca2;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#2d6ca2;border-color:#2b669a}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{background-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-color:#e8e8e8}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);background-color:#357ebd}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f3f3f3 100%);background-image:linear-gradient(to bottom,#ebebeb 0,#f3f3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#222 0,#282828 100%);background-image:linear-gradient(to bottom,#222 0,#282828 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0)}.progress-bar{background-image:-webkit-linear-gradient(top,#428bca 0,#3071a9 100%);background-image:linear-gradient(to bottom,#428bca 0,#3071a9 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0)}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0)}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0)}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0)}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #3071a9;background-image:-webkit-linear-gradient(top,#428bca 0,#3278b3 100%);background-image:linear-gradient(to bottom,#428bca 0,#3278b3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);border-color:#3278b3}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0)}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0)}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0)}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0)}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0)}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0)}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
|
assets/bootstrap/css/bootstrap.css
ADDED
@@ -0,0 +1,5831 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Bootstrap v3.1.0 (http://getbootstrap.com)
|
3 |
+
* Copyright 2011-2014 Twitter, Inc.
|
4 |
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
5 |
+
*/
|
6 |
+
|
7 |
+
/*! normalize.css v3.0.0 | MIT License | git.io/normalize */
|
8 |
+
html {
|
9 |
+
font-family: sans-serif;
|
10 |
+
-webkit-text-size-adjust: 100%;
|
11 |
+
-ms-text-size-adjust: 100%;
|
12 |
+
}
|
13 |
+
body {
|
14 |
+
margin: 0;
|
15 |
+
}
|
16 |
+
article,
|
17 |
+
aside,
|
18 |
+
details,
|
19 |
+
figcaption,
|
20 |
+
figure,
|
21 |
+
footer,
|
22 |
+
header,
|
23 |
+
hgroup,
|
24 |
+
main,
|
25 |
+
nav,
|
26 |
+
section,
|
27 |
+
summary {
|
28 |
+
display: block;
|
29 |
+
}
|
30 |
+
audio,
|
31 |
+
canvas,
|
32 |
+
progress,
|
33 |
+
video {
|
34 |
+
display: inline-block;
|
35 |
+
vertical-align: baseline;
|
36 |
+
}
|
37 |
+
audio:not([controls]) {
|
38 |
+
display: none;
|
39 |
+
height: 0;
|
40 |
+
}
|
41 |
+
[hidden],
|
42 |
+
template {
|
43 |
+
display: none;
|
44 |
+
}
|
45 |
+
a {
|
46 |
+
background: transparent;
|
47 |
+
}
|
48 |
+
a:active,
|
49 |
+
a:hover {
|
50 |
+
outline: 0;
|
51 |
+
}
|
52 |
+
abbr[title] {
|
53 |
+
border-bottom: 1px dotted;
|
54 |
+
}
|
55 |
+
b,
|
56 |
+
strong {
|
57 |
+
font-weight: bold;
|
58 |
+
}
|
59 |
+
dfn {
|
60 |
+
font-style: italic;
|
61 |
+
}
|
62 |
+
h1 {
|
63 |
+
margin: .67em 0;
|
64 |
+
font-size: 2em;
|
65 |
+
}
|
66 |
+
mark {
|
67 |
+
color: #000;
|
68 |
+
background: #ff0;
|
69 |
+
}
|
70 |
+
small {
|
71 |
+
font-size: 80%;
|
72 |
+
}
|
73 |
+
sub,
|
74 |
+
sup {
|
75 |
+
position: relative;
|
76 |
+
font-size: 75%;
|
77 |
+
line-height: 0;
|
78 |
+
vertical-align: baseline;
|
79 |
+
}
|
80 |
+
sup {
|
81 |
+
top: -.5em;
|
82 |
+
}
|
83 |
+
sub {
|
84 |
+
bottom: -.25em;
|
85 |
+
}
|
86 |
+
img {
|
87 |
+
border: 0;
|
88 |
+
}
|
89 |
+
svg:not(:root) {
|
90 |
+
overflow: hidden;
|
91 |
+
}
|
92 |
+
figure {
|
93 |
+
margin: 1em 40px;
|
94 |
+
}
|
95 |
+
hr {
|
96 |
+
height: 0;
|
97 |
+
-moz-box-sizing: content-box;
|
98 |
+
box-sizing: content-box;
|
99 |
+
}
|
100 |
+
pre {
|
101 |
+
overflow: auto;
|
102 |
+
}
|
103 |
+
code,
|
104 |
+
kbd,
|
105 |
+
pre,
|
106 |
+
samp {
|
107 |
+
font-family: monospace, monospace;
|
108 |
+
font-size: 1em;
|
109 |
+
}
|
110 |
+
button,
|
111 |
+
input,
|
112 |
+
optgroup,
|
113 |
+
select,
|
114 |
+
textarea {
|
115 |
+
margin: 0;
|
116 |
+
font: inherit;
|
117 |
+
color: inherit;
|
118 |
+
}
|
119 |
+
button {
|
120 |
+
overflow: visible;
|
121 |
+
}
|
122 |
+
button,
|
123 |
+
select {
|
124 |
+
text-transform: none;
|
125 |
+
}
|
126 |
+
button,
|
127 |
+
html input[type="button"],
|
128 |
+
input[type="reset"],
|
129 |
+
input[type="submit"] {
|
130 |
+
-webkit-appearance: button;
|
131 |
+
cursor: pointer;
|
132 |
+
}
|
133 |
+
button[disabled],
|
134 |
+
html input[disabled] {
|
135 |
+
cursor: default;
|
136 |
+
}
|
137 |
+
button::-moz-focus-inner,
|
138 |
+
input::-moz-focus-inner {
|
139 |
+
padding: 0;
|
140 |
+
border: 0;
|
141 |
+
}
|
142 |
+
input {
|
143 |
+
line-height: normal;
|
144 |
+
}
|
145 |
+
input[type="checkbox"],
|
146 |
+
input[type="radio"] {
|
147 |
+
box-sizing: border-box;
|
148 |
+
padding: 0;
|
149 |
+
}
|
150 |
+
input[type="number"]::-webkit-inner-spin-button,
|
151 |
+
input[type="number"]::-webkit-outer-spin-button {
|
152 |
+
height: auto;
|
153 |
+
}
|
154 |
+
input[type="search"] {
|
155 |
+
-webkit-box-sizing: content-box;
|
156 |
+
-moz-box-sizing: content-box;
|
157 |
+
box-sizing: content-box;
|
158 |
+
-webkit-appearance: textfield;
|
159 |
+
}
|
160 |
+
input[type="search"]::-webkit-search-cancel-button,
|
161 |
+
input[type="search"]::-webkit-search-decoration {
|
162 |
+
-webkit-appearance: none;
|
163 |
+
}
|
164 |
+
fieldset {
|
165 |
+
padding: .35em .625em .75em;
|
166 |
+
margin: 0 2px;
|
167 |
+
border: 1px solid #c0c0c0;
|
168 |
+
}
|
169 |
+
legend {
|
170 |
+
padding: 0;
|
171 |
+
border: 0;
|
172 |
+
}
|
173 |
+
textarea {
|
174 |
+
overflow: auto;
|
175 |
+
}
|
176 |
+
optgroup {
|
177 |
+
font-weight: bold;
|
178 |
+
}
|
179 |
+
table {
|
180 |
+
border-spacing: 0;
|
181 |
+
border-collapse: collapse;
|
182 |
+
}
|
183 |
+
td,
|
184 |
+
th {
|
185 |
+
padding: 0;
|
186 |
+
}
|
187 |
+
@media print {
|
188 |
+
* {
|
189 |
+
color: #000 !important;
|
190 |
+
text-shadow: none !important;
|
191 |
+
background: transparent !important;
|
192 |
+
box-shadow: none !important;
|
193 |
+
}
|
194 |
+
a,
|
195 |
+
a:visited {
|
196 |
+
text-decoration: underline;
|
197 |
+
}
|
198 |
+
a[href]:after {
|
199 |
+
content: " (" attr(href) ")";
|
200 |
+
}
|
201 |
+
abbr[title]:after {
|
202 |
+
content: " (" attr(title) ")";
|
203 |
+
}
|
204 |
+
a[href^="javascript:"]:after,
|
205 |
+
a[href^="#"]:after {
|
206 |
+
content: "";
|
207 |
+
}
|
208 |
+
pre,
|
209 |
+
blockquote {
|
210 |
+
border: 1px solid #999;
|
211 |
+
|
212 |
+
page-break-inside: avoid;
|
213 |
+
}
|
214 |
+
thead {
|
215 |
+
display: table-header-group;
|
216 |
+
}
|
217 |
+
tr,
|
218 |
+
img {
|
219 |
+
page-break-inside: avoid;
|
220 |
+
}
|
221 |
+
img {
|
222 |
+
max-width: 100% !important;
|
223 |
+
}
|
224 |
+
p,
|
225 |
+
h2,
|
226 |
+
h3 {
|
227 |
+
orphans: 3;
|
228 |
+
widows: 3;
|
229 |
+
}
|
230 |
+
h2,
|
231 |
+
h3 {
|
232 |
+
page-break-after: avoid;
|
233 |
+
}
|
234 |
+
select {
|
235 |
+
background: #fff !important;
|
236 |
+
}
|
237 |
+
.navbar {
|
238 |
+
display: none;
|
239 |
+
}
|
240 |
+
.table td,
|
241 |
+
.table th {
|
242 |
+
background-color: #fff !important;
|
243 |
+
}
|
244 |
+
.btn > .caret,
|
245 |
+
.dropup > .btn > .caret {
|
246 |
+
border-top-color: #000 !important;
|
247 |
+
}
|
248 |
+
.label {
|
249 |
+
border: 1px solid #000;
|
250 |
+
}
|
251 |
+
.table {
|
252 |
+
border-collapse: collapse !important;
|
253 |
+
}
|
254 |
+
.table-bordered th,
|
255 |
+
.table-bordered td {
|
256 |
+
border: 1px solid #ddd !important;
|
257 |
+
}
|
258 |
+
}
|
259 |
+
* {
|
260 |
+
-webkit-box-sizing: border-box;
|
261 |
+
-moz-box-sizing: border-box;
|
262 |
+
box-sizing: border-box;
|
263 |
+
}
|
264 |
+
*:before,
|
265 |
+
*:after {
|
266 |
+
-webkit-box-sizing: border-box;
|
267 |
+
-moz-box-sizing: border-box;
|
268 |
+
box-sizing: border-box;
|
269 |
+
}
|
270 |
+
html {
|
271 |
+
font-size: 62.5%;
|
272 |
+
|
273 |
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
274 |
+
}
|
275 |
+
body {
|
276 |
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
277 |
+
font-size: 14px;
|
278 |
+
line-height: 1.428571429;
|
279 |
+
color: #333;
|
280 |
+
background-color: #fff;
|
281 |
+
}
|
282 |
+
input,
|
283 |
+
button,
|
284 |
+
select,
|
285 |
+
textarea {
|
286 |
+
font-family: inherit;
|
287 |
+
font-size: inherit;
|
288 |
+
line-height: inherit;
|
289 |
+
}
|
290 |
+
a {
|
291 |
+
color: #428bca;
|
292 |
+
text-decoration: none;
|
293 |
+
}
|
294 |
+
a:hover,
|
295 |
+
a:focus {
|
296 |
+
color: #2a6496;
|
297 |
+
text-decoration: underline;
|
298 |
+
}
|
299 |
+
a:focus {
|
300 |
+
outline: thin dotted;
|
301 |
+
outline: 5px auto -webkit-focus-ring-color;
|
302 |
+
outline-offset: -2px;
|
303 |
+
}
|
304 |
+
figure {
|
305 |
+
margin: 0;
|
306 |
+
}
|
307 |
+
img {
|
308 |
+
vertical-align: middle;
|
309 |
+
}
|
310 |
+
.img-responsive {
|
311 |
+
display: block;
|
312 |
+
max-width: 100%;
|
313 |
+
height: auto;
|
314 |
+
}
|
315 |
+
.img-rounded {
|
316 |
+
border-radius: 6px;
|
317 |
+
}
|
318 |
+
.img-thumbnail {
|
319 |
+
display: inline-block;
|
320 |
+
max-width: 100%;
|
321 |
+
height: auto;
|
322 |
+
padding: 4px;
|
323 |
+
line-height: 1.428571429;
|
324 |
+
background-color: #fff;
|
325 |
+
border: 1px solid #ddd;
|
326 |
+
border-radius: 4px;
|
327 |
+
-webkit-transition: all .2s ease-in-out;
|
328 |
+
transition: all .2s ease-in-out;
|
329 |
+
}
|
330 |
+
.img-circle {
|
331 |
+
border-radius: 50%;
|
332 |
+
}
|
333 |
+
hr {
|
334 |
+
margin-top: 20px;
|
335 |
+
margin-bottom: 20px;
|
336 |
+
border: 0;
|
337 |
+
border-top: 1px solid #eee;
|
338 |
+
}
|
339 |
+
.sr-only {
|
340 |
+
position: absolute;
|
341 |
+
width: 1px;
|
342 |
+
height: 1px;
|
343 |
+
padding: 0;
|
344 |
+
margin: -1px;
|
345 |
+
overflow: hidden;
|
346 |
+
clip: rect(0, 0, 0, 0);
|
347 |
+
border: 0;
|
348 |
+
}
|
349 |
+
h1,
|
350 |
+
h2,
|
351 |
+
h3,
|
352 |
+
h4,
|
353 |
+
h5,
|
354 |
+
h6,
|
355 |
+
.h1,
|
356 |
+
.h2,
|
357 |
+
.h3,
|
358 |
+
.h4,
|
359 |
+
.h5,
|
360 |
+
.h6 {
|
361 |
+
font-family: inherit;
|
362 |
+
font-weight: 500;
|
363 |
+
line-height: 1.1;
|
364 |
+
color: inherit;
|
365 |
+
}
|
366 |
+
h1 small,
|
367 |
+
h2 small,
|
368 |
+
h3 small,
|
369 |
+
h4 small,
|
370 |
+
h5 small,
|
371 |
+
h6 small,
|
372 |
+
.h1 small,
|
373 |
+
.h2 small,
|
374 |
+
.h3 small,
|
375 |
+
.h4 small,
|
376 |
+
.h5 small,
|
377 |
+
.h6 small,
|
378 |
+
h1 .small,
|
379 |
+
h2 .small,
|
380 |
+
h3 .small,
|
381 |
+
h4 .small,
|
382 |
+
h5 .small,
|
383 |
+
h6 .small,
|
384 |
+
.h1 .small,
|
385 |
+
.h2 .small,
|
386 |
+
.h3 .small,
|
387 |
+
.h4 .small,
|
388 |
+
.h5 .small,
|
389 |
+
.h6 .small {
|
390 |
+
font-weight: normal;
|
391 |
+
line-height: 1;
|
392 |
+
color: #999;
|
393 |
+
}
|
394 |
+
h1,
|
395 |
+
.h1,
|
396 |
+
h2,
|
397 |
+
.h2,
|
398 |
+
h3,
|
399 |
+
.h3 {
|
400 |
+
margin-top: 20px;
|
401 |
+
margin-bottom: 10px;
|
402 |
+
}
|
403 |
+
h1 small,
|
404 |
+
.h1 small,
|
405 |
+
h2 small,
|
406 |
+
.h2 small,
|
407 |
+
h3 small,
|
408 |
+
.h3 small,
|
409 |
+
h1 .small,
|
410 |
+
.h1 .small,
|
411 |
+
h2 .small,
|
412 |
+
.h2 .small,
|
413 |
+
h3 .small,
|
414 |
+
.h3 .small {
|
415 |
+
font-size: 65%;
|
416 |
+
}
|
417 |
+
h4,
|
418 |
+
.h4,
|
419 |
+
h5,
|
420 |
+
.h5,
|
421 |
+
h6,
|
422 |
+
.h6 {
|
423 |
+
margin-top: 10px;
|
424 |
+
margin-bottom: 10px;
|
425 |
+
}
|
426 |
+
h4 small,
|
427 |
+
.h4 small,
|
428 |
+
h5 small,
|
429 |
+
.h5 small,
|
430 |
+
h6 small,
|
431 |
+
.h6 small,
|
432 |
+
h4 .small,
|
433 |
+
.h4 .small,
|
434 |
+
h5 .small,
|
435 |
+
.h5 .small,
|
436 |
+
h6 .small,
|
437 |
+
.h6 .small {
|
438 |
+
font-size: 75%;
|
439 |
+
}
|
440 |
+
h1,
|
441 |
+
.h1 {
|
442 |
+
font-size: 36px;
|
443 |
+
}
|
444 |
+
h2,
|
445 |
+
.h2 {
|
446 |
+
font-size: 30px;
|
447 |
+
}
|
448 |
+
h3,
|
449 |
+
.h3 {
|
450 |
+
font-size: 24px;
|
451 |
+
}
|
452 |
+
h4,
|
453 |
+
.h4 {
|
454 |
+
font-size: 18px;
|
455 |
+
}
|
456 |
+
h5,
|
457 |
+
.h5 {
|
458 |
+
font-size: 14px;
|
459 |
+
}
|
460 |
+
h6,
|
461 |
+
.h6 {
|
462 |
+
font-size: 12px;
|
463 |
+
}
|
464 |
+
p {
|
465 |
+
margin: 0 0 10px;
|
466 |
+
}
|
467 |
+
.lead {
|
468 |
+
margin-bottom: 20px;
|
469 |
+
font-size: 16px;
|
470 |
+
font-weight: 200;
|
471 |
+
line-height: 1.4;
|
472 |
+
}
|
473 |
+
@media (min-width: 768px) {
|
474 |
+
.lead {
|
475 |
+
font-size: 21px;
|
476 |
+
}
|
477 |
+
}
|
478 |
+
small,
|
479 |
+
.small {
|
480 |
+
font-size: 85%;
|
481 |
+
}
|
482 |
+
cite {
|
483 |
+
font-style: normal;
|
484 |
+
}
|
485 |
+
.text-left {
|
486 |
+
text-align: left;
|
487 |
+
}
|
488 |
+
.text-right {
|
489 |
+
text-align: right;
|
490 |
+
}
|
491 |
+
.text-center {
|
492 |
+
text-align: center;
|
493 |
+
}
|
494 |
+
.text-justify {
|
495 |
+
text-align: justify;
|
496 |
+
}
|
497 |
+
.text-muted {
|
498 |
+
color: #999;
|
499 |
+
}
|
500 |
+
.text-primary {
|
501 |
+
color: #428bca;
|
502 |
+
}
|
503 |
+
a.text-primary:hover {
|
504 |
+
color: #3071a9;
|
505 |
+
}
|
506 |
+
.text-success {
|
507 |
+
color: #3c763d;
|
508 |
+
}
|
509 |
+
a.text-success:hover {
|
510 |
+
color: #2b542c;
|
511 |
+
}
|
512 |
+
.text-info {
|
513 |
+
color: #31708f;
|
514 |
+
}
|
515 |
+
a.text-info:hover {
|
516 |
+
color: #245269;
|
517 |
+
}
|
518 |
+
.text-warning {
|
519 |
+
color: #8a6d3b;
|
520 |
+
}
|
521 |
+
a.text-warning:hover {
|
522 |
+
color: #66512c;
|
523 |
+
}
|
524 |
+
.text-danger {
|
525 |
+
color: #a94442;
|
526 |
+
}
|
527 |
+
a.text-danger:hover {
|
528 |
+
color: #843534;
|
529 |
+
}
|
530 |
+
.bg-primary {
|
531 |
+
color: #fff;
|
532 |
+
background-color: #428bca;
|
533 |
+
}
|
534 |
+
a.bg-primary:hover {
|
535 |
+
background-color: #3071a9;
|
536 |
+
}
|
537 |
+
.bg-success {
|
538 |
+
background-color: #dff0d8;
|
539 |
+
}
|
540 |
+
a.bg-success:hover {
|
541 |
+
background-color: #c1e2b3;
|
542 |
+
}
|
543 |
+
.bg-info {
|
544 |
+
background-color: #d9edf7;
|
545 |
+
}
|
546 |
+
a.bg-info:hover {
|
547 |
+
background-color: #afd9ee;
|
548 |
+
}
|
549 |
+
.bg-warning {
|
550 |
+
background-color: #fcf8e3;
|
551 |
+
}
|
552 |
+
a.bg-warning:hover {
|
553 |
+
background-color: #f7ecb5;
|
554 |
+
}
|
555 |
+
.bg-danger {
|
556 |
+
background-color: #f2dede;
|
557 |
+
}
|
558 |
+
a.bg-danger:hover {
|
559 |
+
background-color: #e4b9b9;
|
560 |
+
}
|
561 |
+
.page-header {
|
562 |
+
padding-bottom: 9px;
|
563 |
+
margin: 40px 0 20px;
|
564 |
+
border-bottom: 1px solid #eee;
|
565 |
+
}
|
566 |
+
ul,
|
567 |
+
ol {
|
568 |
+
margin-top: 0;
|
569 |
+
margin-bottom: 10px;
|
570 |
+
}
|
571 |
+
ul ul,
|
572 |
+
ol ul,
|
573 |
+
ul ol,
|
574 |
+
ol ol {
|
575 |
+
margin-bottom: 0;
|
576 |
+
}
|
577 |
+
.list-unstyled {
|
578 |
+
padding-left: 0;
|
579 |
+
list-style: none;
|
580 |
+
}
|
581 |
+
.list-inline {
|
582 |
+
padding-left: 0;
|
583 |
+
list-style: none;
|
584 |
+
}
|
585 |
+
.list-inline > li {
|
586 |
+
display: inline-block;
|
587 |
+
padding-right: 5px;
|
588 |
+
padding-left: 5px;
|
589 |
+
}
|
590 |
+
.list-inline > li:first-child {
|
591 |
+
padding-left: 0;
|
592 |
+
}
|
593 |
+
dl {
|
594 |
+
margin-top: 0;
|
595 |
+
margin-bottom: 20px;
|
596 |
+
}
|
597 |
+
dt,
|
598 |
+
dd {
|
599 |
+
line-height: 1.428571429;
|
600 |
+
}
|
601 |
+
dt {
|
602 |
+
font-weight: bold;
|
603 |
+
}
|
604 |
+
dd {
|
605 |
+
margin-left: 0;
|
606 |
+
}
|
607 |
+
@media (min-width: 768px) {
|
608 |
+
.dl-horizontal dt {
|
609 |
+
float: left;
|
610 |
+
width: 160px;
|
611 |
+
overflow: hidden;
|
612 |
+
clear: left;
|
613 |
+
text-align: right;
|
614 |
+
text-overflow: ellipsis;
|
615 |
+
white-space: nowrap;
|
616 |
+
}
|
617 |
+
.dl-horizontal dd {
|
618 |
+
margin-left: 180px;
|
619 |
+
}
|
620 |
+
}
|
621 |
+
abbr[title],
|
622 |
+
abbr[data-original-title] {
|
623 |
+
cursor: help;
|
624 |
+
border-bottom: 1px dotted #999;
|
625 |
+
}
|
626 |
+
.initialism {
|
627 |
+
font-size: 90%;
|
628 |
+
text-transform: uppercase;
|
629 |
+
}
|
630 |
+
blockquote {
|
631 |
+
padding: 10px 20px;
|
632 |
+
margin: 0 0 20px;
|
633 |
+
font-size: 17.5px;
|
634 |
+
border-left: 5px solid #eee;
|
635 |
+
}
|
636 |
+
blockquote p:last-child,
|
637 |
+
blockquote ul:last-child,
|
638 |
+
blockquote ol:last-child {
|
639 |
+
margin-bottom: 0;
|
640 |
+
}
|
641 |
+
blockquote footer,
|
642 |
+
blockquote small,
|
643 |
+
blockquote .small {
|
644 |
+
display: block;
|
645 |
+
font-size: 80%;
|
646 |
+
line-height: 1.428571429;
|
647 |
+
color: #999;
|
648 |
+
}
|
649 |
+
blockquote footer:before,
|
650 |
+
blockquote small:before,
|
651 |
+
blockquote .small:before {
|
652 |
+
content: '\2014 \00A0';
|
653 |
+
}
|
654 |
+
.blockquote-reverse,
|
655 |
+
blockquote.pull-right {
|
656 |
+
padding-right: 15px;
|
657 |
+
padding-left: 0;
|
658 |
+
text-align: right;
|
659 |
+
border-right: 5px solid #eee;
|
660 |
+
border-left: 0;
|
661 |
+
}
|
662 |
+
.blockquote-reverse footer:before,
|
663 |
+
blockquote.pull-right footer:before,
|
664 |
+
.blockquote-reverse small:before,
|
665 |
+
blockquote.pull-right small:before,
|
666 |
+
.blockquote-reverse .small:before,
|
667 |
+
blockquote.pull-right .small:before {
|
668 |
+
content: '';
|
669 |
+
}
|
670 |
+
.blockquote-reverse footer:after,
|
671 |
+
blockquote.pull-right footer:after,
|
672 |
+
.blockquote-reverse small:after,
|
673 |
+
blockquote.pull-right small:after,
|
674 |
+
.blockquote-reverse .small:after,
|
675 |
+
blockquote.pull-right .small:after {
|
676 |
+
content: '\00A0 \2014';
|
677 |
+
}
|
678 |
+
blockquote:before,
|
679 |
+
blockquote:after {
|
680 |
+
content: "";
|
681 |
+
}
|
682 |
+
address {
|
683 |
+
margin-bottom: 20px;
|
684 |
+
font-style: normal;
|
685 |
+
line-height: 1.428571429;
|
686 |
+
}
|
687 |
+
code,
|
688 |
+
kbd,
|
689 |
+
pre,
|
690 |
+
samp {
|
691 |
+
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
692 |
+
}
|
693 |
+
code {
|
694 |
+
padding: 2px 4px;
|
695 |
+
font-size: 90%;
|
696 |
+
color: #c7254e;
|
697 |
+
white-space: nowrap;
|
698 |
+
background-color: #f9f2f4;
|
699 |
+
border-radius: 4px;
|
700 |
+
}
|
701 |
+
kbd {
|
702 |
+
padding: 2px 4px;
|
703 |
+
font-size: 90%;
|
704 |
+
color: #fff;
|
705 |
+
background-color: #333;
|
706 |
+
border-radius: 3px;
|
707 |
+
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
|
708 |
+
}
|
709 |
+
pre {
|
710 |
+
display: block;
|
711 |
+
padding: 9.5px;
|
712 |
+
margin: 0 0 10px;
|
713 |
+
font-size: 13px;
|
714 |
+
line-height: 1.428571429;
|
715 |
+
color: #333;
|
716 |
+
word-break: break-all;
|
717 |
+
word-wrap: break-word;
|
718 |
+
background-color: #f5f5f5;
|
719 |
+
border: 1px solid #ccc;
|
720 |
+
border-radius: 4px;
|
721 |
+
}
|
722 |
+
pre code {
|
723 |
+
padding: 0;
|
724 |
+
font-size: inherit;
|
725 |
+
color: inherit;
|
726 |
+
white-space: pre-wrap;
|
727 |
+
background-color: transparent;
|
728 |
+
border-radius: 0;
|
729 |
+
}
|
730 |
+
.pre-scrollable {
|
731 |
+
max-height: 340px;
|
732 |
+
overflow-y: scroll;
|
733 |
+
}
|
734 |
+
.container {
|
735 |
+
padding-right: 15px;
|
736 |
+
padding-left: 15px;
|
737 |
+
margin-right: auto;
|
738 |
+
margin-left: auto;
|
739 |
+
}
|
740 |
+
@media (min-width: 768px) {
|
741 |
+
.container {
|
742 |
+
width: 750px;
|
743 |
+
}
|
744 |
+
}
|
745 |
+
@media (min-width: 992px) {
|
746 |
+
.container {
|
747 |
+
width: 970px;
|
748 |
+
}
|
749 |
+
}
|
750 |
+
@media (min-width: 1200px) {
|
751 |
+
.container {
|
752 |
+
width: 1170px;
|
753 |
+
}
|
754 |
+
}
|
755 |
+
.container-fluid {
|
756 |
+
padding-right: 15px;
|
757 |
+
padding-left: 15px;
|
758 |
+
margin-right: auto;
|
759 |
+
margin-left: auto;
|
760 |
+
}
|
761 |
+
.row {
|
762 |
+
margin-right: -15px;
|
763 |
+
margin-left: -15px;
|
764 |
+
}
|
765 |
+
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
|
766 |
+
position: relative;
|
767 |
+
min-height: 1px;
|
768 |
+
padding-right: 15px;
|
769 |
+
padding-left: 15px;
|
770 |
+
}
|
771 |
+
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
|
772 |
+
float: left;
|
773 |
+
}
|
774 |
+
.col-xs-12 {
|
775 |
+
width: 100%;
|
776 |
+
}
|
777 |
+
.col-xs-11 {
|
778 |
+
width: 91.66666666666666%;
|
779 |
+
}
|
780 |
+
.col-xs-10 {
|
781 |
+
width: 83.33333333333334%;
|
782 |
+
}
|
783 |
+
.col-xs-9 {
|
784 |
+
width: 75%;
|
785 |
+
}
|
786 |
+
.col-xs-8 {
|
787 |
+
width: 66.66666666666666%;
|
788 |
+
}
|
789 |
+
.col-xs-7 {
|
790 |
+
width: 58.333333333333336%;
|
791 |
+
}
|
792 |
+
.col-xs-6 {
|
793 |
+
width: 50%;
|
794 |
+
}
|
795 |
+
.col-xs-5 {
|
796 |
+
width: 41.66666666666667%;
|
797 |
+
}
|
798 |
+
.col-xs-4 {
|
799 |
+
width: 33.33333333333333%;
|
800 |
+
}
|
801 |
+
.col-xs-3 {
|
802 |
+
width: 25%;
|
803 |
+
}
|
804 |
+
.col-xs-2 {
|
805 |
+
width: 16.666666666666664%;
|
806 |
+
}
|
807 |
+
.col-xs-1 {
|
808 |
+
width: 8.333333333333332%;
|
809 |
+
}
|
810 |
+
.col-xs-pull-12 {
|
811 |
+
right: 100%;
|
812 |
+
}
|
813 |
+
.col-xs-pull-11 {
|
814 |
+
right: 91.66666666666666%;
|
815 |
+
}
|
816 |
+
.col-xs-pull-10 {
|
817 |
+
right: 83.33333333333334%;
|
818 |
+
}
|
819 |
+
.col-xs-pull-9 {
|
820 |
+
right: 75%;
|
821 |
+
}
|
822 |
+
.col-xs-pull-8 {
|
823 |
+
right: 66.66666666666666%;
|
824 |
+
}
|
825 |
+
.col-xs-pull-7 {
|
826 |
+
right: 58.333333333333336%;
|
827 |
+
}
|
828 |
+
.col-xs-pull-6 {
|
829 |
+
right: 50%;
|
830 |
+
}
|
831 |
+
.col-xs-pull-5 {
|
832 |
+
right: 41.66666666666667%;
|
833 |
+
}
|
834 |
+
.col-xs-pull-4 {
|
835 |
+
right: 33.33333333333333%;
|
836 |
+
}
|
837 |
+
.col-xs-pull-3 {
|
838 |
+
right: 25%;
|
839 |
+
}
|
840 |
+
.col-xs-pull-2 {
|
841 |
+
right: 16.666666666666664%;
|
842 |
+
}
|
843 |
+
.col-xs-pull-1 {
|
844 |
+
right: 8.333333333333332%;
|
845 |
+
}
|
846 |
+
.col-xs-pull-0 {
|
847 |
+
right: 0;
|
848 |
+
}
|
849 |
+
.col-xs-push-12 {
|
850 |
+
left: 100%;
|
851 |
+
}
|
852 |
+
.col-xs-push-11 {
|
853 |
+
left: 91.66666666666666%;
|
854 |
+
}
|
855 |
+
.col-xs-push-10 {
|
856 |
+
left: 83.33333333333334%;
|
857 |
+
}
|
858 |
+
.col-xs-push-9 {
|
859 |
+
left: 75%;
|
860 |
+
}
|
861 |
+
.col-xs-push-8 {
|
862 |
+
left: 66.66666666666666%;
|
863 |
+
}
|
864 |
+
.col-xs-push-7 {
|
865 |
+
left: 58.333333333333336%;
|
866 |
+
}
|
867 |
+
.col-xs-push-6 {
|
868 |
+
left: 50%;
|
869 |
+
}
|
870 |
+
.col-xs-push-5 {
|
871 |
+
left: 41.66666666666667%;
|
872 |
+
}
|
873 |
+
.col-xs-push-4 {
|
874 |
+
left: 33.33333333333333%;
|
875 |
+
}
|
876 |
+
.col-xs-push-3 {
|
877 |
+
left: 25%;
|
878 |
+
}
|
879 |
+
.col-xs-push-2 {
|
880 |
+
left: 16.666666666666664%;
|
881 |
+
}
|
882 |
+
.col-xs-push-1 {
|
883 |
+
left: 8.333333333333332%;
|
884 |
+
}
|
885 |
+
.col-xs-push-0 {
|
886 |
+
left: 0;
|
887 |
+
}
|
888 |
+
.col-xs-offset-12 {
|
889 |
+
margin-left: 100%;
|
890 |
+
}
|
891 |
+
.col-xs-offset-11 {
|
892 |
+
margin-left: 91.66666666666666%;
|
893 |
+
}
|
894 |
+
.col-xs-offset-10 {
|
895 |
+
margin-left: 83.33333333333334%;
|
896 |
+
}
|
897 |
+
.col-xs-offset-9 {
|
898 |
+
margin-left: 75%;
|
899 |
+
}
|
900 |
+
.col-xs-offset-8 {
|
901 |
+
margin-left: 66.66666666666666%;
|
902 |
+
}
|
903 |
+
.col-xs-offset-7 {
|
904 |
+
margin-left: 58.333333333333336%;
|
905 |
+
}
|
906 |
+
.col-xs-offset-6 {
|
907 |
+
margin-left: 50%;
|
908 |
+
}
|
909 |
+
.col-xs-offset-5 {
|
910 |
+
margin-left: 41.66666666666667%;
|
911 |
+
}
|
912 |
+
.col-xs-offset-4 {
|
913 |
+
margin-left: 33.33333333333333%;
|
914 |
+
}
|
915 |
+
.col-xs-offset-3 {
|
916 |
+
margin-left: 25%;
|
917 |
+
}
|
918 |
+
.col-xs-offset-2 {
|
919 |
+
margin-left: 16.666666666666664%;
|
920 |
+
}
|
921 |
+
.col-xs-offset-1 {
|
922 |
+
margin-left: 8.333333333333332%;
|
923 |
+
}
|
924 |
+
.col-xs-offset-0 {
|
925 |
+
margin-left: 0;
|
926 |
+
}
|
927 |
+
@media (min-width: 768px) {
|
928 |
+
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
|
929 |
+
float: left;
|
930 |
+
}
|
931 |
+
.col-sm-12 {
|
932 |
+
width: 100%;
|
933 |
+
}
|
934 |
+
.col-sm-11 {
|
935 |
+
width: 91.66666666666666%;
|
936 |
+
}
|
937 |
+
.col-sm-10 {
|
938 |
+
width: 83.33333333333334%;
|
939 |
+
}
|
940 |
+
.col-sm-9 {
|
941 |
+
width: 75%;
|
942 |
+
}
|
943 |
+
.col-sm-8 {
|
944 |
+
width: 66.66666666666666%;
|
945 |
+
}
|
946 |
+
.col-sm-7 {
|
947 |
+
width: 58.333333333333336%;
|
948 |
+
}
|
949 |
+
.col-sm-6 {
|
950 |
+
width: 50%;
|
951 |
+
}
|
952 |
+
.col-sm-5 {
|
953 |
+
width: 41.66666666666667%;
|
954 |
+
}
|
955 |
+
.col-sm-4 {
|
956 |
+
width: 33.33333333333333%;
|
957 |
+
}
|
958 |
+
.col-sm-3 {
|
959 |
+
width: 25%;
|
960 |
+
}
|
961 |
+
.col-sm-2 {
|
962 |
+
width: 16.666666666666664%;
|
963 |
+
}
|
964 |
+
.col-sm-1 {
|
965 |
+
width: 8.333333333333332%;
|
966 |
+
}
|
967 |
+
.col-sm-pull-12 {
|
968 |
+
right: 100%;
|
969 |
+
}
|
970 |
+
.col-sm-pull-11 {
|
971 |
+
right: 91.66666666666666%;
|
972 |
+
}
|
973 |
+
.col-sm-pull-10 {
|
974 |
+
right: 83.33333333333334%;
|
975 |
+
}
|
976 |
+
.col-sm-pull-9 {
|
977 |
+
right: 75%;
|
978 |
+
}
|
979 |
+
.col-sm-pull-8 {
|
980 |
+
right: 66.66666666666666%;
|
981 |
+
}
|
982 |
+
.col-sm-pull-7 {
|
983 |
+
right: 58.333333333333336%;
|
984 |
+
}
|
985 |
+
.col-sm-pull-6 {
|
986 |
+
right: 50%;
|
987 |
+
}
|
988 |
+
.col-sm-pull-5 {
|
989 |
+
right: 41.66666666666667%;
|
990 |
+
}
|
991 |
+
.col-sm-pull-4 {
|
992 |
+
right: 33.33333333333333%;
|
993 |
+
}
|
994 |
+
.col-sm-pull-3 {
|
995 |
+
right: 25%;
|
996 |
+
}
|
997 |
+
.col-sm-pull-2 {
|
998 |
+
right: 16.666666666666664%;
|
999 |
+
}
|
1000 |
+
.col-sm-pull-1 {
|
1001 |
+
right: 8.333333333333332%;
|
1002 |
+
}
|
1003 |
+
.col-sm-pull-0 {
|
1004 |
+
right: 0;
|
1005 |
+
}
|
1006 |
+
.col-sm-push-12 {
|
1007 |
+
left: 100%;
|
1008 |
+
}
|
1009 |
+
.col-sm-push-11 {
|
1010 |
+
left: 91.66666666666666%;
|
1011 |
+
}
|
1012 |
+
.col-sm-push-10 {
|
1013 |
+
left: 83.33333333333334%;
|
1014 |
+
}
|
1015 |
+
.col-sm-push-9 {
|
1016 |
+
left: 75%;
|
1017 |
+
}
|
1018 |
+
.col-sm-push-8 {
|
1019 |
+
left: 66.66666666666666%;
|
1020 |
+
}
|
1021 |
+
.col-sm-push-7 {
|
1022 |
+
left: 58.333333333333336%;
|
1023 |
+
}
|
1024 |
+
.col-sm-push-6 {
|
1025 |
+
left: 50%;
|
1026 |
+
}
|
1027 |
+
.col-sm-push-5 {
|
1028 |
+
left: 41.66666666666667%;
|
1029 |
+
}
|
1030 |
+
.col-sm-push-4 {
|
1031 |
+
left: 33.33333333333333%;
|
1032 |
+
}
|
1033 |
+
.col-sm-push-3 {
|
1034 |
+
left: 25%;
|
1035 |
+
}
|
1036 |
+
.col-sm-push-2 {
|
1037 |
+
left: 16.666666666666664%;
|
1038 |
+
}
|
1039 |
+
.col-sm-push-1 {
|
1040 |
+
left: 8.333333333333332%;
|
1041 |
+
}
|
1042 |
+
.col-sm-push-0 {
|
1043 |
+
left: 0;
|
1044 |
+
}
|
1045 |
+
.col-sm-offset-12 {
|
1046 |
+
margin-left: 100%;
|
1047 |
+
}
|
1048 |
+
.col-sm-offset-11 {
|
1049 |
+
margin-left: 91.66666666666666%;
|
1050 |
+
}
|
1051 |
+
.col-sm-offset-10 {
|
1052 |
+
margin-left: 83.33333333333334%;
|
1053 |
+
}
|
1054 |
+
.col-sm-offset-9 {
|
1055 |
+
margin-left: 75%;
|
1056 |
+
}
|
1057 |
+
.col-sm-offset-8 {
|
1058 |
+
margin-left: 66.66666666666666%;
|
1059 |
+
}
|
1060 |
+
.col-sm-offset-7 {
|
1061 |
+
margin-left: 58.333333333333336%;
|
1062 |
+
}
|
1063 |
+
.col-sm-offset-6 {
|
1064 |
+
margin-left: 50%;
|
1065 |
+
}
|
1066 |
+
.col-sm-offset-5 {
|
1067 |
+
margin-left: 41.66666666666667%;
|
1068 |
+
}
|
1069 |
+
.col-sm-offset-4 {
|
1070 |
+
margin-left: 33.33333333333333%;
|
1071 |
+
}
|
1072 |
+
.col-sm-offset-3 {
|
1073 |
+
margin-left: 25%;
|
1074 |
+
}
|
1075 |
+
.col-sm-offset-2 {
|
1076 |
+
margin-left: 16.666666666666664%;
|
1077 |
+
}
|
1078 |
+
.col-sm-offset-1 {
|
1079 |
+
margin-left: 8.333333333333332%;
|
1080 |
+
}
|
1081 |
+
.col-sm-offset-0 {
|
1082 |
+
margin-left: 0;
|
1083 |
+
}
|
1084 |
+
}
|
1085 |
+
@media (min-width: 992px) {
|
1086 |
+
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
|
1087 |
+
float: left;
|
1088 |
+
}
|
1089 |
+
.col-md-12 {
|
1090 |
+
width: 100%;
|
1091 |
+
}
|
1092 |
+
.col-md-11 {
|
1093 |
+
width: 91.66666666666666%;
|
1094 |
+
}
|
1095 |
+
.col-md-10 {
|
1096 |
+
width: 83.33333333333334%;
|
1097 |
+
}
|
1098 |
+
.col-md-9 {
|
1099 |
+
width: 75%;
|
1100 |
+
}
|
1101 |
+
.col-md-8 {
|
1102 |
+
width: 66.66666666666666%;
|
1103 |
+
}
|
1104 |
+
.col-md-7 {
|
1105 |
+
width: 58.333333333333336%;
|
1106 |
+
}
|
1107 |
+
.col-md-6 {
|
1108 |
+
width: 50%;
|
1109 |
+
}
|
1110 |
+
.col-md-5 {
|
1111 |
+
width: 41.66666666666667%;
|
1112 |
+
}
|
1113 |
+
.col-md-4 {
|
1114 |
+
width: 33.33333333333333%;
|
1115 |
+
}
|
1116 |
+
.col-md-3 {
|
1117 |
+
width: 25%;
|
1118 |
+
}
|
1119 |
+
.col-md-2 {
|
1120 |
+
width: 16.666666666666664%;
|
1121 |
+
}
|
1122 |
+
.col-md-1 {
|
1123 |
+
width: 8.333333333333332%;
|
1124 |
+
}
|
1125 |
+
.col-md-pull-12 {
|
1126 |
+
right: 100%;
|
1127 |
+
}
|
1128 |
+
.col-md-pull-11 {
|
1129 |
+
right: 91.66666666666666%;
|
1130 |
+
}
|
1131 |
+
.col-md-pull-10 {
|
1132 |
+
right: 83.33333333333334%;
|
1133 |
+
}
|
1134 |
+
.col-md-pull-9 {
|
1135 |
+
right: 75%;
|
1136 |
+
}
|
1137 |
+
.col-md-pull-8 {
|
1138 |
+
right: 66.66666666666666%;
|
1139 |
+
}
|
1140 |
+
.col-md-pull-7 {
|
1141 |
+
right: 58.333333333333336%;
|
1142 |
+
}
|
1143 |
+
.col-md-pull-6 {
|
1144 |
+
right: 50%;
|
1145 |
+
}
|
1146 |
+
.col-md-pull-5 {
|
1147 |
+
right: 41.66666666666667%;
|
1148 |
+
}
|
1149 |
+
.col-md-pull-4 {
|
1150 |
+
right: 33.33333333333333%;
|
1151 |
+
}
|
1152 |
+
.col-md-pull-3 {
|
1153 |
+
right: 25%;
|
1154 |
+
}
|
1155 |
+
.col-md-pull-2 {
|
1156 |
+
right: 16.666666666666664%;
|
1157 |
+
}
|
1158 |
+
.col-md-pull-1 {
|
1159 |
+
right: 8.333333333333332%;
|
1160 |
+
}
|
1161 |
+
.col-md-pull-0 {
|
1162 |
+
right: 0;
|
1163 |
+
}
|
1164 |
+
.col-md-push-12 {
|
1165 |
+
left: 100%;
|
1166 |
+
}
|
1167 |
+
.col-md-push-11 {
|
1168 |
+
left: 91.66666666666666%;
|
1169 |
+
}
|
1170 |
+
.col-md-push-10 {
|
1171 |
+
left: 83.33333333333334%;
|
1172 |
+
}
|
1173 |
+
.col-md-push-9 {
|
1174 |
+
left: 75%;
|
1175 |
+
}
|
1176 |
+
.col-md-push-8 {
|
1177 |
+
left: 66.66666666666666%;
|
1178 |
+
}
|
1179 |
+
.col-md-push-7 {
|
1180 |
+
left: 58.333333333333336%;
|
1181 |
+
}
|
1182 |
+
.col-md-push-6 {
|
1183 |
+
left: 50%;
|
1184 |
+
}
|
1185 |
+
.col-md-push-5 {
|
1186 |
+
left: 41.66666666666667%;
|
1187 |
+
}
|
1188 |
+
.col-md-push-4 {
|
1189 |
+
left: 33.33333333333333%;
|
1190 |
+
}
|
1191 |
+
.col-md-push-3 {
|
1192 |
+
left: 25%;
|
1193 |
+
}
|
1194 |
+
.col-md-push-2 {
|
1195 |
+
left: 16.666666666666664%;
|
1196 |
+
}
|
1197 |
+
.col-md-push-1 {
|
1198 |
+
left: 8.333333333333332%;
|
1199 |
+
}
|
1200 |
+
.col-md-push-0 {
|
1201 |
+
left: 0;
|
1202 |
+
}
|
1203 |
+
.col-md-offset-12 {
|
1204 |
+
margin-left: 100%;
|
1205 |
+
}
|
1206 |
+
.col-md-offset-11 {
|
1207 |
+
margin-left: 91.66666666666666%;
|
1208 |
+
}
|
1209 |
+
.col-md-offset-10 {
|
1210 |
+
margin-left: 83.33333333333334%;
|
1211 |
+
}
|
1212 |
+
.col-md-offset-9 {
|
1213 |
+
margin-left: 75%;
|
1214 |
+
}
|
1215 |
+
.col-md-offset-8 {
|
1216 |
+
margin-left: 66.66666666666666%;
|
1217 |
+
}
|
1218 |
+
.col-md-offset-7 {
|
1219 |
+
margin-left: 58.333333333333336%;
|
1220 |
+
}
|
1221 |
+
.col-md-offset-6 {
|
1222 |
+
margin-left: 50%;
|
1223 |
+
}
|
1224 |
+
.col-md-offset-5 {
|
1225 |
+
margin-left: 41.66666666666667%;
|
1226 |
+
}
|
1227 |
+
.col-md-offset-4 {
|
1228 |
+
margin-left: 33.33333333333333%;
|
1229 |
+
}
|
1230 |
+
.col-md-offset-3 {
|
1231 |
+
margin-left: 25%;
|
1232 |
+
}
|
1233 |
+
.col-md-offset-2 {
|
1234 |
+
margin-left: 16.666666666666664%;
|
1235 |
+
}
|
1236 |
+
.col-md-offset-1 {
|
1237 |
+
margin-left: 8.333333333333332%;
|
1238 |
+
}
|
1239 |
+
.col-md-offset-0 {
|
1240 |
+
margin-left: 0;
|
1241 |
+
}
|
1242 |
+
}
|
1243 |
+
@media (min-width: 1200px) {
|
1244 |
+
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
|
1245 |
+
float: left;
|
1246 |
+
}
|
1247 |
+
.col-lg-12 {
|
1248 |
+
width: 100%;
|
1249 |
+
}
|
1250 |
+
.col-lg-11 {
|
1251 |
+
width: 91.66666666666666%;
|
1252 |
+
}
|
1253 |
+
.col-lg-10 {
|
1254 |
+
width: 83.33333333333334%;
|
1255 |
+
}
|
1256 |
+
.col-lg-9 {
|
1257 |
+
width: 75%;
|
1258 |
+
}
|
1259 |
+
.col-lg-8 {
|
1260 |
+
width: 66.66666666666666%;
|
1261 |
+
}
|
1262 |
+
.col-lg-7 {
|
1263 |
+
width: 58.333333333333336%;
|
1264 |
+
}
|
1265 |
+
.col-lg-6 {
|
1266 |
+
width: 50%;
|
1267 |
+
}
|
1268 |
+
.col-lg-5 {
|
1269 |
+
width: 41.66666666666667%;
|
1270 |
+
}
|
1271 |
+
.col-lg-4 {
|
1272 |
+
width: 33.33333333333333%;
|
1273 |
+
}
|
1274 |
+
.col-lg-3 {
|
1275 |
+
width: 25%;
|
1276 |
+
}
|
1277 |
+
.col-lg-2 {
|
1278 |
+
width: 16.666666666666664%;
|
1279 |
+
}
|
1280 |
+
.col-lg-1 {
|
1281 |
+
width: 8.333333333333332%;
|
1282 |
+
}
|
1283 |
+
.col-lg-pull-12 {
|
1284 |
+
right: 100%;
|
1285 |
+
}
|
1286 |
+
.col-lg-pull-11 {
|
1287 |
+
right: 91.66666666666666%;
|
1288 |
+
}
|
1289 |
+
.col-lg-pull-10 {
|
1290 |
+
right: 83.33333333333334%;
|
1291 |
+
}
|
1292 |
+
.col-lg-pull-9 {
|
1293 |
+
right: 75%;
|
1294 |
+
}
|
1295 |
+
.col-lg-pull-8 {
|
1296 |
+
right: 66.66666666666666%;
|
1297 |
+
}
|
1298 |
+
.col-lg-pull-7 {
|
1299 |
+
right: 58.333333333333336%;
|
1300 |
+
}
|
1301 |
+
.col-lg-pull-6 {
|
1302 |
+
right: 50%;
|
1303 |
+
}
|
1304 |
+
.col-lg-pull-5 {
|
1305 |
+
right: 41.66666666666667%;
|
1306 |
+
}
|
1307 |
+
.col-lg-pull-4 {
|
1308 |
+
right: 33.33333333333333%;
|
1309 |
+
}
|
1310 |
+
.col-lg-pull-3 {
|
1311 |
+
right: 25%;
|
1312 |
+
}
|
1313 |
+
.col-lg-pull-2 {
|
1314 |
+
right: 16.666666666666664%;
|
1315 |
+
}
|
1316 |
+
.col-lg-pull-1 {
|
1317 |
+
right: 8.333333333333332%;
|
1318 |
+
}
|
1319 |
+
.col-lg-pull-0 {
|
1320 |
+
right: 0;
|
1321 |
+
}
|
1322 |
+
.col-lg-push-12 {
|
1323 |
+
left: 100%;
|
1324 |
+
}
|
1325 |
+
.col-lg-push-11 {
|
1326 |
+
left: 91.66666666666666%;
|
1327 |
+
}
|
1328 |
+
.col-lg-push-10 {
|
1329 |
+
left: 83.33333333333334%;
|
1330 |
+
}
|
1331 |
+
.col-lg-push-9 {
|
1332 |
+
left: 75%;
|
1333 |
+
}
|
1334 |
+
.col-lg-push-8 {
|
1335 |
+
left: 66.66666666666666%;
|
1336 |
+
}
|
1337 |
+
.col-lg-push-7 {
|
1338 |
+
left: 58.333333333333336%;
|
1339 |
+
}
|
1340 |
+
.col-lg-push-6 {
|
1341 |
+
left: 50%;
|
1342 |
+
}
|
1343 |
+
.col-lg-push-5 {
|
1344 |
+
left: 41.66666666666667%;
|
1345 |
+
}
|
1346 |
+
.col-lg-push-4 {
|
1347 |
+
left: 33.33333333333333%;
|
1348 |
+
}
|
1349 |
+
.col-lg-push-3 {
|
1350 |
+
left: 25%;
|
1351 |
+
}
|
1352 |
+
.col-lg-push-2 {
|
1353 |
+
left: 16.666666666666664%;
|
1354 |
+
}
|
1355 |
+
.col-lg-push-1 {
|
1356 |
+
left: 8.333333333333332%;
|
1357 |
+
}
|
1358 |
+
.col-lg-push-0 {
|
1359 |
+
left: 0;
|
1360 |
+
}
|
1361 |
+
.col-lg-offset-12 {
|
1362 |
+
margin-left: 100%;
|
1363 |
+
}
|
1364 |
+
.col-lg-offset-11 {
|
1365 |
+
margin-left: 91.66666666666666%;
|
1366 |
+
}
|
1367 |
+
.col-lg-offset-10 {
|
1368 |
+
margin-left: 83.33333333333334%;
|
1369 |
+
}
|
1370 |
+
.col-lg-offset-9 {
|
1371 |
+
margin-left: 75%;
|
1372 |
+
}
|
1373 |
+
.col-lg-offset-8 {
|
1374 |
+
margin-left: 66.66666666666666%;
|
1375 |
+
}
|
1376 |
+
.col-lg-offset-7 {
|
1377 |
+
margin-left: 58.333333333333336%;
|
1378 |
+
}
|
1379 |
+
.col-lg-offset-6 {
|
1380 |
+
margin-left: 50%;
|
1381 |
+
}
|
1382 |
+
.col-lg-offset-5 {
|
1383 |
+
margin-left: 41.66666666666667%;
|
1384 |
+
}
|
1385 |
+
.col-lg-offset-4 {
|
1386 |
+
margin-left: 33.33333333333333%;
|
1387 |
+
}
|
1388 |
+
.col-lg-offset-3 {
|
1389 |
+
margin-left: 25%;
|
1390 |
+
}
|
1391 |
+
.col-lg-offset-2 {
|
1392 |
+
margin-left: 16.666666666666664%;
|
1393 |
+
}
|
1394 |
+
.col-lg-offset-1 {
|
1395 |
+
margin-left: 8.333333333333332%;
|
1396 |
+
}
|
1397 |
+
.col-lg-offset-0 {
|
1398 |
+
margin-left: 0;
|
1399 |
+
}
|
1400 |
+
}
|
1401 |
+
table {
|
1402 |
+
max-width: 100%;
|
1403 |
+
background-color: transparent;
|
1404 |
+
}
|
1405 |
+
th {
|
1406 |
+
text-align: left;
|
1407 |
+
}
|
1408 |
+
.table {
|
1409 |
+
width: 100%;
|
1410 |
+
margin-bottom: 20px;
|
1411 |
+
}
|
1412 |
+
.table > thead > tr > th,
|
1413 |
+
.table > tbody > tr > th,
|
1414 |
+
.table > tfoot > tr > th,
|
1415 |
+
.table > thead > tr > td,
|
1416 |
+
.table > tbody > tr > td,
|
1417 |
+
.table > tfoot > tr > td {
|
1418 |
+
padding: 8px;
|
1419 |
+
line-height: 1.428571429;
|
1420 |
+
vertical-align: top;
|
1421 |
+
border-top: 1px solid #ddd;
|
1422 |
+
}
|
1423 |
+
.table > thead > tr > th {
|
1424 |
+
vertical-align: bottom;
|
1425 |
+
border-bottom: 2px solid #ddd;
|
1426 |
+
}
|
1427 |
+
.table > caption + thead > tr:first-child > th,
|
1428 |
+
.table > colgroup + thead > tr:first-child > th,
|
1429 |
+
.table > thead:first-child > tr:first-child > th,
|
1430 |
+
.table > caption + thead > tr:first-child > td,
|
1431 |
+
.table > colgroup + thead > tr:first-child > td,
|
1432 |
+
.table > thead:first-child > tr:first-child > td {
|
1433 |
+
border-top: 0;
|
1434 |
+
}
|
1435 |
+
.table > tbody + tbody {
|
1436 |
+
border-top: 2px solid #ddd;
|
1437 |
+
}
|
1438 |
+
.table .table {
|
1439 |
+
background-color: #fff;
|
1440 |
+
}
|
1441 |
+
.table-condensed > thead > tr > th,
|
1442 |
+
.table-condensed > tbody > tr > th,
|
1443 |
+
.table-condensed > tfoot > tr > th,
|
1444 |
+
.table-condensed > thead > tr > td,
|
1445 |
+
.table-condensed > tbody > tr > td,
|
1446 |
+
.table-condensed > tfoot > tr > td {
|
1447 |
+
padding: 5px;
|
1448 |
+
}
|
1449 |
+
.table-bordered {
|
1450 |
+
border: 1px solid #ddd;
|
1451 |
+
}
|
1452 |
+
.table-bordered > thead > tr > th,
|
1453 |
+
.table-bordered > tbody > tr > th,
|
1454 |
+
.table-bordered > tfoot > tr > th,
|
1455 |
+
.table-bordered > thead > tr > td,
|
1456 |
+
.table-bordered > tbody > tr > td,
|
1457 |
+
.table-bordered > tfoot > tr > td {
|
1458 |
+
border: 1px solid #ddd;
|
1459 |
+
}
|
1460 |
+
.table-bordered > thead > tr > th,
|
1461 |
+
.table-bordered > thead > tr > td {
|
1462 |
+
border-bottom-width: 2px;
|
1463 |
+
}
|
1464 |
+
.table-striped > tbody > tr:nth-child(odd) > td,
|
1465 |
+
.table-striped > tbody > tr:nth-child(odd) > th {
|
1466 |
+
background-color: #f9f9f9;
|
1467 |
+
}
|
1468 |
+
.table-hover > tbody > tr:hover > td,
|
1469 |
+
.table-hover > tbody > tr:hover > th {
|
1470 |
+
background-color: #f5f5f5;
|
1471 |
+
}
|
1472 |
+
table col[class*="col-"] {
|
1473 |
+
position: static;
|
1474 |
+
display: table-column;
|
1475 |
+
float: none;
|
1476 |
+
}
|
1477 |
+
table td[class*="col-"],
|
1478 |
+
table th[class*="col-"] {
|
1479 |
+
position: static;
|
1480 |
+
display: table-cell;
|
1481 |
+
float: none;
|
1482 |
+
}
|
1483 |
+
.table > thead > tr > td.active,
|
1484 |
+
.table > tbody > tr > td.active,
|
1485 |
+
.table > tfoot > tr > td.active,
|
1486 |
+
.table > thead > tr > th.active,
|
1487 |
+
.table > tbody > tr > th.active,
|
1488 |
+
.table > tfoot > tr > th.active,
|
1489 |
+
.table > thead > tr.active > td,
|
1490 |
+
.table > tbody > tr.active > td,
|
1491 |
+
.table > tfoot > tr.active > td,
|
1492 |
+
.table > thead > tr.active > th,
|
1493 |
+
.table > tbody > tr.active > th,
|
1494 |
+
.table > tfoot > tr.active > th {
|
1495 |
+
background-color: #f5f5f5;
|
1496 |
+
}
|
1497 |
+
.table-hover > tbody > tr > td.active:hover,
|
1498 |
+
.table-hover > tbody > tr > th.active:hover,
|
1499 |
+
.table-hover > tbody > tr.active:hover > td,
|
1500 |
+
.table-hover > tbody > tr.active:hover > th {
|
1501 |
+
background-color: #e8e8e8;
|
1502 |
+
}
|
1503 |
+
.table > thead > tr > td.success,
|
1504 |
+
.table > tbody > tr > td.success,
|
1505 |
+
.table > tfoot > tr > td.success,
|
1506 |
+
.table > thead > tr > th.success,
|
1507 |
+
.table > tbody > tr > th.success,
|
1508 |
+
.table > tfoot > tr > th.success,
|
1509 |
+
.table > thead > tr.success > td,
|
1510 |
+
.table > tbody > tr.success > td,
|
1511 |
+
.table > tfoot > tr.success > td,
|
1512 |
+
.table > thead > tr.success > th,
|
1513 |
+
.table > tbody > tr.success > th,
|
1514 |
+
.table > tfoot > tr.success > th {
|
1515 |
+
background-color: #dff0d8;
|
1516 |
+
}
|
1517 |
+
.table-hover > tbody > tr > td.success:hover,
|
1518 |
+
.table-hover > tbody > tr > th.success:hover,
|
1519 |
+
.table-hover > tbody > tr.success:hover > td,
|
1520 |
+
.table-hover > tbody > tr.success:hover > th {
|
1521 |
+
background-color: #d0e9c6;
|
1522 |
+
}
|
1523 |
+
.table > thead > tr > td.info,
|
1524 |
+
.table > tbody > tr > td.info,
|
1525 |
+
.table > tfoot > tr > td.info,
|
1526 |
+
.table > thead > tr > th.info,
|
1527 |
+
.table > tbody > tr > th.info,
|
1528 |
+
.table > tfoot > tr > th.info,
|
1529 |
+
.table > thead > tr.info > td,
|
1530 |
+
.table > tbody > tr.info > td,
|
1531 |
+
.table > tfoot > tr.info > td,
|
1532 |
+
.table > thead > tr.info > th,
|
1533 |
+
.table > tbody > tr.info > th,
|
1534 |
+
.table > tfoot > tr.info > th {
|
1535 |
+
background-color: #d9edf7;
|
1536 |
+
}
|
1537 |
+
.table-hover > tbody > tr > td.info:hover,
|
1538 |
+
.table-hover > tbody > tr > th.info:hover,
|
1539 |
+
.table-hover > tbody > tr.info:hover > td,
|
1540 |
+
.table-hover > tbody > tr.info:hover > th {
|
1541 |
+
background-color: #c4e3f3;
|
1542 |
+
}
|
1543 |
+
.table > thead > tr > td.warning,
|
1544 |
+
.table > tbody > tr > td.warning,
|
1545 |
+
.table > tfoot > tr > td.warning,
|
1546 |
+
.table > thead > tr > th.warning,
|
1547 |
+
.table > tbody > tr > th.warning,
|
1548 |
+
.table > tfoot > tr > th.warning,
|
1549 |
+
.table > thead > tr.warning > td,
|
1550 |
+
.table > tbody > tr.warning > td,
|
1551 |
+
.table > tfoot > tr.warning > td,
|
1552 |
+
.table > thead > tr.warning > th,
|
1553 |
+
.table > tbody > tr.warning > th,
|
1554 |
+
.table > tfoot > tr.warning > th {
|
1555 |
+
background-color: #fcf8e3;
|
1556 |
+
}
|
1557 |
+
.table-hover > tbody > tr > td.warning:hover,
|
1558 |
+
.table-hover > tbody > tr > th.warning:hover,
|
1559 |
+
.table-hover > tbody > tr.warning:hover > td,
|
1560 |
+
.table-hover > tbody > tr.warning:hover > th {
|
1561 |
+
background-color: #faf2cc;
|
1562 |
+
}
|
1563 |
+
.table > thead > tr > td.danger,
|
1564 |
+
.table > tbody > tr > td.danger,
|
1565 |
+
.table > tfoot > tr > td.danger,
|
1566 |
+
.table > thead > tr > th.danger,
|
1567 |
+
.table > tbody > tr > th.danger,
|
1568 |
+
.table > tfoot > tr > th.danger,
|
1569 |
+
.table > thead > tr.danger > td,
|
1570 |
+
.table > tbody > tr.danger > td,
|
1571 |
+
.table > tfoot > tr.danger > td,
|
1572 |
+
.table > thead > tr.danger > th,
|
1573 |
+
.table > tbody > tr.danger > th,
|
1574 |
+
.table > tfoot > tr.danger > th {
|
1575 |
+
background-color: #f2dede;
|
1576 |
+
}
|
1577 |
+
.table-hover > tbody > tr > td.danger:hover,
|
1578 |
+
.table-hover > tbody > tr > th.danger:hover,
|
1579 |
+
.table-hover > tbody > tr.danger:hover > td,
|
1580 |
+
.table-hover > tbody > tr.danger:hover > th {
|
1581 |
+
background-color: #ebcccc;
|
1582 |
+
}
|
1583 |
+
@media (max-width: 767px) {
|
1584 |
+
.table-responsive {
|
1585 |
+
width: 100%;
|
1586 |
+
margin-bottom: 15px;
|
1587 |
+
overflow-x: scroll;
|
1588 |
+
overflow-y: hidden;
|
1589 |
+
-webkit-overflow-scrolling: touch;
|
1590 |
+
-ms-overflow-style: -ms-autohiding-scrollbar;
|
1591 |
+
border: 1px solid #ddd;
|
1592 |
+
}
|
1593 |
+
.table-responsive > .table {
|
1594 |
+
margin-bottom: 0;
|
1595 |
+
}
|
1596 |
+
.table-responsive > .table > thead > tr > th,
|
1597 |
+
.table-responsive > .table > tbody > tr > th,
|
1598 |
+
.table-responsive > .table > tfoot > tr > th,
|
1599 |
+
.table-responsive > .table > thead > tr > td,
|
1600 |
+
.table-responsive > .table > tbody > tr > td,
|
1601 |
+
.table-responsive > .table > tfoot > tr > td {
|
1602 |
+
white-space: nowrap;
|
1603 |
+
}
|
1604 |
+
.table-responsive > .table-bordered {
|
1605 |
+
border: 0;
|
1606 |
+
}
|
1607 |
+
.table-responsive > .table-bordered > thead > tr > th:first-child,
|
1608 |
+
.table-responsive > .table-bordered > tbody > tr > th:first-child,
|
1609 |
+
.table-responsive > .table-bordered > tfoot > tr > th:first-child,
|
1610 |
+
.table-responsive > .table-bordered > thead > tr > td:first-child,
|
1611 |
+
.table-responsive > .table-bordered > tbody > tr > td:first-child,
|
1612 |
+
.table-responsive > .table-bordered > tfoot > tr > td:first-child {
|
1613 |
+
border-left: 0;
|
1614 |
+
}
|
1615 |
+
.table-responsive > .table-bordered > thead > tr > th:last-child,
|
1616 |
+
.table-responsive > .table-bordered > tbody > tr > th:last-child,
|
1617 |
+
.table-responsive > .table-bordered > tfoot > tr > th:last-child,
|
1618 |
+
.table-responsive > .table-bordered > thead > tr > td:last-child,
|
1619 |
+
.table-responsive > .table-bordered > tbody > tr > td:last-child,
|
1620 |
+
.table-responsive > .table-bordered > tfoot > tr > td:last-child {
|
1621 |
+
border-right: 0;
|
1622 |
+
}
|
1623 |
+
.table-responsive > .table-bordered > tbody > tr:last-child > th,
|
1624 |
+
.table-responsive > .table-bordered > tfoot > tr:last-child > th,
|
1625 |
+
.table-responsive > .table-bordered > tbody > tr:last-child > td,
|
1626 |
+
.table-responsive > .table-bordered > tfoot > tr:last-child > td {
|
1627 |
+
border-bottom: 0;
|
1628 |
+
}
|
1629 |
+
}
|
1630 |
+
fieldset {
|
1631 |
+
min-width: 0;
|
1632 |
+
padding: 0;
|
1633 |
+
margin: 0;
|
1634 |
+
border: 0;
|
1635 |
+
}
|
1636 |
+
legend {
|
1637 |
+
display: block;
|
1638 |
+
width: 100%;
|
1639 |
+
padding: 0;
|
1640 |
+
margin-bottom: 20px;
|
1641 |
+
font-size: 21px;
|
1642 |
+
line-height: inherit;
|
1643 |
+
color: #333;
|
1644 |
+
border: 0;
|
1645 |
+
border-bottom: 1px solid #e5e5e5;
|
1646 |
+
}
|
1647 |
+
label {
|
1648 |
+
display: inline-block;
|
1649 |
+
margin-bottom: 5px;
|
1650 |
+
font-weight: bold;
|
1651 |
+
}
|
1652 |
+
input[type="search"] {
|
1653 |
+
-webkit-box-sizing: border-box;
|
1654 |
+
-moz-box-sizing: border-box;
|
1655 |
+
box-sizing: border-box;
|
1656 |
+
}
|
1657 |
+
input[type="radio"],
|
1658 |
+
input[type="checkbox"] {
|
1659 |
+
margin: 4px 0 0;
|
1660 |
+
margin-top: 1px \9;
|
1661 |
+
/* IE8-9 */
|
1662 |
+
line-height: normal;
|
1663 |
+
}
|
1664 |
+
input[type="file"] {
|
1665 |
+
display: block;
|
1666 |
+
}
|
1667 |
+
input[type="range"] {
|
1668 |
+
display: block;
|
1669 |
+
width: 100%;
|
1670 |
+
}
|
1671 |
+
select[multiple],
|
1672 |
+
select[size] {
|
1673 |
+
height: auto;
|
1674 |
+
}
|
1675 |
+
input[type="file"]:focus,
|
1676 |
+
input[type="radio"]:focus,
|
1677 |
+
input[type="checkbox"]:focus {
|
1678 |
+
outline: thin dotted;
|
1679 |
+
outline: 5px auto -webkit-focus-ring-color;
|
1680 |
+
outline-offset: -2px;
|
1681 |
+
}
|
1682 |
+
output {
|
1683 |
+
display: block;
|
1684 |
+
padding-top: 7px;
|
1685 |
+
font-size: 14px;
|
1686 |
+
line-height: 1.428571429;
|
1687 |
+
color: #555;
|
1688 |
+
}
|
1689 |
+
.form-control {
|
1690 |
+
display: block;
|
1691 |
+
width: 100%;
|
1692 |
+
height: 34px;
|
1693 |
+
padding: 6px 12px;
|
1694 |
+
font-size: 14px;
|
1695 |
+
line-height: 1.428571429;
|
1696 |
+
color: #555;
|
1697 |
+
background-color: #fff;
|
1698 |
+
background-image: none;
|
1699 |
+
border: 1px solid #ccc;
|
1700 |
+
border-radius: 4px;
|
1701 |
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
|
1702 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
|
1703 |
+
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
1704 |
+
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
1705 |
+
}
|
1706 |
+
.form-control:focus {
|
1707 |
+
border-color: #66afe9;
|
1708 |
+
outline: 0;
|
1709 |
+
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
|
1710 |
+
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
|
1711 |
+
}
|
1712 |
+
.form-control:-moz-placeholder {
|
1713 |
+
color: #999;
|
1714 |
+
}
|
1715 |
+
.form-control::-moz-placeholder {
|
1716 |
+
color: #999;
|
1717 |
+
opacity: 1;
|
1718 |
+
}
|
1719 |
+
.form-control:-ms-input-placeholder {
|
1720 |
+
color: #999;
|
1721 |
+
}
|
1722 |
+
.form-control::-webkit-input-placeholder {
|
1723 |
+
color: #999;
|
1724 |
+
}
|
1725 |
+
.form-control[disabled],
|
1726 |
+
.form-control[readonly],
|
1727 |
+
fieldset[disabled] .form-control {
|
1728 |
+
cursor: not-allowed;
|
1729 |
+
background-color: #eee;
|
1730 |
+
opacity: 1;
|
1731 |
+
}
|
1732 |
+
textarea.form-control {
|
1733 |
+
height: auto;
|
1734 |
+
}
|
1735 |
+
input[type="date"] {
|
1736 |
+
line-height: 34px;
|
1737 |
+
}
|
1738 |
+
.form-group {
|
1739 |
+
margin-bottom: 15px;
|
1740 |
+
}
|
1741 |
+
.radio,
|
1742 |
+
.checkbox {
|
1743 |
+
display: block;
|
1744 |
+
min-height: 20px;
|
1745 |
+
padding-left: 20px;
|
1746 |
+
margin-top: 10px;
|
1747 |
+
margin-bottom: 10px;
|
1748 |
+
}
|
1749 |
+
.radio label,
|
1750 |
+
.checkbox label {
|
1751 |
+
display: inline;
|
1752 |
+
font-weight: normal;
|
1753 |
+
cursor: pointer;
|
1754 |
+
}
|
1755 |
+
.radio input[type="radio"],
|
1756 |
+
.radio-inline input[type="radio"],
|
1757 |
+
.checkbox input[type="checkbox"],
|
1758 |
+
.checkbox-inline input[type="checkbox"] {
|
1759 |
+
float: left;
|
1760 |
+
margin-left: -20px;
|
1761 |
+
}
|
1762 |
+
.radio + .radio,
|
1763 |
+
.checkbox + .checkbox {
|
1764 |
+
margin-top: -5px;
|
1765 |
+
}
|
1766 |
+
.radio-inline,
|
1767 |
+
.checkbox-inline {
|
1768 |
+
display: inline-block;
|
1769 |
+
padding-left: 20px;
|
1770 |
+
margin-bottom: 0;
|
1771 |
+
font-weight: normal;
|
1772 |
+
vertical-align: middle;
|
1773 |
+
cursor: pointer;
|
1774 |
+
}
|
1775 |
+
.radio-inline + .radio-inline,
|
1776 |
+
.checkbox-inline + .checkbox-inline {
|
1777 |
+
margin-top: 0;
|
1778 |
+
margin-left: 10px;
|
1779 |
+
}
|
1780 |
+
input[type="radio"][disabled],
|
1781 |
+
input[type="checkbox"][disabled],
|
1782 |
+
.radio[disabled],
|
1783 |
+
.radio-inline[disabled],
|
1784 |
+
.checkbox[disabled],
|
1785 |
+
.checkbox-inline[disabled],
|
1786 |
+
fieldset[disabled] input[type="radio"],
|
1787 |
+
fieldset[disabled] input[type="checkbox"],
|
1788 |
+
fieldset[disabled] .radio,
|
1789 |
+
fieldset[disabled] .radio-inline,
|
1790 |
+
fieldset[disabled] .checkbox,
|
1791 |
+
fieldset[disabled] .checkbox-inline {
|
1792 |
+
cursor: not-allowed;
|
1793 |
+
}
|
1794 |
+
.input-sm {
|
1795 |
+
height: 30px;
|
1796 |
+
padding: 5px 10px;
|
1797 |
+
font-size: 12px;
|
1798 |
+
line-height: 1.5;
|
1799 |
+
border-radius: 3px;
|
1800 |
+
}
|
1801 |
+
select.input-sm {
|
1802 |
+
height: 30px;
|
1803 |
+
line-height: 30px;
|
1804 |
+
}
|
1805 |
+
textarea.input-sm,
|
1806 |
+
select[multiple].input-sm {
|
1807 |
+
height: auto;
|
1808 |
+
}
|
1809 |
+
.input-lg {
|
1810 |
+
height: 46px;
|
1811 |
+
padding: 10px 16px;
|
1812 |
+
font-size: 18px;
|
1813 |
+
line-height: 1.33;
|
1814 |
+
border-radius: 6px;
|
1815 |
+
}
|
1816 |
+
select.input-lg {
|
1817 |
+
height: 46px;
|
1818 |
+
line-height: 46px;
|
1819 |
+
}
|
1820 |
+
textarea.input-lg,
|
1821 |
+
select[multiple].input-lg {
|
1822 |
+
height: auto;
|
1823 |
+
}
|
1824 |
+
.has-feedback {
|
1825 |
+
position: relative;
|
1826 |
+
}
|
1827 |
+
.has-feedback .form-control {
|
1828 |
+
padding-right: 42.5px;
|
1829 |
+
}
|
1830 |
+
.has-feedback .form-control-feedback {
|
1831 |
+
position: absolute;
|
1832 |
+
top: 25px;
|
1833 |
+
right: 0;
|
1834 |
+
display: block;
|
1835 |
+
width: 34px;
|
1836 |
+
height: 34px;
|
1837 |
+
line-height: 34px;
|
1838 |
+
text-align: center;
|
1839 |
+
}
|
1840 |
+
.has-success .help-block,
|
1841 |
+
.has-success .control-label,
|
1842 |
+
.has-success .radio,
|
1843 |
+
.has-success .checkbox,
|
1844 |
+
.has-success .radio-inline,
|
1845 |
+
.has-success .checkbox-inline {
|
1846 |
+
color: #3c763d;
|
1847 |
+
}
|
1848 |
+
.has-success .form-control {
|
1849 |
+
border-color: #3c763d;
|
1850 |
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
|
1851 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
|
1852 |
+
}
|
1853 |
+
.has-success .form-control:focus {
|
1854 |
+
border-color: #2b542c;
|
1855 |
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
|
1856 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
|
1857 |
+
}
|
1858 |
+
.has-success .input-group-addon {
|
1859 |
+
color: #3c763d;
|
1860 |
+
background-color: #dff0d8;
|
1861 |
+
border-color: #3c763d;
|
1862 |
+
}
|
1863 |
+
.has-success .form-control-feedback {
|
1864 |
+
color: #3c763d;
|
1865 |
+
}
|
1866 |
+
.has-warning .help-block,
|
1867 |
+
.has-warning .control-label,
|
1868 |
+
.has-warning .radio,
|
1869 |
+
.has-warning .checkbox,
|
1870 |
+
.has-warning .radio-inline,
|
1871 |
+
.has-warning .checkbox-inline {
|
1872 |
+
color: #8a6d3b;
|
1873 |
+
}
|
1874 |
+
.has-warning .form-control {
|
1875 |
+
border-color: #8a6d3b;
|
1876 |
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
|
1877 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
|
1878 |
+
}
|
1879 |
+
.has-warning .form-control:focus {
|
1880 |
+
border-color: #66512c;
|
1881 |
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
|
1882 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
|
1883 |
+
}
|
1884 |
+
.has-warning .input-group-addon {
|
1885 |
+
color: #8a6d3b;
|
1886 |
+
background-color: #fcf8e3;
|
1887 |
+
border-color: #8a6d3b;
|
1888 |
+
}
|
1889 |
+
.has-warning .form-control-feedback {
|
1890 |
+
color: #8a6d3b;
|
1891 |
+
}
|
1892 |
+
.has-error .help-block,
|
1893 |
+
.has-error .control-label,
|
1894 |
+
.has-error .radio,
|
1895 |
+
.has-error .checkbox,
|
1896 |
+
.has-error .radio-inline,
|
1897 |
+
.has-error .checkbox-inline {
|
1898 |
+
color: #a94442;
|
1899 |
+
}
|
1900 |
+
.has-error .form-control {
|
1901 |
+
border-color: #a94442;
|
1902 |
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
|
1903 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
|
1904 |
+
}
|
1905 |
+
.has-error .form-control:focus {
|
1906 |
+
border-color: #843534;
|
1907 |
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
|
1908 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
|
1909 |
+
}
|
1910 |
+
.has-error .input-group-addon {
|
1911 |
+
color: #a94442;
|
1912 |
+
background-color: #f2dede;
|
1913 |
+
border-color: #a94442;
|
1914 |
+
}
|
1915 |
+
.has-error .form-control-feedback {
|
1916 |
+
color: #a94442;
|
1917 |
+
}
|
1918 |
+
.form-control-static {
|
1919 |
+
margin-bottom: 0;
|
1920 |
+
}
|
1921 |
+
.help-block {
|
1922 |
+
display: block;
|
1923 |
+
margin-top: 5px;
|
1924 |
+
margin-bottom: 10px;
|
1925 |
+
color: #737373;
|
1926 |
+
}
|
1927 |
+
@media (min-width: 768px) {
|
1928 |
+
.form-inline .form-group {
|
1929 |
+
display: inline-block;
|
1930 |
+
margin-bottom: 0;
|
1931 |
+
vertical-align: middle;
|
1932 |
+
}
|
1933 |
+
.form-inline .form-control {
|
1934 |
+
display: inline-block;
|
1935 |
+
width: auto;
|
1936 |
+
vertical-align: middle;
|
1937 |
+
}
|
1938 |
+
.form-inline .control-label {
|
1939 |
+
margin-bottom: 0;
|
1940 |
+
vertical-align: middle;
|
1941 |
+
}
|
1942 |
+
.form-inline .radio,
|
1943 |
+
.form-inline .checkbox {
|
1944 |
+
display: inline-block;
|
1945 |
+
padding-left: 0;
|
1946 |
+
margin-top: 0;
|
1947 |
+
margin-bottom: 0;
|
1948 |
+
vertical-align: middle;
|
1949 |
+
}
|
1950 |
+
.form-inline .radio input[type="radio"],
|
1951 |
+
.form-inline .checkbox input[type="checkbox"] {
|
1952 |
+
float: none;
|
1953 |
+
margin-left: 0;
|
1954 |
+
}
|
1955 |
+
.form-inline .has-feedback .form-control-feedback {
|
1956 |
+
top: 0;
|
1957 |
+
}
|
1958 |
+
}
|
1959 |
+
.form-horizontal .control-label,
|
1960 |
+
.form-horizontal .radio,
|
1961 |
+
.form-horizontal .checkbox,
|
1962 |
+
.form-horizontal .radio-inline,
|
1963 |
+
.form-horizontal .checkbox-inline {
|
1964 |
+
padding-top: 7px;
|
1965 |
+
margin-top: 0;
|
1966 |
+
margin-bottom: 0;
|
1967 |
+
}
|
1968 |
+
.form-horizontal .radio,
|
1969 |
+
.form-horizontal .checkbox {
|
1970 |
+
min-height: 27px;
|
1971 |
+
}
|
1972 |
+
.form-horizontal .form-group {
|
1973 |
+
margin-right: -15px;
|
1974 |
+
margin-left: -15px;
|
1975 |
+
}
|
1976 |
+
.form-horizontal .form-control-static {
|
1977 |
+
padding-top: 7px;
|
1978 |
+
}
|
1979 |
+
@media (min-width: 768px) {
|
1980 |
+
.form-horizontal .control-label {
|
1981 |
+
text-align: right;
|
1982 |
+
}
|
1983 |
+
}
|
1984 |
+
.form-horizontal .has-feedback .form-control-feedback {
|
1985 |
+
top: 0;
|
1986 |
+
right: 15px;
|
1987 |
+
}
|
1988 |
+
.btn {
|
1989 |
+
display: inline-block;
|
1990 |
+
padding: 6px 12px;
|
1991 |
+
margin-bottom: 0;
|
1992 |
+
font-size: 14px;
|
1993 |
+
font-weight: normal;
|
1994 |
+
line-height: 1.428571429;
|
1995 |
+
text-align: center;
|
1996 |
+
white-space: nowrap;
|
1997 |
+
vertical-align: middle;
|
1998 |
+
cursor: pointer;
|
1999 |
+
-webkit-user-select: none;
|
2000 |
+
-moz-user-select: none;
|
2001 |
+
-ms-user-select: none;
|
2002 |
+
-o-user-select: none;
|
2003 |
+
user-select: none;
|
2004 |
+
background-image: none;
|
2005 |
+
border: 1px solid transparent;
|
2006 |
+
border-radius: 4px;
|
2007 |
+
}
|
2008 |
+
.btn:focus {
|
2009 |
+
outline: thin dotted;
|
2010 |
+
outline: 5px auto -webkit-focus-ring-color;
|
2011 |
+
outline-offset: -2px;
|
2012 |
+
}
|
2013 |
+
.btn:hover,
|
2014 |
+
.btn:focus {
|
2015 |
+
color: #333;
|
2016 |
+
text-decoration: none;
|
2017 |
+
}
|
2018 |
+
.btn:active,
|
2019 |
+
.btn.active {
|
2020 |
+
background-image: none;
|
2021 |
+
outline: 0;
|
2022 |
+
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
2023 |
+
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
2024 |
+
}
|
2025 |
+
.btn.disabled,
|
2026 |
+
.btn[disabled],
|
2027 |
+
fieldset[disabled] .btn {
|
2028 |
+
pointer-events: none;
|
2029 |
+
cursor: not-allowed;
|
2030 |
+
filter: alpha(opacity=65);
|
2031 |
+
-webkit-box-shadow: none;
|
2032 |
+
box-shadow: none;
|
2033 |
+
opacity: .65;
|
2034 |
+
}
|
2035 |
+
.btn-default {
|
2036 |
+
color: #333;
|
2037 |
+
background-color: #fff;
|
2038 |
+
border-color: #ccc;
|
2039 |
+
}
|
2040 |
+
.btn-default:hover,
|
2041 |
+
.btn-default:focus,
|
2042 |
+
.btn-default:active,
|
2043 |
+
.btn-default.active,
|
2044 |
+
.open .dropdown-toggle.btn-default {
|
2045 |
+
color: #333;
|
2046 |
+
background-color: #ebebeb;
|
2047 |
+
border-color: #adadad;
|
2048 |
+
}
|
2049 |
+
.btn-default:active,
|
2050 |
+
.btn-default.active,
|
2051 |
+
.open .dropdown-toggle.btn-default {
|
2052 |
+
background-image: none;
|
2053 |
+
}
|
2054 |
+
.btn-default.disabled,
|
2055 |
+
.btn-default[disabled],
|
2056 |
+
fieldset[disabled] .btn-default,
|
2057 |
+
.btn-default.disabled:hover,
|
2058 |
+
.btn-default[disabled]:hover,
|
2059 |
+
fieldset[disabled] .btn-default:hover,
|
2060 |
+
.btn-default.disabled:focus,
|
2061 |
+
.btn-default[disabled]:focus,
|
2062 |
+
fieldset[disabled] .btn-default:focus,
|
2063 |
+
.btn-default.disabled:active,
|
2064 |
+
.btn-default[disabled]:active,
|
2065 |
+
fieldset[disabled] .btn-default:active,
|
2066 |
+
.btn-default.disabled.active,
|
2067 |
+
.btn-default[disabled].active,
|
2068 |
+
fieldset[disabled] .btn-default.active {
|
2069 |
+
background-color: #fff;
|
2070 |
+
border-color: #ccc;
|
2071 |
+
}
|
2072 |
+
.btn-default .badge {
|
2073 |
+
color: #fff;
|
2074 |
+
background-color: #333;
|
2075 |
+
}
|
2076 |
+
.btn-primary {
|
2077 |
+
color: #fff;
|
2078 |
+
background-color: #428bca;
|
2079 |
+
border-color: #357ebd;
|
2080 |
+
}
|
2081 |
+
.btn-primary:hover,
|
2082 |
+
.btn-primary:focus,
|
2083 |
+
.btn-primary:active,
|
2084 |
+
.btn-primary.active,
|
2085 |
+
.open .dropdown-toggle.btn-primary {
|
2086 |
+
color: #fff;
|
2087 |
+
background-color: #3276b1;
|
2088 |
+
border-color: #285e8e;
|
2089 |
+
}
|
2090 |
+
.btn-primary:active,
|
2091 |
+
.btn-primary.active,
|
2092 |
+
.open .dropdown-toggle.btn-primary {
|
2093 |
+
background-image: none;
|
2094 |
+
}
|
2095 |
+
.btn-primary.disabled,
|
2096 |
+
.btn-primary[disabled],
|
2097 |
+
fieldset[disabled] .btn-primary,
|
2098 |
+
.btn-primary.disabled:hover,
|
2099 |
+
.btn-primary[disabled]:hover,
|
2100 |
+
fieldset[disabled] .btn-primary:hover,
|
2101 |
+
.btn-primary.disabled:focus,
|
2102 |
+
.btn-primary[disabled]:focus,
|
2103 |
+
fieldset[disabled] .btn-primary:focus,
|
2104 |
+
.btn-primary.disabled:active,
|
2105 |
+
.btn-primary[disabled]:active,
|
2106 |
+
fieldset[disabled] .btn-primary:active,
|
2107 |
+
.btn-primary.disabled.active,
|
2108 |
+
.btn-primary[disabled].active,
|
2109 |
+
fieldset[disabled] .btn-primary.active {
|
2110 |
+
background-color: #428bca;
|
2111 |
+
border-color: #357ebd;
|
2112 |
+
}
|
2113 |
+
.btn-primary .badge {
|
2114 |
+
color: #428bca;
|
2115 |
+
background-color: #fff;
|
2116 |
+
}
|
2117 |
+
.btn-success {
|
2118 |
+
color: #fff;
|
2119 |
+
background-color: #5cb85c;
|
2120 |
+
border-color: #4cae4c;
|
2121 |
+
}
|
2122 |
+
.btn-success:hover,
|
2123 |
+
.btn-success:focus,
|
2124 |
+
.btn-success:active,
|
2125 |
+
.btn-success.active,
|
2126 |
+
.open .dropdown-toggle.btn-success {
|
2127 |
+
color: #fff;
|
2128 |
+
background-color: #47a447;
|
2129 |
+
border-color: #398439;
|
2130 |
+
}
|
2131 |
+
.btn-success:active,
|
2132 |
+
.btn-success.active,
|
2133 |
+
.open .dropdown-toggle.btn-success {
|
2134 |
+
background-image: none;
|
2135 |
+
}
|
2136 |
+
.btn-success.disabled,
|
2137 |
+
.btn-success[disabled],
|
2138 |
+
fieldset[disabled] .btn-success,
|
2139 |
+
.btn-success.disabled:hover,
|
2140 |
+
.btn-success[disabled]:hover,
|
2141 |
+
fieldset[disabled] .btn-success:hover,
|
2142 |
+
.btn-success.disabled:focus,
|
2143 |
+
.btn-success[disabled]:focus,
|
2144 |
+
fieldset[disabled] .btn-success:focus,
|
2145 |
+
.btn-success.disabled:active,
|
2146 |
+
.btn-success[disabled]:active,
|
2147 |
+
fieldset[disabled] .btn-success:active,
|
2148 |
+
.btn-success.disabled.active,
|
2149 |
+
.btn-success[disabled].active,
|
2150 |
+
fieldset[disabled] .btn-success.active {
|
2151 |
+
background-color: #5cb85c;
|
2152 |
+
border-color: #4cae4c;
|
2153 |
+
}
|
2154 |
+
.btn-success .badge {
|
2155 |
+
color: #5cb85c;
|
2156 |
+
background-color: #fff;
|
2157 |
+
}
|
2158 |
+
.btn-info {
|
2159 |
+
color: #fff;
|
2160 |
+
background-color: #5bc0de;
|
2161 |
+
border-color: #46b8da;
|
2162 |
+
}
|
2163 |
+
.btn-info:hover,
|
2164 |
+
.btn-info:focus,
|
2165 |
+
.btn-info:active,
|
2166 |
+
.btn-info.active,
|
2167 |
+
.open .dropdown-toggle.btn-info {
|
2168 |
+
color: #fff;
|
2169 |
+
background-color: #39b3d7;
|
2170 |
+
border-color: #269abc;
|
2171 |
+
}
|
2172 |
+
.btn-info:active,
|
2173 |
+
.btn-info.active,
|
2174 |
+
.open .dropdown-toggle.btn-info {
|
2175 |
+
background-image: none;
|
2176 |
+
}
|
2177 |
+
.btn-info.disabled,
|
2178 |
+
.btn-info[disabled],
|
2179 |
+
fieldset[disabled] .btn-info,
|
2180 |
+
.btn-info.disabled:hover,
|
2181 |
+
.btn-info[disabled]:hover,
|
2182 |
+
fieldset[disabled] .btn-info:hover,
|
2183 |
+
.btn-info.disabled:focus,
|
2184 |
+
.btn-info[disabled]:focus,
|
2185 |
+
fieldset[disabled] .btn-info:focus,
|
2186 |
+
.btn-info.disabled:active,
|
2187 |
+
.btn-info[disabled]:active,
|
2188 |
+
fieldset[disabled] .btn-info:active,
|
2189 |
+
.btn-info.disabled.active,
|
2190 |
+
.btn-info[disabled].active,
|
2191 |
+
fieldset[disabled] .btn-info.active {
|
2192 |
+
background-color: #5bc0de;
|
2193 |
+
border-color: #46b8da;
|
2194 |
+
}
|
2195 |
+
.btn-info .badge {
|
2196 |
+
color: #5bc0de;
|
2197 |
+
background-color: #fff;
|
2198 |
+
}
|
2199 |
+
.btn-warning {
|
2200 |
+
color: #fff;
|
2201 |
+
background-color: #f0ad4e;
|
2202 |
+
border-color: #eea236;
|
2203 |
+
}
|
2204 |
+
.btn-warning:hover,
|
2205 |
+
.btn-warning:focus,
|
2206 |
+
.btn-warning:active,
|
2207 |
+
.btn-warning.active,
|
2208 |
+
.open .dropdown-toggle.btn-warning {
|
2209 |
+
color: #fff;
|
2210 |
+
background-color: #ed9c28;
|
2211 |
+
border-color: #d58512;
|
2212 |
+
}
|
2213 |
+
.btn-warning:active,
|
2214 |
+
.btn-warning.active,
|
2215 |
+
.open .dropdown-toggle.btn-warning {
|
2216 |
+
background-image: none;
|
2217 |
+
}
|
2218 |
+
.btn-warning.disabled,
|
2219 |
+
.btn-warning[disabled],
|
2220 |
+
fieldset[disabled] .btn-warning,
|
2221 |
+
.btn-warning.disabled:hover,
|
2222 |
+
.btn-warning[disabled]:hover,
|
2223 |
+
fieldset[disabled] .btn-warning:hover,
|
2224 |
+
.btn-warning.disabled:focus,
|
2225 |
+
.btn-warning[disabled]:focus,
|
2226 |
+
fieldset[disabled] .btn-warning:focus,
|
2227 |
+
.btn-warning.disabled:active,
|
2228 |
+
.btn-warning[disabled]:active,
|
2229 |
+
fieldset[disabled] .btn-warning:active,
|
2230 |
+
.btn-warning.disabled.active,
|
2231 |
+
.btn-warning[disabled].active,
|
2232 |
+
fieldset[disabled] .btn-warning.active {
|
2233 |
+
background-color: #f0ad4e;
|
2234 |
+
border-color: #eea236;
|
2235 |
+
}
|
2236 |
+
.btn-warning .badge {
|
2237 |
+
color: #f0ad4e;
|
2238 |
+
background-color: #fff;
|
2239 |
+
}
|
2240 |
+
.btn-danger {
|
2241 |
+
color: #fff;
|
2242 |
+
background-color: #d9534f;
|
2243 |
+
border-color: #d43f3a;
|
2244 |
+
}
|
2245 |
+
.btn-danger:hover,
|
2246 |
+
.btn-danger:focus,
|
2247 |
+
.btn-danger:active,
|
2248 |
+
.btn-danger.active,
|
2249 |
+
.open .dropdown-toggle.btn-danger {
|
2250 |
+
color: #fff;
|
2251 |
+
background-color: #d2322d;
|
2252 |
+
border-color: #ac2925;
|
2253 |
+
}
|
2254 |
+
.btn-danger:active,
|
2255 |
+
.btn-danger.active,
|
2256 |
+
.open .dropdown-toggle.btn-danger {
|
2257 |
+
background-image: none;
|
2258 |
+
}
|
2259 |
+
.btn-danger.disabled,
|
2260 |
+
.btn-danger[disabled],
|
2261 |
+
fieldset[disabled] .btn-danger,
|
2262 |
+
.btn-danger.disabled:hover,
|
2263 |
+
.btn-danger[disabled]:hover,
|
2264 |
+
fieldset[disabled] .btn-danger:hover,
|
2265 |
+
.btn-danger.disabled:focus,
|
2266 |
+
.btn-danger[disabled]:focus,
|
2267 |
+
fieldset[disabled] .btn-danger:focus,
|
2268 |
+
.btn-danger.disabled:active,
|
2269 |
+
.btn-danger[disabled]:active,
|
2270 |
+
fieldset[disabled] .btn-danger:active,
|
2271 |
+
.btn-danger.disabled.active,
|
2272 |
+
.btn-danger[disabled].active,
|
2273 |
+
fieldset[disabled] .btn-danger.active {
|
2274 |
+
background-color: #d9534f;
|
2275 |
+
border-color: #d43f3a;
|
2276 |
+
}
|
2277 |
+
.btn-danger .badge {
|
2278 |
+
color: #d9534f;
|
2279 |
+
background-color: #fff;
|
2280 |
+
}
|
2281 |
+
.btn-link {
|
2282 |
+
font-weight: normal;
|
2283 |
+
color: #428bca;
|
2284 |
+
cursor: pointer;
|
2285 |
+
border-radius: 0;
|
2286 |
+
}
|
2287 |
+
.btn-link,
|
2288 |
+
.btn-link:active,
|
2289 |
+
.btn-link[disabled],
|
2290 |
+
fieldset[disabled] .btn-link {
|
2291 |
+
background-color: transparent;
|
2292 |
+
-webkit-box-shadow: none;
|
2293 |
+
box-shadow: none;
|
2294 |
+
}
|
2295 |
+
.btn-link,
|
2296 |
+
.btn-link:hover,
|
2297 |
+
.btn-link:focus,
|
2298 |
+
.btn-link:active {
|
2299 |
+
border-color: transparent;
|
2300 |
+
}
|
2301 |
+
.btn-link:hover,
|
2302 |
+
.btn-link:focus {
|
2303 |
+
color: #2a6496;
|
2304 |
+
text-decoration: underline;
|
2305 |
+
background-color: transparent;
|
2306 |
+
}
|
2307 |
+
.btn-link[disabled]:hover,
|
2308 |
+
fieldset[disabled] .btn-link:hover,
|
2309 |
+
.btn-link[disabled]:focus,
|
2310 |
+
fieldset[disabled] .btn-link:focus {
|
2311 |
+
color: #999;
|
2312 |
+
text-decoration: none;
|
2313 |
+
}
|
2314 |
+
.btn-lg {
|
2315 |
+
padding: 10px 16px;
|
2316 |
+
font-size: 18px;
|
2317 |
+
line-height: 1.33;
|
2318 |
+
border-radius: 6px;
|
2319 |
+
}
|
2320 |
+
.btn-sm {
|
2321 |
+
padding: 5px 10px;
|
2322 |
+
font-size: 12px;
|
2323 |
+
line-height: 1.5;
|
2324 |
+
border-radius: 3px;
|
2325 |
+
}
|
2326 |
+
.btn-xs {
|
2327 |
+
padding: 1px 5px;
|
2328 |
+
font-size: 12px;
|
2329 |
+
line-height: 1.5;
|
2330 |
+
border-radius: 3px;
|
2331 |
+
}
|
2332 |
+
.btn-block {
|
2333 |
+
display: block;
|
2334 |
+
width: 100%;
|
2335 |
+
padding-right: 0;
|
2336 |
+
padding-left: 0;
|
2337 |
+
}
|
2338 |
+
.btn-block + .btn-block {
|
2339 |
+
margin-top: 5px;
|
2340 |
+
}
|
2341 |
+
input[type="submit"].btn-block,
|
2342 |
+
input[type="reset"].btn-block,
|
2343 |
+
input[type="button"].btn-block {
|
2344 |
+
width: 100%;
|
2345 |
+
}
|
2346 |
+
.fade {
|
2347 |
+
opacity: 0;
|
2348 |
+
-webkit-transition: opacity .15s linear;
|
2349 |
+
transition: opacity .15s linear;
|
2350 |
+
}
|
2351 |
+
.fade.in {
|
2352 |
+
opacity: 1;
|
2353 |
+
}
|
2354 |
+
.collapse {
|
2355 |
+
display: none;
|
2356 |
+
}
|
2357 |
+
.collapse.in {
|
2358 |
+
display: block;
|
2359 |
+
}
|
2360 |
+
.collapsing {
|
2361 |
+
position: relative;
|
2362 |
+
height: 0;
|
2363 |
+
overflow: hidden;
|
2364 |
+
-webkit-transition: height .35s ease;
|
2365 |
+
transition: height .35s ease;
|
2366 |
+
}
|
2367 |
+
@font-face {
|
2368 |
+
font-family: 'Glyphicons Halflings';
|
2369 |
+
|
2370 |
+
src: url('../fonts/glyphicons-halflings-regular.eot');
|
2371 |
+
src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
|
2372 |
+
}
|
2373 |
+
.glyphicon {
|
2374 |
+
position: relative;
|
2375 |
+
top: 1px;
|
2376 |
+
display: inline-block;
|
2377 |
+
font-family: 'Glyphicons Halflings';
|
2378 |
+
font-style: normal;
|
2379 |
+
font-weight: normal;
|
2380 |
+
line-height: 1;
|
2381 |
+
|
2382 |
+
-webkit-font-smoothing: antialiased;
|
2383 |
+
-moz-osx-font-smoothing: grayscale;
|
2384 |
+
}
|
2385 |
+
.glyphicon-asterisk:before {
|
2386 |
+
content: "\2a";
|
2387 |
+
}
|
2388 |
+
.glyphicon-plus:before {
|
2389 |
+
content: "\2b";
|
2390 |
+
}
|
2391 |
+
.glyphicon-euro:before {
|
2392 |
+
content: "\20ac";
|
2393 |
+
}
|
2394 |
+
.glyphicon-minus:before {
|
2395 |
+
content: "\2212";
|
2396 |
+
}
|
2397 |
+
.glyphicon-cloud:before {
|
2398 |
+
content: "\2601";
|
2399 |
+
}
|
2400 |
+
.glyphicon-envelope:before {
|
2401 |
+
content: "\2709";
|
2402 |
+
}
|
2403 |
+
.glyphicon-pencil:before {
|
2404 |
+
content: "\270f";
|
2405 |
+
}
|
2406 |
+
.glyphicon-glass:before {
|
2407 |
+
content: "\e001";
|
2408 |
+
}
|
2409 |
+
.glyphicon-music:before {
|
2410 |
+
content: "\e002";
|
2411 |
+
}
|
2412 |
+
.glyphicon-search:before {
|
2413 |
+
content: "\e003";
|
2414 |
+
}
|
2415 |
+
.glyphicon-heart:before {
|
2416 |
+
content: "\e005";
|
2417 |
+
}
|
2418 |
+
.glyphicon-star:before {
|
2419 |
+
content: "\e006";
|
2420 |
+
}
|
2421 |
+
.glyphicon-star-empty:before {
|
2422 |
+
content: "\e007";
|
2423 |
+
}
|
2424 |
+
.glyphicon-user:before {
|
2425 |
+
content: "\e008";
|
2426 |
+
}
|
2427 |
+
.glyphicon-film:before {
|
2428 |
+
content: "\e009";
|
2429 |
+
}
|
2430 |
+
.glyphicon-th-large:before {
|
2431 |
+
content: "\e010";
|
2432 |
+
}
|
2433 |
+
.glyphicon-th:before {
|
2434 |
+
content: "\e011";
|
2435 |
+
}
|
2436 |
+
.glyphicon-th-list:before {
|
2437 |
+
content: "\e012";
|
2438 |
+
}
|
2439 |
+
.glyphicon-ok:before {
|
2440 |
+
content: "\e013";
|
2441 |
+
}
|
2442 |
+
.glyphicon-remove:before {
|
2443 |
+
content: "\e014";
|
2444 |
+
}
|
2445 |
+
.glyphicon-zoom-in:before {
|
2446 |
+
content: "\e015";
|
2447 |
+
}
|
2448 |
+
.glyphicon-zoom-out:before {
|
2449 |
+
content: "\e016";
|
2450 |
+
}
|
2451 |
+
.glyphicon-off:before {
|
2452 |
+
content: "\e017";
|
2453 |
+
}
|
2454 |
+
.glyphicon-signal:before {
|
2455 |
+
content: "\e018";
|
2456 |
+
}
|
2457 |
+
.glyphicon-cog:before {
|
2458 |
+
content: "\e019";
|
2459 |
+
}
|
2460 |
+
.glyphicon-trash:before {
|
2461 |
+
content: "\e020";
|
2462 |
+
}
|
2463 |
+
.glyphicon-home:before {
|
2464 |
+
content: "\e021";
|
2465 |
+
}
|
2466 |
+
.glyphicon-file:before {
|
2467 |
+
content: "\e022";
|
2468 |
+
}
|
2469 |
+
.glyphicon-time:before {
|
2470 |
+
content: "\e023";
|
2471 |
+
}
|
2472 |
+
.glyphicon-road:before {
|
2473 |
+
content: "\e024";
|
2474 |
+
}
|
2475 |
+
.glyphicon-download-alt:before {
|
2476 |
+
content: "\e025";
|
2477 |
+
}
|
2478 |
+
.glyphicon-download:before {
|
2479 |
+
content: "\e026";
|
2480 |
+
}
|
2481 |
+
.glyphicon-upload:before {
|
2482 |
+
content: "\e027";
|
2483 |
+
}
|
2484 |
+
.glyphicon-inbox:before {
|
2485 |
+
content: "\e028";
|
2486 |
+
}
|
2487 |
+
.glyphicon-play-circle:before {
|
2488 |
+
content: "\e029";
|
2489 |
+
}
|
2490 |
+
.glyphicon-repeat:before {
|
2491 |
+
content: "\e030";
|
2492 |
+
}
|
2493 |
+
.glyphicon-refresh:before {
|
2494 |
+
content: "\e031";
|
2495 |
+
}
|
2496 |
+
.glyphicon-list-alt:before {
|
2497 |
+
content: "\e032";
|
2498 |
+
}
|
2499 |
+
.glyphicon-lock:before {
|
2500 |
+
content: "\e033";
|
2501 |
+
}
|
2502 |
+
.glyphicon-flag:before {
|
2503 |
+
content: "\e034";
|
2504 |
+
}
|
2505 |
+
.glyphicon-headphones:before {
|
2506 |
+
content: "\e035";
|
2507 |
+
}
|
2508 |
+
.glyphicon-volume-off:before {
|
2509 |
+
content: "\e036";
|
2510 |
+
}
|
2511 |
+
.glyphicon-volume-down:before {
|
2512 |
+
content: "\e037";
|
2513 |
+
}
|
2514 |
+
.glyphicon-volume-up:before {
|
2515 |
+
content: "\e038";
|
2516 |
+
}
|
2517 |
+
.glyphicon-qrcode:before {
|
2518 |
+
content: "\e039";
|
2519 |
+
}
|
2520 |
+
.glyphicon-barcode:before {
|
2521 |
+
content: "\e040";
|
2522 |
+
}
|
2523 |
+
.glyphicon-tag:before {
|
2524 |
+
content: "\e041";
|
2525 |
+
}
|
2526 |
+
.glyphicon-tags:before {
|
2527 |
+
content: "\e042";
|
2528 |
+
}
|
2529 |
+
.glyphicon-book:before {
|
2530 |
+
content: "\e043";
|
2531 |
+
}
|
2532 |
+
.glyphicon-bookmark:before {
|
2533 |
+
content: "\e044";
|
2534 |
+
}
|
2535 |
+
.glyphicon-print:before {
|
2536 |
+
content: "\e045";
|
2537 |
+
}
|
2538 |
+
.glyphicon-camera:before {
|
2539 |
+
content: "\e046";
|
2540 |
+
}
|
2541 |
+
.glyphicon-font:before {
|
2542 |
+
content: "\e047";
|
2543 |
+
}
|
2544 |
+
.glyphicon-bold:before {
|
2545 |
+
content: "\e048";
|
2546 |
+
}
|
2547 |
+
.glyphicon-italic:before {
|
2548 |
+
content: "\e049";
|
2549 |
+
}
|
2550 |
+
.glyphicon-text-height:before {
|
2551 |
+
content: "\e050";
|
2552 |
+
}
|
2553 |
+
.glyphicon-text-width:before {
|
2554 |
+
content: "\e051";
|
2555 |
+
}
|
2556 |
+
.glyphicon-align-left:before {
|
2557 |
+
content: "\e052";
|
2558 |
+
}
|
2559 |
+
.glyphicon-align-center:before {
|
2560 |
+
content: "\e053";
|
2561 |
+
}
|
2562 |
+
.glyphicon-align-right:before {
|
2563 |
+
content: "\e054";
|
2564 |
+
}
|
2565 |
+
.glyphicon-align-justify:before {
|
2566 |
+
content: "\e055";
|
2567 |
+
}
|
2568 |
+
.glyphicon-list:before {
|
2569 |
+
content: "\e056";
|
2570 |
+
}
|
2571 |
+
.glyphicon-indent-left:before {
|
2572 |
+
content: "\e057";
|
2573 |
+
}
|
2574 |
+
.glyphicon-indent-right:before {
|
2575 |
+
content: "\e058";
|
2576 |
+
}
|
2577 |
+
.glyphicon-facetime-video:before {
|
2578 |
+
content: "\e059";
|
2579 |
+
}
|
2580 |
+
.glyphicon-picture:before {
|
2581 |
+
content: "\e060";
|
2582 |
+
}
|
2583 |
+
.glyphicon-map-marker:before {
|
2584 |
+
content: "\e062";
|
2585 |
+
}
|
2586 |
+
.glyphicon-adjust:before {
|
2587 |
+
content: "\e063";
|
2588 |
+
}
|
2589 |
+
.glyphicon-tint:before {
|
2590 |
+
content: "\e064";
|
2591 |
+
}
|
2592 |
+
.glyphicon-edit:before {
|
2593 |
+
content: "\e065";
|
2594 |
+
}
|
2595 |
+
.glyphicon-share:before {
|
2596 |
+
content: "\e066";
|
2597 |
+
}
|
2598 |
+
.glyphicon-check:before {
|
2599 |
+
content: "\e067";
|
2600 |
+
}
|
2601 |
+
.glyphicon-move:before {
|
2602 |
+
content: "\e068";
|
2603 |
+
}
|
2604 |
+
.glyphicon-step-backward:before {
|
2605 |
+
content: "\e069";
|
2606 |
+
}
|
2607 |
+
.glyphicon-fast-backward:before {
|
2608 |
+
content: "\e070";
|
2609 |
+
}
|
2610 |
+
.glyphicon-backward:before {
|
2611 |
+
content: "\e071";
|
2612 |
+
}
|
2613 |
+
.glyphicon-play:before {
|
2614 |
+
content: "\e072";
|
2615 |
+
}
|
2616 |
+
.glyphicon-pause:before {
|
2617 |
+
content: "\e073";
|
2618 |
+
}
|
2619 |
+
.glyphicon-stop:before {
|
2620 |
+
content: "\e074";
|
2621 |
+
}
|
2622 |
+
.glyphicon-forward:before {
|
2623 |
+
content: "\e075";
|
2624 |
+
}
|
2625 |
+
.glyphicon-fast-forward:before {
|
2626 |
+
content: "\e076";
|
2627 |
+
}
|
2628 |
+
.glyphicon-step-forward:before {
|
2629 |
+
content: "\e077";
|
2630 |
+
}
|
2631 |
+
.glyphicon-eject:before {
|
2632 |
+
content: "\e078";
|
2633 |
+
}
|
2634 |
+
.glyphicon-chevron-left:before {
|
2635 |
+
content: "\e079";
|
2636 |
+
}
|
2637 |
+
.glyphicon-chevron-right:before {
|
2638 |
+
content: "\e080";
|
2639 |
+
}
|
2640 |
+
.glyphicon-plus-sign:before {
|
2641 |
+
content: "\e081";
|
2642 |
+
}
|
2643 |
+
.glyphicon-minus-sign:before {
|
2644 |
+
content: "\e082";
|
2645 |
+
}
|
2646 |
+
.glyphicon-remove-sign:before {
|
2647 |
+
content: "\e083";
|
2648 |
+
}
|
2649 |
+
.glyphicon-ok-sign:before {
|
2650 |
+
content: "\e084";
|
2651 |
+
}
|
2652 |
+
.glyphicon-question-sign:before {
|
2653 |
+
content: "\e085";
|
2654 |
+
}
|
2655 |
+
.glyphicon-info-sign:before {
|
2656 |
+
content: "\e086";
|
2657 |
+
}
|
2658 |
+
.glyphicon-screenshot:before {
|
2659 |
+
content: "\e087";
|
2660 |
+
}
|
2661 |
+
.glyphicon-remove-circle:before {
|
2662 |
+
content: "\e088";
|
2663 |
+
}
|
2664 |
+
.glyphicon-ok-circle:before {
|
2665 |
+
content: "\e089";
|
2666 |
+
}
|
2667 |
+
.glyphicon-ban-circle:before {
|
2668 |
+
content: "\e090";
|
2669 |
+
}
|
2670 |
+
.glyphicon-arrow-left:before {
|
2671 |
+
content: "\e091";
|
2672 |
+
}
|
2673 |
+
.glyphicon-arrow-right:before {
|
2674 |
+
content: "\e092";
|
2675 |
+
}
|
2676 |
+
.glyphicon-arrow-up:before {
|
2677 |
+
content: "\e093";
|
2678 |
+
}
|
2679 |
+
.glyphicon-arrow-down:before {
|
2680 |
+
content: "\e094";
|
2681 |
+
}
|
2682 |
+
.glyphicon-share-alt:before {
|
2683 |
+
content: "\e095";
|
2684 |
+
}
|
2685 |
+
.glyphicon-resize-full:before {
|
2686 |
+
content: "\e096";
|
2687 |
+
}
|
2688 |
+
.glyphicon-resize-small:before {
|
2689 |
+
content: "\e097";
|
2690 |
+
}
|
2691 |
+
.glyphicon-exclamation-sign:before {
|
2692 |
+
content: "\e101";
|
2693 |
+
}
|
2694 |
+
.glyphicon-gift:before {
|
2695 |
+
content: "\e102";
|
2696 |
+
}
|
2697 |
+
.glyphicon-leaf:before {
|
2698 |
+
content: "\e103";
|
2699 |
+
}
|
2700 |
+
.glyphicon-fire:before {
|
2701 |
+
content: "\e104";
|
2702 |
+
}
|
2703 |
+
.glyphicon-eye-open:before {
|
2704 |
+
content: "\e105";
|
2705 |
+
}
|
2706 |
+
.glyphicon-eye-close:before {
|
2707 |
+
content: "\e106";
|
2708 |
+
}
|
2709 |
+
.glyphicon-warning-sign:before {
|
2710 |
+
content: "\e107";
|
2711 |
+
}
|
2712 |
+
.glyphicon-plane:before {
|
2713 |
+
content: "\e108";
|
2714 |
+
}
|
2715 |
+
.glyphicon-calendar:before {
|
2716 |
+
content: "\e109";
|
2717 |
+
}
|
2718 |
+
.glyphicon-random:before {
|
2719 |
+
content: "\e110";
|
2720 |
+
}
|
2721 |
+
.glyphicon-comment:before {
|
2722 |
+
content: "\e111";
|
2723 |
+
}
|
2724 |
+
.glyphicon-magnet:before {
|
2725 |
+
content: "\e112";
|
2726 |
+
}
|
2727 |
+
.glyphicon-chevron-up:before {
|
2728 |
+
content: "\e113";
|
2729 |
+
}
|
2730 |
+
.glyphicon-chevron-down:before {
|
2731 |
+
content: "\e114";
|
2732 |
+
}
|
2733 |
+
.glyphicon-retweet:before {
|
2734 |
+
content: "\e115";
|
2735 |
+
}
|
2736 |
+
.glyphicon-shopping-cart:before {
|
2737 |
+
content: "\e116";
|
2738 |
+
}
|
2739 |
+
.glyphicon-folder-close:before {
|
2740 |
+
content: "\e117";
|
2741 |
+
}
|
2742 |
+
.glyphicon-folder-open:before {
|
2743 |
+
content: "\e118";
|
2744 |
+
}
|
2745 |
+
.glyphicon-resize-vertical:before {
|
2746 |
+
content: "\e119";
|
2747 |
+
}
|
2748 |
+
.glyphicon-resize-horizontal:before {
|
2749 |
+
content: "\e120";
|
2750 |
+
}
|
2751 |
+
.glyphicon-hdd:before {
|
2752 |
+
content: "\e121";
|
2753 |
+
}
|
2754 |
+
.glyphicon-bullhorn:before {
|
2755 |
+
content: "\e122";
|
2756 |
+
}
|
2757 |
+
.glyphicon-bell:before {
|
2758 |
+
content: "\e123";
|
2759 |
+
}
|
2760 |
+
.glyphicon-certificate:before {
|
2761 |
+
content: "\e124";
|
2762 |
+
}
|
2763 |
+
.glyphicon-thumbs-up:before {
|
2764 |
+
content: "\e125";
|
2765 |
+
}
|
2766 |
+
.glyphicon-thumbs-down:before {
|
2767 |
+
content: "\e126";
|
2768 |
+
}
|
2769 |
+
.glyphicon-hand-right:before {
|
2770 |
+
content: "\e127";
|
2771 |
+
}
|
2772 |
+
.glyphicon-hand-left:before {
|
2773 |
+
content: "\e128";
|
2774 |
+
}
|
2775 |
+
.glyphicon-hand-up:before {
|
2776 |
+
content: "\e129";
|
2777 |
+
}
|
2778 |
+
.glyphicon-hand-down:before {
|
2779 |
+
content: "\e130";
|
2780 |
+
}
|
2781 |
+
.glyphicon-circle-arrow-right:before {
|
2782 |
+
content: "\e131";
|
2783 |
+
}
|
2784 |
+
.glyphicon-circle-arrow-left:before {
|
2785 |
+
content: "\e132";
|
2786 |
+
}
|
2787 |
+
.glyphicon-circle-arrow-up:before {
|
2788 |
+
content: "\e133";
|
2789 |
+
}
|
2790 |
+
.glyphicon-circle-arrow-down:before {
|
2791 |
+
content: "\e134";
|
2792 |
+
}
|
2793 |
+
.glyphicon-globe:before {
|
2794 |
+
content: "\e135";
|
2795 |
+
}
|
2796 |
+
.glyphicon-wrench:before {
|
2797 |
+
content: "\e136";
|
2798 |
+
}
|
2799 |
+
.glyphicon-tasks:before {
|
2800 |
+
content: "\e137";
|
2801 |
+
}
|
2802 |
+
.glyphicon-filter:before {
|
2803 |
+
content: "\e138";
|
2804 |
+
}
|
2805 |
+
.glyphicon-briefcase:before {
|
2806 |
+
content: "\e139";
|
2807 |
+
}
|
2808 |
+
.glyphicon-fullscreen:before {
|
2809 |
+
content: "\e140";
|
2810 |
+
}
|
2811 |
+
.glyphicon-dashboard:before {
|
2812 |
+
content: "\e141";
|
2813 |
+
}
|
2814 |
+
.glyphicon-paperclip:before {
|
2815 |
+
content: "\e142";
|
2816 |
+
}
|
2817 |
+
.glyphicon-heart-empty:before {
|
2818 |
+
content: "\e143";
|
2819 |
+
}
|
2820 |
+
.glyphicon-link:before {
|
2821 |
+
content: "\e144";
|
2822 |
+
}
|
2823 |
+
.glyphicon-phone:before {
|
2824 |
+
content: "\e145";
|
2825 |
+
}
|
2826 |
+
.glyphicon-pushpin:before {
|
2827 |
+
content: "\e146";
|
2828 |
+
}
|
2829 |
+
.glyphicon-usd:before {
|
2830 |
+
content: "\e148";
|
2831 |
+
}
|
2832 |
+
.glyphicon-gbp:before {
|
2833 |
+
content: "\e149";
|
2834 |
+
}
|
2835 |
+
.glyphicon-sort:before {
|
2836 |
+
content: "\e150";
|
2837 |
+
}
|
2838 |
+
.glyphicon-sort-by-alphabet:before {
|
2839 |
+
content: "\e151";
|
2840 |
+
}
|
2841 |
+
.glyphicon-sort-by-alphabet-alt:before {
|
2842 |
+
content: "\e152";
|
2843 |
+
}
|
2844 |
+
.glyphicon-sort-by-order:before {
|
2845 |
+
content: "\e153";
|
2846 |
+
}
|
2847 |
+
.glyphicon-sort-by-order-alt:before {
|
2848 |
+
content: "\e154";
|
2849 |
+
}
|
2850 |
+
.glyphicon-sort-by-attributes:before {
|
2851 |
+
content: "\e155";
|
2852 |
+
}
|
2853 |
+
.glyphicon-sort-by-attributes-alt:before {
|
2854 |
+
content: "\e156";
|
2855 |
+
}
|
2856 |
+
.glyphicon-unchecked:before {
|
2857 |
+
content: "\e157";
|
2858 |
+
}
|
2859 |
+
.glyphicon-expand:before {
|
2860 |
+
content: "\e158";
|
2861 |
+
}
|
2862 |
+
.glyphicon-collapse-down:before {
|
2863 |
+
content: "\e159";
|
2864 |
+
}
|
2865 |
+
.glyphicon-collapse-up:before {
|
2866 |
+
content: "\e160";
|
2867 |
+
}
|
2868 |
+
.glyphicon-log-in:before {
|
2869 |
+
content: "\e161";
|
2870 |
+
}
|
2871 |
+
.glyphicon-flash:before {
|
2872 |
+
content: "\e162";
|
2873 |
+
}
|
2874 |
+
.glyphicon-log-out:before {
|
2875 |
+
content: "\e163";
|
2876 |
+
}
|
2877 |
+
.glyphicon-new-window:before {
|
2878 |
+
content: "\e164";
|
2879 |
+
}
|
2880 |
+
.glyphicon-record:before {
|
2881 |
+
content: "\e165";
|
2882 |
+
}
|
2883 |
+
.glyphicon-save:before {
|
2884 |
+
content: "\e166";
|
2885 |
+
}
|
2886 |
+
.glyphicon-open:before {
|
2887 |
+
content: "\e167";
|
2888 |
+
}
|
2889 |
+
.glyphicon-saved:before {
|
2890 |
+
content: "\e168";
|
2891 |
+
}
|
2892 |
+
.glyphicon-import:before {
|
2893 |
+
content: "\e169";
|
2894 |
+
}
|
2895 |
+
.glyphicon-export:before {
|
2896 |
+
content: "\e170";
|
2897 |
+
}
|
2898 |
+
.glyphicon-send:before {
|
2899 |
+
content: "\e171";
|
2900 |
+
}
|
2901 |
+
.glyphicon-floppy-disk:before {
|
2902 |
+
content: "\e172";
|
2903 |
+
}
|
2904 |
+
.glyphicon-floppy-saved:before {
|
2905 |
+
content: "\e173";
|
2906 |
+
}
|
2907 |
+
.glyphicon-floppy-remove:before {
|
2908 |
+
content: "\e174";
|
2909 |
+
}
|
2910 |
+
.glyphicon-floppy-save:before {
|
2911 |
+
content: "\e175";
|
2912 |
+
}
|
2913 |
+
.glyphicon-floppy-open:before {
|
2914 |
+
content: "\e176";
|
2915 |
+
}
|
2916 |
+
.glyphicon-credit-card:before {
|
2917 |
+
content: "\e177";
|
2918 |
+
}
|
2919 |
+
.glyphicon-transfer:before {
|
2920 |
+
content: "\e178";
|
2921 |
+
}
|
2922 |
+
.glyphicon-cutlery:before {
|
2923 |
+
content: "\e179";
|
2924 |
+
}
|
2925 |
+
.glyphicon-header:before {
|
2926 |
+
content: "\e180";
|
2927 |
+
}
|
2928 |
+
.glyphicon-compressed:before {
|
2929 |
+
content: "\e181";
|
2930 |
+
}
|
2931 |
+
.glyphicon-earphone:before {
|
2932 |
+
content: "\e182";
|
2933 |
+
}
|
2934 |
+
.glyphicon-phone-alt:before {
|
2935 |
+
content: "\e183";
|
2936 |
+
}
|
2937 |
+
.glyphicon-tower:before {
|
2938 |
+
content: "\e184";
|
2939 |
+
}
|
2940 |
+
.glyphicon-stats:before {
|
2941 |
+
content: "\e185";
|
2942 |
+
}
|
2943 |
+
.glyphicon-sd-video:before {
|
2944 |
+
content: "\e186";
|
2945 |
+
}
|
2946 |
+
.glyphicon-hd-video:before {
|
2947 |
+
content: "\e187";
|
2948 |
+
}
|
2949 |
+
.glyphicon-subtitles:before {
|
2950 |
+
content: "\e188";
|
2951 |
+
}
|
2952 |
+
.glyphicon-sound-stereo:before {
|
2953 |
+
content: "\e189";
|
2954 |
+
}
|
2955 |
+
.glyphicon-sound-dolby:before {
|
2956 |
+
content: "\e190";
|
2957 |
+
}
|
2958 |
+
.glyphicon-sound-5-1:before {
|
2959 |
+
content: "\e191";
|
2960 |
+
}
|
2961 |
+
.glyphicon-sound-6-1:before {
|
2962 |
+
content: "\e192";
|
2963 |
+
}
|
2964 |
+
.glyphicon-sound-7-1:before {
|
2965 |
+
content: "\e193";
|
2966 |
+
}
|
2967 |
+
.glyphicon-copyright-mark:before {
|
2968 |
+
content: "\e194";
|
2969 |
+
}
|
2970 |
+
.glyphicon-registration-mark:before {
|
2971 |
+
content: "\e195";
|
2972 |
+
}
|
2973 |
+
.glyphicon-cloud-download:before {
|
2974 |
+
content: "\e197";
|
2975 |
+
}
|
2976 |
+
.glyphicon-cloud-upload:before {
|
2977 |
+
content: "\e198";
|
2978 |
+
}
|
2979 |
+
.glyphicon-tree-conifer:before {
|
2980 |
+
content: "\e199";
|
2981 |
+
}
|
2982 |
+
.glyphicon-tree-deciduous:before {
|
2983 |
+
content: "\e200";
|
2984 |
+
}
|
2985 |
+
.caret {
|
2986 |
+
display: inline-block;
|
2987 |
+
width: 0;
|
2988 |
+
height: 0;
|
2989 |
+
margin-left: 2px;
|
2990 |
+
vertical-align: middle;
|
2991 |
+
border-top: 4px solid;
|
2992 |
+
border-right: 4px solid transparent;
|
2993 |
+
border-left: 4px solid transparent;
|
2994 |
+
}
|
2995 |
+
.dropdown {
|
2996 |
+
position: relative;
|
2997 |
+
}
|
2998 |
+
.dropdown-toggle:focus {
|
2999 |
+
outline: 0;
|
3000 |
+
}
|
3001 |
+
.dropdown-menu {
|
3002 |
+
position: absolute;
|
3003 |
+
top: 100%;
|
3004 |
+
left: 0;
|
3005 |
+
z-index: 1000;
|
3006 |
+
display: none;
|
3007 |
+
float: left;
|
3008 |
+
min-width: 160px;
|
3009 |
+
padding: 5px 0;
|
3010 |
+
margin: 2px 0 0;
|
3011 |
+
font-size: 14px;
|
3012 |
+
list-style: none;
|
3013 |
+
background-color: #fff;
|
3014 |
+
background-clip: padding-box;
|
3015 |
+
border: 1px solid #ccc;
|
3016 |
+
border: 1px solid rgba(0, 0, 0, .15);
|
3017 |
+
border-radius: 4px;
|
3018 |
+
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
|
3019 |
+
box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
|
3020 |
+
}
|
3021 |
+
.dropdown-menu.pull-right {
|
3022 |
+
right: 0;
|
3023 |
+
left: auto;
|
3024 |
+
}
|
3025 |
+
.dropdown-menu .divider {
|
3026 |
+
height: 1px;
|
3027 |
+
margin: 9px 0;
|
3028 |
+
overflow: hidden;
|
3029 |
+
background-color: #e5e5e5;
|
3030 |
+
}
|
3031 |
+
.dropdown-menu > li > a {
|
3032 |
+
display: block;
|
3033 |
+
padding: 3px 20px;
|
3034 |
+
clear: both;
|
3035 |
+
font-weight: normal;
|
3036 |
+
line-height: 1.428571429;
|
3037 |
+
color: #333;
|
3038 |
+
white-space: nowrap;
|
3039 |
+
}
|
3040 |
+
.dropdown-menu > li > a:hover,
|
3041 |
+
.dropdown-menu > li > a:focus {
|
3042 |
+
color: #262626;
|
3043 |
+
text-decoration: none;
|
3044 |
+
background-color: #f5f5f5;
|
3045 |
+
}
|
3046 |
+
.dropdown-menu > .active > a,
|
3047 |
+
.dropdown-menu > .active > a:hover,
|
3048 |
+
.dropdown-menu > .active > a:focus {
|
3049 |
+
color: #fff;
|
3050 |
+
text-decoration: none;
|
3051 |
+
background-color: #428bca;
|
3052 |
+
outline: 0;
|
3053 |
+
}
|
3054 |
+
.dropdown-menu > .disabled > a,
|
3055 |
+
.dropdown-menu > .disabled > a:hover,
|
3056 |
+
.dropdown-menu > .disabled > a:focus {
|
3057 |
+
color: #999;
|
3058 |
+
}
|
3059 |
+
.dropdown-menu > .disabled > a:hover,
|
3060 |
+
.dropdown-menu > .disabled > a:focus {
|
3061 |
+
text-decoration: none;
|
3062 |
+
cursor: not-allowed;
|
3063 |
+
background-color: transparent;
|
3064 |
+
background-image: none;
|
3065 |
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
3066 |
+
}
|
3067 |
+
.open > .dropdown-menu {
|
3068 |
+
display: block;
|
3069 |
+
}
|
3070 |
+
.open > a {
|
3071 |
+
outline: 0;
|
3072 |
+
}
|
3073 |
+
.dropdown-menu-right {
|
3074 |
+
right: 0;
|
3075 |
+
left: auto;
|
3076 |
+
}
|
3077 |
+
.dropdown-menu-left {
|
3078 |
+
right: auto;
|
3079 |
+
left: 0;
|
3080 |
+
}
|
3081 |
+
.dropdown-header {
|
3082 |
+
display: block;
|
3083 |
+
padding: 3px 20px;
|
3084 |
+
font-size: 12px;
|
3085 |
+
line-height: 1.428571429;
|
3086 |
+
color: #999;
|
3087 |
+
}
|
3088 |
+
.dropdown-backdrop {
|
3089 |
+
position: fixed;
|
3090 |
+
top: 0;
|
3091 |
+
right: 0;
|
3092 |
+
bottom: 0;
|
3093 |
+
left: 0;
|
3094 |
+
z-index: 990;
|
3095 |
+
}
|
3096 |
+
.pull-right > .dropdown-menu {
|
3097 |
+
right: 0;
|
3098 |
+
left: auto;
|
3099 |
+
}
|
3100 |
+
.dropup .caret,
|
3101 |
+
.navbar-fixed-bottom .dropdown .caret {
|
3102 |
+
content: "";
|
3103 |
+
border-top: 0;
|
3104 |
+
border-bottom: 4px solid;
|
3105 |
+
}
|
3106 |
+
.dropup .dropdown-menu,
|
3107 |
+
.navbar-fixed-bottom .dropdown .dropdown-menu {
|
3108 |
+
top: auto;
|
3109 |
+
bottom: 100%;
|
3110 |
+
margin-bottom: 1px;
|
3111 |
+
}
|
3112 |
+
@media (min-width: 768px) {
|
3113 |
+
.navbar-right .dropdown-menu {
|
3114 |
+
right: 0;
|
3115 |
+
left: auto;
|
3116 |
+
}
|
3117 |
+
.navbar-right .dropdown-menu-left {
|
3118 |
+
right: auto;
|
3119 |
+
left: 0;
|
3120 |
+
}
|
3121 |
+
}
|
3122 |
+
.btn-group,
|
3123 |
+
.btn-group-vertical {
|
3124 |
+
position: relative;
|
3125 |
+
display: inline-block;
|
3126 |
+
vertical-align: middle;
|
3127 |
+
}
|
3128 |
+
.btn-group > .btn,
|
3129 |
+
.btn-group-vertical > .btn {
|
3130 |
+
position: relative;
|
3131 |
+
float: left;
|
3132 |
+
}
|
3133 |
+
.btn-group > .btn:hover,
|
3134 |
+
.btn-group-vertical > .btn:hover,
|
3135 |
+
.btn-group > .btn:focus,
|
3136 |
+
.btn-group-vertical > .btn:focus,
|
3137 |
+
.btn-group > .btn:active,
|
3138 |
+
.btn-group-vertical > .btn:active,
|
3139 |
+
.btn-group > .btn.active,
|
3140 |
+
.btn-group-vertical > .btn.active {
|
3141 |
+
z-index: 2;
|
3142 |
+
}
|
3143 |
+
.btn-group > .btn:focus,
|
3144 |
+
.btn-group-vertical > .btn:focus {
|
3145 |
+
outline: none;
|
3146 |
+
}
|
3147 |
+
.btn-group .btn + .btn,
|
3148 |
+
.btn-group .btn + .btn-group,
|
3149 |
+
.btn-group .btn-group + .btn,
|
3150 |
+
.btn-group .btn-group + .btn-group {
|
3151 |
+
margin-left: -1px;
|
3152 |
+
}
|
3153 |
+
.btn-toolbar {
|
3154 |
+
margin-left: -5px;
|
3155 |
+
}
|
3156 |
+
.btn-toolbar .btn-group,
|
3157 |
+
.btn-toolbar .input-group {
|
3158 |
+
float: left;
|
3159 |
+
}
|
3160 |
+
.btn-toolbar > .btn,
|
3161 |
+
.btn-toolbar > .btn-group,
|
3162 |
+
.btn-toolbar > .input-group {
|
3163 |
+
margin-left: 5px;
|
3164 |
+
}
|
3165 |
+
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
|
3166 |
+
border-radius: 0;
|
3167 |
+
}
|
3168 |
+
.btn-group > .btn:first-child {
|
3169 |
+
margin-left: 0;
|
3170 |
+
}
|
3171 |
+
.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
|
3172 |
+
border-top-right-radius: 0;
|
3173 |
+
border-bottom-right-radius: 0;
|
3174 |
+
}
|
3175 |
+
.btn-group > .btn:last-child:not(:first-child),
|
3176 |
+
.btn-group > .dropdown-toggle:not(:first-child) {
|
3177 |
+
border-top-left-radius: 0;
|
3178 |
+
border-bottom-left-radius: 0;
|
3179 |
+
}
|
3180 |
+
.btn-group > .btn-group {
|
3181 |
+
float: left;
|
3182 |
+
}
|
3183 |
+
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
|
3184 |
+
border-radius: 0;
|
3185 |
+
}
|
3186 |
+
.btn-group > .btn-group:first-child > .btn:last-child,
|
3187 |
+
.btn-group > .btn-group:first-child > .dropdown-toggle {
|
3188 |
+
border-top-right-radius: 0;
|
3189 |
+
border-bottom-right-radius: 0;
|
3190 |
+
}
|
3191 |
+
.btn-group > .btn-group:last-child > .btn:first-child {
|
3192 |
+
border-top-left-radius: 0;
|
3193 |
+
border-bottom-left-radius: 0;
|
3194 |
+
}
|
3195 |
+
.btn-group .dropdown-toggle:active,
|
3196 |
+
.btn-group.open .dropdown-toggle {
|
3197 |
+
outline: 0;
|
3198 |
+
}
|
3199 |
+
.btn-group-xs > .btn {
|
3200 |
+
padding: 1px 5px;
|
3201 |
+
font-size: 12px;
|
3202 |
+
line-height: 1.5;
|
3203 |
+
border-radius: 3px;
|
3204 |
+
}
|
3205 |
+
.btn-group-sm > .btn {
|
3206 |
+
padding: 5px 10px;
|
3207 |
+
font-size: 12px;
|
3208 |
+
line-height: 1.5;
|
3209 |
+
border-radius: 3px;
|
3210 |
+
}
|
3211 |
+
.btn-group-lg > .btn {
|
3212 |
+
padding: 10px 16px;
|
3213 |
+
font-size: 18px;
|
3214 |
+
line-height: 1.33;
|
3215 |
+
border-radius: 6px;
|
3216 |
+
}
|
3217 |
+
.btn-group > .btn + .dropdown-toggle {
|
3218 |
+
padding-right: 8px;
|
3219 |
+
padding-left: 8px;
|
3220 |
+
}
|
3221 |
+
.btn-group > .btn-lg + .dropdown-toggle {
|
3222 |
+
padding-right: 12px;
|
3223 |
+
padding-left: 12px;
|
3224 |
+
}
|
3225 |
+
.btn-group.open .dropdown-toggle {
|
3226 |
+
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
3227 |
+
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
3228 |
+
}
|
3229 |
+
.btn-group.open .dropdown-toggle.btn-link {
|
3230 |
+
-webkit-box-shadow: none;
|
3231 |
+
box-shadow: none;
|
3232 |
+
}
|
3233 |
+
.btn .caret {
|
3234 |
+
margin-left: 0;
|
3235 |
+
}
|
3236 |
+
.btn-lg .caret {
|
3237 |
+
border-width: 5px 5px 0;
|
3238 |
+
border-bottom-width: 0;
|
3239 |
+
}
|
3240 |
+
.dropup .btn-lg .caret {
|
3241 |
+
border-width: 0 5px 5px;
|
3242 |
+
}
|
3243 |
+
.btn-group-vertical > .btn,
|
3244 |
+
.btn-group-vertical > .btn-group,
|
3245 |
+
.btn-group-vertical > .btn-group > .btn {
|
3246 |
+
display: block;
|
3247 |
+
float: none;
|
3248 |
+
width: 100%;
|
3249 |
+
max-width: 100%;
|
3250 |
+
}
|
3251 |
+
.btn-group-vertical > .btn-group > .btn {
|
3252 |
+
float: none;
|
3253 |
+
}
|
3254 |
+
.btn-group-vertical > .btn + .btn,
|
3255 |
+
.btn-group-vertical > .btn + .btn-group,
|
3256 |
+
.btn-group-vertical > .btn-group + .btn,
|
3257 |
+
.btn-group-vertical > .btn-group + .btn-group {
|
3258 |
+
margin-top: -1px;
|
3259 |
+
margin-left: 0;
|
3260 |
+
}
|
3261 |
+
.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
|
3262 |
+
border-radius: 0;
|
3263 |
+
}
|
3264 |
+
.btn-group-vertical > .btn:first-child:not(:last-child) {
|
3265 |
+
border-top-right-radius: 4px;
|
3266 |
+
border-bottom-right-radius: 0;
|
3267 |
+
border-bottom-left-radius: 0;
|
3268 |
+
}
|
3269 |
+
.btn-group-vertical > .btn:last-child:not(:first-child) {
|
3270 |
+
border-top-left-radius: 0;
|
3271 |
+
border-top-right-radius: 0;
|
3272 |
+
border-bottom-left-radius: 4px;
|
3273 |
+
}
|
3274 |
+
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
|
3275 |
+
border-radius: 0;
|
3276 |
+
}
|
3277 |
+
.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
|
3278 |
+
.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
|
3279 |
+
border-bottom-right-radius: 0;
|
3280 |
+
border-bottom-left-radius: 0;
|
3281 |
+
}
|
3282 |
+
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
|
3283 |
+
border-top-left-radius: 0;
|
3284 |
+
border-top-right-radius: 0;
|
3285 |
+
}
|
3286 |
+
.btn-group-justified {
|
3287 |
+
display: table;
|
3288 |
+
width: 100%;
|
3289 |
+
table-layout: fixed;
|
3290 |
+
border-collapse: separate;
|
3291 |
+
}
|
3292 |
+
.btn-group-justified > .btn,
|
3293 |
+
.btn-group-justified > .btn-group {
|
3294 |
+
display: table-cell;
|
3295 |
+
float: none;
|
3296 |
+
width: 1%;
|
3297 |
+
}
|
3298 |
+
.btn-group-justified > .btn-group .btn {
|
3299 |
+
width: 100%;
|
3300 |
+
}
|
3301 |
+
[data-toggle="buttons"] > .btn > input[type="radio"],
|
3302 |
+
[data-toggle="buttons"] > .btn > input[type="checkbox"] {
|
3303 |
+
display: none;
|
3304 |
+
}
|
3305 |
+
.input-group {
|
3306 |
+
position: relative;
|
3307 |
+
display: table;
|
3308 |
+
border-collapse: separate;
|
3309 |
+
}
|
3310 |
+
.input-group[class*="col-"] {
|
3311 |
+
float: none;
|
3312 |
+
padding-right: 0;
|
3313 |
+
padding-left: 0;
|
3314 |
+
}
|
3315 |
+
.input-group .form-control {
|
3316 |
+
float: left;
|
3317 |
+
width: 100%;
|
3318 |
+
margin-bottom: 0;
|
3319 |
+
}
|
3320 |
+
.input-group-lg > .form-control,
|
3321 |
+
.input-group-lg > .input-group-addon,
|
3322 |
+
.input-group-lg > .input-group-btn > .btn {
|
3323 |
+
height: 46px;
|
3324 |
+
padding: 10px 16px;
|
3325 |
+
font-size: 18px;
|
3326 |
+
line-height: 1.33;
|
3327 |
+
border-radius: 6px;
|
3328 |
+
}
|
3329 |
+
select.input-group-lg > .form-control,
|
3330 |
+
select.input-group-lg > .input-group-addon,
|
3331 |
+
select.input-group-lg > .input-group-btn > .btn {
|
3332 |
+
height: 46px;
|
3333 |
+
line-height: 46px;
|
3334 |
+
}
|
3335 |
+
textarea.input-group-lg > .form-control,
|
3336 |
+
textarea.input-group-lg > .input-group-addon,
|
3337 |
+
textarea.input-group-lg > .input-group-btn > .btn,
|
3338 |
+
select[multiple].input-group-lg > .form-control,
|
3339 |
+
select[multiple].input-group-lg > .input-group-addon,
|
3340 |
+
select[multiple].input-group-lg > .input-group-btn > .btn {
|
3341 |
+
height: auto;
|
3342 |
+
}
|
3343 |
+
.input-group-sm > .form-control,
|
3344 |
+
.input-group-sm > .input-group-addon,
|
3345 |
+
.input-group-sm > .input-group-btn > .btn {
|
3346 |
+
height: 30px;
|
3347 |
+
padding: 5px 10px;
|
3348 |
+
font-size: 12px;
|
3349 |
+
line-height: 1.5;
|
3350 |
+
border-radius: 3px;
|
3351 |
+
}
|
3352 |
+
select.input-group-sm > .form-control,
|
3353 |
+
select.input-group-sm > .input-group-addon,
|
3354 |
+
select.input-group-sm > .input-group-btn > .btn {
|
3355 |
+
height: 30px;
|
3356 |
+
line-height: 30px;
|
3357 |
+
}
|
3358 |
+
textarea.input-group-sm > .form-control,
|
3359 |
+
textarea.input-group-sm > .input-group-addon,
|
3360 |
+
textarea.input-group-sm > .input-group-btn > .btn,
|
3361 |
+
select[multiple].input-group-sm > .form-control,
|
3362 |
+
select[multiple].input-group-sm > .input-group-addon,
|
3363 |
+
select[multiple].input-group-sm > .input-group-btn > .btn {
|
3364 |
+
height: auto;
|
3365 |
+
}
|
3366 |
+
.input-group-addon,
|
3367 |
+
.input-group-btn,
|
3368 |
+
.input-group .form-control {
|
3369 |
+
display: table-cell;
|
3370 |
+
}
|
3371 |
+
.input-group-addon:not(:first-child):not(:last-child),
|
3372 |
+
.input-group-btn:not(:first-child):not(:last-child),
|
3373 |
+
.input-group .form-control:not(:first-child):not(:last-child) {
|
3374 |
+
border-radius: 0;
|
3375 |
+
}
|
3376 |
+
.input-group-addon,
|
3377 |
+
.input-group-btn {
|
3378 |
+
width: 1%;
|
3379 |
+
white-space: nowrap;
|
3380 |
+
vertical-align: middle;
|
3381 |
+
}
|
3382 |
+
.input-group-addon {
|
3383 |
+
padding: 6px 12px;
|
3384 |
+
font-size: 14px;
|
3385 |
+
font-weight: normal;
|
3386 |
+
line-height: 1;
|
3387 |
+
color: #555;
|
3388 |
+
text-align: center;
|
3389 |
+
background-color: #eee;
|
3390 |
+
border: 1px solid #ccc;
|
3391 |
+
border-radius: 4px;
|
3392 |
+
}
|
3393 |
+
.input-group-addon.input-sm {
|
3394 |
+
padding: 5px 10px;
|
3395 |
+
font-size: 12px;
|
3396 |
+
border-radius: 3px;
|
3397 |
+
}
|
3398 |
+
.input-group-addon.input-lg {
|
3399 |
+
padding: 10px 16px;
|
3400 |
+
font-size: 18px;
|
3401 |
+
border-radius: 6px;
|
3402 |
+
}
|
3403 |
+
.input-group-addon input[type="radio"],
|
3404 |
+
.input-group-addon input[type="checkbox"] {
|
3405 |
+
margin-top: 0;
|
3406 |
+
}
|
3407 |
+
.input-group .form-control:first-child,
|
3408 |
+
.input-group-addon:first-child,
|
3409 |
+
.input-group-btn:first-child > .btn,
|
3410 |
+
.input-group-btn:first-child > .btn-group > .btn,
|
3411 |
+
.input-group-btn:first-child > .dropdown-toggle,
|
3412 |
+
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
|
3413 |
+
.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
|
3414 |
+
border-top-right-radius: 0;
|
3415 |
+
border-bottom-right-radius: 0;
|
3416 |
+
}
|
3417 |
+
.input-group-addon:first-child {
|
3418 |
+
border-right: 0;
|
3419 |
+
}
|
3420 |
+
.input-group .form-control:last-child,
|
3421 |
+
.input-group-addon:last-child,
|
3422 |
+
.input-group-btn:last-child > .btn,
|
3423 |
+
.input-group-btn:last-child > .btn-group > .btn,
|
3424 |
+
.input-group-btn:last-child > .dropdown-toggle,
|
3425 |
+
.input-group-btn:first-child > .btn:not(:first-child),
|
3426 |
+
.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
|
3427 |
+
border-top-left-radius: 0;
|
3428 |
+
border-bottom-left-radius: 0;
|
3429 |
+
}
|
3430 |
+
.input-group-addon:last-child {
|
3431 |
+
border-left: 0;
|
3432 |
+
}
|
3433 |
+
.input-group-btn {
|
3434 |
+
position: relative;
|
3435 |
+
font-size: 0;
|
3436 |
+
white-space: nowrap;
|
3437 |
+
}
|
3438 |
+
.input-group-btn > .btn {
|
3439 |
+
position: relative;
|
3440 |
+
}
|
3441 |
+
.input-group-btn > .btn + .btn {
|
3442 |
+
margin-left: -1px;
|
3443 |
+
}
|
3444 |
+
.input-group-btn > .btn:hover,
|
3445 |
+
.input-group-btn > .btn:focus,
|
3446 |
+
.input-group-btn > .btn:active {
|
3447 |
+
z-index: 2;
|
3448 |
+
}
|
3449 |
+
.input-group-btn:first-child > .btn,
|
3450 |
+
.input-group-btn:first-child > .btn-group {
|
3451 |
+
margin-right: -1px;
|
3452 |
+
}
|
3453 |
+
.input-group-btn:last-child > .btn,
|
3454 |
+
.input-group-btn:last-child > .btn-group {
|
3455 |
+
margin-left: -1px;
|
3456 |
+
}
|
3457 |
+
.nav {
|
3458 |
+
padding-left: 0;
|
3459 |
+
margin-bottom: 0;
|
3460 |
+
list-style: none;
|
3461 |
+
}
|
3462 |
+
.nav > li {
|
3463 |
+
position: relative;
|
3464 |
+
display: block;
|
3465 |
+
}
|
3466 |
+
.nav > li > a {
|
3467 |
+
position: relative;
|
3468 |
+
display: block;
|
3469 |
+
padding: 10px 15px;
|
3470 |
+
}
|
3471 |
+
.nav > li > a:hover,
|
3472 |
+
.nav > li > a:focus {
|
3473 |
+
text-decoration: none;
|
3474 |
+
background-color: #eee;
|
3475 |
+
}
|
3476 |
+
.nav > li.disabled > a {
|
3477 |
+
color: #999;
|
3478 |
+
}
|
3479 |
+
.nav > li.disabled > a:hover,
|
3480 |
+
.nav > li.disabled > a:focus {
|
3481 |
+
color: #999;
|
3482 |
+
text-decoration: none;
|
3483 |
+
cursor: not-allowed;
|
3484 |
+
background-color: transparent;
|
3485 |
+
}
|
3486 |
+
.nav .open > a,
|
3487 |
+
.nav .open > a:hover,
|
3488 |
+
.nav .open > a:focus {
|
3489 |
+
background-color: #eee;
|
3490 |
+
border-color: #428bca;
|
3491 |
+
}
|
3492 |
+
.nav .nav-divider {
|
3493 |
+
height: 1px;
|
3494 |
+
margin: 9px 0;
|
3495 |
+
overflow: hidden;
|
3496 |
+
background-color: #e5e5e5;
|
3497 |
+
}
|
3498 |
+
.nav > li > a > img {
|
3499 |
+
max-width: none;
|
3500 |
+
}
|
3501 |
+
.nav-tabs {
|
3502 |
+
border-bottom: 1px solid #ddd;
|
3503 |
+
}
|
3504 |
+
.nav-tabs > li {
|
3505 |
+
float: left;
|
3506 |
+
margin-bottom: -1px;
|
3507 |
+
}
|
3508 |
+
.nav-tabs > li > a {
|
3509 |
+
margin-right: 2px;
|
3510 |
+
line-height: 1.428571429;
|
3511 |
+
border: 1px solid transparent;
|
3512 |
+
border-radius: 4px 4px 0 0;
|
3513 |
+
}
|
3514 |
+
.nav-tabs > li > a:hover {
|
3515 |
+
border-color: #eee #eee #ddd;
|
3516 |
+
}
|
3517 |
+
.nav-tabs > li.active > a,
|
3518 |
+
.nav-tabs > li.active > a:hover,
|
3519 |
+
.nav-tabs > li.active > a:focus {
|
3520 |
+
color: #555;
|
3521 |
+
cursor: default;
|
3522 |
+
background-color: #fff;
|
3523 |
+
border: 1px solid #ddd;
|
3524 |
+
border-bottom-color: transparent;
|
3525 |
+
}
|
3526 |
+
.nav-tabs.nav-justified {
|
3527 |
+
width: 100%;
|
3528 |
+
border-bottom: 0;
|
3529 |
+
}
|
3530 |
+
.nav-tabs.nav-justified > li {
|
3531 |
+
float: none;
|
3532 |
+
}
|
3533 |
+
.nav-tabs.nav-justified > li > a {
|
3534 |
+
margin-bottom: 5px;
|
3535 |
+
text-align: center;
|
3536 |
+
}
|
3537 |
+
.nav-tabs.nav-justified > .dropdown .dropdown-menu {
|
3538 |
+
top: auto;
|
3539 |
+
left: auto;
|
3540 |
+
}
|
3541 |
+
@media (min-width: 768px) {
|
3542 |
+
.nav-tabs.nav-justified > li {
|
3543 |
+
display: table-cell;
|
3544 |
+
width: 1%;
|
3545 |
+
}
|
3546 |
+
.nav-tabs.nav-justified > li > a {
|
3547 |
+
margin-bottom: 0;
|
3548 |
+
}
|
3549 |
+
}
|
3550 |
+
.nav-tabs.nav-justified > li > a {
|
3551 |
+
margin-right: 0;
|
3552 |
+
border-radius: 4px;
|
3553 |
+
}
|
3554 |
+
.nav-tabs.nav-justified > .active > a,
|
3555 |
+
.nav-tabs.nav-justified > .active > a:hover,
|
3556 |
+
.nav-tabs.nav-justified > .active > a:focus {
|
3557 |
+
border: 1px solid #ddd;
|
3558 |
+
}
|
3559 |
+
@media (min-width: 768px) {
|
3560 |
+
.nav-tabs.nav-justified > li > a {
|
3561 |
+
border-bottom: 1px solid #ddd;
|
3562 |
+
border-radius: 4px 4px 0 0;
|
3563 |
+
}
|
3564 |
+
.nav-tabs.nav-justified > .active > a,
|
3565 |
+
.nav-tabs.nav-justified > .active > a:hover,
|
3566 |
+
.nav-tabs.nav-justified > .active > a:focus {
|
3567 |
+
border-bottom-color: #fff;
|
3568 |
+
}
|
3569 |
+
}
|
3570 |
+
.nav-pills > li {
|
3571 |
+
float: left;
|
3572 |
+
}
|
3573 |
+
.nav-pills > li > a {
|
3574 |
+
border-radius: 4px;
|
3575 |
+
}
|
3576 |
+
.nav-pills > li + li {
|
3577 |
+
margin-left: 2px;
|
3578 |
+
}
|
3579 |
+
.nav-pills > li.active > a,
|
3580 |
+
.nav-pills > li.active > a:hover,
|
3581 |
+
.nav-pills > li.active > a:focus {
|
3582 |
+
color: #fff;
|
3583 |
+
background-color: #428bca;
|
3584 |
+
}
|
3585 |
+
.nav-stacked > li {
|
3586 |
+
float: none;
|
3587 |
+
}
|
3588 |
+
.nav-stacked > li + li {
|
3589 |
+
margin-top: 2px;
|
3590 |
+
margin-left: 0;
|
3591 |
+
}
|
3592 |
+
.nav-justified {
|
3593 |
+
width: 100%;
|
3594 |
+
}
|
3595 |
+
.nav-justified > li {
|
3596 |
+
float: none;
|
3597 |
+
}
|
3598 |
+
.nav-justified > li > a {
|
3599 |
+
margin-bottom: 5px;
|
3600 |
+
text-align: center;
|
3601 |
+
}
|
3602 |
+
.nav-justified > .dropdown .dropdown-menu {
|
3603 |
+
top: auto;
|
3604 |
+
left: auto;
|
3605 |
+
}
|
3606 |
+
@media (min-width: 768px) {
|
3607 |
+
.nav-justified > li {
|
3608 |
+
display: table-cell;
|
3609 |
+
width: 1%;
|
3610 |
+
}
|
3611 |
+
.nav-justified > li > a {
|
3612 |
+
margin-bottom: 0;
|
3613 |
+
}
|
3614 |
+
}
|
3615 |
+
.nav-tabs-justified {
|
3616 |
+
border-bottom: 0;
|
3617 |
+
}
|
3618 |
+
.nav-tabs-justified > li > a {
|
3619 |
+
margin-right: 0;
|
3620 |
+
border-radius: 4px;
|
3621 |
+
}
|
3622 |
+
.nav-tabs-justified > .active > a,
|
3623 |
+
.nav-tabs-justified > .active > a:hover,
|
3624 |
+
.nav-tabs-justified > .active > a:focus {
|
3625 |
+
border: 1px solid #ddd;
|
3626 |
+
}
|
3627 |
+
@media (min-width: 768px) {
|
3628 |
+
.nav-tabs-justified > li > a {
|
3629 |
+
border-bottom: 1px solid #ddd;
|
3630 |
+
border-radius: 4px 4px 0 0;
|
3631 |
+
}
|
3632 |
+
.nav-tabs-justified > .active > a,
|
3633 |
+
.nav-tabs-justified > .active > a:hover,
|
3634 |
+
.nav-tabs-justified > .active > a:focus {
|
3635 |
+
border-bottom-color: #fff;
|
3636 |
+
}
|
3637 |
+
}
|
3638 |
+
.tab-content > .tab-pane {
|
3639 |
+
display: none;
|
3640 |
+
}
|
3641 |
+
.tab-content > .active {
|
3642 |
+
display: block;
|
3643 |
+
}
|
3644 |
+
.nav-tabs .dropdown-menu {
|
3645 |
+
margin-top: -1px;
|
3646 |
+
border-top-left-radius: 0;
|
3647 |
+
border-top-right-radius: 0;
|
3648 |
+
}
|
3649 |
+
.navbar {
|
3650 |
+
position: relative;
|
3651 |
+
min-height: 50px;
|
3652 |
+
margin-bottom: 20px;
|
3653 |
+
border: 1px solid transparent;
|
3654 |
+
}
|
3655 |
+
@media (min-width: 768px) {
|
3656 |
+
.navbar {
|
3657 |
+
border-radius: 4px;
|
3658 |
+
}
|
3659 |
+
}
|
3660 |
+
@media (min-width: 768px) {
|
3661 |
+
.navbar-header {
|
3662 |
+
float: left;
|
3663 |
+
}
|
3664 |
+
}
|
3665 |
+
.navbar-collapse {
|
3666 |
+
max-height: 340px;
|
3667 |
+
padding-right: 15px;
|
3668 |
+
padding-left: 15px;
|
3669 |
+
overflow-x: visible;
|
3670 |
+
-webkit-overflow-scrolling: touch;
|
3671 |
+
border-top: 1px solid transparent;
|
3672 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
|
3673 |
+
}
|
3674 |
+
.navbar-collapse.in {
|
3675 |
+
overflow-y: auto;
|
3676 |
+
}
|
3677 |
+
@media (min-width: 768px) {
|
3678 |
+
.navbar-collapse {
|
3679 |
+
width: auto;
|
3680 |
+
border-top: 0;
|
3681 |
+
box-shadow: none;
|
3682 |
+
}
|
3683 |
+
.navbar-collapse.collapse {
|
3684 |
+
display: block !important;
|
3685 |
+
height: auto !important;
|
3686 |
+
padding-bottom: 0;
|
3687 |
+
overflow: visible !important;
|
3688 |
+
}
|
3689 |
+
.navbar-collapse.in {
|
3690 |
+
overflow-y: visible;
|
3691 |
+
}
|
3692 |
+
.navbar-fixed-top .navbar-collapse,
|
3693 |
+
.navbar-static-top .navbar-collapse,
|
3694 |
+
.navbar-fixed-bottom .navbar-collapse {
|
3695 |
+
padding-right: 0;
|
3696 |
+
padding-left: 0;
|
3697 |
+
}
|
3698 |
+
}
|
3699 |
+
.container > .navbar-header,
|
3700 |
+
.container-fluid > .navbar-header,
|
3701 |
+
.container > .navbar-collapse,
|
3702 |
+
.c
|