ultimix

- Main Page
- Data Structures
- Files
- Examples

- File List
- Globals

jquery.php
Go to the documentation of this file.
1 <?php
2
3 /*
4 * This source code is a part of the Ultimix Project.
5 * It is distributed under BSD license. All other third side source code (like tinyMCE) is distributed under
6 * it's own license wich could be found from the corresponding files or sources.
7 * This source code is provided "as is" without any warranties or garanties.
8 *
9 * Have a nice day!
10 *
11 * @url http://ultimix.sorceforge.net
12 *
13 * @author Alexey "gdever" Dodonov
14 */
15
26 class jquery_1_7_1{
27
38 var $JQueryMarkup = false;
39 var $PageCSS = false;
40 var $PageJS = false;
41
56 function __construct()
57 {
58 try
59 {
60 $this->JQueryMarkup = get_package( 'jquery::jquery_markup' , 'last' , __FILE__ );
61 $this->PageCSS = get_package( 'page::page_css' , 'last' , __FILE__ );
62 $this->PageJS = get_package( 'page::page_js' , 'last' , __FILE__ );
63 }
64 catch( Exception $e )
65 {
66 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
67 }
68 }
69
88 private function load_jquery_core( $Path )
89 {
90 try
91 {
92 $this->PageJS->add_javascript( "$Path/include/js/jquery-1.7.1.min.js" );
93 $this->PageJS->add_javascript( "$Path/include/js/jquery-ui-1.8.17.custom.min.js" );
94 $this->PageJS->add_javascript( "$Path/include/js/lang/ui.datepicker-ru.js" );
95 $this->PageJS->add_javascript( "$Path/include/js/jquery.cookie.js" );
96 $this->PageJS->add_javascript( "$Path/include/js/jquery.accordion.autorun.js" );
97 }
98 catch( Exception $e )
99 {
100 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
101 }
102 }
103
122 private function load_framework_scripts( $Path )
123 {
124 try
125 {
126 $this->PageJS->add_javascript( "$Path/include/js/jquery.simple.select.extractor.js" );
127 $this->PageJS->add_javascript( "$Path/include/js/jquery.wrappers.js" );
128 $this->PageJS->add_javascript( "$Path/include/js/request_manager.js" );
129 $this->PageJS->add_javascript( "$Path/include/js/tabs_ex.js" );
130 $this->PageJS->add_javascript( "$Path/include/js/print.js" );
131 }
132 catch( Exception $e )
133 {
134 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
135 }
136 }
137
156 private function load_widgets_scripts( $Path )
157 {
158 try
159 {
160 $this->PageJS->add_javascript( "$Path/include/js/jquery.dropdown.block.js" );
161 $this->PageJS->add_javascript( "$Path/include/js/jquery.timer.widget.js" );
162 $this->PageJS->add_javascript( "$Path/include/js/jquery.disable.text.select.js" );
163 $this->PageJS->add_javascript( "$Path/include/js/wizard.js" );
164 }
165 catch( Exception $e )
166 {
167 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
168 }
169 }
170
189 private function load_styles_and_languages( $Path )
190 {
191 try
192 {
193 $this->PageCSS->add_stylesheet(
194 "$Path/res/css/jquery-ui-1.8.default.css"
195 );
196 $this->PageCSS->add_stylesheet( "$Path/res/css/jquery-ui-1.8.patch.css" );
197
198 $Lang = get_package( 'lang' , 'last' , __FILE__ );
199 $Lang->include_strings_js( 'settings::settings_view' );
200 }
201 catch( Exception $e )
202 {
203 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
204 }
205 }
206
225 function pre_generation( &$Options )
226 {
227 try
228 {
229 $Path = '{http_host}/'._get_package_relative_path_ex( 'jquery' , 'last' );
230
231 $this->load_jquery_core( $Path );
232
233 $this->load_framework_scripts( $Path );
234
235 $this->load_widgets_scripts( $Path );
236
237 $this->load_styles_and_languages( $Path );
238 }
239 catch( Exception $e )
240 {
241 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
242 }
243 }
244 }
245
246 ?>