From e82ea0a3d9622b30f5753dd0800ee77caa919e9c Mon Sep 17 00:00:00 2001 From: urs_hunkler Date: Wed, 9 May 2007 14:26:59 +0000 Subject: [PATCH] custom_corners theme added --- theme/custom_corners/README.html | 7 + theme/custom_corners/config.php | 190 + theme/custom_corners/favicon.ico | Bin 0 -> 894 bytes theme/custom_corners/footer.html | 22 + theme/custom_corners/header.html | 97 + theme/custom_corners/js/jquery-latest.pack.js | 1 + theme/custom_corners/js/jquery.php | 18 + theme/custom_corners/meta.php | 6 + theme/custom_corners/pix/b.gif | Bin 0 -> 75 bytes theme/custom_corners/pix/beige_borders.png | Bin 0 -> 194 bytes theme/custom_corners/pix/beige_box.png | Bin 0 -> 6056 bytes theme/custom_corners/pix/bg.jpg | Bin 0 -> 1107 bytes theme/custom_corners/pix/borders.png | Bin 0 -> 194 bytes theme/custom_corners/pix/bottom_shadow.png | Bin 0 -> 263 bytes .../pix/bottom_shadow_to_top.png | Bin 0 -> 199 bytes theme/custom_corners/pix/box.png | Bin 0 -> 6031 bytes theme/custom_corners/pix/css.gif | Bin 0 -> 750 bytes theme/custom_corners/pix/header.png | Bin 0 -> 354 bytes theme/custom_corners/pix/help.gif | Bin 0 -> 441 bytes theme/custom_corners/pix/movehere.gif | Bin 0 -> 230 bytes theme/custom_corners/pix/section_508.gif | Bin 0 -> 731 bytes theme/custom_corners/pix/spacer.gif | Bin 0 -> 43 bytes theme/custom_corners/pix/switch_minus.gif | Bin 0 -> 119 bytes theme/custom_corners/pix/switch_plus.gif | Bin 0 -> 124 bytes theme/custom_corners/pix/tab/left.gif | Bin 0 -> 293 bytes theme/custom_corners/pix/tab/left_active.gif | Bin 0 -> 202 bytes .../pix/tab/left_active_hover.gif | Bin 0 -> 206 bytes theme/custom_corners/pix/tab/left_hover.gif | Bin 0 -> 292 bytes theme/custom_corners/pix/tab/right.gif | Bin 0 -> 3297 bytes theme/custom_corners/pix/tab/right_active.gif | Bin 0 -> 905 bytes .../pix/tab/right_active_hover.gif | Bin 0 -> 803 bytes theme/custom_corners/pix/tab/right_end.gif | Bin 0 -> 69 bytes theme/custom_corners/pix/tab/right_hover.gif | Bin 0 -> 2730 bytes theme/custom_corners/pix/tab/right_last.gif | Bin 0 -> 2382 bytes theme/custom_corners/pix/tab/tabrow1.gif | Bin 0 -> 269 bytes theme/custom_corners/pix/xhtml_1_0.gif | Bin 0 -> 780 bytes theme/custom_corners/styles.php | 19 + theme/custom_corners/styles_ie6.css | 16 + theme/custom_corners/styles_ie7.css | 16 + theme/custom_corners/temp_user_styles.css | 0 .../custom_corners/ui/ChameleonCSS.class.php | 139 + .../ui/ChameleonFileBrowser.class.php | 85 + theme/custom_corners/ui/chameleon.php | 32 + theme/custom_corners/ui/chameleon_js.php | 3134 +++++++++++++++++ theme/custom_corners/ui/chameleon_ui.css | 400 +++ theme/custom_corners/ui/css.php | 64 + theme/custom_corners/ui/css_query.js | 356 ++ theme/custom_corners/ui/images/active_tab.gif | Bin 0 -> 207 bytes theme/custom_corners/ui/images/error.gif | Bin 0 -> 1129 bytes theme/custom_corners/ui/images/folder.gif | Bin 0 -> 394 bytes theme/custom_corners/ui/images/grad.gif | Bin 0 -> 1174 bytes theme/custom_corners/ui/images/hotspot.gif | Bin 0 -> 1170 bytes theme/custom_corners/ui/images/image.gif | Bin 0 -> 397 bytes .../custom_corners/ui/images/inactive_tab.gif | Bin 0 -> 201 bytes theme/custom_corners/ui/images/none.gif | Bin 0 -> 463 bytes theme/custom_corners/ui/images/notice.gif | Bin 0 -> 1136 bytes theme/custom_corners/ui/images/ok.gif | Bin 0 -> 1134 bytes theme/custom_corners/ui/images/parent.gif | Bin 0 -> 402 bytes theme/custom_corners/ui/images/tag.gif | Bin 0 -> 286 bytes theme/custom_corners/ui/images/working.gif | Bin 0 -> 1142 bytes theme/custom_corners/ui/sarissa.js | 648 ++++ theme/custom_corners/user_styles.css | 941 +++++ 62 files changed, 6191 insertions(+) create mode 100644 theme/custom_corners/README.html create mode 100644 theme/custom_corners/config.php create mode 100644 theme/custom_corners/favicon.ico create mode 100644 theme/custom_corners/footer.html create mode 100644 theme/custom_corners/header.html create mode 100644 theme/custom_corners/js/jquery-latest.pack.js create mode 100644 theme/custom_corners/js/jquery.php create mode 100644 theme/custom_corners/meta.php create mode 100644 theme/custom_corners/pix/b.gif create mode 100644 theme/custom_corners/pix/beige_borders.png create mode 100644 theme/custom_corners/pix/beige_box.png create mode 100644 theme/custom_corners/pix/bg.jpg create mode 100644 theme/custom_corners/pix/borders.png create mode 100644 theme/custom_corners/pix/bottom_shadow.png create mode 100644 theme/custom_corners/pix/bottom_shadow_to_top.png create mode 100644 theme/custom_corners/pix/box.png create mode 100644 theme/custom_corners/pix/css.gif create mode 100644 theme/custom_corners/pix/header.png create mode 100644 theme/custom_corners/pix/help.gif create mode 100644 theme/custom_corners/pix/movehere.gif create mode 100644 theme/custom_corners/pix/section_508.gif create mode 100644 theme/custom_corners/pix/spacer.gif create mode 100644 theme/custom_corners/pix/switch_minus.gif create mode 100644 theme/custom_corners/pix/switch_plus.gif create mode 100644 theme/custom_corners/pix/tab/left.gif create mode 100644 theme/custom_corners/pix/tab/left_active.gif create mode 100644 theme/custom_corners/pix/tab/left_active_hover.gif create mode 100644 theme/custom_corners/pix/tab/left_hover.gif create mode 100644 theme/custom_corners/pix/tab/right.gif create mode 100644 theme/custom_corners/pix/tab/right_active.gif create mode 100644 theme/custom_corners/pix/tab/right_active_hover.gif create mode 100644 theme/custom_corners/pix/tab/right_end.gif create mode 100644 theme/custom_corners/pix/tab/right_hover.gif create mode 100755 theme/custom_corners/pix/tab/right_last.gif create mode 100644 theme/custom_corners/pix/tab/tabrow1.gif create mode 100644 theme/custom_corners/pix/xhtml_1_0.gif create mode 100644 theme/custom_corners/styles.php create mode 100644 theme/custom_corners/styles_ie6.css create mode 100644 theme/custom_corners/styles_ie7.css create mode 100644 theme/custom_corners/temp_user_styles.css create mode 100644 theme/custom_corners/ui/ChameleonCSS.class.php create mode 100644 theme/custom_corners/ui/ChameleonFileBrowser.class.php create mode 100644 theme/custom_corners/ui/chameleon.php create mode 100644 theme/custom_corners/ui/chameleon_js.php create mode 100644 theme/custom_corners/ui/chameleon_ui.css create mode 100644 theme/custom_corners/ui/css.php create mode 100644 theme/custom_corners/ui/css_query.js create mode 100644 theme/custom_corners/ui/images/active_tab.gif create mode 100644 theme/custom_corners/ui/images/error.gif create mode 100644 theme/custom_corners/ui/images/folder.gif create mode 100644 theme/custom_corners/ui/images/grad.gif create mode 100644 theme/custom_corners/ui/images/hotspot.gif create mode 100644 theme/custom_corners/ui/images/image.gif create mode 100644 theme/custom_corners/ui/images/inactive_tab.gif create mode 100644 theme/custom_corners/ui/images/none.gif create mode 100644 theme/custom_corners/ui/images/notice.gif create mode 100644 theme/custom_corners/ui/images/ok.gif create mode 100644 theme/custom_corners/ui/images/parent.gif create mode 100644 theme/custom_corners/ui/images/tag.gif create mode 100644 theme/custom_corners/ui/images/working.gif create mode 100644 theme/custom_corners/ui/sarissa.js create mode 100644 theme/custom_corners/user_styles.css diff --git a/theme/custom_corners/README.html b/theme/custom_corners/README.html new file mode 100644 index 0000000000..36a53016c9 --- /dev/null +++ b/theme/custom_corners/README.html @@ -0,0 +1,7 @@ +

"Custom corners", the Moodle theme with graphics for transparent custom corners and borders.

+ +

Custom corners use the technique from Roger Johansson. He describes how to build the graphices on his page "customising_custom_corners_and_borders"

+ +

The Moodle implementation does not use JavaScript as describd in Roger Johansson's documentation. Moodle adds all neccessary divs to the pages when the option "$THEME->customcorners = true;" is set in config.php.

+ +

A Moodle Theme from Urs Hunkler, unodo.

\ No newline at end of file diff --git a/theme/custom_corners/config.php b/theme/custom_corners/config.php new file mode 100644 index 0000000000..523702e499 --- /dev/null +++ b/theme/custom_corners/config.php @@ -0,0 +1,190 @@ +sheets = array('user_styles'); +// $THEME->sheets = array('user_styles', 'adminpage_correct'); + +/// This variable is an array containing the names of all the +/// stylesheet files you want included in this theme, and in what order +//////////////////////////////////////////////////////////////////////////////// + + +$THEME->standardsheets = array('styles_layout'); + +/// This variable can be set to an array containing +/// filenames from the *STANDARD* theme. If the +/// array exists, it will be used to choose the +/// files to include in the standard style sheet. +/// When false, then no files are used. +/// When true or NON-EXISTENT, then ALL standard files are used. +/// This parameter can be used, for example, to prevent +/// having to override too many classes. +/// Note that the trailing .css should not be included +/// eg $THEME->standardsheets = array('styles_layout','styles_fonts','styles_color'); +//////////////////////////////////////////////////////////////////////////////// + + +$THEME->parent = ''; + +/// This variable can be set to the name of a parent theme +/// which you want to have included before the current theme. +/// This can make it easy to make modifications to another +/// theme without having to actually change the files +/// If this variable is empty or false then a parent theme +/// is not used. +//////////////////////////////////////////////////////////////////////////////// + + +$THEME->parentsheets = false; + +/// This variable can be set to an array containing +/// filenames from a chosen *PARENT* theme. If the +/// array exists, it will be used to choose the +/// files to include in the standard style sheet. +/// When false, then no files are used. +/// When true or NON-EXISTENT, then ALL standard files are used. +/// This parameter can be used, for example, to prevent +/// having to override too many classes. +/// Note that the trailing .css should not be included +/// eg $THEME->parentsheets = array('styles_layout','styles_fonts','styles_color'); +//////////////////////////////////////////////////////////////////////////////// + + +$THEME->modsheets = true; + +/// When this is enabled, then this theme will search for +/// files named "styles.php" inside all Activity modules and +/// include them. This allows modules to provide some basic +/// layouts so they work out of the box. +/// It is HIGHLY recommended to leave this enabled. + + +$THEME->blocksheets = true; + +/// When this is enabled, then this theme will search for +/// files named "styles.php" inside all Block modules and +/// include them. This allows Blocks to provide some basic +/// layouts so they work out of the box. +/// It is HIGHLY recommended to leave this enabled. + + +$THEME->langsheets = false; + +/// By setting this to true, then this theme will search for +/// a file named "styles.php" inside the current language +/// directory. This allows different languages to provide +/// different styles. + + +$THEME->block_l_min_width = 180; +$THEME->block_l_max_width = 210; +$THEME->block_r_min_width = 180; +$THEME->block_r_max_width = 210;; + +/// These values define the min and max width of the left and right +/// sieblocks in the course pages. If not set or false the standard +/// values are taken. + + +$THEME->courseformatsheets = true; + +/// When this is enabled, this theme will search for files +/// named "styles.php" inside all course formats and +/// include them. This allows course formats to provide +/// their own default styles. + + +$THEME->metainclude = true; + +/// When this is enabled (or not set!) then Moodle will try +/// to include a file meta.php from this theme into the +/// part of the page. + + +$THEME->standardmetainclude = true; + + +/// When this is enabled (or not set!) then Moodle will try +/// to include a file meta.php from the standard theme into the +/// part of the page. + + +$THEME->parentmetainclude = false; + +/// When this is enabled (or not set!) then Moodle will try +/// to include a file meta.php from the parent theme into the +/// part of the page. + + +$THEME->navmenuwidth = 50; + +/// You can use this to control the cutoff point for strings +/// in the navmenus (list of activities in popup menu etc) +/// Default is 50 characters wide. + + +$THEME->makenavmenulist = false; + +/// By setting this to true, then you will have access to a +/// new variable in your header.html and footer.html called +/// $navmenulist ... this contains a simple XHTML menu of +/// all activities in the current course, mostly useful for +/// creating popup navigation menus and so on. + +// $THEME->layouttable = array('middle', 'left', 'right'); + + +$THEME->customcorners = true; + +/// By setting this to true, Moodel will generate extra divs in +/// all pages to enable graphical rich custom corners and borders. +/// Please have a look at the README with more details. + + +$THEME->chameleonenabled = true; +// $THEME->chameleonenabled = false; + +/// By setting this to false it disables editing of the stylsheets +/// this saves the overhead of loading chameleon on each page +/// viewed by a user who can edit pages. it is recommended to +/// set this to false once you're satisfied with your theme. + +$THEME->chameleonteachereditenabled = false; + +/// If you use chameleon as a course theme setting this to true +/// will allow teachers on that course to edit the theme. + + + +$THEME->resource_mp3player_colors = + 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'. + 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'. + 'font=Arial&fontColour=3333FF&buffer=10&waitForPlay=no&autoPlay=yes'; + +/// With this you can control the colours of the "big" MP3 player +/// that is used for MP3 resources. + + +$THEME->filter_mediaplugin_colors = + 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'. + 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'. + 'waitForPlay=yes'; + +/// ...And this controls the small embedded player + + +$THEME->custompix = false; + +/// If true, then this theme must have a "pix" +/// subdirectory that contains copies of all +/// files from the moodle/pix directory, plus a +/// "pix/mod" directory containing all the icons +/// for all the activity modules. +//////////////////////////////////////////////////////////////////////////////// + +?> diff --git a/theme/custom_corners/favicon.ico b/theme/custom_corners/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..5a7a36a68e69533576ab37a35abce1d3fbb38800 GIT binary patch literal 894 zcmZQzU<5(|0R|u`!H~hsz#zuJz@P!dKp_SNAO?vKIbb{CFhl-MrSiEDm+MbD!c@3Z zC}SFg>oxZxXX##+)QNC^1s(V=xcI+f^+t$@>%RZetN(IUu7+^qPW)5e@SmX+Dhm`u zQxD_<)x)&|xj^+0?(#LOK`&M1(*F7t6u?R1A*VZ|B`Ee3zS2-iATRGZTiKWzY-_~Q6F~vzu5f$I`!MZ${D;5 z{gPb$m!}x&;MgO7B{uzMDBK2DA8_cq)T%$?r3)bH_2)fPT>GD`co~H2wfvssnm=5* zAng$I0~;s%7flX}&vbWpw=HdBT>M*p#ecPV&(!)hEB5Z;Sn!T_-YcWJ^$_)2Rxfw- zaq;u@3=448S5sCo^%ARDV?XD%^N#_{Tc)wNC$Th+T%}M#iT4K+@a8D<~+) z-oZvrPOfWeFHrWti~p@R|JUz-zwX#0h++tNXz#A1 + + + + + + + diff --git a/theme/custom_corners/header.html b/theme/custom_corners/header.html new file mode 100644 index 0000000000..55d54788b3 --- /dev/null +++ b/theme/custom_corners/header.html @@ -0,0 +1,97 @@ + +> + + + + <?php echo $title ?> + + + + javascript"); ?> + + + dirroot.'/lib/custom_corners_lib.php'); ?> + + type == 'admin') && (strstr($bodytags, ' nocoursepage'))) { + $bodytags = str_replace(' nocoursepage', '', $bodytags); + } + + // list of pages using the layout-table to be able to view sideblocks + $excludelist = array('mod-chat-view', 'mod-data-view', 'mod-quiz-view'); + if ((in_array($PAGE->type, $excludelist)) && + (strstr($bodytags, ' nocoursepage'))) { + $bodytags = str_replace(' nocoursepage', '', $bodytags); + } + + // add 'nocoursepage' to the list of CLASSes on the admin-roles pages + preg_match('/id="([^"]*)"/i', $bodytags, $ids); + if (($ids[1] == 'admin-roles-assign') || ($ids[1] == 'admin-roles-override')) { + // exclude roles called from the admin area (courseid 1) + // include user roles for the Moodle user settings called + // from the start page + if (($COURSE->id > 1) || ($_GET['contextid'] == 30)) { + preg_match('/class="([^"]*)"/i', $bodytags, $classes); + $classlist = explode (' ', $classes[1]); + if (!in_array('nocoursepage', $classlist)) { + array_push($classlist, 'nocoursepage'); + $bodytags = str_replace($classes[0], + 'class="'.implode(' ', $classlist).'"', $bodytags); + } + } + } + ?> + + '.'pagetype: '.$PAGE->type. + "\n".$bodytags. + ''; + ?> + + +> + + +
+ +
+ + +
+ +

+
+ +
+ + + + +
+ diff --git a/theme/custom_corners/js/jquery-latest.pack.js b/theme/custom_corners/js/jquery-latest.pack.js new file mode 100644 index 0000000000..f954b6b3ce --- /dev/null +++ b/theme/custom_corners/js/jquery-latest.pack.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('7(1C 1w.6=="T"){1w.T=1w.T;B 6=u(a,c){7(1w==q)v 1p 6(a,c);a=a||17;7(6.1t(a))v 1p 6(17)[6.E.27?"27":"2O"](a);7(1C a=="23"){B m=/^[^<]*(<(.|\\s)+>)[^>]*$/.2Q(a);7(m)a=6.3k([m[1]]);J v 1p 6(c).2o(a)}v q.6r(a.1l==2y&&a||(a.3Y||a.I&&a!=1w&&!a.24&&a[0]!=T&&a[0].24)&&6.3M(a)||[a])};7(1C $!="T")6.2S$=$;B $=6;6.E=6.8p={3Y:"1.1.2",8q:u(){v q.I},I:0,2b:u(1T){v 1T==T?6.3M(q):q[1T]},2r:u(a){B L=6(a);L.6p=q;v L},6r:u(a){q.I=0;[].1g.14(q,a);v q},K:u(E,1E){v 6.K(q,E,1E)},2h:u(1c){B 4c=-1;q.K(u(i){7(q==1c)4c=i});v 4c},1I:u(1Y,O,C){B 1c=1Y;7(1Y.1l==3t)7(O==T)v q.I&&6[C||"1I"](q[0],1Y)||T;J{1c={};1c[1Y]=O}v q.K(u(2h){P(B H 1x 1c)6.1I(C?q.1q:q,H,6.H(q,1c[H],C,2h,H))})},1m:u(1Y,O){v q.1I(1Y,O,"30")},2L:u(e){7(1C e=="23")v q.3u().3r(17.8t(e));B t="";6.K(e||q,u(){6.K(q.2I,u(){7(q.24!=8)t+=q.24!=1?q.60:6.E.2L([q])})});v t},2K:u(){B a=6.3k(1A);v q.K(u(){B b=a[0].3l(U);q.11.2X(b,q);22(b.1b)b=b.1b;b.4C(q)})},3r:u(){v q.3j(1A,U,1,u(a){q.4C(a)})},5i:u(){v q.3j(1A,U,-1,u(a){q.2X(a,q.1b)})},5j:u(){v q.3j(1A,12,1,u(a){q.11.2X(a,q)})},5t:u(){v q.3j(1A,12,-1,u(a){q.11.2X(a,q.2e)})},4g:u(){v q.6p||6([])},2o:u(t){v q.2r(6.31(q,u(a){v 6.2o(t,a)}),t)},4Y:u(4N){v q.2r(6.31(q,u(a){B a=a.3l(4N!=T?4N:U);a.$1H=16;v a}))},1D:u(t){v q.2r(6.1t(t)&&6.2q(q,u(2z,2h){v t.14(2z,[2h])})||6.3z(t,q))},2g:u(t){v q.2r(t.1l==3t&&6.3z(t,q,U)||6.2q(q,u(a){v(t.1l==2y||t.3Y)?6.3y(a,t)<0:a!=t}))},1M:u(t){v q.2r(6.2k(q.2b(),t.1l==3t?6(t).2b():t.I!=T&&(!t.1f||t.1f=="8v")?t:[t]))},4l:u(1s){v 1s?6.1D(1s,q).r.I>0:12},1a:u(1a){v 1a==T?(q.I?q[0].O:16):q.1I("O",1a)},4U:u(1a){v 1a==T?(q.I?q[0].2t:16):q.3u().3r(1a)},3j:u(1E,1P,3Z,E){B 4Y=q.I>1;B a=6.3k(1E);7(3Z<0)a.8w();v q.K(u(){B 1c=q;7(1P&&6.1f(q,"1P")&&6.1f(a[0],"3m"))1c=q.5J("20")[0]||q.4C(17.6n("20"));6.K(a,u(){E.14(1c,[4Y?q.3l(U):q])})})}};6.1z=6.E.1z=u(){B 1O=1A[0],a=1;7(1A.I==1){1O=q;a=0}B H;22(H=1A[a++])P(B i 1x H)1O[i]=H[i];v 1O};6.1z({8x:u(){7(6.2S$)$=6.2S$;v 6},1t:u(E){v!!E&&1C E!="23"&&!E.1f&&1C E[0]=="T"&&/u/i.1n(E+"")},4B:u(D){v D.66&&D.5I&&!D.5I.64},1f:u(D,Y){v D.1f&&D.1f.3K()==Y.3K()},K:u(1c,E,1E){7(1c.I==T)P(B i 1x 1c)E.14(1c[i],1E||[i,1c[i]]);J P(B i=0,6q=1c.I;i<6q;i++)7(E.14(1c[i],1E||[i,1c[i]])===12)3O;v 1c},H:u(D,O,C,2h,H){7(6.1t(O))O=O.3n(D,[2h]);B 6s=/z-?2h|7P-?8A|1d|58|8B-?28/i;v O&&O.1l==3Q&&C=="30"&&!6s.1n(H)?O+"4S":O},19:{1M:u(D,c){6.K(c.3o(/\\s+/),u(i,Q){7(!6.19.2V(D.19,Q))D.19+=(D.19?" ":"")+Q})},2f:u(D,c){D.19=c?6.2q(D.19.3o(/\\s+/),u(Q){v!6.19.2V(c,Q)}).6t(" "):""},2V:u(t,c){t=t.19||t;c=c.1R(/([\\.\\\\\\+\\*\\?\\[\\^\\]\\$\\(\\)\\{\\}\\=\\!\\<\\>\\|\\:])/g,"\\\\$1");v t&&1p 4v("(^|\\\\s)"+c+"(\\\\s|$)").1n(t)}},4d:u(e,o,f){P(B i 1x o){e.1q["1N"+i]=e.1q[i];e.1q[i]=o[i]}f.14(e,[]);P(B i 1x o)e.1q[i]=e.1q["1N"+i]},1m:u(e,p){7(p=="28"||p=="3V"){B 1N={},46,3P,d=["7d","8C","8D","8E"];6.K(d,u(){1N["8F"+q]=0;1N["8G"+q+"8H"]=0});6.4d(e,1N,u(){7(6.1m(e,"1h")!="1Z"){46=e.8I;3P=e.8J}J{e=6(e.3l(U)).2o(":4j").5l("2Z").4g().1m({4n:"1G",45:"8K",1h:"2D",7I:"0",8M:"0"}).5z(e.11)[0];B 3d=6.1m(e.11,"45");7(3d==""||3d=="4b")e.11.1q.45="6x";46=e.6y;3P=e.6z;7(3d==""||3d=="4b")e.11.1q.45="4b";e.11.33(e)}});v p=="28"?46:3P}v 6.30(e,p)},30:u(D,H,53){B L;7(H=="1d"&&6.W.1j)v 6.1I(D.1q,"1d");7(H=="4h"||H=="2v")H=6.W.1j?"3T":"2v";7(!53&&D.1q[H])L=D.1q[H];J 7(17.44&&17.44.4W){7(H=="2v"||H=="3T")H="4h";H=H.1R(/([A-Z])/g,"-$1").4m();B Q=17.44.4W(D,16);7(Q)L=Q.55(H);J 7(H=="1h")L="1Z";J 6.4d(D,{1h:"2D"},u(){B c=17.44.4W(q,"");L=c&&c.55(H)||""})}J 7(D.51){B 56=H.1R(/\\-(\\w)/g,u(m,c){v c.3K()});L=D.51[H]||D.51[56]}v L},3k:u(a){B r=[];6.K(a,u(i,1r){7(!1r)v;7(1r.1l==3Q)1r=1r.6C();7(1C 1r=="23"){B s=6.35(1r),1V=17.6n("1V"),2i=[];B 2K=!s.18("<1u")&&[1,"<42>",""]||(!s.18("<6D")||!s.18("<20")||!s.18("<6E"))&&[1,"<1P>",""]||!s.18("<3m")&&[2,"<1P><20>",""]||(!s.18("<6F")||!s.18("<6G"))&&[3,"<1P><20><3m>",""]||[0,"",""];1V.2t=2K[1]+s+2K[2];22(2K[0]--)1V=1V.1b;7(6.W.1j){7(!s.18("<1P")&&s.18("<20")<0)2i=1V.1b&&1V.1b.2I;J 7(2K[1]=="<1P>"&&s.18("<20")<0)2i=1V.2I;P(B n=2i.I-1;n>=0;--n)7(6.1f(2i[n],"20")&&!2i[n].2I.I)2i[n].11.33(2i[n])}1r=[];P(B i=0,l=1V.2I.I;im[3]-0",2a:"m[3]-0==i",5q:"m[3]-0==i",2u:"i==0",2T:"i==r.I-1",5R:"i%2==0",5S:"i%2","2a-3s":"6.2a(a.11.1b,m[3],\'2e\',a)==a","2u-3s":"6.2a(a.11.1b,1,\'2e\')==a","2T-3s":"6.2a(a.11.7n,1,\'5s\')==a","7p-3s":"6.2B(a.11.1b).I==1",5u:"a.1b",3u:"!a.1b",5v:"6.E.2L.14([a]).18(m[3])>=0",3i:\'a.C!="1G"&&6.1m(a,"1h")!="1Z"&&6.1m(a,"4n")!="1G"\',1G:\'a.C=="1G"||6.1m(a,"1h")=="1Z"||6.1m(a,"4n")=="1G"\',7v:"!a.2W",2W:"a.2W",2Z:"a.2Z",2Y:"a.2Y||6.1I(a,\'2Y\')",2L:"a.C==\'2L\'",4j:"a.C==\'4j\'",5x:"a.C==\'5x\'",4G:"a.C==\'4G\'",5y:"a.C==\'5y\'",4R:"a.C==\'4R\'",5A:"a.C==\'5A\'",5B:"a.C==\'5B\'",3x:\'a.C=="3x"||6.1f(a,"3x")\',5C:"/5C|42|7A|3x/i.1n(a.1f)"},".":"6.19.2V(a,m[2])","@":{"=":"z==m[4]","!=":"z!=m[4]","^=":"z&&!z.18(m[4])","$=":"z&&z.2U(z.I - m[4].I,m[4].I)==m[4]","*=":"z&&z.18(m[4])>=0","":"z",4u:u(m){v["",m[1],m[3],m[2],m[5]]},5P:"z=a[m[3]];7(!z||/5E|3e/.1n(m[3]))z=6.1I(a,m[3]);"},"[":"6.2o(m[2],a).I"},5M:[/^\\[ *(@)([a-2m-3C-]*) *([!*$^=]*) *(\'?"?)(.*?)\\4 *\\]/i,/^(\\[)\\s*(.*?(\\[.*?\\])?[^[]*?)\\s*\\]/,/^(:)([a-2m-3C-]*)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/i,/^([:.#]*)([a-2m-3C*-]*)/i],1Q:[/^(\\/?\\.\\.)/,"a.11",/^(>|\\/)/,"6.2B(a.1b)",/^(\\+)/,"6.2a(a,2,\'2e\')",/^(~)/,u(a){B s=6.2B(a.11.1b);v s.3N(6.3y(a,s)+1)}],3z:u(1s,1U,2g){B 1N,Q=[];22(1s&&1s!=1N){1N=1s;B f=6.1D(1s,1U,2g);1s=f.t.1R(/^\\s*,\\s*/,"");Q=2g?1U=f.r:6.2k(Q,f.r)}v Q},2o:u(t,1B){7(1C t!="23")v[t];7(1B&&!1B.24)1B=16;1B=1B||17;7(!t.18("//")){1B=1B.4H;t=t.2U(2,t.I)}J 7(!t.18("/")){1B=1B.4H;t=t.2U(1,t.I);7(t.18("/")>=1)t=t.2U(t.18("/"),t.I)}B L=[1B],2c=[],2T=16;22(t&&2T!=t){B r=[];2T=t;t=6.35(t).1R(/^\\/\\//i,"");B 3B=12;B 1J=/^[\\/>]\\s*([a-2m-9*-]+)/i;B m=1J.2Q(t);7(m){6.K(L,u(){P(B c=q.1b;c;c=c.2e)7(c.24==1&&(6.1f(c,m[1])||m[1]=="*"))r.1g(c)});L=r;t=t.1R(1J,"");7(t.18(" ")==0)5F;3B=U}J{P(B i=0;i<6.1Q.I;i+=2){B 1J=6.1Q[i];B m=1J.2Q(t);7(m){r=L=6.31(L,6.1t(6.1Q[i+1])?6.1Q[i+1]:u(a){v 40(6.1Q[i+1])});t=6.35(t.1R(1J,""));3B=U;3O}}}7(t&&!3B){7(!t.18(",")){7(L[0]==1B)L.4L();6.2k(2c,L);r=L=[1B];t=" "+t.2U(1,t.I)}J{B 34=/^([a-2m-3C-]+)(#)([a-2m-9\\\\*2S-]*)/i;B m=34.2Q(t);7(m){m=[0,m[2],m[3],m[1]]}J{34=/^([#.]?)([a-2m-9\\\\*2S-]*)/i;m=34.2Q(t)}7(m[1]=="#"&&L[L.I-1].4X){B 2l=L[L.I-1].4X(m[2]);7(6.W.1j&&2l&&2l.2J!=m[2])2l=6(\'[@2J="\'+m[2]+\'"]\',L[L.I-1])[0];L=r=2l&&(!m[3]||6.1f(2l,m[3]))?[2l]:[]}J{7(m[1]==".")B 4r=1p 4v("(^|\\\\s)"+m[2]+"(\\\\s|$)");6.K(L,u(){B 3E=m[1]!=""||m[0]==""?"*":m[2];7(6.1f(q,"7J")&&3E=="*")3E="3g";6.2k(r,m[1]!=""&&L.I!=1?6.4x(q,[],m[1],m[2],4r):q.5J(3E))});7(m[1]=="."&&L.I==1)r=6.2q(r,u(e){v 4r.1n(e.19)});7(m[1]=="#"&&L.I==1){B 5K=r;r=[];6.K(5K,u(){7(q.36("2J")==m[2]){r=[q];v 12}})}L=r}t=t.1R(34,"")}}7(t){B 1a=6.1D(t,r);L=r=1a.r;t=6.35(1a.t)}}7(L&&L[0]==1B)L.4L();6.2k(2c,L);v 2c},1D:u(t,r,2g){22(t&&/^[a-z[({<*:.#]/i.1n(t)){B p=6.5M,m;6.K(p,u(i,1J){m=1J.2Q(t);7(m){t=t.7M(m[0].I);7(6.1s[m[1]].4u)m=6.1s[m[1]].4u(m);v 12}});7(m[1]==":"&&m[2]=="2g")r=6.1D(m[3],r,U).r;J 7(m[1]=="."){B 1J=1p 4v("(^|\\\\s)"+m[2]+"(\\\\s|$)");r=6.2q(r,u(e){v 1J.1n(e.19||"")},2g)}J{B f=6.1s[m[1]];7(1C f!="23")f=6.1s[m[1]][m[2]];40("f = u(a,i){"+(6.1s[m[1]].5P||"")+"v "+f+"}");r=6.2q(r,f,2g)}}v{r:r,t:t}},4x:u(o,r,1Q,Y,1J){P(B s=o.1b;s;s=s.2e)7(s.24==1){B 1M=U;7(1Q==".")1M=s.19&&1J.1n(s.19);J 7(1Q=="#")1M=s.36("2J")==Y;7(1M)r.1g(s);7(1Q=="#"&&r.I)3O;7(s.1b)6.4x(s,r,1Q,Y,1J)}v r},4z:u(D){B 4A=[];B Q=D.11;22(Q&&Q!=17){4A.1g(Q);Q=Q.11}v 4A},2a:u(Q,1i,3Z,D){1i=1i||1;B 1T=0;P(;Q;Q=Q[3Z]){7(Q.24==1)1T++;7(1T==1i||1i=="5R"&&1T%2==0&&1T>1&&Q==D||1i=="5S"&&1T%2==1&&Q==D)v Q}},2B:u(n,D){B r=[];P(;n;n=n.2e){7(n.24==1&&(!D||n!=D))r.1g(n)}v r}});6.G={1M:u(S,C,1o,F){7(6.W.1j&&S.3L!=T)S=1w;7(F)1o.F=F;7(!1o.2A)1o.2A=q.2A++;7(!S.$1H)S.$1H={};B 38=S.$1H[C];7(!38){38=S.$1H[C]={};7(S["39"+C])38[0]=S["39"+C]}38[1o.2A]=1o;S["39"+C]=q.5Y;7(!q.1k[C])q.1k[C]=[];q.1k[C].1g(S)},2A:1,1k:{},2f:u(S,C,1o){7(S.$1H){B i,j,k;7(C&&C.C){1o=C.1o;C=C.C}7(C&&S.$1H[C])7(1o)5U S.$1H[C][1o.2A];J P(i 1x S.$1H[C])5U S.$1H[C][i];J P(j 1x S.$1H)q.2f(S,j);P(k 1x S.$1H[C])7(k){k=U;3O}7(!k)S["39"+C]=16}},1S:u(C,F,S){F=6.3M(F||[]);7(!S)6.K(q.1k[C]||[],u(){6.G.1S(C,F,q)});J{B 1o=S["39"+C],1a,E=6.1t(S[C]);7(1o){F.61(q.2j({C:C,1O:S}));7((1a=1o.14(S,F))!==12)q.4F=U}7(E&&1a!==12)S[C]();q.4F=12}},5Y:u(G){7(1C 6=="T"||6.G.4F)v;G=6.G.2j(G||1w.G||{});B 3R;B c=q.$1H[G.C];B 1E=[].3N.3n(1A,1);1E.61(G);P(B j 1x c){1E[0].1o=c[j];1E[0].F=c[j].F;7(c[j].14(q,1E)===12){G.2n();G.2H();3R=12}}7(6.W.1j)G.1O=G.2n=G.2H=G.1o=G.F=16;v 3R},2j:u(G){7(!G.1O&&G.63)G.1O=G.63;7(G.65==T&&G.67!=T){B e=17.4H,b=17.64;G.65=G.67+(e.68||b.68);G.7Y=G.7Z+(e.6c||b.6c)}7(6.W.2N&&G.1O.24==3){B 3a=G;G=6.1z({},3a);G.1O=3a.1O.11;G.2n=u(){v 3a.2n()};G.2H=u(){v 3a.2H()}}7(!G.2n)G.2n=u(){q.3R=12};7(!G.2H)G.2H=u(){q.82=U};v G}};6.E.1z({3U:u(C,F,E){v q.K(u(){6.G.1M(q,C,E||F,F)})},6u:u(C,F,E){v q.K(u(){6.G.1M(q,C,u(G){6(q).6f(G);v(E||F).14(q,1A)},F)})},6f:u(C,E){v q.K(u(){6.G.2f(q,C,E)})},1S:u(C,F){v q.K(u(){6.G.1S(C,F,q)})},3X:u(){B a=1A;v q.6j(u(e){q.4M=q.4M==0?1:0;e.2n();v a[q.4M].14(q,[e])||12})},83:u(f,g){u 4O(e){B p=(e.C=="41"?e.84:e.85)||e.86;22(p&&p!=q)2G{p=p.11}2w(e){p=q};7(p==q)v 12;v(e.C=="41"?f:g).14(q,[e])}v q.41(4O).6k(4O)},27:u(f){7(6.3W)f.14(17,[6]);J{6.3c.1g(u(){v f.14(q,[6])})}v q}});6.1z({3W:12,3c:[],27:u(){7(!6.3W){6.3W=U;7(6.3c){6.K(6.3c,u(){q.14(17)});6.3c=16}7(6.W.3h||6.W.3f)17.87("6o",6.27,12)}}});1p u(){6.K(("88,8a,2O,8b,8d,52,6j,8e,"+"8f,8g,8h,41,6k,8j,42,"+"4R,8k,8l,8m,2C").3o(","),u(i,o){6.E[o]=u(f){v f?q.3U(o,f):q.1S(o)}});7(6.W.3h||6.W.3f)17.8n("6o",6.27,12);J 7(6.W.1j){17.8o("<8r"+"8s 2J=62 8u=U "+"3e=//:><\\/2d>");B 2d=17.4X("62");7(2d)2d.37=u(){7(q.3D!="1X")v;q.11.33(q);6.27()};2d=16}J 7(6.W.2N)6.50=3L(u(){7(17.3D=="8y"||17.3D=="1X"){4p(6.50);6.50=16;6.27()}},10);6.G.1M(1w,"2O",6.27)};7(6.W.1j)6(1w).6u("52",u(){B 1k=6.G.1k;P(B C 1x 1k){B 4Z=1k[C],i=4Z.I;7(i&&C!=\'52\')6w 6.G.2f(4Z[i-1],C);22(--i)}});6.E.1z({6A:u(V,21,M){q.2O(V,21,M,1)},2O:u(V,21,M,1W){7(6.1t(V))v q.3U("2O",V);M=M||u(){};B C="5d";7(21)7(6.1t(21)){M=21;21=16}J{21=6.3g(21);C="5V"}B 4e=q;6.3v({V:V,C:C,F:21,1W:1W,1X:u(2P,15){7(15=="2M"||!1W&&15=="5L")4e.1I("2t",2P.3G).4V().K(M,[2P.3G,15,2P]);J M.14(4e,[2P.3G,15,2P])}});v q},6B:u(){v 6.3g(q)},4V:u(){v q.2o("2d").K(u(){7(q.3e)6.59(q.3e);J 6.4a(q.2L||q.6H||q.2t||"")}).4g()}});7(!1w.3p)3p=u(){v 1p 6I("6K.6M")};6.K("5m,5Q,5O,5W,5N,5H".3o(","),u(i,o){6.E[o]=u(f){v q.3U(o,f)}});6.1z({2b:u(V,F,M,C,1W){7(6.1t(F)){M=F;F=16}v 6.3v({V:V,F:F,2M:M,4t:C,1W:1W})},6Q:u(V,F,M,C){v 6.2b(V,F,M,C,1)},59:u(V,M){v 6.2b(V,16,M,"2d")},6S:u(V,F,M){v 6.2b(V,F,M,"6m")},6U:u(V,F,M,C){7(6.1t(F)){M=F;F={}}v 6.3v({C:"5V",V:V,F:F,2M:M,4t:C})},6X:u(29){6.3q.29=29},6Y:u(5c){6.1z(6.3q,5c)},3q:{1k:U,C:"5d",29:0,5r:"70/x-73-3w-77",5h:U,48:U,F:16},3S:{},3v:u(s){s=6.1z({},6.3q,s);7(s.F){7(s.5h&&1C s.F!="23")s.F=6.3g(s.F);7(s.C.4m()=="2b"){s.V+=((s.V.18("?")>-1)?"&":"?")+s.F;s.F=16}}7(s.1k&&!6.4E++)6.G.1S("5m");B 4y=12;B N=1p 3p();N.7j(s.C,s.V,s.48);7(s.F)N.3A("7l-7m",s.5r);7(s.1W)N.3A("7o-4K-7q",6.3S[s.V]||"7s, 7t 7w 7x 4o:4o:4o 7z");N.3A("X-7B-7C","3p");7(N.7E)N.3A("7F","7G");7(s.5G)s.5G(N);7(s.1k)6.G.1S("5H",[N,s]);B 37=u(4s){7(N&&(N.3D==4||4s=="29")){4y=U;7(3I){4p(3I);3I=16}B 15;2G{15=6.5Z(N)&&4s!="29"?s.1W&&6.69(N,s.V)?"5L":"2M":"2C";7(15!="2C"){B 3F;2G{3F=N.4P("6b-4K")}2w(e){}7(s.1W&&3F)6.3S[s.V]=3F;B F=6.6i(N,s.4t);7(s.2M)s.2M(F,15);7(s.1k)6.G.1S("5N",[N,s])}J 6.3J(s,N,15)}2w(e){15="2C";6.3J(s,N,15,e)}7(s.1k)6.G.1S("5O",[N,s]);7(s.1k&&!--6.4E)6.G.1S("5Q");7(s.1X)s.1X(N,15);7(s.48)N=16}};B 3I=3L(37,13);7(s.29>0)57(u(){7(N){N.7N();7(!4y)37("29")}},s.29);2G{N.7Q(s.F)}2w(e){6.3J(s,N,16,e)}7(!s.48)37();v N},3J:u(s,N,15,e){7(s.2C)s.2C(N,15,e);7(s.1k)6.G.1S("5W",[N,s,e])},4E:0,5Z:u(r){2G{v!r.15&&7V.7W=="4G:"||(r.15>=5X&&r.15<7X)||r.15==6d||6.W.2N&&r.15==T}2w(e){}v 12},69:u(N,V){2G{B 6e=N.4P("6b-4K");v N.15==6d||6e==6.3S[V]||6.W.2N&&N.15==T}2w(e){}v 12},6i:u(r,C){B 4Q=r.4P("8c-C");B F=!C&&4Q&&4Q.18("N")>=0;F=C=="N"||F?r.8i:r.3G;7(C=="2d")6.4a(F);7(C=="6m")40("F = "+F);7(C=="4U")6("<1V>").4U(F).4V();v F},3g:u(a){B s=[];7(a.1l==2y||a.3Y)6.K(a,u(){s.1g(2x(q.Y)+"="+2x(q.O))});J P(B j 1x a)7(a[j]&&a[j].1l==2y)6.K(a[j],u(){s.1g(2x(j)+"="+2x(q))});J s.1g(2x(j)+"="+2x(a[j]));v s.6t("&")},4a:u(F){7(1w.54)1w.54(F);J 7(6.W.2N)1w.57(F,0);J 40.3n(1w,F)}});6.E.1z({1L:u(R,M){B 1G=q.1D(":1G");R?1G.26({28:"1L",3V:"1L",1d:"1L"},R,M):1G.K(u(){q.1q.1h=q.2E?q.2E:"";7(6.1m(q,"1h")=="1Z")q.1q.1h="2D"});v q},1K:u(R,M){B 3i=q.1D(":3i");R?3i.26({28:"1K",3V:"1K",1d:"1K"},R,M):3i.K(u(){q.2E=q.2E||6.1m(q,"1h");7(q.2E=="1Z")q.2E="2D";q.1q.1h="1Z"});v q},5g:6.E.3X,3X:u(E,4I){B 1E=1A;v 6.1t(E)&&6.1t(4I)?q.5g(E,4I):q.K(u(){6(q)[6(q).4l(":1G")?"1L":"1K"].14(6(q),1E)})},7a:u(R,M){v q.26({28:"1L"},R,M)},7c:u(R,M){v q.26({28:"1K"},R,M)},7f:u(R,M){v q.K(u(){B 5k=6(q).4l(":1G")?"1L":"1K";6(q).26({28:5k},R,M)})},7r:u(R,M){v q.26({1d:"1L"},R,M)},7u:u(R,M){v q.26({1d:"1K"},R,M)},7y:u(R,43,M){v q.26({1d:43},R,M)},26:u(H,R,1v,M){v q.1F(u(){q.2F=6.1z({},H);B 1u=6.R(R,1v,M);P(B p 1x H){B e=1p 6.3b(q,1u,p);7(H[p].1l==3Q)e.2s(e.Q(),H[p]);J e[H[p]](H)}})},1F:u(C,E){7(!E){E=C;C="3b"}v q.K(u(){7(!q.1F)q.1F={};7(!q.1F[C])q.1F[C]=[];q.1F[C].1g(E);7(q.1F[C].I==1)E.14(q)})}});6.1z({R:u(R,1v,E){B 1u=R&&R.1l==7K?R:{1X:E||!E&&1v||6.1t(R)&&R,25:R,1v:E&&1v||1v&&1v.1l!=4w&&1v};1u.25=(1u.25&&1u.25.1l==3Q?1u.25:{7R:7S,7T:5X}[1u.25])||7U;1u.1N=1u.1X;1u.1X=u(){6.6a(q,"3b");7(6.1t(1u.1N))1u.1N.14(q)};v 1u},1v:{},1F:{},6a:u(D,C){C=C||"3b";7(D.1F&&D.1F[C]){D.1F[C].4L();B f=D.1F[C][0];7(f)f.14(D)}},3b:u(D,1e,H){B z=q;B y=D.1q;B 4D=6.1m(D,"1h");y.5T="1G";z.a=u(){7(1e.49)1e.49.14(D,[z.2p]);7(H=="1d")6.1I(y,"1d",z.2p);J 7(6l(z.2p))y[H]=6l(z.2p)+"4S";y.1h="2D"};z.6v=u(){v 4T(6.1m(D,H))};z.Q=u(){B r=4T(6.30(D,H));v r&&r>-8z?r:z.6v()};z.2s=u(4f,43){z.4J=(1p 5o()).5w();z.2p=4f;z.a();z.4q=3L(u(){z.49(4f,43)},13)};z.1L=u(){7(!D.1y)D.1y={};D.1y[H]=q.Q();1e.1L=U;z.2s(0,D.1y[H]);7(H!="1d")y[H]="5a"};z.1K=u(){7(!D.1y)D.1y={};D.1y[H]=q.Q();1e.1K=U;z.2s(D.1y[H],0)};z.3X=u(){7(!D.1y)D.1y={};D.1y[H]=q.Q();7(4D=="1Z"){1e.1L=U;7(H!="1d")y[H]="5a";z.2s(0,D.1y[H])}J{1e.1K=U;z.2s(D.1y[H],0)}};z.49=u(32,47){B t=(1p 5o()).5w();7(t>1e.25+z.4J){4p(z.4q);z.4q=16;z.2p=47;z.a();7(D.2F)D.2F[H]=U;B 2c=U;P(B i 1x D.2F)7(D.2F[i]!==U)2c=12;7(2c){y.5T="";y.1h=4D;7(6.1m(D,"1h")=="1Z")y.1h="2D";7(1e.1K)y.1h="1Z";7(1e.1K||1e.1L)P(B p 1x D.2F)7(p=="1d")6.1I(y,p,D.1y[p]);J y[p]=""}7(2c&&6.1t(1e.1X))1e.1X.14(D)}J{B n=t-q.4J;B p=n/1e.25;z.2p=1e.1v&&6.1v[1e.1v]?6.1v[1e.1v](p,n,32,(47-32),1e.25):((-6h.7O(p*6h.8L)/2)+0.5)*(47-32)+32;z.a()}}}})}',62,545,'||||||jQuery|if|||||||||||||||||||this||||function|return||||||var|type|elem|fn|data|event|prop|length|else|each|ret|callback|xml|value|for|cur|speed|element|undefined|true|url|browser||name|||parentNode|false||apply|status|null|document|indexOf|className|val|firstChild|obj|opacity|options|nodeName|push|display|result|msie|global|constructor|css|test|handler|new|style|arg|expr|isFunction|opt|easing|window|in|orig|extend|arguments|context|typeof|filter|args|queue|hidden|events|attr|re|hide|show|add|old|target|table|token|replace|trigger|num|elems|div|ifModified|complete|key|none|tbody|params|while|string|nodeType|duration|animate|ready|height|timeout|nth|get|done|script|nextSibling|remove|not|index|tb|fix|merge|oid|z0|preventDefault|find|now|grep|pushStack|custom|innerHTML|first|cssFloat|catch|encodeURIComponent|Array|el|guid|sibling|error|block|oldblock|curAnim|try|stopPropagation|childNodes|id|wrap|text|success|safari|load|res|exec|al|_|last|substr|has|disabled|insertBefore|selected|checked|curCSS|map|firstNum|removeChild|re2|trim|getAttribute|onreadystatechange|handlers|on|originalEvent|fx|readyList|parPos|src|opera|param|mozilla|visible|domManip|clean|cloneNode|tr|call|split|XMLHttpRequest|ajaxSettings|append|child|String|empty|ajax|form|button|inArray|multiFilter|setRequestHeader|foundToken|9_|readyState|tag|modRes|responseText|second|ival|handleError|toUpperCase|setInterval|makeArray|slice|break|oWidth|Number|returnValue|lastModified|styleFloat|bind|width|isReady|toggle|jquery|dir|eval|mouseover|select|to|defaultView|position|oHeight|lastNum|async|step|globalEval|static|pos|swap|self|from|end|float|alpha|radio|inv|is|toLowerCase|visibility|00|clearInterval|timer|rec|isTimeout|dataType|_resort|RegExp|Function|getAll|requestDone|parents|matched|isXMLDoc|appendChild|oldDisplay|active|triggered|file|documentElement|fn2|startTime|Modified|shift|lastToggle|deep|handleHover|getResponseHeader|ct|submit|px|parseFloat|html|evalScripts|getComputedStyle|getElementById|clone|els|safariTimer|currentStyle|unload|force|execScript|getPropertyValue|newProp|setTimeout|zoom|getScript|1px|sl|settings|GET|rl|check|_toggle|processData|prepend|before|state|removeAttr|ajaxStart|lt|Date|gt|eq|contentType|previousSibling|after|parent|contains|getTime|checkbox|password|appendTo|image|reset|input|webkit|href|continue|beforeSend|ajaxSend|ownerDocument|getElementsByTagName|tmp|notmodified|parse|ajaxSuccess|ajaxComplete|_prefix|ajaxStop|even|odd|overflow|delete|POST|ajaxError|200|handle|httpSuccess|nodeValue|unshift|__ie_init|srcElement|body|pageX|tagName|clientX|scrollLeft|httpNotModified|dequeue|Last|scrollTop|304|xmlRes|unbind|100|Math|httpData|click|mouseout|parseInt|json|createElement|DOMContentLoaded|prevObject|ol|setArray|exclude|join|one|max|do|relative|clientHeight|clientWidth|loadIfModified|serialize|toString|thead|tfoot|td|th|textContent|ActiveXObject|htmlFor|Microsoft|class|XMLHTTP|readOnly|gi|match|getIfModified|9999|getJSON|getAttributeNode|post|setAttribute|ig|ajaxTimeout|ajaxSetup|concat|application|userAgent|compatible|www|compatMode|CSS1Compat|next|urlencoded|siblings|children|slideDown|prependTo|slideUp|Top|insertAfter|slideToggle|removeAttribute|addClass|removeClass|open|toggleClass|Content|Type|lastChild|If|only|Since|fadeIn|Thu|01|fadeOut|enabled|Jan|1970|fadeTo|GMT|textarea|Requested|With|prev|overrideMimeType|Connection|close|boxModel|right|object|Object|navigator|substring|abort|cos|font|send|slow|600|fast|400|location|protocol|300|pageY|clientY|method|action|cancelBubble|hover|fromElement|toElement|relatedTarget|removeEventListener|blur|readonly|focus|resize|content|scroll|dblclick|mousedown|mouseup|mousemove|responseXML|change|keydown|keypress|keyup|addEventListener|write|prototype|size|scr|ipt|createTextNode|defer|FORM|reverse|noConflict|loaded|10000|weight|line|Bottom|Right|Left|padding|border|Width|offsetHeight|offsetWidth|absolute|PI|left'.split('|'),0,{})) diff --git a/theme/custom_corners/js/jquery.php b/theme/custom_corners/js/jquery.php new file mode 100644 index 0000000000..14945bb2cc --- /dev/null +++ b/theme/custom_corners/js/jquery.php @@ -0,0 +1,18 @@ + + + \ No newline at end of file diff --git a/theme/custom_corners/meta.php b/theme/custom_corners/meta.php new file mode 100644 index 0000000000..371974ac41 --- /dev/null +++ b/theme/custom_corners/meta.php @@ -0,0 +1,6 @@ + + diff --git a/theme/custom_corners/pix/b.gif b/theme/custom_corners/pix/b.gif new file mode 100644 index 0000000000000000000000000000000000000000..3b68f145b48b87c0ae4a69a713d00478d95f2036 GIT binary patch literal 75 zcmZ?wbhEHb>ix eI?NDpiPGo$cH*w2yck#VGuv~Awz)AfSOWkdV-|=2 literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/beige_borders.png b/theme/custom_corners/pix/beige_borders.png new file mode 100644 index 0000000000000000000000000000000000000000..9e6261be3acad2ae2fb5fb73e963a25cec46547a GIT binary patch literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^5pvSrJYl$4Ywf4{$< zZ@|vp{^S1s`qWjYxF)U9)s>O-U}*1`yMOgTe~DWM4f=^RFV literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/beige_box.png b/theme/custom_corners/pix/beige_box.png new file mode 100644 index 0000000000000000000000000000000000000000..2b095c1ebd24abab4f6a9ef02b22e2039a155ad6 GIT binary patch literal 6056 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
  • $Y2d*X6OZxn`$nDg^gDfn0|FE zx4J}cG0k0jGvRew;nAzJ33w>IS=!&-T9~NzTd!=`TcS6W1S+A)N%z2>4oqic;h%-pw>nn(o-$K#xm)7g?a@HCeqz4q9TVX5H*%^WAql}7nd&I@(U5M Z=vD2u?%*u{R_jCF(7$1%hu5`#`hQ_!)eHat literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/bg.jpg b/theme/custom_corners/pix/bg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..14359bb7c4ce5fa09bc35240b07f4b91d9d0866b GIT binary patch literal 1107 zcmex=+Px z7O~kgeNC5~IrDP!fx{df9UV`PmHydpsRRPb`}foy1If+&3g#;T?UNH=U;Y#^gz zV54B7z(j>YnA`0Yueom0opm-P+H}_0w9S!gt|S~>aj?Hf_CxtWv(7CEN0QVgnixuS zE-AdEHnC%tTTfa~T5nCp#YH+9*Ia?hyJf%54O2QEx;b)@?&OTwF1OS!0=4-r$`#I- z?Y1aaqW|zbrA%Ru$4iR;SR8)eF5hnBZsRWS;Q7Ua2hT5_&wu&LUwe-)e-+%9L@Qs? zsheT_;Na@VY<30-@0(eG7MgS}@l~pU(m-SS+wJ=575dwOt_MdZ12ZtF1fEM4P8aq~ zxpwxtR3e{nY{|X5U+31Yp9~a<#1rhGco85JFJJ|#0zi8hnOIp7F~cYrsAwqQIPu`a z#KOjn9~XXrho``*vQx5$9$e9FJ(cHtx&Bc`+u{|`RexQ}H-zy{Es-wUu%2-n@9JM% zEJxKA|MWR*PiUeKZYjEi99iS-5D(*u6i^y({I`Xm_l zVEP0XQKv<#CTBm=W%d(@;B^ai_ATaqD1KPKB}z;CA#Y#T)86|z8$9<5W+*$$@$&Gj z&}1nXq)&d>*Q+Ht&{G#o|#{8 zYWj|RV-qRgv&S8-h&AU=-P`>_nk(FQaiY`ugxxJXJPR9Vs2p$c?MO&BSbAV4e|X^1 iiQ?r!Iwv+MD=wWVcFknnza^2SLcJ1Qum1Y~zX<@~3sr9b literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/borders.png b/theme/custom_corners/pix/borders.png new file mode 100644 index 0000000000000000000000000000000000000000..991177d916c7d44b2b8d2ec5a51657326d281cd2 GIT binary patch literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^5fGed%8G=Xq->pvSrJYl$4Ywf4{$< zZ@|vp{^S1s`qWvoXHS0f_N}a>2Ln5w%#HgOE*SiOe}8{}WJE;VpI={J-~IppzrC^H k1&N+0gRFxqSb2CD<{gth(Gj4t8)!6xr>mdKI;Vst05D`mrvLx| literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/bottom_shadow.png b/theme/custom_corners/pix/bottom_shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..e8725fce84d4892c931d6dfe06bcd61a7813c9bb GIT binary patch literal 263 zcmeAS@N?(olHy`uVBq!ia0vp^96-#;!3HGxgLCzO6kC$Fy9>jA5L~c#`DBoEfk$L9 z0|U1(2s1Lwnj--eWH0gbb!ETK%FJ)hmfiGZDo|*Or;B5V#O2zagI-4+M4bKC&D7iy z@Z$gfxqA0rHF9rEU3U4klZMix#x;IId+p^<+W+|a_F!dMmHeE?PgGf0^p;I)vbW>^ zR=a%bF^R|3sm8v-mrWk#-k$M%rXkzjawR6uD^VMJua_>}>Xvqof0D*h0l|t$v8=TW zDQYu2RdSR$Wsgt1UOI7Rx#uO>+xw2@D=|Hdf5sj!(cvneFZk&^(0vS^u6{1-oD!M< DiojoV literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/bottom_shadow_to_top.png b/theme/custom_corners/pix/bottom_shadow_to_top.png new file mode 100644 index 0000000000000000000000000000000000000000..9c8ca0391f57181a394ebcd88050e7f438ac1da0 GIT binary patch literal 199 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 literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/css.gif b/theme/custom_corners/pix/css.gif new file mode 100644 index 0000000000000000000000000000000000000000..312cde94381c20c32f83488c2f1eb94d31c83d8a GIT binary patch literal 750 zcmVsf=d`TG2)rlq62)S$Ifq&K2)!patUWc^) z{{Q;_|6W~O`~CjS-s|J*@?VU%ho{Kh=I`6(?~ba<(%DHU|?YP`TLcXmGk!d#LLk8 z{QQcj$3ktTd7;Gf^Yi-p`uqL;m9WjfzrQnRqmZr4H)WuYvCzla=rC87&(YHB@%M&? zhDu6G3^#<-;_cYk*=dox`uzR<{r>#@{Z&;}grv%=!`g$R$7qVUA^8LV00000EC2ui z09F7G000O7fEt2>goTEOh>41ejENbKkdcy;l$Dm3n3kGfd-6UPFBItp0Ccr(U@hzO6$ zL`s#f;y!;EQ?1H?M?!@*Y7)%Yf+m0z0es*L5Hg9PD1E6iWb_B{k&Pe>fMoe`!9)fs z3IyQTK*^=di%4e{tC?X+0y=ISAaHWxNQMvyDDZd$06;&O82EuzN{lIp2^?SqAaY{@ z8$T9HkbsHMp~?;w{mANlx$)78H5oQ|@Bl%~0TK?vG)b}ti?hFj7&OT-%hAgt6trxwd>cg83h6WI}%!-BLDyZ literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/header.png b/theme/custom_corners/pix/header.png new file mode 100644 index 0000000000000000000000000000000000000000..5cf6546a11cbe1a09e7e20da774ba2c7a437a4b4 GIT binary patch literal 354 zcmeAS@N?(olHy`uVBq!ia0vp^96+qk!3HGnE$e0lQfx`y?k)`fL2$v|<&%LToCO|{ z#S9GG!XV7ZFl&wkP>{XE)7O>#Ix923F4LVux59x!?>$`{Lo7~T4ff1BYQR$~^+(#N zc-EWZhI`xCIpwQ*ofclOS~BUWo|VqyhI;X@VUK!^TwRVH41Q3+xAypFVU7&ND`tm2 zGBN9R<+Z$9;1_TugZ1n8*e~vP*DidzX#YE7sa?B&u&3W&vg6>%yANJ(bu|-PcYV2g z`Tk=4lijNg!W*1I?DRC>ZqYf-+)&MMc)GTOi;a?5d40H2)w-?wIz5WYRTpKYDJoeT zzt>XIw|suufM?OFPrkA)DevA%39er%VruNC`Egrr!ZWMB#jCSknD|OE%$A%f$sk~S vJ;>{t(CZAIu6{1-oD!M<`mKme literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/help.gif b/theme/custom_corners/pix/help.gif new file mode 100644 index 0000000000000000000000000000000000000000..78fddd9416c330e11c4bd71ce8d21c18469ae9d7 GIT binary patch literal 441 zcmV;q0Y?5uNk%w1VG#fk0M!5h2??WYs{bc$>i{9m+}!MwlfE-EnYy~%07~CShVB3% zzyLAYWSsb;#Q*>Q|B%H01#|yUP_-#3rvOOt1qibMFzLGQ|0;d|0z^F5G8^$7qFOg z4NW4Gfk{%sSNEZD&@dR!>C!1-h#N~NfO2>|ZYnh$JWMYPUI989HzzU<8we8<20tP= z84m$27cc@24hTI93jjYH5F|I79&HXfq#rvJr>P_zFfO35J0CH#mbMijfGr=#EWf4^ z5EB){2s6hY$uR?!2Q7p=APjLV)d~~^LJ=wxARr+QGZZoJ*LObz5|aZh2?_u)3Iii( jL!Jy6HDJJwSq1<$`LV(P016ZU7$_ibp~Z_of&c(JfN8CA literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/movehere.gif b/theme/custom_corners/pix/movehere.gif new file mode 100644 index 0000000000000000000000000000000000000000..aaa4e5d9bcaee07adaefd6582f9169c2517bba3b GIT binary patch literal 230 zcmZ?wbhEHb3}6so*v!SCsj11q!4VY|)zHweapOiOC#RV+XFh)Xn1O-eKNtWR$UyNY z3nK#q7lRH+5M%}e%jAHQo~!p-ygpm)zJRIkQOA@em8&vN>|3~8(KGjc#k%)@>P|^U z<$LHnOJQ@ma3bfIO+$mw<27ORbDSNj1f%x5yis7#n0=bbkx@`0V$XveeM|v2BSm)9 z#2@Bzh-S>mNzLZS6RoN#ijXPo5bK`QD^<@V(KRW4ie#qutZE121=VvF3F&F7>1wYw SShZoL%JMB+w+RU{SOWkEdR6TJ literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/section_508.gif b/theme/custom_corners/pix/section_508.gif new file mode 100644 index 0000000000000000000000000000000000000000..89e9c9a1817070a1848626a06bd76fd76d351fba GIT binary patch literal 731 zcmZ?wbhEHb3}fJDc*el+Y&ygL|Nqm{(j3zF{rmU#9}xfj<&d_|A$6Za@;$>$jmTqC%aOn8P<;)hWPUh_F+y{=G*t~VYgn2h_9lL$^?&i%a zIE4946&3tc*WK^meC6GZ>$etu`0|}$!>>C(mU9Iuag^+EIB-<3?BRyHx6{`~>@E8t z^eozAeeiZhWsU%Y1#j0_CC3_2hl$P5M+6@x}jo>+}7XMbwMT4X4?Pe^rc=zXy3 V_Vi;JmFKc_jY6Jkw{tL90|4C(FZ=)i literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/switch_plus.gif b/theme/custom_corners/pix/switch_plus.gif new file mode 100644 index 0000000000000000000000000000000000000000..84ac3532459419c05bf4d53206d14f3864524fde GIT binary patch literal 124 zcmV-?0E7QWNk%w1VG95Y0J9DNva+)O|NmiOVX3L9u&}VPv9YMAsI#-Po}QkZoSc-D zl&7bst*x!Eudo0A{{R30A^8LW000gEEC2ui01E&M000Cj5P=B}ZELvAIWb*GXq?a$ epecd{z?}>+K*bxazWynxO0029>=rm;j literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/tab/left.gif b/theme/custom_corners/pix/tab/left.gif new file mode 100644 index 0000000000000000000000000000000000000000..409fe64a47f211c6a1e1a8ff50a603dfcffddea4 GIT binary patch literal 293 zcmV+=0owjYNk%w1VGaOB0OJe*nVFfTrKPQ{t+lnazP`T9%*@x<*WcgY<>lq(=H~D3 z@Avoj|NsC0|NsC0|NsC0A^8LW3IGoPEC2ui01f~~000Ei@X1N5y*TU5>M<6U=3xMMJG6)vftQI>UY`+V^0lbxx zwdRFF&0enoZS0z@mMYx%w)xKQ-|c>ZfPsC3gnx&AhKEuJ3XYJEk^qsFk_eQKkeid5 zo(Pqcjt8Hhpa2P}s;jD~tgi{Ku&c7Osi+4Dxx2c(00+Rq!ok18#s|g6!pX|O%+1fr r(Z|!q)x+1z&Dz_}-QM5X#NWu|;^5uq<>BV-?CJb1t5o4&_ literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/tab/left_active.gif b/theme/custom_corners/pix/tab/left_active.gif new file mode 100644 index 0000000000000000000000000000000000000000..d52083ea05cab7841a0dc46df5f1401d9e61dbad GIT binary patch literal 202 zcmZ?wbhEHbMmPs1YNCoP;DSH*Ru&&n~}%a?egT73LP(XTamo9~Af*VvX{f9O{^Z{POsAHAy@ hYntm?8{C>YTe{nNI~=+u_Dt@ZI>CC<%tS#3YXAnOW|RN` literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/tab/left_active_hover.gif b/theme/custom_corners/pix/tab/left_active_hover.gif new file mode 100644 index 0000000000000000000000000000000000000000..93afbdd3473d1f81a75239a886b9b368c3ac8d95 GIT binary patch literal 206 zcmZ?wbhEHb^hSut*ZhIqg8GBTO&)RSCi%s5t zNApLRj{N2Kv46tl&;9;hU)#{!)S6n;-q_jF-Im_b-!-vka$n|z>62zonLRB#Nsz%B E0P4AC761SM literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/tab/left_hover.gif b/theme/custom_corners/pix/tab/left_hover.gif new file mode 100644 index 0000000000000000000000000000000000000000..f7c2e926de48fc8a69f05a1158dae04c3e468b51 GIT binary patch literal 292 zcmV+<0o(pZNk%w1VGaOB0OJb)nVFfTrKPQ{t+lnazP`T9%*@x<*WcgY=H}+_@9+2b z_y7O@|NsC0|NsC0|NsC0A^8LW3IGoPEC2ui01f~~000Eh@X1L}8GzCf0x^m99Kmob z=%Nw9nWB_1C~rCub8SByt;2}`;%6feh$#gifkYVuil}rN9T2Ekh2W5-F1yojLNP9r z$$+zYtt`9A?qy;=hu0Hwx?Z2(@B4mqfPr`k2y=&thK2x#i;j?m2#S-B2#tn`nu(2* zm7kuSnVzJVrKgjfsHCc^sjjRD2eP!YwwDLFy1TjnyuZ1=z`Vl4y~ex6$jZjd!_L6a qztY6W$JPhb$=KQ4+Sk_K!QSN9;@#%u;p)rm&F;_e(el&W5db?@!=wZN literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/tab/right.gif b/theme/custom_corners/pix/tab/right.gif new file mode 100644 index 0000000000000000000000000000000000000000..1851ef1f6212e8013a25b9a21975729e1abf5458 GIT binary patch literal 3297 zcmV<73?B1GNk%w1Vci8r0OJb)nVFfUrlzf}t+lnayu7^3%*@u-*5BXX=H}+_@9+2b z_y7O@|NsC0|NsC0|NsC0A^8LW3IGoPEC2ui0Nn*f000F3@X1N5y*TU5yZ>M)j$~<` zXsWJk>%MR-&vb3yc&_h!@BhG{a7Zi~kI1BQ$!t2G(5Q4uty-_xtai)odcWYXcuX#v z&*-#z&2GEj@VIs;jK6uCK7Mva__cwzs&sy1Tr+zQ4f1jR6A%2O0~>%FE2n&d<=% z($mz{*4NnC+S}aS-rwNi;^XAy=I7|?>g(+7?(gvN^7Hid_V@Vt`uqI-3knDf5C{;U z00w^u6DnNDu%W|;5F<*QNU@^Dix@L%+{iKC0RjF2j#cPLvZTqAC{wCj$+D%(moQ_> zoO$m600JXv>fFh*r_Y~2g9;r=w5U;*2?hwDaI~q@r%>)y?~ zx9{J;g9{%{ytwh>$dfA<&2_o+=g^}|pH98H_3PNPYv0bjyZ7(l!;6PbK*0F(=+moT z&%V9;_weJ(pHIKOedPuM+~3c?zyJRL2L34EfCLt3;DPlapkD$CFz8@|5I!hjgcMF_ zVTBl8s9}a2Zs=i$Abu!fh$N0^Vu>i8sA7sNu9$#}Eyf7rj55|pOp zJ_ZTokU|zoHp%3ZPF4uzlu=S?WtCWJxS(YZLP(*PT{8Hkm|=1WrkP}- zY37(}o|z__aF!Y8nRC7=XP0%Zc_*EF+R5jieg>*1po0qPW}%24s%V;GF4`uei9+gV zo|E<&>7$rZD(R+~T3RWghZ@SMrk#R1s;8%#TB@k4UP|h#sJ8m4p|Gl2E33D<8f&hz z>T2t*!2Zf>s<;MQtgy!>>#MT8{x(bOvX?UZth2ICYi+gI4x6p9&{C`IoO(s*poHU! z+aS5;n){-<=&oC?yXnH~ZoBldYwx@D;(Kqr`M%5VzVia?Z@~H%{I9_TAFOb~3=iyZ zybF(;Z^RHcT=B#5Vmz_M8DH#i#~^R4vA`dTtS-eNlbkZbBePtx$|kRja?CWtY_rQN zw>ufa8Oeg(v(@Q%obJSETJ#^JiOMSJ~Sz|pl*I#!H z_SRw_tk;WZOPuz(X{(Jk+iSNyZ`*LcEw|fq$1Qi=dE34B-F)LMc;Iyt4*21JCr&rw ziz}{ol*I3<(y+aIOCUpzPaa`S57+Uor`Yz=cR||_^{`>I9FaP}X*Khy*_~)p$JDv!V;SBgeXj*3RlR& z7P|0-FpQxLXZS%6((r~j%%Ki<$ip7`@P|MQq7a8j#3C9IgEl;(5|_xtCOYwnP>iA! zr%1&rS}}+LKtTQiw8+IRda;XO{Gu4cNX9Xmv5aUuqZ-r5#x=UJjc|OU9OFpGIoh#~ zc)X(?^Qgr=`jL-+3?v{2Dab++@{op1BqA57$VM{qk&cWcBqu4!N>cKYmdqq3H>t@^ zax#pb4CN<9Ny<^0QjL1)q8G)uN>%pJl`n!ND__~lSk`iuwxlI4cPYzW-qM%41g0%{ zIZR>JGMK+iCNh^CJMI^PJ)g zr!mc$PFQZUo#&Z zMw*h*renmZO<(#&o^lb7I_;@YXFAlH7WJk_&1q718q=j7)u&s8DpQI2)23FHs!_FS zRj6|si3>tQ4NRK`x$vXaegW%;^Tw{EtxplxhuFUwic znwGSq)vQ`6yIQa&Ad6S+Dqd&1RoVVDwo#RBZfl#{+2Yo=x8*HxcT3yh>bAJHC2nkw z{)^n+2KTwk^{sG|%iP*B_qWt-u5q=SUF=?Wy5B`^c%utl>5A99Aodyzi}UeFeN<0{7Rz+x0Gf56oQv54gb#PB3^Q+}#O3 zm%kD|uYMV<;0xf<$0**hkabMtAQu_PNQUu|m2BiDCt18%6mD;)+f(jV8M{}e@_n^DW$kwPw_lcW zcEx;MD{tA$V=iu()tu(lnt9D`#`2lL+~&U`7S48-GoB&)<~s9P&wh4kpF^DfWi%6d z&Sd^`O$W_rKp%R~f_8MHxg6+1)A`YrMl_o-U1mvpn$nz}w4p_PX;LTp)1yXpspAZ4 zQ*YYUtWI^SRekDN+gjGRUNxjGUF%%;TGzgQHLZnxYhWAu*T^Pzu(_DZ|2jLr&z^6z zp&f1KPTShmo_2z@P3>o6o7>XPHn_X(>~EKQ+~oeRxz&yCb#EKp@4j}s=RIzBcbD7t z?zFt?O>c1L8{YTU_P^5|Z*lv(-}pwjz!kplgYz5U`ZjpNAMWsqPu$`Qr})J;o^gyr zJlx)9xWqfo@rIXtqC5TSNk_WUvkrBv2i@u*_d3dR{p(FX z``EW`^RlD8>S=#F*~Px{wQK$ET~|BU<<54z$KCFE=eytO{`b9q8}M#NJmKNa__^yn z?t_1P}OB= z+S~s2xX-=rchCFY`~LU955Djr&iUaR|MRbQ%*w4Q7 zi?99ed;k0355M@wPyX_o|NQ7rzxvnD{*QCN{qT>!{O3>q`u^Mh{`k+o{`b%SJsCIEG|chGuw% zXqbj-xQ1-lhHm(Va2SVjIEQpthjw^}c$kNJxQBe$hkp2nfEb8^IEY*Le}s65h?t0q zxQL9{h>rM(kQj-QIEj>4iI#YYn3##0xQU5qh@AL|{-79&qBx4ASc;~2il~^1sbQ>V*pBY_j_??d zYKV^VSdaF2kNB96`nZq$sEYL1j{q5v0y&TbS&#;KkW~1O2)U39*^mzTkPsP>x~Py6 zS&#yD!Gy@*^DTZSCmU20lbXk{38JBjMmwLIE ze2J2H*_VJBn1VT&2KkqSd6M)j$~<` zXsWJk>%MR-&vb3yc&_h!@BhG{a7Zi~kI1BQ$!t2G(5Q4uty-_xtai)odcWYXcuX#v z&*-#z&2GEj@VIs;jK6uCK7Mva__cwzs&sy1Tr+zQ4f1jR6A&2O0{=%FE2n&d<=% z($mz{*4NnC+S}aS-rwNi;^XAy=I7|?>g(+7?(gvN^7Hid_V@Vt`uqI-$p{Au1PEXN zgTI3a6DnNDu%W|;5F<*QNU@^Dix@L%+?emcfB^o-DsUW0vZTqAC{wCj$+D%(moQ_> zymuf#0g*Fv>fFh*r_Y~2g9;r=wCG9%0|rnq%CxD|r%>fOt?uiw9b0}Do1;O5}Nh!ZPb%($`R znFs(Rcucvn<;$2eYu;RqAm`7ZLyI0wy0p^*1Wc=5&APSg*Rbs!5D>ez?c2C>>n0s} zx9{J;g9{%%769?%$dfBy&YYz2=Fp={pH96xx#!liYv0bj`*7^u!;2qJzC2~{=F_WR z&%Qla^zP%!pHIJjOZfKl>)+46zdro_1^y`DfCLs;4S)tFsNjMOx`$wc5Jo8Bgv>oi z;e{AxsNrfBZs_5MAclxoha#3};)y60m*R>nw&=iRYet_UV_Neg-P&pk)C{=%I)v3YDRXHtOi3Ix!0A zq?A_boTZp%s_9FTZtCf$pw`oAsHB!^>UF24s_LrojLPb(u&(NAthCnZ>8!Tqs_Ub; z?&|BWf%XdQu*AwKY_Z5DOXji4IX3GomCQaX?X*TlOYODT=4frU+;+R-w%&#-u7}`` fYwo!amW%GX>M)j$~<` zXsWJk>%MR-&vb3yc&_h!@BhG{a7Zi~C5Hq7@n|}qi>P!;ty-_xtai)odcWYXcuX#v z&*-#z&2GEj@VIdFX%FE2n&d;;~ z2?oN@*4NnC+S}aS-rwNiSp^2c58~+Q>g(+7?(gvN*9DDD^7r`p`uqI-{{Qk290+g@ zpuvL(6DnNDu%W{@N(w%lNU@^Dix@L%-1V!##*h9WLy8fFh*j{pM(dI}v%w5ZXeF9i@#fV8R8r%ytYTe4!lz;$C zyNVr4wyfE+YYK!#%eJlCw{WGdjZ3$#-Me@{&dtlWuiw9b*X<2VxUk{Fh;I!}%($`R z$B+drj!e0-<;$46OwP=?v**u&H-jEcy0mGoqED+{&ARo?)UIR8o=uw~?Ao|<>)!3| zHt*lSg9}&Yd${rA$di{UuDrSP=g)&q{KmY##2GZ!1e*zY0;DIs`h~R<@Hn@?34n`>9ga<)L z;e{Ax*p7u7cIe@U*Ki2ph$NQCi-;zssN#ytvFPH9Fy?|{j5OA0qaHKfsN;@2rjcWh zKn5u!7C#PYhzadr3Z-7{y-{Qv(y0~jd&WMO1rU}ew&@jz-B Tn7JZ$ol#_-;JI3rlffDQhnp4| literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/tab/right_hover.gif b/theme/custom_corners/pix/tab/right_hover.gif new file mode 100644 index 0000000000000000000000000000000000000000..ef44869a710e70ced39654c640d8e8c218a71dc7 GIT binary patch literal 2730 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 literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/tab/right_last.gif b/theme/custom_corners/pix/tab/right_last.gif new file mode 100755 index 0000000000000000000000000000000000000000..8ed76c4764a8296d384115e39cd2da4631f9078a GIT binary patch literal 2382 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 T($mz{*4NnC+S}aS#1Q~HpZBH6 literal 0 HcmV?d00001 diff --git a/theme/custom_corners/pix/xhtml_1_0.gif b/theme/custom_corners/pix/xhtml_1_0.gif new file mode 100644 index 0000000000000000000000000000000000000000..119e2ca7ea191e758d555197017c7044cc031a5d GIT binary patch literal 780 zcmV+n1M~bxNk%w1VO9VS0OkMy-{0Tp@AVr~mEz*!{r&%To58cj+&XHa3q_1pf3Jz9 z$Nm5RB~p~wsf=d`TG2)rlq62)S$Ifq&K2)!patUWc^) z{{Q;_|6W~O`~CjS-s|J*@?VU%ho{Kh=I`6(?~ba<(%DHU|?YP`TLcXmGk!d#LLk8 z{QQcj$3ktTd7;Gf^Yi-p`uqL;m9WjfzrQnRqmZr4H)WuYvCzla=rC87&(YHB@%M&? zhDu6G3^#<-;_cYk*=dox`uzR<{r>#@{Z&;}grv%=!`g$R$7qVUA^8LV00000EC2ui z09F7G000O7fEt2>goTEOh>41ejENbKkdcy;l$Dm3n3SPar^#sXBfX$FbkRRT=O|sL)1Df*D)T1dt+t51au)CJhX=(PT$| zCU^1-$`NG-8$lQV$@1fZi40T}2*9y{Qb~|NeeTP8uq4-kMyDj8~lJ3^5bMq1OXb>ziNFXL~fDwSmjR|c0SU>_MLWe3lROAgu`5Qt=E7oM# z;K2g~F$YLE2-76V9xP@iS6+?k@}mVG9&ON*;fsR+EjBL!kf$f>->r>y8cw{p@kYp# KD__ni5CA(5BB=xb literal 0 HcmV?d00001 diff --git a/theme/custom_corners/styles.php b/theme/custom_corners/styles.php new file mode 100644 index 0000000000..fd3271b72d --- /dev/null +++ b/theme/custom_corners/styles.php @@ -0,0 +1,19 @@ + diff --git a/theme/custom_corners/styles_ie6.css b/theme/custom_corners/styles_ie6.css new file mode 100644 index 0000000000..38a38e74a7 --- /dev/null +++ b/theme/custom_corners/styles_ie6.css @@ -0,0 +1,16 @@ +/* + * These styles are ONLY included for IE 6 (via meta.php) + */ + +div.navbar { + height: 2em; +} +div.sideblock ul.list li { + margin: 0.4em 0; +} +div.i1 { + min-width: 0; +} +div#header div.i3 { + min-width: 0; +} diff --git a/theme/custom_corners/styles_ie7.css b/theme/custom_corners/styles_ie7.css new file mode 100644 index 0000000000..d53c5b4b54 --- /dev/null +++ b/theme/custom_corners/styles_ie7.css @@ -0,0 +1,16 @@ +/* + * These styles are ONLY included for IE 7 (via meta.php) + */ + +div.navbar { + height: 2em; +} +div.sideblock ul.list li { + margin: 0.4em 0; +} +div.i1 { + min-width: 0; +} +div#header div.i3 { + min-width: 0; +} diff --git a/theme/custom_corners/temp_user_styles.css b/theme/custom_corners/temp_user_styles.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/theme/custom_corners/ui/ChameleonCSS.class.php b/theme/custom_corners/ui/ChameleonCSS.class.php new file mode 100644 index 0000000000..28c0bda06c --- /dev/null +++ b/theme/custom_corners/ui/ChameleonCSS.class.php @@ -0,0 +1,139 @@ +base = $base; + $this->perm = $perm; + $this->temp = $temp; + } + + function update($file, $content = '') { + if (!is_writable($this->base . $this->$file)) { + $this->error = $this->$file . ' is not writeable, the file permissions are currently ' . $this->getfilepermissions($this->$file); + return false; + } + + if (!$fp = fopen($this->base . $this->$file, 'w')) { + $this->error = 'couldn\'t open file'; + return false; + } + fwrite($fp, stripslashes($content)); + fclose($fp); + return true; + } + + function getfilepermissions($file) { + return substr(sprintf('%o', fileperms($this->base . $file)), -4); + } + + function read() { + $permcss = file_get_contents($this->base . $this->perm); + $tempcss = file_get_contents($this->base . $this->temp); + + if ($permcss === false || $tempcss === false) { + $this->error = 'Couldn\'t read file'; + return false; + } + + $permcss = trim($permcss); + $tempcss = trim($tempcss); + + if ($tempcss == '') { + return $permcss; + } + return $this->_merge($permcss, $tempcss); + } + + + + + function _merge($permcss, $tempcss) { + $csssrcs = array($this->_toobj($permcss), $this->_toobj($tempcss)); + + $merged = array(); + + for ($i = 0; $i < 2; ++$i) { + foreach ($csssrcs[$i] as $sel => $rule) { + $newsel = false; + if (!isset($merged[$sel])) { + $merged[$sel] = array(); + $newsel = true; + } + foreach ($rule as $prop => $value) { + $merged[$sel][$prop] = $value; + } + if ($i > 0 && !$newsel) { + foreach ($merged[$sel] as $prop => $value) { + if (!isset($csssrcs[$i][$sel][$prop])) { + unset($merged[$sel][$prop]); + } + } + } + } + if ($i > 0) { + foreach ($merged as $sel => $value) { + if (!isset($csssrcs[$i][$sel])) { + unset($merged[$sel]); + } + } + } + } + + return $this->_tostr($merged); + } + + + + + function _toobj($cssstr) { + $cssobj = array(); + $end = strpos($cssstr, '}'); + while ($end !== false) { + $currule = substr($cssstr, 0, $end); + $parts = explode('{', $currule); + $selector = trim($parts[0]); + $rules = trim($parts[1]); + $rulesarr = explode(';', $rules); + + $num = count($rulesarr); + for ($i = 0; $i < $num; ++$i) { + if (strpos($rulesarr[$i], ':') === false) { + break; + } + $rule = explode(':', $rulesarr[$i]); + $prop = trim($rule[0]); + $value = trim($rule[1]); + + if (!isset($cssobj[$selector])) { + $cssobj[$selector] = array(); + } + $cssobj[$selector][$prop] = $value; + } + $cssstr = substr($cssstr, $end + 1); + $end = strpos($cssstr, '}'); + } + return $cssobj; + } + + + function _tostr($cssobj) { + $cssstr = ''; + foreach ($cssobj as $sel => $rule) { + $cssstr .= "$sel {\n"; + foreach ($rule as $prop => $value) { + $cssstr .= " $prop: $value;\n"; + } + $cssstr .= "}\n"; + } + return $cssstr; + } +} + + +?> \ No newline at end of file diff --git a/theme/custom_corners/ui/ChameleonFileBrowser.class.php b/theme/custom_corners/ui/ChameleonFileBrowser.class.php new file mode 100644 index 0000000000..7b1aca510b --- /dev/null +++ b/theme/custom_corners/ui/ChameleonFileBrowser.class.php @@ -0,0 +1,85 @@ +IMAGE_TYPES = array('jpeg', 'jpg', 'gif', 'png'); + + $tmp = explode('/', str_replace('\\', '/', __FILE__)); + array_pop($tmp); + array_pop($tmp); + $this->root = implode('/', $tmp); + + $this->path = $this->sanitisepath($_GET['path']); + $this->dir = $this->root . '/' . $this->path; + } + + function sanitisepath($path) { + if ($path == 'root') { + return 'pix'; + } + + if (substr($path, 0, 3) != 'pix') { + $this->send('Not a valid directory'); + } + + return preg_replace('/[.]+/', '', $path); + } + + function isimage($file) { + if (strpos($file, '.') === false) { + return false; + } + return in_array(array_pop(explode('.', $file)), $this->IMAGE_TYPES); + } + + function readfiles() { + if (!is_dir($this->dir)) { + $this->send('Not a valid directory'); + } + + $handle = opendir($this->dir); + while (false !== ($file = readdir($handle))) { + if ($file == '.' || $file == '..') { + continue; + } + if (is_dir($this->dir . '/' . $file)) { + $this->founddirs[] = $file; + } else if ($this->isimage($file)) { + $this->foundfiles[] = $file; + } + } + closedir($handle); + + sort($this->founddirs, SORT_STRING); + sort($this->foundfiles, SORT_STRING); + $this->sendfiles(); + } + + function sendfiles() { + $out = "path\">\n"; + foreach ($this->founddirs as $file) { + $out .= " $this->path/$file\n"; + } + foreach ($this->foundfiles as $file) { + $out .= " $this->path/$file\n"; + } + $out .= ""; + + $this->send($out); + } + + function send($out) { + header("Content-type: application/xml; charset=utf-8"); + die($out); + } +} + +?> \ No newline at end of file diff --git a/theme/custom_corners/ui/chameleon.php b/theme/custom_corners/ui/chameleon.php new file mode 100644 index 0000000000..aac69aa330 --- /dev/null +++ b/theme/custom_corners/ui/chameleon.php @@ -0,0 +1,32 @@ +chameleonenabled)) { + $chameleon_isadmin = has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID)); + $chameleon_isteacher = false; + if ($COURSE->id == SITEID) { + $chameleon_courseparam = ''; + } else { + $chameleon_courseparam = '?id=' . $COURSE->id; + $chameleon_isteacher = !empty($COURSE->theme) and has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $COURSE->id)); + } + + if ($chameleon_isadmin or ($chameleon_isteacher and !empty($CFG->allowcoursethemes) and !empty($THEME->chameleonteachereditenabled))) { + // either we're an admin or we're a teacher and this is being used as the course theme + // if we're on a page using a course theme edit that, otherwise edit the main chameleon theme + // $chameleon_theme = (isset($CFG->coursetheme)) ? $CFG->coursetheme : $CFG->theme; + $chameleon_theme = current_theme(); +?> + + + + + + + + + + diff --git a/theme/custom_corners/ui/chameleon_js.php b/theme/custom_corners/ui/chameleon_js.php new file mode 100644 index 0000000000..94c3e8208c --- /dev/null +++ b/theme/custom_corners/ui/chameleon_js.php @@ -0,0 +1,3134 @@ + + +if (!window.Node) { + var Node = { + ELEMENT_NODE: 1, + ATTRIBUTE_NODE: 2, + TEXT_NODE: 3, + CDATA_SECTION_NODE: 4, + ENTITY_REFERENCE_NODE: 5, + ENTITY_NODE: 6, + PROCESSING_INSTRUCTIONS_NODE: 7, + COMMENT_NODE: 8, + DOCUMENT_NODE: 9, + DOCUMENT_TYPE_NODE: 10, + DOCUMENT_FRAGMENT_NODE: 11, + NOTATION_NODE: 12 + }; +} + + + +String.prototype.trim = function() { + return this.replace(/^\s+|\s+$/g, ''); +}; + + +(function() { + + var struct = []; + var hotspotMode = null; + + var Config = { + THEME_ROOT: '', + REMOTE_URI: '/css.php', + FONTS_LIST: ['verdana, arial, helvetica, sans-serif', '"trebuchet ms", verdana, sans-serif', 'georgia, "trebuchet ms", times, serif', 'Other'], + FONT_WEIGHTS: ['normal', 'bold'], + FONT_STYLES: ['normal', 'italic'], + TEXT_DECORATION: ['none', 'underline', 'overline', 'line-through'], + TEXT_ALIGN: ['left', 'right', 'center', 'justify'], + REPEAT_LIST: ['repeat', 'repeat-x', 'repeat-y', 'no-repeat'], + POSITION_LIST: ['left top', 'left center', 'left bottom', 'center top', 'center center', 'center bottom', 'right top', 'right center', 'right bottom'], + BORDER_LIST: ['solid', 'dotted', 'dashed', 'none'], + UNITS: ['px', 'pt', 'em', '%'], + PROPS_LIST: ['color', 'background-color', 'background-image', 'background-attachment', 'background-position', 'font-family', 'font-size', 'font-weight', 'font-style', 'line-height', 'margin', 'padding', 'border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width', 'border-top-style', 'border-right-style', 'border-bottom-style', 'border-left-style', 'border-top-color', 'border-right-color', 'border-bottom-color', 'border-left-color'] + }; + + + + var Util = { + __registry: {}, + __uniqueId: 0, + + createElement: function(tag, id) { + if (!id) var id = 'chameleon-element-' + ++Util.__uniqueId; + var obj = document.createElement(tag); + obj.setAttribute('id', id); + return obj; + }, + + removeElement: function(obj) { + if (!obj || !obj.parentNode) return false; + + var kids = obj.getElementsByTagName('*'); + if (!kids.length && typeof obj.all != 'undefined') { + kids = obj.all; + } + + var n = kids.length; + while (n--) { + if (kids[n].id && Util.__registry[kids[n].id]) { + Util.__removeAllEvents(kids[n]); + } + } + if (Util.__registry[obj.id]) { + Util.__removeAllEvents(obj); + } + obj.parentNode.removeChild(obj); + }, + + clearElement: function(obj) { + while (obj.hasChildNodes()) { + obj.removeChild(obj.firstChild); + } + }, + + addEvent: function(obj, ev, fn) { + if (!Util.__addToRegistry(obj, ev, fn)) return; + + if (obj.addEventListener) { + obj.addEventListener(ev, fn, false); + } else if (obj.attachEvent) { + obj['e' + ev + fn] = fn; + obj[ev + fn] = function() { + obj['e' + ev + fn](window.event); + }; + obj.attachEvent('on' + ev, obj[ev + fn]); + } + }, + removeEvent: function(obj, ev, fn) { + if (!Util.__removeFromRegistry(obj, ev, fn)) return; + + if (obj.removeEventListener) { + obj.removeEventListener(ev, fn, false); + } else if (obj.detachEvent) { + obj.detachEvent('on' + ev, obj[ev + fn]); + obj[ev + fn] = null; + } + }, + + __getEventId: function(obj) { + if (obj == document) return 'chameleon-doc'; + if (obj == window) return 'chameleon-win'; + if (obj.id) return obj.id; + return false; + }, + __findEvent: function(id, ev, fn) { + var i = Util.__registry[id][ev].length; + while (i--) { + if (Util.__registry[id][ev][i] == fn) { + return i; + } + } + return -1; + }, + __addToRegistry: function(obj, ev, fn) { + var id = Util.__getEventId(obj); + + if (!id) return false; + + if (!Util.__registry[id]) { + Util.__registry[id] = {}; + } + if (!Util.__registry[id][ev]) { + Util.__registry[id][ev] = []; + } + if (Util.__findEvent(id, ev, fn) == -1) { + Util.__registry[id][ev].push(fn); + return true; + } + return false; + }, + __removeFromRegistry: function(obj, ev, fn) { + var id = Util.__getEventId(obj); + + if (!id) return false; + + var pos = Util.__findEvent(id, ev, fn); + if (pos != -1) { + Util.__registry[id][ev].splice(pos, 1); + return true; + } + return false; + }, + __removeAllEvents: function(obj) { + for (var event in Util.__registry[obj.id]) { + var n = Util.__registry[obj.id][event].length; + while (n--) { + Util.removeEvent(obj, event, Util.__registry[obj.id][event][n]); + } + } + }, + + cleanUp: function() { + struct = null; + UI.closeAllBoxes(); + } + }; + + + + + + var Pos = { + getElement: function(obj) { + var x = 0; var y = 0; + if (obj.offsetParent) { + while (obj.offsetParent) { + x += obj.offsetLeft; + y += obj.offsetTop; + obj = obj.offsetParent; + } + } + return {x: x, y: y}; + }, + getMouse: function(e) { + var x = 0; var y = 0; + if (e.pageX || e.pageY) { + x = e.pageX; + y = e.pageY; + } else if (e.clientX || e.clientY) { + x = e.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); + y = e.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); + } + return {x: x, y: y}; + } + }; + + + + + + + + var CSS = { + + __localCSS: {}, + __remoteCSS: {}, + + __localSaveRequired: false, + __remoteSaveRequired: false, + + + requireRemoteSave: function() { + CSS.__remoteSaveRequired = true; + }, + + clearTheme: function() { + /*var links = document.getElementsByTagName('link'); + var n = links.length; + while (n--) { + if (links[n].href && links[n].href.indexOf('') != -1) { + links[n].parentNode.removeChild(links[n]); + break; + } + }*/ + }, + + + loadRemote: function(doSetup) { + if (!Sarissa.IS_ENABLED_XMLHTTP) { + return false; + } + var xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function() { + if (xmlhttp.readyState == 4) { + if (xmlhttp.responseText.indexOf('CHAMELEON_ERROR') != -1) { + alert('There was an error loading from the server:\n' + xmlhttp.responseText.replace(/CHAMELEON_ERROR /, '') + '.'); + return; + } + + CSS.__remoteCSS = CSS.toObject(xmlhttp.responseText); + CSS.__localCSS = CSS.__clone(CSS.__remoteCSS); + CSS.preview(); + if (doSetup) { + setup(); + } + xmlhttp = null; + } + }; + xmlhttp.open('GET', Config.REMOTE_URI + '&nc=' + new Date().getTime(), true); + xmlhttp.send(null); + return true; + }, + + + updateTemp: function(e, reset) { + if (!CSS.__localSaveRequired && !reset) { + UI.statusMsg('There are no changes that need saving!', 'chameleon-notice'); + return; + } + + if (!reset) { + UI.statusMsg('Updating temporary styles on the server...', 'chameleon-working'); + } else { + UI.statusMsg('Deleting temporary styles from the server...', 'chameleon-working'); + } + + var css = CSS.toString(); + var xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function() { + if (xmlhttp.readyState == 4) { + if (xmlhttp.responseText.indexOf('CHAMELEON_ERROR') != -1) { + UI.statusMsg('There was an error saving to the server:\n' + xmlhttp.responseText.replace(/CHAMELEON_ERROR /, '') + '.', 'chameleon-error'); + + } else { + CSS.__localSaveRequired = false; + if (!reset) { + UI.statusMsg('Temporary styles have been updated.', 'chameleon-ok'); + } else { + UI.statusMsg('Temporary styles have been cleared.', 'chameleon-ok'); + } + } + xmlhttp = null; + } + }; + xmlhttp.open('POST', Config.REMOTE_URI + '&temp=1', true); + xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); + xmlhttp.send('css=' + css); + }, + + + updateRemote: function() { + if (!CSS.__remoteSaveRequired) { + UI.statusMsg('There are no changes that need saving!', 'chameleon-notice'); + return; + } + + var css = CSS.toString(CSS.__localCSS); + + UI.statusMsg('Updating styles on the server...', 'chameleon-working'); + var xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function() { + if (xmlhttp.readyState == 4) { + if (xmlhttp.responseText.indexOf('CHAMELEON_ERROR') != -1) { + UI.statusMsg('There was an error saving to the server:\n' + xmlhttp.responseText.replace(/CHAMELEON_ERROR /, '') + '.', 'chameleon-error'); + } else { + CSS.__remoteCSS = CSS.toObject(css); + CSS.__localSaveRequired = false; + CSS.__remoteSaveRequired = false; + UI.statusMsg('Styles have been saved to the server.', 'chameleon-ok'); + } + xmlhttp = null; + } + }; + xmlhttp.open('POST', Config.REMOTE_URI, true); + xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); + xmlhttp.send('css=' + css); + }, + + + + + + + hardReset: function(e, noPrompt) { + if (noPrompt || confirm('Are you sure? This will erase all styles that have not been permanently saved to the server.')) { + CSS.__localCSS = {}; + CSS.updateTemp(null, true); + + CSS.__localCSS = CSS.__clone(CSS.__remoteCSS); + CSS.__localSaveRequired = false; + CSS.__remoteSaveRequired = false; + CSS.preview(); + } + }, + + + + setPropValue: function(prop, value, selector) { + if (!selector) var selector = CSS.Selector.get(); + + if (!CSS.__localCSS[selector]) { + CSS.__localCSS[selector] = {}; + } + + var matches = prop.match(/^border\-([^\-]+)$/); + if (value) { + var func = CSS.__requiresFunction(prop); + if (func && value != 'none') { + CSS.__localCSS[selector][prop] = func + '(' + value + ')'; + } else if (matches) { + CSS.__localCSS[selector]['border-left-' + matches[1]] = value; + CSS.__localCSS[selector]['border-right-' + matches[1]] = value; + CSS.__localCSS[selector]['border-top-' + matches[1]] = value; + CSS.__localCSS[selector]['border-bottom-' + matches[1]] = value; + } else { + CSS.__localCSS[selector][prop] = value; + } + } else { + if (matches) { + CSS.unsetProp('border-left-' + matches[1], selector); + CSS.unsetProp('border-right-' + matches[1], selector); + CSS.unsetProp('border-top-' + matches[1], selector); + CSS.unsetProp('border-bottom-' + matches[1], selector); + } else { + CSS.unsetProp(prop, selector); + } + } + + CSS.__localSaveRequired = true; + CSS.__remoteSaveRequired = true; + CSS.preview(selector); + }, + + getPropValue: function(prop, selector) { + if (!selector) var selector = CSS.Selector.get(); + + if (!CSS.__localCSS[selector] || !CSS.__localCSS[selector][prop]) { + return ''; + } + return CSS.__cleanFunctions(CSS.__localCSS[selector][prop]); + }, + + unsetProp: function(prop, selector) { + if (!selector) var selector = CSS.Selector.get(); + + if (!CSS.__localCSS[selector] || !CSS.__localCSS[selector][prop]) return; + + CSS.__localCSS[selector][prop] = null; + delete CSS.__localCSS[selector][prop]; + + if (!CSS.__hasProps(selector)) { + CSS.__localCSS[selector] = null; + delete CSS.__localCSS[selector]; + } + }, + + + __hasProps: function(selector) { + for (var prop in CSS.__localCSS[selector]) { + if (prop) { + return true; + } + } + return false; + }, + + + + + __cleanFunctions: function(val) { + var toClean = ['url']; + for (var i = 0; i < toClean.length; ++i) { + var start = val.indexOf(toClean[i] + '('); + var end = val.indexOf(')', start); + if (start == -1 || end == -1) { + continue; + } + val = val.slice(start + toClean[i].length + 1, end); + } + return val; + }, + + __requiresFunction: function(prop) { + var fnProps = {}; + fnProps['background-image'] = 'url'; + if (fnProps[prop]) { + return fnProps[prop]; + } + return false; + }, + + + + + fixPath: function(val) { + if (val == 'none') return val; + + var tmp = val.split('('); + if (tmp.length > 1) { + tmp[1] = Config.THEME_ROOT + '/' + tmp[1]; + return tmp.join('('); + } + return Config.THEME_ROOT + '/' + val; + }, + + + + preview: function(sel) { + var styleId = 'chameleon-preview-styles'; + + var h = document.getElementsByTagName('head')[0]; + var s = document.getElementById(styleId); + + if (!s) { + var s = Util.createElement('style', styleId); + s.setAttribute('type', 'text/css'); + h.appendChild(s); + } + + if (navigator.userAgent.toLowerCase().indexOf('msie') != -1 && !window.opera && document.styleSheets && document.styleSheets.length > 0) { + var lastStyle = document.styleSheets[document.styleSheets.length - 1]; + + var ieCrashProtector = /[^a-z0-9 #_:\.\-\*]/i; // some characters appearing in a selector can cause addRule to crash IE in spectacular style - if the selector contains any character outside this list don't try to add to the preview + var ieWarning = false; + + if (sel) { + var matchedSelectors = []; + if (typeof sel == 'string') { + sel = [sel]; + } + var n = lastStyle.rules.length; + while (n--) { + var ns = sel.length; + if (ns == 0) { + break; + } + while (ns--) { + if (sel[ns].match(ieCrashProtector)) { + ieWarning = true; + sel.splice(ns, 1); + break; + } + + if (lastStyle.rules[n].selectorText.toLowerCase() == sel[ns].toLowerCase()) { + matchedSelectors.push(sel[ns]); + sel.splice(ns, 1); + lastStyle.removeRule(n); + break; + } + } + } + matchedSelectors = matchedSelectors.concat(sel); + var sl = matchedSelectors.length; + while (sl--) { + lastStyle.addRule(matchedSelectors[sl], CSS.__propsToString(CSS.__localCSS[matchedSelectors[sl]], true)); + } + } else { + var n = lastStyle.rules.length; + while (n--) { + lastStyle.removeRule(n); + } + + for (var sel in CSS.__localCSS) { + if (sel.match(ieCrashProtector)) { + ieWarning = true; + continue; + } + var dec = CSS.__propsToString(CSS.__localCSS[sel], true); + lastStyle.addRule(sel, dec); + } + } + + if (ieWarning) { + UI.statusMsg('The edited CSS contains content that can not be previewed by Internet Explorer', 'chameleon-notice'); + } + + } else { + Util.clearElement(s); + s.appendChild(document.createTextNode(CSS.toString(CSS.__localCSS, true))); // I think innerHTML would be faster here, but it doesn't work in KHTML browsers (Safari etc) + } + }, + + + + __merge: function() { + var merged = {}; + for (var i = 0; i < arguments.length; ++i) { + for (var sel in arguments[i]) { + var newSelector = false; + if (!merged[sel]) { + merged[sel] = {}; + newSelector = true; + } + for (var prop in arguments[i][sel]) { + merged[sel][prop] = arguments[i][sel][prop]; + } + + if (i > 0 && !newSelector) { + for (var prop in merged[sel]) { + if (!arguments[i][sel][prop]) { + merged[sel][prop] = null; + delete merged[sel][prop]; + } + } + } + } + if (i > 0) { + for (var sel in merged) { + if (!arguments[i][sel]) { + merged[sel] = null; + delete merged[sel]; + } + } + } + } + return merged; + }, + + __clone: function(src) { + var cloned = {}; + for (var sel in src) { + if (!cloned[sel]) { + cloned[sel] = {}; + } + for (var prop in src[sel]) { + cloned[sel][prop] = src[sel][prop]; + } + } + return cloned; + }, + + + toString: function(css, fixpath) { + if (!css) var css = CSS.__localCSS; + + var dec = ''; + for (var sel in css) { + dec += sel + ' ' + CSS.__propsToString(css[sel], fixpath, sel); + } + return dec; + }, + + __propsToString: function(css, fixpath) { + CSS.__Shorthand.border = {}; + + var hasBorder = false; + var col = false; + var importantBorders = []; + + var dec = '{\n'; + for (var prop in css) { + + var includeProp = true; + + if (prop.indexOf('border') != -1 && prop.indexOf('spacing') == -1 && prop.indexOf('collapse') == -1) { + if (css[prop].indexOf('!important') == -1) { + CSS.__Shorthand.recordBorder(prop, css[prop]); + } else { + importantBorders.push({prop: prop, css: css[prop]}); + } + includeProp = false; + hasBorder = true; + } + + if (prop == 'color') { + col = css[prop]; + } + + if (includeProp) { + if (fixpath && (CSS.__requiresFunction(prop) == 'url') && css[prop] != 'none') { + dec += ' ' + prop + ': ' + CSS.fixPath(css[prop]) + ';\n'; + } else { + dec += ' ' + prop + ': ' + css[prop] + ';\n'; + } + } + } + + if (hasBorder) { + dec += CSS.__Shorthand.getBorderString(col); + } + var n; + if (n = importantBorders.length) { + while (n--) { + dec += ' ' + importantBorders[n].prop + ': ' + importantBorders[n].css + ';\n'; + } + } + + dec += '}\n'; + return dec; + }, + + + + + toObject: function(css) { + var cssObj = {}; + var end; + + while (end = css.indexOf('}'), end != -1) { + var cssRule = css.substr(0, end); + var parts = cssRule.split('{'); + var selector = parts.shift() + if (selector.indexOf(',') != -1) { + var selectorArr = selector.split(','); + } else { + var selectorArr = [selector]; + } + + var rules = parts.pop().trim(); + rules = rules.split(';'); + for (var i = 0; i < rules.length; ++i) { + if (rules[i].indexOf(':') == -1) { + break; + } + var rule = rules[i].split(':'); + var prop = rule.shift().trim(); + var val = rule.pop().trim(); + + for (var j = 0; j < selectorArr.length; ++j) { + var noFontPropReset = {}; + + selector = selectorArr[j].trim(); + if (!cssObj[selector]) { + cssObj[selector] = {}; + } + + if (prop != 'font' && (prop.indexOf('font') != -1 || prop == 'line-height')) { + noFontPropReset[prop] = true; + } + + if (prop == 'background') { + CSS.__Shorthand.setBackground(cssObj, selector, val); + } else if (prop == 'font') { + CSS.__Shorthand.setFont(cssObj, selector, val, noFontPropReset); + } else if ((prop == 'border' || prop.match(/^border\-([^-]+)$/)) && prop.indexOf('spacing') == -1 && prop.indexOf('collapse') == -1) { + CSS.__Shorthand.setBorder(cssObj, selector, val, prop); + } else { + cssObj[selector][prop] = val; + } + } + } + css = css.substring(end + 1); + } + return cssObj; + }, + + + + + + getSelectorCSS: function(selector, asObject) { + if (!selector) var selector = CSS.Selector.get(); + + var css = (CSS.__localCSS[selector]) ? CSS.__localCSS[selector] : {}; + if (asObject) { + return css; + } + return selector + ' ' + CSS.__propsToString(css); + }, + + + + saveRequired: function() { + return CSS.__localSaveRequired || CSS.__serverSaveRequired; + }, + + + checkSpec: function(e, selector) { + if (!selector) var selector = CSS.Selector.get(); + if (selector == '') { + UI.statusMsg('First you have to choose which item to style!', 'chameleon-notice'); + return; + } + + var splitSelector = function(selector) { + var selectorEnd = selector.split(' ').pop(); + selectorEnd = selectorEnd.replace(/([\.:#])/g, '|$1'); + return selectorEnd.split('|'); + }; + + var similar = []; + + var selectorBits = splitSelector(selector); + + for (var sel in CSS.__localCSS) { + var selBits = splitSelector(sel); + + var n = selectorBits.length; + + while (n--) { + var match = selectorBits[n]; + var m = selBits.length; + while (m--) { + if (selBits[m] == match) { + var l = similar.length; + var add = true; + while (l--) { + if (similar[l] == sel) { + add = false; + break; + } + } + if (add) { + similar.push(sel); + } + break; + } + } + } + } + + if (similar.length) { + UI.Selector.__displayOverview(null, similar, selector); + } else { + UI.statusMsg('Your file currently contains no selectors that appear similar to "' + selector + '"', 'chameleon-notice'); + } + }, + + + unloadPrompt: function() { + if (CSS.__localSaveRequired) { + if (confirm('You have made changes to the CSS on this page since the last time it was saved, these changes will be lost unless you save them now. Select OK to save a temporary copy or Cancel to continue and discard the unsaved CSS.')) { + CSS.updateTemp(); + } + } + var cookieVal = (CSS.__remoteSaveRequired) ? 1 : 0; + var crumb = new cookie('chameleon_server_save_required', cookieVal, 30, '/', null, null); + crumb.set(); + } + + }; + + + + CSS.Selector = { + + trimmed: [], + full: [], + selector: '', + + create: function() { + CSS.Selector.trimmed = []; + + var n = struct.length; + while (n--) { + if (CSS.Selector.full[n]) { + CSS.Selector.trimmed.push(CSS.Selector.full[n].val); + } + } + CSS.Selector.set(CSS.Selector.trimmed.join(' ')); + }, + + modify: function(e) { + var target = e.target || e.srcElement; + var p = target.position; + + var sel = CSS.Selector.full; + + if (!sel[p]) { + UI.Selector.highlight(target); + sel[p] = {val: target.selectorValue, id: target.id}; + } else if (sel[p].val != target.selectorValue) { + UI.Selector.highlight(target); + UI.Selector.unhighlight(document.getElementById(sel[p].id)); + sel[p] = {val: target.selectorValue, id: target.id}; + } else { + UI.Selector.unhighlight(target); + sel[p] = null; + } + + CSS.Selector.create(); + UI.Selector.displaySelector(CSS.Selector.trimmed); + }, + + set: function(sel) { + CSS.Selector.selector = sel; + }, + + get: function() { + return CSS.Selector.selector; + }, + + reset: function() { + CSS.Selector.trimmed = []; + CSS.Selector.full = []; + CSS.Selector.set(''); + } + }; + + + + CSS.__Shorthand = { + border: {}, + + recordBorder: function(prop, value) { + var pr = prop.split('-') + var p = pr.pop(); + var s = pr.pop(); + if (!CSS.__Shorthand.border[p]) { + CSS.__Shorthand.border[p] = []; + } + if (!CSS.__Shorthand.border[s]) { + CSS.__Shorthand.border[s] = {}; + } + if (!CSS.__Shorthand.border[s][p]) { + CSS.__Shorthand.border[s][p] = []; + } + CSS.__Shorthand.border[p].push({prop: prop, value: value}); + CSS.__Shorthand.border[s][p] = value; + }, + + getBorderString: function(col) { + var cb = CSS.__Shorthand.border; + + var useHowManyProps = function(prop) { + if (!cb['top'] || !cb['right'] || !cb['bottom'] || !cb['left']) { + return false; + } + + if (!(cb['top'][prop] && cb['right'][prop] && cb['bottom'][prop] && cb['left'][prop])) { + return false; + } + + if (cb['top'][prop] == cb['right'][prop] && cb['top'][prop] == cb['bottom'][prop] && cb['top'][prop] == cb['left'][prop]) { + return 1; + } + if (cb['top'][prop] == cb['bottom'][prop] && cb['right'][prop] == cb['left'][prop]) { + return 2; + } + if (cb['right'][prop] == cb['left'][prop]) { + return 3; + } + return 4; + }; + + var getPropShorthand = function(prop) { + var num = useHowManyProps(prop); + if (!num) { + return ''; + } + + if (prop.indexOf('color') != -1) { + var l = inheritColor(cb['left'][prop]); + var r = inheritColor(cb['right'][prop]); + var t = inheritColor(cb['top'][prop]); + var b = inheritColor(cb['bottom'][prop]); + } else { + var l = cb['left'][prop]; + var r = cb['right'][prop]; + var t = cb['top'][prop]; + var b = cb['bottom'][prop]; + } + + var propShorthand = ''; + if (num == 1) { + propShorthand += ' border-' + prop + ': ' + l; + } else if (num == 2) { + propShorthand += ' border-' + prop + ': ' + t + ' ' + l; + } else if (num == 3) { + propShorthand += ' border-' + prop + ': ' + t + ' ' + l + ' ' + b; + } else { + propShorthand += ' border-' + prop + ': ' + t + ' ' + r + ' ' + b + ' ' + l; + } + return propShorthand + ';\n'; + }; + + var propsStr = function(props) { + var str = ''; + for (var i = 0; i < props.length; ++i) { + str += ' ' + props[i].prop + ': ' + ((props[i].prop.indexOf('color') != -1) ? inheritColor(props[i].value) : props[i].value) + ';\n'; + } + return str; + }; + + var inheritColor = function(val) { + if (!col || val != 'inherit') return val; + return col; + }; + + var setImportant = function(str) { + if (!str) return ''; + if (str.indexOf('!important') == -1) return str; + str = str.replace(/ *\!important */g, ' '); + return str.substr(0, str.lastIndexOf(';')) + ' !important;\n'; + }; + + var widthEqual = (cb['width']) ? CSS.__Shorthand.__allPropsEqual(cb['width']) : false; + var styleEqual = (cb['style']) ? CSS.__Shorthand.__allPropsEqual(cb['style']) : false; + var colorEqual = (cb['color']) ? CSS.__Shorthand.__allPropsEqual(cb['color']) : false; + + if (widthEqual && styleEqual && colorEqual) { + var propStr = setImportant(cb['width'][0].value + ' ' + cb['style'][0].value + ' ' + inheritColor(cb['color'][0].value) + ';\n'); + if (cb['left'] && cb['top'] && cb['right'] && cb['bottom']) { + return ' border: ' + propStr; + } + + var sideShorthand = ''; + if (cb['top']) { + sideShorthand += ' border-top: ' + propStr; + } + if (cb['right']) { + sideShorthand += ' border-right: ' + propStr; + } + if (cb['bottom']) { + sideShorthand += ' border-bottom: ' + propStr; + } + if (cb['left']) { + sideShorthand += ' border-left: ' + propStr; + } + return sideShorthand; + } + + var widthProps = getPropShorthand('width'); + if (!widthProps) { + widthProps = (cb['width']) ? propsStr(cb['width']) : ''; + } + var styleProps = getPropShorthand('style'); + if (!styleProps) { + styleProps = (cb['style']) ? propsStr(cb['style']) : ''; + } + var colorProps = getPropShorthand('color'); + if (!colorProps) { + colorProps = (cb['color']) ? propsStr(cb['color']) : ''; + } + + return setImportant(widthProps) + setImportant(styleProps) + setImportant(colorProps); + + }, + + + + + + setBorder: function(css, selector, value, prop) { + var props = {}; + var p = ''; + + props['width'] = { + regexp: /^(thin|medium|thick|0|(\d+(([^%\d]+)|%)))$/, + def: 'medium' + }; + props['style'] = { + regexp: /none|dotted|dashed|solid|double|groove|ridge|inset|outset/, + def: 'none' + }; + props['color'] = { + regexp: /^((rgb\(\d{1,3} *, *\d{1,3} *, *\d{1,3} *\))|(#[A-F0-9]{3}([A-F0-9]{3})?)|([a-z]+))$/i, + def: 'inherit' + }; + + var bits = value.split(' '); + var imp = (bits[bits.length - 1] == '!important') ? ' ' + bits.pop() : ''; + + if (prop == 'border') { + for (var i in props) { + css[selector]['border-top-' + i] = props[i].def; + css[selector]['border-right-' + i] = props[i].def; + css[selector]['border-bottom-' + i] = props[i].def; + css[selector]['border-left-' + i] = props[i].def; + var j = bits.length; + while (j--) { + if (bits[j].match(props[i].regexp)) { + css[selector]['border-top-' + i] = bits[j]; + css[selector]['border-right-' + i] = bits[j]; + css[selector]['border-bottom-' + i] = bits[j]; + css[selector]['border-left-' + i] = bits[j]; + bits.splice(j, 1); + break; + } + } + } + } else if (prop == 'border-left' || prop == 'border-right' || prop == 'border-top' || prop == 'border-bottom') { + for (var i in props) { + css[selector][prop + '-' + i] = props[i].def; + var j = bits.length; + while (j--) { + if (bits[j].match(props[i].regexp)) { + css[selector][prop + '-' + i] = bits[j] + imp; + bits.splice(j, 1); + break; + } + } + } + imp = ''; + + } else if (prop == 'border-width' || prop == 'border-style' || prop == 'border-color') { + var p = prop.split('-').pop(); + var num = bits.length; + if (num == 1) { + css[selector]['border-top-' + p] = bits[0]; + css[selector]['border-right-' + p] = bits[0]; + css[selector]['border-bottom-' + p] = bits[0]; + css[selector]['border-left-' + p] = bits[0]; + } else if (num == 2) { + css[selector]['border-top-' + p] = bits[0]; + css[selector]['border-right-' + p] = bits[1]; + css[selector]['border-bottom-' + p] = bits[0]; + css[selector]['border-left-' + p] = bits[1]; + } else if (num == 3) { + css[selector]['border-top-' + p] = bits[0]; + css[selector]['border-right-' + p] = bits[1]; + css[selector]['border-bottom-' + p] = bits[2]; + css[selector]['border-left-' + p] = bits[1]; + } else if (num == 4) { + css[selector]['border-top-' + p] = bits[0]; + css[selector]['border-right-' + p] = bits[1]; + css[selector]['border-bottom-' + p] = bits[2]; + css[selector]['border-left-' + p] = bits[3]; + } + } + + if (imp != '') { + var sides = ['top', 'right', 'bottom', 'left']; + for (var i = 0; i < 4; ++i) { + for (var j in props) { + if (p != '' && p != j) { + continue; + } + + if (css[selector]['border-' + sides[i] + '-' + j]) { + css[selector]['border-' + sides[i] + '-' + j] += imp; + } + } + } + } + + }, + + + + + setBackground: function(css, selector, value) { + var imp = (value.indexOf('!important') != -1) ? ' !important' : ''; + if (imp != '') { + value = value.replace(/ *\!important */g, ''); + } + + var urlPos = value.indexOf('url('); + if (urlPos == -1 && value.indexOf('none') == -1) { + css[selector]['background-color'] = value + imp; + return; + } else if (urlPos == -1 && value.indexOf(' none') != -1) { + var bits = value.split(' '); + css[selector]['background-color'] = bits[0] + imp; + css[selector]['background-image'] = bits[1] + imp; + return; + } else if (value == 'none') { + css[selector]['background-image'] = value + imp; + return; + } + var bits = value.split('url('); + var endImg = bits[1].indexOf(')'); + if (endImg == -1) { + return; + } + css[selector]['background-image'] = 'url(' + bits[1].substr(0, endImg).replace(/["']+/g, '') + ')' + imp; //" + + var pos = []; + + var bgOptions = bits[1].substring(endImg + 1).split(' '); + var n = bgOptions.length; + + for (var i = 0; i < n; ++i) { + var opt = bgOptions[i].trim(); + if (opt.indexOf('repeat') != -1) { + css[selector]['background-repeat'] = opt + imp; + } else if (opt == 'fixed' || opt == 'scroll') { + css[selector]['background-attachment'] = opt + imp; + } else if (opt != '') { + pos.push(opt); + } + } + if (pos.length == 2) { + css[selector]['background-position'] = pos.join(' ') + imp; + } + var col = bits[0].trim(); + if (col != '') { + css[selector]['background-color'] = col + imp; + } + }, + + setFont: function(css, selector, value, noreset) { + var imp = (value.indexOf('!important') != -1) ? ' !important' : ''; + if (imp != '') { + value = value.replace(/ *\!important */g, ''); + } + + var order = ['font-style', 'font-variant', 'font-weight', 'font-size', 'font-family']; + var numProps = order.length; + var allowedVals = {}; + allowedVals['font-style'] = /(normal|italic|oblique|inherit)/; + allowedVals['font-variant'] = /(normal|small\-caps|inherit)/; + allowedVals['font-weight'] = /(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit)/; + allowedVals['font-size'] = /([^ ]+)/; + allowedVals['font-family'] = /(.+$)/; + + if (!noreset['font-style']) css[selector]['font-style'] = 'normal'; + if (!noreset['font-variant']) css[selector]['font-variant'] = 'normal'; + if (!noreset['font-weight']) css[selector]['font-weight'] = 'normal'; + if (!noreset['font-size']) css[selector]['font-size'] = 'medium'; + if (!noreset['line-height']) css[selector]['line-height'] = 'normal'; + + var expandShorthand = function(bits) { + var numBits = bits.length; + var startProp = 0; + for (var i = 0; i < numBits; ++i) { + if (i > numProps - 1) { + return; + } + for (var j = startProp; j < numProps; ++j) { + if (bits[i].match(allowedVals[order[j]])) { + if (order[j] == 'font-size' && bits[i].indexOf('/') != -1) { + var fsLh = bits[i].split('/'); + css[selector]['font-size'] = fsLh[0] + imp; + css[selector]['line-height'] = fsLh[1] + imp; + } else { + css[selector][order[j]] = bits[i] + imp; + } + startProp = j + 1; + break; + } + } + } + }; + + var removeCommaListSpaces = function(str) { + var comma = str.indexOf(','); + if (comma != -1) { + return str.substr(0, comma) + str.substring(comma).replace(/ +/g, ''); + } + return str; + }; + + var hasQuote = value.match(/(["'])/); //" + if (hasQuote) { + var tmp = value.split(hasQuote[1]); + var bits = removeCommaListSpaces(tmp.shift()).split(' '); + var startFont = bits.pop(); + + expandShorthand(bits); + + css[selector]['font-family'] = startFont + hasQuote[1] + tmp.join(hasQuote[1]) + imp; + } else { + value = removeCommaListSpaces(value); + expandShorthand(value.split(' ')); + } + }, + + + + + __allPropsEqual: function(props) { + var num = props.length - 1; + if (num < 3) return false; + + for (var i = 0; i < num; ++i) { + if (props[i].value != props[i + 1].value) { + return false; + } + } + return true; + } + }; + + + + CSS.FreeEdit = { + + __initial: {}, + + setInitial: function(e) { + var target = e.target || e.srcElement; + + CSS.FreeEdit.__initial = CSS.toObject(target.value); + }, + + saveComplete: function(e) { + var target = e.target || e.srcElement; + target.value = CSS.FreeEdit.__stripComments(target.value); + + CSS.__localCSS = CSS.__merge(CSS.__localCSS, CSS.toObject(target.value)); + + CSS.__localSaveRequired = true; + CSS.__remoteSaveRequired = true; + + CSS.preview(); + }, + + saveSelector: function(e) { + var target = e.target || e.srcElement; + target.value = CSS.FreeEdit.__stripComments(target.value); + + var changedSelectors = []; + var css = CSS.toObject(target.value); + for (var sel in css) { + changedSelectors.push(sel); + if (!CSS.__localCSS[sel]) { + CSS.__localCSS[sel] = {}; + } + for (var prop in css[sel]) { + CSS.__localCSS[sel][prop] = css[sel][prop]; + } + } + + for (var sel in CSS.FreeEdit.__initial) { + if (!css[sel] && CSS.__localCSS[sel]) { + changedSelectors.push(sel); + CSS.__localCSS[sel] = null; + delete CSS.__localCSS[sel]; + continue; + } + for (var prop in CSS.FreeEdit.__initial[sel]) { + if (!css[sel][prop] && CSS.__localCSS[sel][prop]) { + CSS.__localCSS[sel][prop] = null; + delete CSS.__localCSS[sel][prop]; + } + } + } + + CSS.__localSaveRequired = true; + CSS.__remoteSaveRequired = true; + CSS.preview(changedSelectors); + }, + + __stripComments: function(str) { + return str.replace(/\/\*([\s\S])*?\*\//g, ''); + } + + }; + + + + + + + var FileHandler = { + + getFiles: function(path) { + if (!path) path = ''; + var xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function() { + if (xmlhttp.readyState == 4) { + UI.CSS.displayImagePicker(xmlhttp.responseXML); + xmlhttp = null; + } + }; + xmlhttp.open('GET', Config.REMOTE_URI + '&path=' + escape(path) + '&nc=' + new Date().getTime(), true); + xmlhttp.send(null); + return true; + } + }; + + + + + + var UI = { + boxes: [], + boxOffsetX: 35, + boxOffsetY: 30, + zIndex: 9999, + + __dragTargetId: null, + + statusMsg: function(msg, cls) { + UI.clearStatusMsg(); + + var target = UI.__getBox(); + if (!target) { + var box = Util.createElement('div', 'chameleon-status-msg'); + box.appendChild(document.createTextNode(msg)); + box.style.zIndex = ++UI.zIndex; + UI.addToDoc(box); + } else { + + var statusTable = Util.createElement('table', 'chameleon-status-msg'); + var statusTableBody = Util.createElement('tbody'); + var statusRow = Util.createElement('tr'); + var statusIconCell = Util.createElement('td'); + var statusMsgCell = Util.createElement('td'); + var statusBtnCell = Util.createElement('td'); + + if (cls) { + statusIconCell.className = cls; + } + statusMsgCell.appendChild(document.createTextNode(msg)); + statusBtnCell.appendChild(UI.createButton('chameleon-status-msg-btn', 'OK', 'Clear this message', UI.clearStatusMsg)); + + statusRow.appendChild(statusIconCell); + statusRow.appendChild(statusMsgCell); + statusRow.appendChild(statusBtnCell); + statusTableBody.appendChild(statusRow); + statusTable.appendChild(statusTableBody); + + target.appendChild(statusTable); + } + }, + + clearStatusMsg: function() { + var obj = document.getElementById('chameleon-status-msg'); + if (obj) { + Util.removeElement(obj); + } + }, + + addToDoc: function(content) { + document.getElementsByTagName('body')[0].appendChild(content); + }, + + makeDraggableBox: function(id, x, y) { + if ((x + 500) > screen.width) { + var offset = x + 525 - screen.width; + x -= offset; + } + + var box = Util.createElement('div', id); + box.style.left = x + 'px'; + box.style.top = y + 'px'; + box.style.zIndex = ++UI.zIndex; + + var topBar = Util.createElement('div', id + '-handle'); + var closeBtn = Util.createElement('div', id + '-close'); + closeBtn.appendChild(document.createTextNode('x')); + closeBtn.setAttribute('title', 'Close'); + topBar.setAttribute('title', 'Drag me!'); + + UI.__dragTargetId = id + '-handle'; + + Util.addEvent(closeBtn, 'click', UI.closeBoxes); + Util.addEvent(topBar, 'mousedown', UI.__startDrag); + Util.addEvent(topBar, 'mousedown', UI.__bringToFront); + Util.addEvent(topBar, 'mouseup', UI.__stopDrag); + + topBar.appendChild(closeBtn); + box.appendChild(topBar); + + UI.boxes.push(id); + + return box; + }, + + closeAllBoxes: function() { + var n = UI.boxes.length; + while (n--) { + Util.removeElement(document.getElementById(UI.boxes[n])); + UI.boxes.splice(n, 1); + } + UI.__dragTargetId = null; + }, + + closeBoxes: function(e, box) { + if (!box) { + var target = e.target || e.srcElement; + var box = target.parentNode.parentNode; + } + + var n = UI.boxes.length; + while (n--) { + if (UI.boxes[n] == box.id) { + break; + } + Util.removeElement(document.getElementById(UI.boxes[n])); + UI.boxes.splice(n, 1); + } + Util.removeElement(box); + UI.boxes.splice(n, 1); + UI.__dragTargetId = (UI.boxes.length) ? UI.boxes[UI.boxes.length - 1] + '-handle' : null; + }, + + __startDrag: function(e) { + var target = e.target || e.srcElement; + var mouseCoords = Pos.getMouse(e); + var elementCoords = Pos.getElement(target); + target.mouseX = mouseCoords.x - elementCoords.x; + target.mouseY = mouseCoords.y - elementCoords.y; + + UI.__dragTargetId = target.id; + + Util.addEvent(document, 'mousemove', UI.__drag); + }, + + __stopDrag: function(e) { + Util.removeEvent(document, 'mousemove', UI.__drag); + }, + + __drag: function(e) { + var target = document.getElementById(UI.__dragTargetId); + + var mouseCoords = Pos.getMouse(e); + target.parentNode.style.left = (mouseCoords.x - target.mouseX) + 'px'; + target.parentNode.style.top = (mouseCoords.y - target.mouseY) + 'px'; + + if (e.preventDefault) { + e.preventDefault(); + } else if (window.event) { + window.event.returnValue = false; + } + }, + + __bringToFront: function(e) { + var target = e.target || e.srcElement; + target.parentNode.style.zIndex = ++UI.zIndex; + }, + + __getBox: function() { + var obj = document.getElementById(UI.__dragTargetId); + if (obj && obj.parentNode) { + return obj.parentNode; + } + return false; + }, + + + + + setupPane: function(tabs, parentId, tabId, active) { + for (var i = 0; i < tabs.length; ++i) { + var obj = document.getElementById(tabId + '-tab-' + tabs[i]); + if (obj) { + obj.className = tabId + ((active == tabs[i]) ? '-tab-active' : '-tab'); + } + } + + var parent = document.getElementById(parentId); + if (parent && parent.firstChild) { + Util.removeElement(parent.firstChild); + } + return parent; + }, + + setupButtons: function() { + var parentId = arguments[0]; + var parent = document.getElementById(parentId); + if (!parent) return; + + var btns = parent.getElementsByTagName('input'); + for (var i = 0; i < btns.length; ++i) { + btns[i].style.display = 'none'; + } + + for (var i = 1; i < arguments.length; ++i) { + var id = parentId + '-' + arguments[i]; + var btn = document.getElementById(id); + if (btn) { + btn.style.display = 'inline'; + } + } + }, + + createButton: function(id, value, title, fn, hidden) { + var btn = Util.createElement('input', id); + btn.setAttribute('type', 'submit'); + btn.setAttribute('value', value); + btn.setAttribute('title', title); + btn.className = 'chameleon-btn'; + if (hidden) { + btn.style.display = 'none'; + } + + Util.addEvent(btn, 'click', fn); + return btn; + }, + + setOverflow: function(obj, height, forced) { + if (obj.offsetHeight > height || forced) { + obj.style.height = height + 'px'; + obj.style.overflow = 'scroll'; + } + } + }; + + + UI.Selector = { + controlsId: 'chameleon-selector-controls', + viewedProp: null, + displayPropWatch: false, + sections: ['choose', 'overview', 'free-edit'], + + + editWindow: function(e) { + if (!e.shiftKey) { + return; + } + + var target = e.target || e.srcElement; + var tmpStruct = climbTree(target); + if (typeof tmpStruct == 'string') { + return; + } + + hotspotMode = false; + + var box = document.getElementById('chameleon-selector-box'); + if (box) UI.closeBoxes(true, box); + + struct = tmpStruct; + CSS.Selector.reset(); + + var coords = Pos.getMouse(e); + var box = UI.makeDraggableBox('chameleon-selector-box', coords.x, coords.y); + + + var instructions = Util.createElement('p'); + instructions.appendChild(document.createTextNode('Create a CSS selector to edit, browse an overview of your edited styles or edit your complete stylesheet by hand.')); + instructions.className = 'chameleon-instructions'; + box.appendChild(instructions); + + var tabsContainer = Util.createElement('table', 'chameleon-selector-tabs'); + var tabsBody = Util.createElement('tbody'); + var tabs = Util.createElement('tr'); + + tabs.appendChild(UI.Selector.__createTab('Choose', UI.Selector.__editSelector, true, 'Choose')); + tabs.appendChild(UI.Selector.__createTab('Overview', UI.Selector.__displayOverview, false, 'Overview')); + tabs.appendChild(UI.Selector.__createTab('Free Edit', UI.Selector.__editCode, false, 'Free Edit')); + + tabsBody.appendChild(tabs); + tabsContainer.appendChild(tabsBody); + + box.appendChild(tabsContainer); + + var styleControls = Util.createElement('div', UI.Selector.controlsId); + box.appendChild(styleControls); + box.appendChild(UI.Selector.__addButtons()); + + UI.addToDoc(box); + + UI.Selector.__editSelector(); + + if (e.preventDefault) { + e.preventDefault(); + } else if (window.event) { + window.event.returnValue = false; + } + }, + + + __listProps: function(e) { + var target = e.target || e.srcElement; + + Util.removeElement(document.getElementById('chameleon-selector-element-list')); + UI.Selector.viewedProp = target.options[target.selectedIndex].value; + if (!document.getElementById('chameleon-selector-list')) { + target.parentNode.parentNode.appendChild(UI.Selector.__elementList(target.options[target.selectedIndex].value)); + } else { + target.parentNode.parentNode.insertBefore(UI.Selector.__elementList(target.options[target.selectedIndex].value), document.getElementById('chameleon-selector-list')); + } + }, + + __editSelector: function() { + var parent = UI.setupPane(UI.Selector.sections, UI.Selector.controlsId, 'chameleon-selector', 'choose'); + UI.setupButtons('chameleon-selector-buttons', 'edit', 'check'); + + var container = Util.createElement('div'); + + var instructions = Util.createElement('p'); + instructions.appendChild(document.createTextNode('Please choose the element you wish to style.')); + container.appendChild(instructions); + + var options = Util.createElement('p'); + + if (UI.Selector.__displayPropWatch) { + + var selectProp = Util.createElement('select', 'chameleon-selector-prop-select'); + var optionProp = Util.createElement('option'); + optionProp.appendChild(document.createTextNode('Select a CSS property to view')); + optionProp.setAttribute('value', ''); + selectProp.appendChild(optionProp); + + for (var i = 0; i < Config.PROPS_LIST.length; ++i) { + optionProp = Util.createElement('option'); + optionProp.setAttribute('value', Config.PROPS_LIST[i]); + if (UI.Selector.viewedProp == Config.PROPS_LIST[i]) { + optionProp.setAttribute('selected', 'selected'); + } + optionProp.appendChild(document.createTextNode(Config.PROPS_LIST[i])); + selectProp.appendChild(optionProp); + } + + Util.addEvent(selectProp, 'change', UI.Selector.__listProps); + + options.appendChild(selectProp); + + } + + var togglePropWatch = Util.createElement('a'); + togglePropWatch.setAttribute('title', 'The property inspector allows you to check the current value of a range of CSS properties for these elements'); + togglePropWatch.appendChild(document.createTextNode(' (' + (UI.Selector.__displayPropWatch ? 'Hide property inspector' : 'Show property inspector') + ')')); + Util.addEvent(togglePropWatch, 'click', UI.Selector.__togglePropWatch); + options.appendChild(togglePropWatch); + + + container.appendChild(options); + + container.appendChild(UI.Selector.__elementList()); + + parent.appendChild(container); + + UI.Selector.displaySelector(CSS.Selector.trimmed); + }, + + __togglePropWatch: function() { + UI.Selector.__displayPropWatch = !UI.Selector.__displayPropWatch; + UI.Selector.__editSelector(); + }, + + __displayOverview: function(e, selectors, selector) { + var parent = UI.setupPane(UI.Selector.sections, UI.Selector.controlsId, 'chameleon-selector', 'overview'); + UI.setupButtons('chameleon-selector-buttons'); + + var container = Util.createElement('div', 'chameleon-style-overview-container'); + parent.appendChild(container); // doing it this way is much faster than creating the table then applying the overflow + UI.setOverflow(container, 350, true); + + var overviewTable = Util.createElement('table', 'chameleon-style-overview'); + var overviewTableBody = Util.createElement('tbody'); + + if (!selectors) { + + for (var sel in CSS.__localCSS) { + var overviewTableRow = Util.createElement('tr'); + + var overviewTableCell = Util.createElement('th'); + overviewTableCell.className = 'selector'; + overviewTableCell.appendChild(document.createTextNode(sel)); + overviewTableRow.appendChild(overviewTableCell); + overviewTableCell = Util.createElement('td'); + + var overviewEditLink = Util.createElement('a'); + overviewEditLink.value = sel; + overviewEditLink.appendChild(document.createTextNode('[edit]')); + Util.addEvent(overviewEditLink, 'click', UI.CSS.launchEditWindow); + overviewTableCell.className = 'selector'; + overviewTableCell.appendChild(overviewEditLink); + + overviewTableRow.appendChild(overviewTableCell); + overviewTableBody.appendChild(overviewTableRow); + for (var prop in CSS.__localCSS[sel]) { + overviewTableRow = Util.createElement('tr'); + overviewTableCell = Util.createElement('td'); + overviewTableCell.className = 'prop'; + overviewTableCell.appendChild(document.createTextNode(prop)); + overviewTableRow.appendChild(overviewTableCell); + overviewTableCell = Util.createElement('td'); + overviewTableCell.className = 'value'; + overviewTableCell.appendChild(document.createTextNode(CSS.__localCSS[sel][prop])); + overviewTableRow.appendChild(overviewTableCell); + overviewTableBody.appendChild(overviewTableRow); + } + } + } else { + + var n = selectors.length; + + if (!CSS.__localCSS[selector]) { + var overviewTableRow = Util.createElement('tr'); + + var overviewTableCell = Util.createElement('th'); + overviewTableCell.className = 'current-selector'; + overviewTableCell.appendChild(document.createTextNode(selector)); + overviewTableRow.appendChild(overviewTableCell); + overviewTableCell = Util.createElement('td'); + + var overviewEditLink = Util.createElement('a'); + overviewEditLink.value = selector; + overviewEditLink.appendChild(document.createTextNode('[edit]')); + Util.addEvent(overviewEditLink, 'click', UI.CSS.launchEditWindow); + overviewTableCell.className = 'current-selector'; + overviewTableCell.appendChild(overviewEditLink); + + overviewTableRow.appendChild(overviewTableCell); + overviewTableBody.appendChild(overviewTableRow); + } + + for (var i = 0; i < n; ++i) { + var sel = selectors[i]; + + var overviewTableRow = Util.createElement('tr'); + + var overviewTableCell = Util.createElement('th'); + overviewTableCell.className = (sel == selector) ? 'current-selector' : 'selector'; + overviewTableCell.appendChild(document.createTextNode(sel)); + overviewTableRow.appendChild(overviewTableCell); + overviewTableCell = Util.createElement('td'); + + var overviewEditLink = Util.createElement('a'); + overviewEditLink.value = sel; + overviewEditLink.appendChild(document.createTextNode('[edit]')); + Util.addEvent(overviewEditLink, 'click', UI.CSS.launchEditWindow); + overviewTableCell.className = (sel == selector) ? 'current-selector' : 'selector'; + overviewTableCell.appendChild(overviewEditLink); + + overviewTableRow.appendChild(overviewTableCell); + overviewTableBody.appendChild(overviewTableRow); + + for (var prop in CSS.__localCSS[sel]) { + overviewTableRow = Util.createElement('tr'); + overviewTableCell = Util.createElement('td'); + overviewTableCell.className = 'prop'; + overviewTableCell.appendChild(document.createTextNode(prop)); + overviewTableRow.appendChild(overviewTableCell); + overviewTableCell = Util.createElement('td'); + overviewTableCell.className = 'value'; + overviewTableCell.appendChild(document.createTextNode(CSS.__localCSS[sel][prop])); + overviewTableRow.appendChild(overviewTableCell); + overviewTableBody.appendChild(overviewTableRow); + } + } + + } + + overviewTable.appendChild(overviewTableBody); + container.appendChild(overviewTable); + }, + + __elementList: function(showComputedStyle) { + if (!showComputedStyle && UI.Selector.viewedProp) { + showComputedStyle = UI.Selector.viewedProp; + } + + var list = Util.createElement('ol', 'chameleon-selector-element-list'); + var n = struct.length; + var classStr = ''; + var idStr = ''; + + var pseudoClasses = ['link', 'active', 'visited', 'hover', 'focus']; + + while (n--) { + var row = n % 2; + + var item = Util.createElement('li'); + item.className = 'row' + row; + var tag = Util.createElement('span', 'chameleon-tag-name-' + n); + tag.appendChild(document.createTextNode(struct[n].tagname)); + tag.selectorValue = struct[n].tagname; + tag.position = n; + + UI.Selector.__autoHighlight(tag); + + Util.addEvent(tag, 'click', CSS.Selector.modify); + + item.appendChild(tag); + + if (idStr = struct[n].id) { + var id = Util.createElement('span', 'chameleon-id-attr-' + n); + id.selectorValue = struct[n].tagname + '#' + idStr; + id.position = n; + id.appendChild(document.createTextNode('#' + idStr)); + + UI.Selector.__autoHighlight(id); + + Util.addEvent(id, 'click', CSS.Selector.modify); + item.appendChild(id); + } + + if (struct[n].classname) { + var classArr = struct[n].classname.split(' '); + for (var i = 0; i < classArr.length; ++i) { + var cn = Util.createElement('span', 'chameleon-class-attr-' + n + '-' + i); + cn.selectorValue = struct[n].tagname + '.' + classArr[i]; + cn.position = n; + cn.appendChild(document.createTextNode('.' + classArr[i])); + + UI.Selector.__autoHighlight(cn); + + Util.addEvent(cn, 'click', CSS.Selector.modify); + item.appendChild(cn); + } + } + if (struct[n].tagname == 'a') { + for (var i = 0; i < pseudoClasses.length; ++i) { + var pc = Util.createElement('span', 'chameleon-pseudo-class' + n + '-' + i); + pc.selectorValue = struct[n].tagname + ':' + pseudoClasses[i]; + + pc.position = n; + pc.appendChild(document.createTextNode(':' + pseudoClasses[i])); + + UI.Selector.__autoHighlight(pc); + + Util.addEvent(pc, 'click', CSS.Selector.modify); + item.appendChild(pc); + } + } + + if (showComputedStyle) { + var sides = ['top', 'right', 'bottom', 'left']; + + if (document.defaultView && document.defaultView.getComputedStyle) { + if (showComputedStyle == 'margin' || showComputedStyle == 'padding') { + var styleVal = []; + for (var i = 0; i < 4; ++i) { + styleVal.push(document.defaultView.getComputedStyle(struct[n].el, null).getPropertyValue(showComputedStyle + '-' + sides[i])) + } + + if (styleVal[0] == styleVal[1] && styleVal[1] == styleVal[2] && styleVal[2] == styleVal[3]) { + styleVal = styleVal[0]; + } else if (styleVal[0] == styleVal[2] && styleVal[1] == styleVal[3]) { + styleVal = styleVal[0] + ' ' + styleVal[1]; + } else if (styleVal[1] == styleVal[3]) { + styleVal = styleVal[0] + ' ' + styleVal[1] + ' ' + styleVal[2]; + } else { + styleVal = styleVal.join(' '); + } + } else { + var styleVal = document.defaultView.getComputedStyle(struct[n].el, null).getPropertyValue(showComputedStyle); + } + + + if (styleVal.indexOf('rgb') != -1) { + styleVal = UI.Selector.__formatColor(styleVal); + } + + } else if (struct[n].el.currentStyle) { + var propBits = showComputedStyle.split('-'); + for (var i = 1; i < propBits.length; ++i) { + propBits[i] = propBits[i].charAt(0).toUpperCase() + propBits[i].substring(1); + } + var styleVal = struct[n].el.currentStyle[propBits.join('')]; + } + + var sp = Util.createElement('span'); + sp.className = 'prop-value'; + sp.appendChild(document.createTextNode(styleVal)); + + item.appendChild(sp); + } + + + list.appendChild(item); + } + + return list; + }, + + + __formatColor: function(color) { + var newColor = ''; + colorBits = color.replace(/rgb\(|[ \)]/g, '').split(','); + var hexCol = (colorBits[0] << 16 | colorBits[1] << 8 | colorBits[2]).toString(16); + while (hexCol.length < 6) { + hexCol = '0' + hexCol; + } + return '#' + hexCol; + }, + + + __editCode: function() { + var parent = UI.setupPane(UI.Selector.sections, UI.Selector.controlsId, 'chameleon-selector', 'free-edit'); + UI.setupButtons('chameleon-selector-buttons', 'revert', 'save-local', 'save-server'); + + var container = Util.createElement('div'); + var textarea = Util.createElement('textarea', 'chameleon-free-edit-all-field'); + + textarea.style.width = '100%'; + textarea.style.height = '350px'; + Util.addEvent(textarea, 'blur', CSS.FreeEdit.saveComplete); + + container.appendChild(textarea); + + parent.appendChild(container); + textarea.value = CSS.toString(); // avoid Konqueror bug + }, + + + + + __selectorList: function() { + return Util.createElement('ol', 'chameleon-selector-list'); + }, + + + + + __createTab: function(str, fn, active, title) { + var id = 'chameleon-selector-tab-' + str.replace(/ +/, '-').toLowerCase(); + var tab = Util.createElement('td', id); + tab.appendChild(document.createTextNode(((title) ? title : str))); + tab.className = (active) ? 'chameleon-selector-tab-active' : 'chameleon-selector-tab'; + Util.addEvent(tab, 'click', fn); + return tab; + }, + + __addButtons: function() { + var p = Util.createElement('p', 'chameleon-selector-buttons'); + p.style.textAlign = 'right'; + + p.appendChild(UI.createButton('chameleon-selector-buttons-check', 'Compare', 'Check for other similar selectors already in your styles', CSS.checkSpec)); + p.appendChild(UI.createButton('chameleon-selector-buttons-revert', 'Revert', 'Revert to the version currently on the server', CSS.hardReset)); + p.appendChild(UI.createButton('chameleon-selector-buttons-save-local', 'Save Temp', 'Save these changes to a temporary file on the server', CSS.updateTemp)); + p.appendChild(UI.createButton('chameleon-selector-buttons-save-server', 'Save Server', 'Save these changes to the server', CSS.updateRemote)) + p.appendChild(UI.createButton('chameleon-selector-buttons-edit', 'Set Styles', 'Create and edit styles for this CSS selector', UI.CSS.editWindow)); + + return p; + }, + + + + + __autoHighlight: function(el) { + if (CSS.Selector.full[el.position] && CSS.Selector.full[el.position].val == el.selectorValue) { + UI.Selector.highlight(el); + } else { + UI.Selector.unhighlight(el); + } + }, + + highlight: function(el) { + UI.Selector.unhighlight(el); + el.className += 'active-selector'; + }, + + unhighlight: function(el) { + el.className = el.className.replace(/\bactive-selector\b/, ''); + }, + + + + + displaySelector: function(selector) { + var n = selector.length; + + var list = document.getElementById('chameleon-selector-list'); + if (!list && n != 0) { + var parent = document.getElementById(UI.Selector.controlsId).firstChild; + list = UI.Selector.__selectorList(); + parent.appendChild(list); + } else if (list && n == 0) { + Util.removeElement(list); + } else if (list) { + while (list.hasChildNodes()) { + Util.removeElement(list.firstChild); + } + } + + if (n == 0) return; + + var item = Util.createElement('li'); + item.appendChild(document.createTextNode('Style ' + UI.Selector.__describe(selector[--n]))); + list.appendChild(item); + while (n--) { + item = Util.createElement('li'); + item.appendChild(document.createTextNode('That are descended from ' + UI.Selector.__describe(selector[n]))); + list.appendChild(item); + } + + UI.setOverflow(list, 100); + }, + + __describe: function(txt) { + if (!txt) return ''; + + if (txt.indexOf(':') != -1) { + var parts = txt.split(':'); + var pc = ' the "' + parts.pop() + '" state of '; + txt = parts.shift(); + } else { + var pc = ''; + } + + if (txt.indexOf('#') != -1) { + var parts = txt.split('#'); + return pc + parts[0] + ' tags with the id "' + parts[1] + '"'; + } + if (txt.indexOf('.') != -1) { + var parts = txt.split('.'); + return pc + parts[0] + ' tags with the class "' + parts[1] + '"'; + } + return pc + txt + ' tags'; + } + }; + + + + UI.CSS = { + redraw: null, + colorType: null, + controlsId: 'chameleon-style-controls', + sections: ['text', 'backgrounds', 'borders-all', 'borders-separate', 'free-edit'], + + __borderEditGroup: true, + + editWindow: function(e) { + if (CSS.Selector.get() == '') { + UI.statusMsg('First you have to choose which item to style!', 'chameleon-notice'); + return; + } + + var box = document.getElementById('chameleon-style-box'); + if (box) UI.closeBoxes(true, box); + + var coords = Pos.getElement(document.getElementById('chameleon-selector-box')); + var box = UI.makeDraggableBox('chameleon-style-box', coords.x + UI.boxOffsetX, coords.y + UI.boxOffsetY); + + var instructions = Util.createElement('p'); + if (!hotspotMode) { + instructions.appendChild(document.createTextNode('Add/Edit styles for the CSS selector "' + CSS.Selector.get() + '"')); + } else { + instructions.appendChild(document.createTextNode('Add/Edit styles for ' + UI.HotSpots.getString())); + } + instructions.className = 'chameleon-instructions'; + box.appendChild(instructions); + + var tabsContainer = Util.createElement('table', 'chameleon-style-tabs'); + var tabsBody = Util.createElement('tbody'); + var tabs = Util.createElement('tr'); + + tabs.appendChild(UI.CSS.__createTab('Text', UI.CSS.__editText, true, 'Text')); + tabs.appendChild(UI.CSS.__createTab('Backgrounds', UI.CSS.__editBackgrounds, false, 'Backgrounds')); + tabs.appendChild(UI.CSS.__createTab('Borders (All)', UI.CSS.__editBordersAll, false, 'Borders (All)')); + tabs.appendChild(UI.CSS.__createTab('Borders (Separate)', UI.CSS.__editBordersSeparate, false, 'Borders (Separate)')); + tabs.appendChild(UI.CSS.__createTab('Free Edit', UI.CSS.__editCode, false, 'Free Edit')); + + tabsBody.appendChild(tabs); + tabsContainer.appendChild(tabsBody); + + box.appendChild(tabsContainer); + + var styleControls = Util.createElement('div', UI.CSS.controlsId); + box.appendChild(styleControls); + box.appendChild(UI.CSS.__addButtons()); + + UI.addToDoc(box); + + UI.CSS.__editText(); + }, + + + + launchEditWindow: function(e) { + var target = e.target || e.srcElement; + CSS.Selector.set(target.value); + UI.CSS.editWindow(e); + }, + + + __editText: function(e, redraw) { + UI.CSS.redraw = arguments.callee; + UI.CSS.colorType = 'color'; + + var containerTable = document.getElementById('chameleon-style-edit-text-container'); + if (!containerTable) { + var parent = UI.setupPane(UI.CSS.sections, UI.CSS.controlsId, 'chameleon-style', 'text'); + containerTable = Util.createElement('table', 'chameleon-style-edit-text-container'); + var container = Util.createElement('tbody'); + + var row = UI.CSS.__inputField('color', '-input-color', Check.color); + container.appendChild(row.node); + + row = UI.CSS.__selectBox('font-family', '-select-font-family', Check.fontFamily, Config.FONTS_LIST); + container.appendChild(row.node); + + row = UI.CSS.__inputField('font-family', '-input-font-family', Check.fontFamily, !row.meta.sel); + container.appendChild(row.node); + + row = UI.CSS.__inputField('font-size', '-input-font-size', Check.fontSize); + container.appendChild(row.node); + + row = UI.CSS.__inputField('line-height', '-input-line-height', Check.lineHeight); + container.appendChild(row.node); + + row = UI.CSS.__selectBox('font-weight', '-select-font-weight', Check.fontWeight, Config.FONT_WEIGHTS); + container.appendChild(row.node); + + row = UI.CSS.__selectBox('font-style', '-select-font-style', Check.fontStyle, Config.FONT_STYLES); + container.appendChild(row.node); + + row = UI.CSS.__selectBox('text-align', '-select-text-align', Check.textAlign, Config.TEXT_ALIGN); + container.appendChild(row.node); + + row = UI.CSS.__selectBox('text-decoration', '-select-text-decoration', Check.textDecoration, Config.TEXT_DECORATION); + container.appendChild(row.node); + + containerTable.appendChild(container); + parent.appendChild(containerTable); + } else { + if (redraw == 'color') { + UI.CSS.__setColorDisplay(UI.CSS.colorType, UI.CSS.__getPropValue(UI.CSS.colorType)); + } + } + }, + + __editBackgrounds: function(e, redraw) { + UI.CSS.redraw = arguments.callee; + UI.CSS.colorType = 'background-color'; + + var containerTable = document.getElementById('chameleon-style-edit-backgrounds-container'); + if (!containerTable) { + var parent = UI.setupPane(UI.CSS.sections, UI.CSS.controlsId, 'chameleon-style', 'backgrounds'); + containerTable = Util.createElement('table', 'chameleon-style-edit-backgrounds-container'); + var container = Util.createElement('tbody'); + + var row = UI.CSS.__inputField('background-color', '-input-background-color', Check.color); + container.appendChild(row.node); + + row = UI.CSS.__inputField('background-image', '-input-background-image', Check.backgroundImage); + container.appendChild(row.node); + + var extraFields = row.meta; + + row = UI.CSS.__selectBox('background-repeat', '-select-background-repeat', Check.backgroundRepeat, Config.REPEAT_LIST, !extraFields); + container.appendChild(row.node); + + row = UI.CSS.__selectBox('background-position', '-select-background-position', Check.backgroundPosition, Config.POSITION_LIST, !extraFields); + container.appendChild(row.node); + + containerTable.appendChild(container); + parent.appendChild(containerTable); + } else { + if (redraw == 'color') { + UI.CSS.__setColorDisplay(UI.CSS.colorType, UI.CSS.__getPropValue(UI.CSS.colorType)); + } else if (redraw == 'image') { + var val = UI.CSS.__getPropValue('background-image'); + UI.CSS.__setImageDisplay(val); + if (val == 'none' || val == '') { + document.getElementById(UI.CSS.controlsId + '-row-select-background-repeat').style.display = 'none'; + document.getElementById(UI.CSS.controlsId + '-row-select-background-position').style.display = 'none'; + } else { + try { + document.getElementById(UI.CSS.controlsId + '-row-select-background-repeat').style.display = 'table-row'; + document.getElementById(UI.CSS.controlsId + '-row-select-background-position').style.display = 'table-row'; + } catch(e) { + document.getElementById(UI.CSS.controlsId + '-row-select-background-repeat').style.display = 'block'; + document.getElementById(UI.CSS.controlsId + '-row-select-background-position').style.display = 'block'; + } + } + } + } + var imgPreview = document.getElementById('chameleon-image-preview'); + if (imgPreview) { + imgPreview.setAttribute('width', '20'); + imgPreview.setAttribute('height', '20'); + } + }, + + __editBordersAll: function(e, redraw) { + UI.CSS.redraw = arguments.callee; + UI.CSS.colorType = 'border-color'; + + var containerTable = document.getElementById('chameleon-style-edit-borders-all-container'); + if (!containerTable) { + + var parent = UI.setupPane(UI.CSS.sections, UI.CSS.controlsId, 'chameleon-style', 'borders-all'); + containerTable = Util.createElement('table', 'chameleon-style-edit-borders-all-container'); + var container = Util.createElement('tbody'); + + var row = UI.CSS.__inputField('border-width', '-input-border-width', Check.borderWidth); + container.appendChild(row.node); + + row = UI.CSS.__inputField('border-color', '-input-border-color', Check.color); + container.appendChild(row.node); + + row = UI.CSS.__selectBox('border-style', '-select-border-style', Check.borderStyle, Config.BORDER_LIST); + container.appendChild(row.node); + + containerTable.appendChild(container); + parent.appendChild(containerTable); + } else { + if (redraw == 'color') { + UI.CSS.__setColorDisplay(UI.CSS.colorType, UI.CSS.__getPropValue(UI.CSS.colorType)); + } + } + }, + + __editBordersSeparate: function(e, redraw) { + UI.CSS.redraw = arguments.callee; + + var containerTable = document.getElementById('chameleon-style-edit-borders-separate-container'); + if (!containerTable) { + var parent = UI.setupPane(UI.CSS.sections, UI.CSS.controlsId, 'chameleon-style', 'borders-separate'); + containerTable = Util.createElement('table', 'chameleon-style-edit-borders-separate-container'); + var container = Util.createElement('tbody'); + + var row = UI.CSS.__inputField('border-top-width', '-input-border-top-width', Check.borderWidth); + container.appendChild(row.node); + + row = UI.CSS.__inputField('border-top-color', '-input-border-top-color', Check.color, false, UI.CSS.__setColorType); + container.appendChild(row.node); + + row = UI.CSS.__selectBox('border-top-style', '-select-border-top-style', Check.borderStyle, Config.BORDER_LIST); + container.appendChild(row.node); + + + row = UI.CSS.__inputField('border-right-width', '-input-border-right-width', Check.borderWidth); + container.appendChild(row.node); + + row = UI.CSS.__inputField('border-right-color', '-input-border-right-color', Check.color, false, UI.CSS.__setColorType); + container.appendChild(row.node); + + row = UI.CSS.__selectBox('border-right-style', '-select-border-right-style', Check.borderStyle, Config.BORDER_LIST); + container.appendChild(row.node); + + + row = UI.CSS.__inputField('border-bottom-width', '-input-border-bottom-width', Check.borderWidth); + container.appendChild(row.node); + + row = UI.CSS.__inputField('border-bottom-color', '-input-border-bottom-color', Check.color, false, UI.CSS.__setColorType); + container.appendChild(row.node); + + row = UI.CSS.__selectBox('border-bottom-style', '-select-border-bottom-style', Check.borderStyle, Config.BORDER_LIST); + container.appendChild(row.node); + + + row = UI.CSS.__inputField('border-left-width', '-input-border-left-width', Check.borderWidth); + container.appendChild(row.node); + + row = UI.CSS.__inputField('border-left-color', '-input-border-left-color', Check.color, false, UI.CSS.__setColorType); + container.appendChild(row.node); + + row = UI.CSS.__selectBox('border-left-style', '-select-border-left-style', Check.borderStyle, Config.BORDER_LIST); + container.appendChild(row.node); + + containerTable.appendChild(container); + parent.appendChild(containerTable); + } else { + if (redraw == 'color') { + UI.CSS.__setColorDisplay(UI.CSS.colorType, UI.CSS.__getPropValue(UI.CSS.colorType)); + } + } + }, + + __editCode: function(e) { + UI.CSS.redraw = arguments.callee; + + var parent = UI.setupPane(UI.CSS.sections, UI.CSS.controlsId, 'chameleon-style', 'free-edit'); + + var container = Util.createElement('div'); + var textarea = Util.createElement('textarea', 'chameleon-free-edit-field'); + + textarea.style.width = '100%'; + textarea.style.height = '350px'; + + Util.addEvent(textarea, 'focus', CSS.FreeEdit.setInitial); + Util.addEvent(textarea, 'blur', CSS.FreeEdit.saveSelector); + + container.appendChild(textarea); + parent.appendChild(container); + textarea.value = CSS.getSelectorCSS(); // avoid Konqueror bug + }, + + + + + + + + __getPropValue: function(prop) { + var val = UI.CSS.__getBorderPropValue(prop); + if (val === '') { + return false; + } + + if (val === false) { + val = CSS.getPropValue(prop); + } + return val; + }, + + + __setColorDisplay: function(prop, value, field, picker) { + if (!field) var field = document.getElementById(UI.CSS.controlsId + '-input-' + prop); + if (!picker) var picker = document.getElementById(UI.CSS.controlsId + '-color-picker-' + prop); + + if (!field || !picker) return; + + field.value = value; + try { + picker.style.backgroundColor = (value != '') ? value.replace(/[ ]*\!important/, '') : '#000'; + if (!picker.style.backgroundColor) { + UI.statusMsg(value + ' is an Invalid color!', 'chameleon-error'); + } + } catch(e) { + UI.statusMsg(value + ' is an Invalid color!', 'chameleon-error'); + } + }, + + __setImageDisplay: function(value, field, picker) { + if (!field) var field = document.getElementById(UI.CSS.controlsId + '-input-background-image'); + if (!picker) var picker = document.getElementById(UI.CSS.controlsId + '-background-image-picker'); + + var preview = document.getElementById('chameleon-image-preview'); + + if (!field || !picker) return; + + field.value = value; + if (value != '') { + if (!preview) { + preview = Util.createElement('img', 'chameleon-image-preview'); + picker.appendChild(preview); + } + + if (field.value != 'none') { + preview.setAttribute('src', CSS.fixPath(value.replace(/[ ]*\!important/, ''))); + } else { + preview.setAttribute('src', CSS.fixPath('ui/images/none.gif')); + } + preview.setAttribute('title', 'Open image picker'); + Util.addEvent(preview, 'click', UI.CSS.__loadImagePicker); + + picker.style.backgroundColor = 'transparent'; + } else { + if (preview) { + Util.removeElement(preview); + } + picker.style.backgroundColor = '#000'; + picker.setAttribute('title', 'Open image picker'); + Util.addEvent(picker, 'click', UI.CSS.__loadImagePicker); + } + + + }, + + __shorthandWarningIcon: function() { + var img = Util.createElement('img'); + img.setAttribute('src', CSS.fixPath('ui/images/notice.gif')); + img.style.margin = '0 2px -5px 0'; + img.setAttribute('title', 'Currently this property has specific values set for one or more individual sides. Updating the value here will set this property for all sides, overwriting these individual values.'); + return img; + }, + + __inputField: function(prop, id, validate, hidden, init) { + var row = Util.createElement('tr', UI.CSS.controlsId + '-row' + id); + id = UI.CSS.controlsId + id; + + var labelCell = Util.createElement('td'); + var fieldCell = Util.createElement('td'); + + var field = Util.createElement('input', id); + field.setAttribute('type', 'text'); + field.className = 'chameleon-input-text'; + + + var val = UI.CSS.__getPropValue(prop); + if (val !== false) { + field.value = val; + } else { + labelCell.appendChild(UI.CSS.__shorthandWarningIcon()); + } + + Util.addEvent(field, 'blur', validate); + if (init) { + Util.addEvent(field, 'focus', init); + } + + labelCell.appendChild(document.createTextNode(UI.CSS.__formatProp(prop) + ': ')); + labelCell.className = 'label'; + + fieldCell.appendChild(field); + + row.appendChild(labelCell); + row.appendChild(fieldCell); + + if (prop == 'color' || prop.indexOf('-color') != -1) { + var colorCell = Util.createElement('td'); + var colorPicker = Util.createElement('div', UI.CSS.controlsId + '-color-picker-' + prop); + + colorPicker.setAttribute('title', 'Open color picker'); + UI.CSS.__setColorDisplay(prop, field.value, field, colorPicker); + + Util.addEvent(colorPicker, 'click', UI.CSS.__displayColorPicker); + if (init) { + Util.addEvent(colorPicker, 'click', init); + } + + colorCell.appendChild(colorPicker); + row.appendChild(colorCell); + } else if (prop.indexOf('-image') != -1) { + var imgCell = Util.createElement('td'); + var imgPicker = Util.createElement('div', UI.CSS.controlsId + '-background-image-picker'); + + UI.CSS.__setImageDisplay(field.value, field, imgPicker); + + imgCell.appendChild(imgPicker); + row.appendChild(imgCell); + + } else { + fieldCell.setAttribute('colspan', '2'); + } + if (hidden) { + row.style.display = 'none'; + } + return {node: row, meta: (field.value == 'none') ? false : field.value}; + }, + + + __selectBox: function(prop, id, validate, src, hidden) { + var row = Util.createElement('tr', UI.CSS.controlsId + '-row' + id); + id = UI.CSS.controlsId + id; + + var labelCell = Util.createElement('td'); + var fieldCell = Util.createElement('td'); + fieldCell.setAttribute('colspan', '2'); + + var currentValue = UI.CSS.__getPropValue(prop); + if (currentValue === false) { + labelCell.appendChild(UI.CSS.__shorthandWarningIcon()); + currentValue = ''; + } + + labelCell.appendChild(document.createTextNode(UI.CSS.__formatProp(prop) + ': ')); + labelCell.className = 'label'; + + var field = Util.createElement('select', id); + var op = Util.createElement('option'); + op.setAttribute('value', ''); + op.appendChild(document.createTextNode('Please select')); + field.appendChild(op); + + var selected = false; + var otherSelected = false; + + for (var i = 0; i < src.length; ++i) { + op = Util.createElement('option'); + op.setAttribute('value', src[i]); + op.appendChild(document.createTextNode(src[i])); + if (src[i] != 'other' && src[i] == currentValue) { + op.setAttribute('selected', 'selected'); + selected = true; + } else if (src[i].toLowerCase() == 'other' && currentValue != '' && !selected) { + op.setAttribute('selected', 'selected'); + selected = true; + otherSelected = true; + } + field.appendChild(op); + } + + Util.addEvent(field, 'change', validate); + + fieldCell.appendChild(field); + row.appendChild(labelCell); + row.appendChild(fieldCell); + + if (hidden) { + row.style.display = 'none'; + } + + return {node: row, meta: {sel: otherSelected, value: currentValue}}; + }, + + + + __createTab: function(str, fn, active, title) { + var id = 'chameleon-style-tab-' + str.replace(/[\( ]+/, '-').replace(/[\)]+/, '').toLowerCase(); + var tab = Util.createElement('td', id); + tab.appendChild(document.createTextNode((title) ? title : str)); + tab.className = (active) ? 'chameleon-style-tab-active' : 'chameleon-style-tab'; + Util.addEvent(tab, 'click', fn); + return tab; + }, + + __addButtons: function() { + var p = Util.createElement('p', 'chameleon-style-buttons'); + p.style.textAlign = 'right'; + + p.appendChild(UI.createButton('chameleon-style-buttons-revert', 'Revert', 'Discard all temporarily saved changes', CSS.hardReset)); + p.appendChild(UI.createButton('chameleon-style-buttons-save-local', 'Save Temp', 'Save these changes in a temporary file on the server', CSS.updateTemp)); + p.appendChild(UI.createButton('chameleon-style-buttons-save-server', 'Save Server', 'Save these changes to the server', CSS.updateRemote)); + + return p; + }, + + __formatProp: function(txt) { + if (txt.length > 15 && txt.indexOf('-') != -1) { + return txt.split('-').slice(1).join('-'); + } + return txt; + }, + + + + + __loadImagePicker: function(e) { + var target = e.target || e.srcElement; + + if (target.value) { + UI.statusMsg('Loading file list for ' + target.value + '...', 'chameleon-working'); + FileHandler.getFiles(target.value); + } else { + UI.statusMsg('Loading file list...', 'chameleon-working'); + FileHandler.getFiles('root'); + } + }, + + displayImagePicker: function(xmldata) { + UI.clearStatusMsg(); + + var box = document.getElementById('chameleon-file-box'); + if (box) UI.closeBoxes(true, box); + + var coords = Pos.getElement(document.getElementById('chameleon-style-box')); + box = UI.makeDraggableBox('chameleon-file-box', coords.x + UI.boxOffsetX, coords.y + UI.boxOffsetY); + + if (xmldata.firstChild.nodeName.toLowerCase() == 'chameleon_error') { + UI.statusMsg('There was an error reading files from the server:\n' + xmldata.firstChild.firstChild.nodeValue + '.', 'chameleon-error'); + return; + } + + var files = xmldata.firstChild; + var hasFiles = false; + + var infoTable = Util.createElement('table'); + var infoTableBody = Util.createElement('tbody'); + var infoTableRow = Util.createElement('tr'); + + var path = files.getAttribute('path'); + if (path.indexOf('/') != -1) { + var parentPath = path.substring(0, path.lastIndexOf('/')); + var parentCell = Util.createElement('td'); + var parentLink = Util.createElement('p', 'chameleon-files-parent'); + parentLink.value = parentPath; + parentLink.className = 'chameleon-image-folder'; + parentLink.appendChild(document.createTextNode('Parent folder')); + Util.addEvent(parentLink, 'click', UI.CSS.__loadImagePicker); + parentCell.appendChild(parentLink); + infoTableRow.appendChild(parentCell); + } + + var location = Util.createElement('td', 'chameleon-files-location'); + var locationPara = Util.createElement('p'); + var locationTxt = Util.createElement('span'); + locationTxt.appendChild(document.createTextNode('Location: ')); + locationPara.appendChild(locationTxt); + locationPara.appendChild(document.createTextNode(path)); + location.appendChild(locationPara); + + infoTableRow.appendChild(location); + infoTableBody.appendChild(infoTableRow); + infoTable.appendChild(infoTableBody); + box.appendChild(infoTable); + + var fileList = Util.createElement('div'); + + for (var i = 0; i < files.childNodes.length; ++i) { + if (files.childNodes[i].nodeType != Node.ELEMENT_NODE) { + continue; + } + hasFiles = true; + + var fileItemContainer = Util.createElement('p'); + var fileItem = Util.createElement('span'); + fileItem.value = files.childNodes[i].firstChild.nodeValue; + fileItem.appendChild(document.createTextNode(fileItem.value.split('/').pop())); + if (files.childNodes[i].getAttribute('type') == 'img') { + Util.addEvent(fileItem, 'click', Check.backgroundImage); + } else { + fileItemContainer.className = 'chameleon-image-folder'; + Util.addEvent(fileItem, 'click', UI.CSS.__loadImagePicker); + } + fileItemContainer.appendChild(fileItem); + fileList.appendChild(fileItemContainer); + } + + if (!hasFiles) { + var fileItem = Util.createElement('p'); + fileItem.appendChild(document.createTextNode('No images were found in this folder')); + fileList.appendChild(fileItem); + } + + box.appendChild(fileList); + UI.addToDoc(box); + + UI.setOverflow(fileList, 350); + }, + + + + + __displayColorPicker: function(e) { + var box = document.getElementById('chameleon-color-box'); + if (box) UI.closeBoxes(true, box); + + var extraColors = ['000000', '333333', '666666', '999999', 'cccccc', 'ffffff', 'ff0000', '00ff00', '0000ff', 'ffff00', 'ff00ff', '00ffff']; + + var coords = Pos.getElement(document.getElementById('chameleon-style-box')); + box = UI.makeDraggableBox('chameleon-color-box', coords.x + UI.boxOffsetX, coords.y + UI.boxOffsetY); + + var container = Util.createElement('div', 'chameleon-color-palette'); + box.appendChild(container); + + var x = 0; var y = 0; var xx = 0; var yi = 0; + for (var r = 0; r < 256; r += 51) { + for (var g = 0; g < 256; g += 51) { + for (var b = 0; b < 256; b += 51) { + var col = (r << 16 | g << 8 | b).toString(16); + while (col.length < 6) { + col = '0' + col; + } + + yi = (xx > 17) ? 5 : 0; + + var colorTab = Util.createElement('div'); + colorTab.style.position = 'absolute'; + colorTab.style.left = ((15 * x) + 17) + 'px'; + colorTab.style.top = (15 * (yi + y)) + 'px'; + colorTab.style.width = colorTab.style.height = '15px'; + colorTab.style.backgroundColor = colorTab.value = '#' + col; + + colorTab.setAttribute('title', '#' + col); + + container.appendChild(colorTab); + + if (x == 17) { + x = 0; + if (xx == 35) { + xx = 0; + } else { + ++xx; + ++y; + } + } else { + ++x; + ++xx; + } + } + } + } + + for (var i = 0; i < extraColors.length; ++i) { + var colorTab = Util.createElement('div'); + colorTab.style.position = 'absolute'; + colorTab.style.left = '0px'; + colorTab.style.top = (15 * i) + 'px'; + colorTab.style.width = colorTab.style.height = '15px'; + colorTab.style.backgroundColor = colorTab.value = '#' + extraColors[i]; + + colorTab.setAttribute('title', '#' + extraColors[i]); + + container.appendChild(colorTab); + } + + Util.addEvent(container, 'click', Check.color); + + container.style.height = (((y + yi) * 15) + 20) + 'px'; + + UI.addToDoc(box); + }, + + + + __setColorType: function(e) { + var target = e.target || e.srcElement; + + UI.CSS.colorType = UI.CSS.getBorderProp(target.id); + }, + + + getBorderProp: function(id) { + var separators = ['color-picker', 'input', 'select']; + for (var i = 0; i < separators.length; ++i) { + if (id.indexOf('-' + separators[i] + '-') != -1) { + return id.split('-' + separators[i] + '-').pop(); + } + } + return ''; + }, + + __getBorderPropValue: function(prop) { + var matches = prop.match(/^border\-([^\-]+)$/); + if (matches) { + var p1 = CSS.getPropValue('border-left-' + matches[1]); + var p2 = CSS.getPropValue('border-right-' + matches[1]); + var p3 = CSS.getPropValue('border-top-' + matches[1]); + var p4 = CSS.getPropValue('border-bottom-' + matches[1]); + if (!p1 && !p2 && !p3 && !p4) { + return false; + } + + if (!(p1 && p2 && p3 && p4)) { + return ''; + } + + return (p1 == p2 && p2 == p3 && p3 == p4) ? p1 : ''; + } + return false; + } + + }; + + + + UI.HotSpots = { + __selectors: null, + __counter: 0, + __lookup: {}, + + init: function() { + var box = Util.createElement('div', 'chameleon-launch-hotspots'); + box.appendChild(document.createTextNode('Load hotspots')); + box.style.zIndex = ++UI.zIndex; + + box.hotSpotsOn = false; + Util.addEvent(box, 'click', UI.HotSpots.__load); + + UI.addToDoc(box); + }, + + getString: function() { + var sel = CSS.Selector.get(); + if (UI.HotSpots.__selectors[sel]) { + return UI.HotSpots.__selectors[sel] + '.'; + } + return '"' + sel + '"'; + }, + + __load: function(e) { + var target = e.target || e.srcElement; + target.hotSpotsOn = !target.hotSpotsOn; + + UI.HotSpots.__counter = 0; + UI.HotSpots.__lookup = {}; + + if (!target.hotSpotsOn) { + target.firstChild.nodeValue = 'Show hotspots'; + UI.HotSpots.__clear(); + return; + } + target.firstChild.nodeValue = 'Hide hotspots'; + + if (!UI.HotSpots.__selectors) { + UI.HotSpots.__selectors = {}; + UI.HotSpots.__selectors['body'] = 'The body of the page (all pages)'; + UI.HotSpots.__selectors['body#site-index'] = 'The body of the homepage'; + UI.HotSpots.__selectors['body#course-view'] = 'The body of the course index page'; + UI.HotSpots.__selectors['div#header'] = 'The page header'; + UI.HotSpots.__selectors['div#header-home'] = 'The page header on the homepage'; + UI.HotSpots.__selectors['div#header-home h1.headermain'] = 'The header text on the homepage'; + UI.HotSpots.__selectors['div#header h1.headermain'] = 'The header text'; + UI.HotSpots.__selectors['div.sideblock'] = 'Blocks'; + UI.HotSpots.__selectors['td#right-column div.sideblock'] = 'Blocks in the right hand column'; + UI.HotSpots.__selectors['td#left-column div.sideblock'] = 'Blocks in the left hand column'; + UI.HotSpots.__selectors['div.sideblock div.header'] = 'The block headings'; + UI.HotSpots.__selectors['td#right-column div.sideblock div.header'] = 'The block headings in the right hand column'; + UI.HotSpots.__selectors['td#left-column div.sideblock div.header'] = 'The block headings in the left hand column'; + UI.HotSpots.__selectors['div.sideblock div.title'] = 'The text in the block headings'; + UI.HotSpots.__selectors['td#right-column div.sideblock div.title'] = 'The text in the block headings in the right hand column'; + UI.HotSpots.__selectors['td#left-column div.sideblock div.title'] = 'The text in the block headings in the left hand column'; + UI.HotSpots.__selectors['div.headingblock'] = 'The heading at the top of the middle column'; + UI.HotSpots.__selectors['table.topics'] = 'The topic sections in a course'; + UI.HotSpots.__selectors['table.topics td.side'] = 'The sides of the topic sections'; + UI.HotSpots.__selectors['table.topics td.left'] = 'The left side of the topic sections'; + UI.HotSpots.__selectors['table.topics td.right'] = 'The right side of the topic sections'; + UI.HotSpots.__selectors['table.topics tr.current div.summary'] = 'The summary of the highlighted topic'; + UI.HotSpots.__selectors['table.topics tr.current td.content'] = 'The content of the highlighted topic'; + UI.HotSpots.__selectors['a'] = 'Links'; + UI.HotSpots.__selectors['a.dimmed'] = 'Greyed out links'; + UI.HotSpots.__selectors['div#footer'] = 'The footer of the page'; + UI.HotSpots.__selectors['div.logininfo'] = 'The "You are logged in as..." text'; + UI.HotSpots.__selectors['div.navbar'] = 'The navigation bar'; + UI.HotSpots.__selectors['div.breadcrumb'] = 'The navigation trail'; + UI.HotSpots.__selectors['table.generaltable tr.r0'] = 'Odd numbered table rows'; + UI.HotSpots.__selectors['table.generaltable tr.r1'] = 'Even numbered table rows'; + } + + UI.HotSpots.__parse(); + }, + + __parse: function() { + var pos = {}; + + for (var sel in UI.HotSpots.__selectors) { + var matches = cssQuery(sel); + var nm = matches.length; + if (!nm) { + continue; + } + + for (var j = 0; j < nm; ++j) { + if (matches[j].hasAttribute && matches[j].hasAttribute('id') && matches[j].getAttribute('id').indexOf('chameleon') != -1) { + continue; + } + + if (!matches[j].chameleonHotspotId) { + var coords = Pos.getElement(matches[j]); + coords.x = 20 * Math.round(coords.x / 20); + coords.y = 20 * Math.round(coords.y / 20); + + while (pos[coords.x + '-' + coords.y]) { + coords.x += 20; + } + pos[coords.x + '-' + coords.y] = true; + + var button = UI.HotSpots.__makeButton(UI.HotSpots.__selectors[sel], coords.x, coords.y); + UI.addToDoc(button); + + matches[j].chameleonHotspotId = button.id; + UI.HotSpots.__lookup[button.id] = sel; + break; + } else { + UI.HotSpots.__lookup[matches[j].chameleonHotspotId] += '|' + sel; + document.getElementById(matches[j].chameleonHotspotId).title += ", " + UI.HotSpots.__selectors[sel]; + + break; + } + } + } + + pos = null; + matches = null; + }, + + + __clear: function() { + for (var sel in UI.HotSpots.__selectors) { + var matches = cssQuery(sel); + var nm = matches.length; + if (!nm) { + continue; + } + + for (var j = 0; j < nm; ++j) { + if (matches[j].chameleonHotspotId) { + UI.HotSpots.__lookup[matches[j].chameleonHotspotId] = null; + Util.removeElement(document.getElementById(matches[j].chameleonHotspotId)); + matches[j].chameleonHotspotId = null; + break; + } + } + } + }, + + + __makeButton: function(title, x, y) { + var d = Util.createElement('img', 'chameleon-hotspot-' + ++UI.HotSpots.__counter); + d.style.width = d.style.height = '20px'; + d.style.position = 'absolute'; + d.style.left = (x - 5) + 'px'; + d.style.top = (y + 15) + 'px'; + d.style.cursor = 'pointer'; + + d.setAttribute('src', CSS.fixPath('ui/images/hotspot.gif')); + d.setAttribute('title', title); + Util.addEvent(d, 'click', UI.HotSpots.__launch); + return d; + }, + + __launch: function(e) { + var target = e.target || e.srcElement; + var selectors = UI.HotSpots.__lookup[target.id].split('|'); + + var coords = Pos.getMouse(e); + + hotspotMode = true; + + var box = document.getElementById('chameleon-selector-box'); + if (box) UI.closeBoxes(true, box); + + var box = UI.makeDraggableBox('chameleon-selector-box', coords.x, coords.y); + + if (selectors.length > 1) { + var instructions = Util.createElement('p'); + instructions.appendChild(document.createTextNode('This element matches more than one selector, please choose which you would like to style.')); + instructions.className = 'chameleon-instructions'; + box.appendChild(instructions); + } + + var selList = Util.createElement('ul'); + for (var i = 0; i < selectors.length; ++i) { + var item = Util.createElement('li'); + var itemLink = Util.createElement('a'); + itemLink.appendChild(document.createTextNode('Add/Edit styles for ' + UI.HotSpots.__selectors[selectors[i]])); + itemLink.value = selectors[i]; + Util.addEvent(itemLink, 'click', UI.HotSpots.__launchCSSEditor); + + item.appendChild(itemLink); + + selList.appendChild(item); + + box.appendChild(selList); + } + UI.addToDoc(box); + }, + + __launchCSSEditor: function(e, value) { + var target = e.target || e.srcElement; + + if (!value) { + var value = target.value; + } + CSS.Selector.set(value); + UI.CSS.editWindow(e); + } + + }; + + + + + + + var Check = { + color: function(e) { + var target = e.target || e.srcElement; + if (e.type == 'click' && !target.value) return; + + var originalColor = UI.CSS.__getPropValue(UI.CSS.colorType); + if (originalColor != target.value) { + CSS.setPropValue(UI.CSS.colorType, target.value); + UI.CSS.redraw.call(null, null, 'color'); + } + if (e.type == 'click') { + UI.closeBoxes(true, target.parentNode.parentNode); + } + }, + + backgroundImage: function(e) { + var target = e.target || e.srcElement; + + CSS.setPropValue('background-image', target.value); + UI.CSS.redraw.call(null, null, 'image'); + if (e.type == 'click') { + UI.closeBoxes(true, document.getElementById('chameleon-file-box')); + } + }, + + backgroundRepeat: function(e) { + var target = e.target || e.srcElement; + var value = target.options[target.options.selectedIndex].value.toLowerCase(); + CSS.setPropValue('background-repeat', value); + }, + + backgroundPosition: function(e) { + var target = e.target || e.srcElement; + var value = target.options[target.options.selectedIndex].value.toLowerCase(); + CSS.setPropValue('background-position', value); + }, + + borderWidth: function(e) { + var target = e.target || e.srcElement; + + var hasUnits = false; + for (var i = 0; i < Config.UNITS.length; ++i) { + if (target.value.indexOf(Config.UNITS[i]) > 0) { + hasUnits = true; + break; + } + } + + var val = parseInt(target.value); + if (isNaN(val)) { + if (!target.value.match(/thin|medium|thick/)) { + target.value = ''; + } + } else if (!hasUnits) { + target.value = val + 'px'; + } + CSS.setPropValue(UI.CSS.getBorderProp(target.id), target.value); + }, + + borderStyle: function(e) { + var target = e.target || e.srcElement; + var value = target.options[target.options.selectedIndex].value.toLowerCase(); + CSS.setPropValue(UI.CSS.getBorderProp(target.id), value); + }, + + fontStyle: function(e) { + var target = e.target || e.srcElement; + var value = target.options[target.options.selectedIndex].value.toLowerCase(); + CSS.setPropValue('font-style', value); + }, + + fontWeight: function(e) { + var target = e.target || e.srcElement; + var value = target.options[target.options.selectedIndex].value.toLowerCase(); + CSS.setPropValue('font-weight', value); + }, + + fontSize: function(e) { + var target = e.target || e.srcElement; + CSS.setPropValue('font-size', target.value); + }, + + lineHeight: function(e) { + var target = e.target || e.srcElement; + CSS.setPropValue('line-height', target.value); + }, + + fontFamily: function(e) { + var target = e.target || e.srcElement; + var n = target.nodeName.toLowerCase(); + + if (n == 'select') { + var value = target.options[target.options.selectedIndex].value.toLowerCase(); + var fontFamilyInputRow = target.parentNode.parentNode.nextSibling; + if (value == 'other') { + try { + fontFamilyInputRow.style.display = 'table-row'; + } catch(e) { + fontFamilyInputRow.style.display = 'block'; + } + } else { + if (value != '') { + fontFamilyInputRow.style.display = 'none'; + } + CSS.setPropValue('font-family', value); + } + } else { + CSS.setPropValue('font-family', target.value); + } + }, + + textDecoration: function(e) { + var target = e.target || e.srcElement; + var value = target.options[target.options.selectedIndex].value.toLowerCase(); + CSS.setPropValue('text-decoration', value); + }, + + textAlign: function(e) { + var target = e.target || e.srcElement; + var value = target.options[target.options.selectedIndex].value.toLowerCase(); + CSS.setPropValue('text-align', value); + } + }; + + + + + + + + + + + + + + + + var debugMsg = function(msg) { + //if (window.opera) window.opera.postError(msg); + }; + + + + + var climbTree = function(src) { + var struct = []; + while (src.parentNode) { + if (src.nodeType == Node.ELEMENT_NODE) { + if (src.getAttribute && src.getAttribute('id') && src.getAttribute('id').indexOf('chameleon-') != -1) { + return src.getAttribute('id'); + } + var elementObj = {tagname: src.nodeName.toLowerCase()}; + if (src.getAttribute && src.getAttribute('id')) { + elementObj.id = src.getAttribute('id'); + } + if (src.className) { + elementObj.classname = src.className; + } + elementObj.el = src; + struct.push(elementObj); + } + src = src.parentNode; + } + return struct; + }; + + + + var setup = function() { + UI.clearStatusMsg(); + + // UI.HotSpots.init(); + + var crumb = new cookie('chameleon_server_save_required'); + if (crumb.read() == 1) { + CSS.requireRemoteSave(); + } + + Util.addEvent(window, 'unload', CSS.unloadPrompt); + Util.addEvent(window, 'unload', Util.cleanUp); + Util.addEvent(document, 'mousedown', UI.Selector.editWindow); + + //CSS.clearTheme(); + }; + + var startSetup = function() { + UI.statusMsg('Chameleon is loading...'); + + if (!CSS.loadRemote(true)) { + alert('Your browser must support XMLHttpRequest! Supported browsers include Internet Explorer, Mozilla Firefox, Safari and Opera'); + } + }; + + Util.addEvent(window, 'load', startSetup); + +})(); diff --git a/theme/custom_corners/ui/chameleon_ui.css b/theme/custom_corners/ui/chameleon_ui.css new file mode 100644 index 0000000000..63ef82d5a0 --- /dev/null +++ b/theme/custom_corners/ui/chameleon_ui.css @@ -0,0 +1,400 @@ +/* sorry about the massive abuse of !important ;-) this tries to prevent user changes in CSS being +inherited by the user interface */ + +/* general box styles */ +#chameleon-selector-box, #chameleon-style-box, +#chameleon-color-box, #chameleon-file-box, +#chameleon-export-box { + position: absolute !important; + left: 0; top: 0; + margin: 0 !important; padding: 0 !important; + width: 400px !important; + background: #eee !important; + border: 1px solid #ccc !important; + font: 9pt/1.4 arial,helvetica,sans-serif !important; + color: #000 !important; +} + +/* reset */ +#chameleon-selector-box div, #chameleon-style-box div, #chameleon-color-box div, #chameleon-file-box div { + margin: 0 !important; padding: 0 !important; + color: #000 !important; + font: 9pt/1.4 arial,helvetica,sans-serif !important; + border: 0 !important; +} + +#chameleon-selector-box a, #chameleon-style-box a, #chameleon-color-box a, #chameleon-file-box a { + margin: 0 !important; padding: 0 !important; + color: #000 !important; + font: 9pt/1.4 arial,helvetica,sans-serif !important; + border: 0 !important; + background: none !important; +} + +#chameleon-selector-box a, #chameleon-style-box a, #chameleon-color-box a, #chameleon-file-box a { + cursor: pointer !important; +} + +#chameleon-selector-box table, #chameleon-style-box table, #chameleon-color-box table, #chameleon-file-box table, +#chameleon-selector-box tr, #chameleon-style-box tr, #chameleon-color-box tr, #chameleon-file-box tr, +#chameleon-selector-box td, #chameleon-style-box td, #chameleon-color-box td, #chameleon-file-box td, +#chameleon-selector-box th, #chameleon-style-box th, #chameleon-color-box th, #chameleon-file-box th { + padding: 0 !important; + color: #000 !important; + font: 9pt/1.4 arial,helvetica,sans-serif !important; + border: 0 !important; + background: none !important; +} + +#chameleon-selector-box p, #chameleon-style-box p, #chameleon-color-box p, #chameleon-file-box p { + margin: 0 !important; padding: 5px 10px 0 10px !important; + color: #000 !important; + font: 9pt/1.4 arial,helvetica,sans-serif !important; + border: 0 !important; + background: none !important; +} + +/* drag handles */ +#chameleon-selector-box #chameleon-selector-box-handle, +#chameleon-style-box #chameleon-style-box-handle, +#chameleon-color-box #chameleon-color-box-handle, +#chameleon-file-box #chameleon-file-box-handle, +#chameleon-export-box #chameleon-export-box-handle { + width: 100% !important; min-height: 20px !important; _height: 20px !important; + background: #ddd !important; +} + +#chameleon-selector-box #chameleon-selector-box-close, +#chameleon-style-box #chameleon-style-box-close, +#chameleon-color-box #chameleon-color-box-close, +#chameleon-file-box #chameleon-file-box-close { + padding: 1px 5px !important; + float: right !important; + cursor: pointer !important; +} + +/* selector box specific stuff */ +#chameleon-selector-box ol { + list-style-type: none !important; + margin: 0 !important; padding: 10px 20px 10px 10px !important; +} + +#chameleon-selector-box li { + margin: 0 0 2px 0 !important; padding: 0 0 0 20px !important; + color: #000 !important; + font: 9pt/1.4 arial,helvetica,sans-serif !important; + background: url(images/tag.gif) no-repeat 0 0 !important; + position: relative !important; +} +#chameleon-selector-box li.row1 { + background-color: #eee !important; +} + +#chameleon-selector-box #chameleon-selector-list li { + background-image: none !important; +} + +#chameleon-selector-box #chameleon-selector-list { + border: 1px solid #ccc !important; + background: #f6f6f6 !important; + margin: 2px !important; +} + +#chameleon-selector-box #chameleon-selector-list li { + margin: 2px !important; padding: 0 !important; +} + +#chameleon-selector-box span { + padding: 1px 3px !important; + font: 9pt/1.4 arial,helvetica,sans-serif !important; + color: #000 !important; + cursor: pointer !important; +} + +#chameleon-selector-box span.prop-value { + padding-right: 0 !important; + cursor: default !important; + position: absolute !important; + top: 0 !important; right: 0 !important; +} + +* html #chameleon-selector-box span.prop-value { + padding-right: 15px !important; +} + +#chameleon-selector-box span.active-selector { + background: #fff !important; + font-weight: bold !important; +} + +#chameleon-selector-box #chameleon-style-overview-container { + background: #f6f6f6 url(images/grad.gif) repeat-x 0 100% !important; +} + +#chameleon-selector-box #chameleon-style-overview { + margin: 0 !important; padding: 0 !important; + width: 100% !important; + border-collapse: collapse !important; +} + +#chameleon-selector-box #chameleon-style-overview th.selector, +#chameleon-selector-box #chameleon-style-overview th.current-selector { + padding: 1px 5px !important; + background: #000 !important; + color: #fff !important; + font-weight: bold !important; + text-align: left !important; +} + +#chameleon-selector-box #chameleon-style-overview th.current-selector, +#chameleon-selector-box #chameleon-style-overview td.current-selector { + border-top: 2px solid #f90 !important; + border-bottom: 2px solid #f90 !important; +} + +#chameleon-selector-box #chameleon-style-overview td.selector, +#chameleon-selector-box #chameleon-style-overview td.current-selector { + padding: 1px 5px !important; + background: #000 !important; + color: #fff !important; + font-weight: normal !important; + text-align: left !important; +} + +#chameleon-selector-box #chameleon-style-overview td.selector a, +#chameleon-selector-box #chameleon-style-overview td.current-selector a { + color: #f90 !important; + font-weight: bold !important; +} + +#chameleon-selector-box #chameleon-style-overview td.prop { + padding: 1px 0 1px 5px !important; + width: 150px !important; +} + +#chameleon-selector-box #chameleon-style-overview td.value { + padding: 1px 5px 1px 0 !important; +} + +/* style box specific stuff */ + +#chameleon-style-box input.chameleon-input-text { + border: 1px solid #999 !important; + color: #000 !important; + background: #fff none !important; +} + +#chameleon-style-box option, #chameleon-style-box select { + color: #000 !important; + background: #fff none !important; +} + +#chameleon-style-box input.chameleon-input-text:focus { + border: 1px solid #000 !important; + background: #fff none !important; +} + +#chameleon-selector-box input.chameleon-btn, +#chameleon-style-box input.chameleon-btn { + border: 1px solid #000 !important; + background: #aaa none !important; + color: #000 !important; + font-size: 9pt !important; + padding: 2px 5px !important; margin: 0 2px; +} + +#chameleon-selector-box input.chameleon-btn:hover, +#chameleon-style-box input.chameleon-btn:hover { + background: #000 none !important; + color: #fff !important; +} + + +#chameleon-style-box table { + margin: 3px 3px 0 1px !important; + position: relative !important; + z-index: 2 !important; +} + +#chameleon-style-box #chameleon-style-controls, #chameleon-selector-box #chameleon-selector-controls { + position: relative !important; + border: 1px solid #999 !important; + background: #f6f6f6 !important; + margin: -1px 3px 3px 2px !important; + z-index: 1 !important; +} + +#chameleon-style-box #chameleon-style-tabs, #chameleon-selector-box #chameleon-selector-tabs { + position: relative !important; + margin: 3px 3px 0 3px !important; + z-index: 2 !important; +} + +#chameleon-style-box td.chameleon-style-tab, #chameleon-selector-box td.chameleon-selector-tab { + border: 1px solid #999 !important; + border-bottom: 0 !important; + background: transparent url(images/inactive_tab.gif) 0 100% repeat-x !important; + padding: 2px 5px 1px 5px !important; + cursor: pointer !important; +} + +#chameleon-style-box td.chameleon-style-tab-active, #chameleon-selector-box td.chameleon-selector-tab-active { + border: 1px solid #999 !important; + border-bottom: 0 !important; + background: transparent url(images/active_tab.gif) 0 100% repeat-x !important; + padding: 2px 5px 1px 5px !important; +} + + +#chameleon-style-controls td { + text-align: left !important; + padding: 2px !important; +} + +#chameleon-style-controls td.label { + width: 120px !important; + text-align: right !important; +} + +/* the open color picker/image browser icons */ +#chameleon-style-controls #chameleon-style-controls-color-picker-color, +#chameleon-style-controls #chameleon-style-controls-color-picker-background-color, +#chameleon-style-controls #chameleon-style-controls-color-picker-border-color, +#chameleon-style-controls #chameleon-style-controls-color-picker-border-left-color, +#chameleon-style-controls #chameleon-style-controls-color-picker-border-right-color, +#chameleon-style-controls #chameleon-style-controls-color-picker-border-top-color, +#chameleon-style-controls #chameleon-style-controls-color-picker-border-bottom-color, +#chameleon-style-controls #chameleon-style-controls-background-image-picker { + width: 20px !important; height: 20px !important; + border: 1px solid #000 !important; + margin: 0 0 0 2px !important; + cursor: pointer !important; +} + +/* color picker */ +#chameleon-color-box #chameleon-color-palette { + position: relative !important; + margin: 10px 12px !important; +} + +body #chameleon-color-box { + width: 312px !important; +} + +#chameleon-color-box #chameleon-color-palette div { + cursor: pointer !important; +} + +#chameleon-file-box table { + margin: 2px 0 !important; +} + +#chameleon-file-box #chameleon-files-parent { + width: 100px !important; + cursor: pointer !important; +} + +#chameleon-file-box #chameleon-files-location p { + font-weight: bold !important; +} + +#chameleon-file-box #chameleon-files-location p span { + font-weight: normal !important; +} + +#chameleon-file-box div p, #chameleon-file-box table p { + padding: 0 0 0 20px !important; margin: 5px 10px !important; +} + +#chameleon-file-box div p { + background: url(images/image.gif) no-repeat 0 0 !important; +} + +#chameleon-file-box div p.chameleon-image-folder { + background: url(images/folder.gif) no-repeat 0 0 !important; +} + +#chameleon-file-box table p.chameleon-image-folder { + background: url(images/parent.gif) no-repeat 0 0 !important; +} + +#chameleon-file-box div p span { + cursor: pointer !important; +} + +/* the buttons */ + +#chameleon-selector-box input.chameleon-btn, +#chameleon-style-box input.chameleon-btn, +#chameleon-color-box input.chameleon-btn, +#chameleon-file-box input.chameleon-btn { + cursor: pointer !important; + margin-bottom: 3px !important; +} + +#chameleon-selector-box p.chameleon-instructions, #chameleon-style-box p.chameleon-instructions { + font-size: 9pt !important; + padding: 10px !important; +} + +#chameleon-status-msg { + text-align: center !important; +} + +#chameleon-status-msg input { + margin-top: 2px !important; +} + + +div table#chameleon-status-msg { + position: relative !important; + background: #f6f6f6 !important; + width: 390px !important; + margin: 5px auto !important; + border: 1px solid #999 !important; +} + +div table#chameleon-status-msg td.chameleon-ok { + background: #f6f6f6 url(images/ok.gif) no-repeat 50% 50% !important; + width: 25px !important; height: 25px !important; +} + +div table#chameleon-status-msg td.chameleon-working { + background: #f6f6f6 url(images/working.gif) no-repeat 50% 50% !important; + width: 25px !important; height: 25px !important; +} + +div table#chameleon-status-msg td.chameleon-notice { + background: #f6f6f6 url(images/notice.gif) no-repeat 50% 50% !important; + width: 25px !important; height: 25px !important; +} + +div table#chameleon-status-msg td.chameleon-error { + background: #f6f6f6 url(images/error.gif) no-repeat 50% 50% !important; + width: 25px !important; height: 25px !important; +} + +div#chameleon-launch-hotspots, div#chameleon-status-msg { + position: absolute !important; + top: 0 !important; left: 50% !important; + z-index: 2 !important; + background: #f6f6f6 !important; + border: 1px solid #999 !important; + padding: 2px 10px !important; + margin: 0 0 0 -200px !important; + cursor: pointer !important; + color: #000 !important; + width: 400px !important; + font: 9pt/1.4 arial,helvetica,sans-serif !important; + text-align: center !important; +} + +body div#chameleon-launch-hotspots { + width: 200px !important; + margin: 0 0 0 -100px !important; +} + +#chameleon-selector-box ul { + list-style-type: none !important; +} + diff --git a/theme/custom_corners/ui/css.php b/theme/custom_corners/ui/css.php new file mode 100644 index 0000000000..3b78f645ff --- /dev/null +++ b/theme/custom_corners/ui/css.php @@ -0,0 +1,64 @@ +chameleonenabled)) { + die('CHAMELEON_ERROR Editing this theme has been disabled'); +} + +$id = optional_param('id', SITEID, PARAM_INT); +if (!$course = get_record('course', 'id', $id)) { + error('Incorrect course id'); +} + +course_setup($course); // we should not require login here + +if ($id != SITEID and !empty($CFG->allowcoursethemes) and !empty($course->theme) and !empty($THEME->chameleonteachereditenabled)) { + if (!has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $id))) { + die('CHAMELEON_ERROR Either you are not logged in or you are not allowed to edit this theme'); + } +} else if (!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID))) { + die('CHAMELEON_ERROR Either you are not logged in or you are not allowed to edit this theme'); +} + + +require_once('ChameleonCSS.class.php'); +require_once('ChameleonFileBrowser.class.php'); + + + +if (isset($_GET['path'])) { + $fm = new ChameleonFileBrowser; + die($fm->readfiles()); +} + +$chameleon = new ChameleonCSS('../', 'user_styles.css', 'temp_user_styles.css'); + +if (isset($_POST['css'])) { + if (!isset($_GET['temp'])) { + if (!$chameleon->update('perm', $_POST['css'])) { + die('CHAMELEON_ERROR ' . $chameleon->error); + } + if (!$chameleon->update('temp')) { + die('CHAMELEON_ERROR ' . $chameleon->error); + } + } else { + if (!$chameleon->update('temp', $_POST['css'])) { + die('CHAMELEON_ERROR ' . $chameleon->error); + } + } + +} else { + + $css = $chameleon->read(); + if ($css === false) { + echo 'CHAMELEON_ERROR ' . $chameleon->error; + } else { + echo $css; + } +} + + +?> \ No newline at end of file diff --git a/theme/custom_corners/ui/css_query.js b/theme/custom_corners/ui/css_query.js new file mode 100644 index 0000000000..7a6efee85b --- /dev/null +++ b/theme/custom_corners/ui/css_query.js @@ -0,0 +1,356 @@ +/* + cssQuery, version 2.0.2 (2005-08-19) + Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/) + License: http://creativecommons.org/licenses/LGPL/2.1/ +*/ + +// the following functions allow querying of the DOM using CSS selectors +var cssQuery = function() { +var version = "2.0.2"; + +// ----------------------------------------------------------------------- +// main query function +// ----------------------------------------------------------------------- + +var $COMMA = /\s*,\s*/; +var cssQuery = function($selector, $$from) { +try { + var $match = []; + var $useCache = arguments.callee.caching && !$$from; + var $base = ($$from) ? ($$from.constructor == Array) ? $$from : [$$from] : [document]; + // process comma separated selectors + var $$selectors = parseSelector($selector).split($COMMA), i; + for (i = 0; i < $$selectors.length; i++) { + // convert the selector to a stream + $selector = _toStream($$selectors[i]); + // faster chop if it starts with id (MSIE only) + if (isMSIE && $selector.slice(0, 3).join("") == " *#") { + $selector = $selector.slice(2); + $$from = _msie_selectById([], $base, $selector[1]); + } else $$from = $base; + // process the stream + var j = 0, $token, $filter, $arguments, $cacheSelector = ""; + while (j < $selector.length) { + $token = $selector[j++]; + $filter = $selector[j++]; + $cacheSelector += $token + $filter; + // some pseudo-classes allow arguments to be passed + // e.g. nth-child(even) + $arguments = ""; + if ($selector[j] == "(") { + while ($selector[j++] != ")" && j < $selector.length) { + $arguments += $selector[j]; + } + $arguments = $arguments.slice(0, -1); + $cacheSelector += "(" + $arguments + ")"; + } + // process a token/filter pair use cached results if possible + $$from = ($useCache && cache[$cacheSelector]) ? + cache[$cacheSelector] : select($$from, $token, $filter, $arguments); + if ($useCache) cache[$cacheSelector] = $$from; + } + $match = $match.concat($$from); + } + delete cssQuery.error; + return $match; +} catch ($error) { + cssQuery.error = $error; + return []; +}}; + +// ----------------------------------------------------------------------- +// public interface +// ----------------------------------------------------------------------- + +cssQuery.toString = function() { + return "function cssQuery() {\n [version " + version + "]\n}"; +}; + +// caching +var cache = {}; +cssQuery.caching = false; +cssQuery.clearCache = function($selector) { + if ($selector) { + $selector = _toStream($selector).join(""); + delete cache[$selector]; + } else cache = {}; +}; + +// allow extensions +var modules = {}; +var loaded = false; +cssQuery.addModule = function($name, $script) { + if (loaded) eval("$script=" + String($script)); + modules[$name] = new $script();; +}; + +// hackery +cssQuery.valueOf = function($code) { + return $code ? eval($code) : this; +}; + +// ----------------------------------------------------------------------- +// declarations +// ----------------------------------------------------------------------- + +var selectors = {}; +var pseudoClasses = {}; +// a safari bug means that these have to be declared here +var AttributeSelector = {match: /\[([\w-]+(\|[\w-]+)?)\s*(\W?=)?\s*([^\]]*)\]/}; +var attributeSelectors = []; + +// ----------------------------------------------------------------------- +// selectors +// ----------------------------------------------------------------------- + +// descendant selector +selectors[" "] = function($results, $from, $tagName, $namespace) { + // loop through current selection + var $element, i, j; + for (i = 0; i < $from.length; i++) { + // get descendants + var $subset = getElementsByTagName($from[i], $tagName, $namespace); + // loop through descendants and add to results selection + for (j = 0; ($element = $subset[j]); j++) { + if (thisElement($element) && compareNamespace($element, $namespace)) + $results.push($element); + } + } +}; + +// ID selector +selectors["#"] = function($results, $from, $id) { + // loop through current selection and check ID + var $element, j; + for (j = 0; ($element = $from[j]); j++) if ($element.id == $id) $results.push($element); +}; + +// class selector +selectors["."] = function($results, $from, $className) { + // create a RegExp version of the class + $className = new RegExp("(^|\\s)" + $className + "(\\s|$)"); + // loop through current selection and check class + var $element, i; + for (i = 0; ($element = $from[i]); i++) + if ($className.test($element.className)) $results.push($element); +}; + +// pseudo-class selector +selectors[":"] = function($results, $from, $pseudoClass, $arguments) { + // retrieve the cssQuery pseudo-class function + var $test = pseudoClasses[$pseudoClass], $element, i; + // loop through current selection and apply pseudo-class filter + if ($test) for (i = 0; ($element = $from[i]); i++) + // if the cssQuery pseudo-class function returns "true" add the element + if ($test($element, $arguments)) $results.push($element); +}; + +// ----------------------------------------------------------------------- +// pseudo-classes +// ----------------------------------------------------------------------- + +pseudoClasses["link"] = function($element) { + var $document = getDocument($element); + if ($document.links) for (var i = 0; i < $document.links.length; i++) { + if ($document.links[i] == $element) return true; + } +}; + +pseudoClasses["visited"] = function($element) { + // can't do this without jiggery-pokery +}; + +// ----------------------------------------------------------------------- +// DOM traversal +// ----------------------------------------------------------------------- + +// IE5/6 includes comments (LOL) in it's elements collections. +// so we have to check for this. the test is tagName != "!". LOL (again). +var thisElement = function($element) { + return ($element && $element.nodeType == 1 && $element.tagName != "!") ? $element : null; +}; + +// return the previous element to the supplied element +// previousSibling is not good enough as it might return a text or comment node +var previousElementSibling = function($element) { + while ($element && ($element = $element.previousSibling) && !thisElement($element)) continue; + return $element; +}; + +// return the next element to the supplied element +var nextElementSibling = function($element) { + while ($element && ($element = $element.nextSibling) && !thisElement($element)) continue; + return $element; +}; + +// return the first child ELEMENT of an element +// NOT the first child node (though they may be the same thing) +var firstElementChild = function($element) { + return thisElement($element.firstChild) || nextElementSibling($element.firstChild); +}; + +var lastElementChild = function($element) { + return thisElement($element.lastChild) || previousElementSibling($element.lastChild); +}; + +// return child elements of an element (not child nodes) +var childElements = function($element) { + var $childElements = []; + $element = firstElementChild($element); + while ($element) { + $childElements.push($element); + $element = nextElementSibling($element); + } + return $childElements; +}; + +// ----------------------------------------------------------------------- +// browser compatibility +// ----------------------------------------------------------------------- + +// all of the functions in this section can be overwritten. the default +// configuration is for IE. The functions below reflect this. standard +// methods are included in a separate module. It would probably be better +// the other way round of course but this makes it easier to keep IE7 trim. + +var isMSIE = true; + +var isXML = function($element) { + var $document = getDocument($element); + return (typeof $document.mimeType == "unknown") ? + /\.xml$/i.test($document.URL) : + Boolean($document.mimeType == "XML Document"); +}; + +// return the element's containing document +var getDocument = function($element) { + return $element.ownerDocument || $element.document; +}; + +var getElementsByTagName = function($element, $tagName) { + return ($tagName == "*" && $element.all) ? $element.all : $element.getElementsByTagName($tagName); +}; + +var compareTagName = function($element, $tagName, $namespace) { + if ($tagName == "*") return thisElement($element); + if (!compareNamespace($element, $namespace)) return false; + if (!isXML($element)) $tagName = $tagName.toUpperCase(); + return $element.tagName == $tagName; +}; + +var compareNamespace = function($element, $namespace) { + return !$namespace || ($namespace == "*") || ($element.scopeName == $namespace); +}; + +var getTextContent = function($element) { + return $element.innerText; +}; + +function _msie_selectById($results, $from, id) { + var $match, i, j; + for (i = 0; i < $from.length; i++) { + if ($match = $from[i].all.item(id)) { + if ($match.id == id) $results.push($match); + else if ($match.length != null) { + for (j = 0; j < $match.length; j++) { + if ($match[j].id == id) $results.push($match[j]); + } + } + } + } + return $results; +}; + +// for IE5.0 +if (![].push) Array.prototype.push = function() { + for (var i = 0; i < arguments.length; i++) { + this[this.length] = arguments[i]; + } + return this.length; +}; + +// ----------------------------------------------------------------------- +// query support +// ----------------------------------------------------------------------- + +// select a set of matching elements. +// "from" is an array of elements. +// "token" is a character representing the type of filter +// e.g. ">" means child selector +// "filter" represents the tag name, id or class name that is being selected +// the function returns an array of matching elements +var $NAMESPACE = /\|/; +function select($$from, $token, $filter, $arguments) { + if ($NAMESPACE.test($filter)) { + $filter = $filter.split($NAMESPACE); + $arguments = $filter[0]; + $filter = $filter[1]; + } + var $results = []; + if (selectors[$token]) { + selectors[$token]($results, $$from, $filter, $arguments); + } + return $results; +}; + +// ----------------------------------------------------------------------- +// parsing +// ----------------------------------------------------------------------- + +// convert css selectors to a stream of tokens and filters +// it's not a real stream. it's just an array of strings. +var $STANDARD_SELECT = /^[^\s>+~]/; +var $$STREAM = /[\s#.:>+~()@]|[^\s#.:>+~()@]+/g; +function _toStream($selector) { + if ($STANDARD_SELECT.test($selector)) $selector = " " + $selector; + return $selector.match($$STREAM) || []; +}; + +var $WHITESPACE = /\s*([\s>+~(),]|^|$)\s*/g; +var $IMPLIED_ALL = /([\s>+~,]|[^(]\+|^)([#.:@])/g; +var parseSelector = function($selector) { + return $selector + // trim whitespace + .replace($WHITESPACE, "$1") + // e.g. ".class1" --> "*.class1" + .replace($IMPLIED_ALL, "$1*$2"); +}; + +var Quote = { + toString: function() {return "'"}, + match: /^('[^']*')|("[^"]*")$/, + test: function($string) { + return this.match.test($string); + }, + add: function($string) { + return this.test($string) ? $string : this + $string + this; + }, + remove: function($string) { + return this.test($string) ? $string.slice(1, -1) : $string; + } +}; + +var getText = function($text) { + return Quote.remove($text); +}; + +var $ESCAPE = /([\/()[\]?{}|*+-])/g; +function regEscape($string) { + return $string.replace($ESCAPE, "\\$1"); +}; + +// ----------------------------------------------------------------------- +// modules +// ----------------------------------------------------------------------- + +// -------- >> insert modules here for packaging << -------- \\ + +loaded = true; + +// ----------------------------------------------------------------------- +// return the query function +// ----------------------------------------------------------------------- + +return cssQuery; + +}(); // cssQuery diff --git a/theme/custom_corners/ui/images/active_tab.gif b/theme/custom_corners/ui/images/active_tab.gif new file mode 100644 index 0000000000000000000000000000000000000000..8cd27e9431d0f3e411667fcf5d4ab89cc1184d6a GIT binary patch literal 207 zcmZ?wbhEHbWMzN%PoKYj18VvT1n=Jib$|d+;PdCtKr_C5`}X0(2awK>AK$%u zr}&eF0R(hF1jtSXR-XszeJPoB4ICn&iIJi;ve#=0n+_Ppye|+~knW*VB{DaKeWp)} um0)_B*9id=Nnhu~u{8Mm^g+GtF32u?-2?uB`K5S@vpT!Vd|h4ho$O3*s;*wHp-jR80DDWW5v(!x9Vi zURL>YY11Vgv$M0^Dk14UHLb0!ttAVo4GE$c644$N+1c6VLOadP&A1K-^=oD2G%N2; zM!^#c?Mp)GIWPkQ1Ck2{2nYzR4hi&aW~o9wqYet;E+w=V5dLyy?L|8NY+&kgZ0g{aB1;PMZ*~p(IFYV4+-;OS@2Isg&+*Q84~eJL+?R1>OnWT z5)6$B2mNkis~Hm7A{x683Gq=#*C!tENI&C6JkJ>r*eoRTURd___Ve@e?d|RG@bL9+ zXY_7o@m5apQc3Uc@BD3J&8Mc{-`~X-5d8D=^z`(qs;cqv@$_$I+Dbyi9v6-m65=Nw z-83u8Fevg&L!mP-z+hXtFB5_Z2+=<`+#wj}E++MGYRJgQ^V-@wv6W zHyaWX5!rWg?W(7?DI&WS4zwx{_T%DW2nX|JUF`O$=n3nKW zO_U}f#C>|u7Z3GhTfG+$#YHN~Q8@9<%=Knq+bJK{A{o^r8uoH&pClf_JtDlkywp%h z4-N|SZe`gjA?PiTUGLMYyWLx<55WO zP)F!eO3E4&-HwXM9Tm^U#+PDQLHAM#B^@=itdZ)fI4 zKiW4h^>1k1H7o@P1<8PY>&V8~B^=x)9jO)%|8QdCHZAUgedaPM<~A*|Zfm-9aQJ6k z^HWOepq%nhNa{m7tv4~?EhG2v@V+A(z#A0Ttg7~LXz$_S0RaK4tE<)3)$Hu-?(XjO z_4NP%0RR90EC2ui02BZe000R80NwN(NU)$mf&z&Mp(4Z*E+G&h;=>nFh^;sM`~gsr z;m;p?vt}7nKvIDdC;l|V>E{hVl@TIDw3#_mi%l(U{LSFUatRMD7lH<*V~Wm&6e-yG zgTa#s08kUG05K;Dh_*e!(xmC|#b3Ur0JNkCRqS6oHNyV=%kkt3HLp!oT<`)2lG?i= zwn;cQ2yQyb%XK9CqlThj#eUPe1@WpaTu0 literal 0 HcmV?d00001 diff --git a/theme/custom_corners/ui/images/folder.gif b/theme/custom_corners/ui/images/folder.gif new file mode 100644 index 0000000000000000000000000000000000000000..81230c66f7594e948effdfb459ed68992bb5ddbf GIT binary patch literal 394 zcmV;50d@XINk%w1VGsZi0M!5hR7pvkoSgre0Jm`f`07#r^_j-T#{cC2qk>1#w?zN{ zroEp>d~I$2{@#FqfdAkr#kp(9v#o|-LjS!0>+9?P?u+i%TD6lu|KS|}|IDzXiJXXQ z|Nnc8Yf^k-TJ+5)wv|->_yynJ-}&xts-3K@bs4&_z2MDau8dm$|GbrUZq$JS|NJ}h z-7b1iIRCH!|JV}$|L*zu|HP*x|I7gY@*mXH)YG>nj*gDXz{~&nrMH=Du8wW7jv4>_ zTmS$6A^8La6aYT}EC2ui01yBW000K3z@KnPEE3y#pmxWJR%MW3KcqsIt7Xa6(2k{I5!+46_phn zlMgf#C^-Q)J_MLPp_-d72qq*mEG+~qEHwu-n-i!cCKoj@H6aJHr!N8}0R}w2A-=P= o!U6*hHU>8>Ee{wlFu^Y?3{nOGI5-Xr3?AkZ5-tD~Nk>5dI|bFT&;S4c literal 0 HcmV?d00001 diff --git a/theme/custom_corners/ui/images/grad.gif b/theme/custom_corners/ui/images/grad.gif new file mode 100644 index 0000000000000000000000000000000000000000..21669ac495948342ee3df38ca16ddca6cbfa51ca GIT binary patch literal 1174 zcmeH`+iO%;6vj^+O)??ciI>snh?5wj#tV~BF^Li~@sd#x?Tb{&!?X%2C@2&)6v}jF zVjFK6721Fz$G1RVe6UbNBr&2v#O6Ut`*8L-d!Nfb=j?s%mqJnO_K)z*wVoDht&iXO zU=1JG-`n@iBJL#jFUJ7@f*|mHUy>w6QFL98qDYoyQ50R*g%CQ9Ln-w<&oB%^2*%j9 zZBHdC~14QnD0B?)3( zcO2XEeKyU!A%xBAuIEvUvXe|=DvBy2q-j``L|I0LZXi}8S;v?VGYA8VTCVFz5Mr!D zgiMn#I8{-QEQhRXQ6LDEP(_xpjwvN!7*T2o0Qk&A&ke&+5QI36xzF*59oYI&|Kl%k zjUTvW$xPuPKT~O3)-_U?FORKE4?Ha1()a93q+dPB)#fV0iEO^VrTT38dTaJbWsB!{#w7GX~$&K@A)g;tv!Ft z)uwCL78YmT9LS*;H(J)Grv(1!x!U$M?F;`&?HsD6x3w1^JgX!owq$xc;QF6tvpvnX zb6>xn9ADS@)q=6n`AW~dhJ!hAw5ZKg|J>YJ-F|!M=TyVgwcg3{>uH*()8U+cQR)-DRV;)l4J7Tr_HVHbzih>TKYr5ZEO4Q&hCMu_m1WHU3II#hgIKq z`|nGm!MVTqKK|vQvBZk5Vr?Qnytw(|^0!C$!7EEz-;JmE#xLjdv*|>~6kqPhUKpx$ z{9T+)Zp@ZStJB9X|5(3rBsIH;dtNG~SD$9icHY1IZ9|nSmXq9fd^x!`bD`SQl`R+6 V^~btAF<8G@sqIaV7Y4aq{{x;m46pzI literal 0 HcmV?d00001 diff --git a/theme/custom_corners/ui/images/hotspot.gif b/theme/custom_corners/ui/images/hotspot.gif new file mode 100644 index 0000000000000000000000000000000000000000..870f5c018be9754911bd5fe1fdf08c0733f05e03 GIT binary patch literal 1170 zcmZ?wbhEHb6k!ly_|CwE_{DyLRnq zaegOW?#-Jw&*kO*`0?ZW_wT1onVgrG_o^s|m4o$jV&sPpA5v3OnHU&8xY@pUG(UX! z@cWdQMRu0QMERyon`X(y`7t%NOHAkxKj)XY(3^^q{r&x)<0AZ&6lTtxxnji%US8g3 zPS)oo1*WJdymPi$Vr%Kh%XM8{?yalUUVhFUd>jruT-Tj#uBu3X3h?+8=J&u<=ZcGc zSXh`CH}{lDlkRFMzKf5%p|5^cT4?d&#aA`tU%!6+($3VCjpgjwv#VCE;$&rU;^Wyb z$n`Zh#a>E6OG`^eRZ@bN$4y%Df~4RZOZ{(I$?wwQUIck{Ns4?gNPU|cC(6xzT21b( zjOeq_fKQ>mUt)q!iSb>%di8yvS4Bm|Q3;_vd-e!(a|v^Deol&JWoC926PaRSASEX1 zA}sjC$@-WmuRRaf=j51AAwFy@EH{;Z7;w zdk_1mlP7QF<@}r+drnF)A|m2*Qk0Ac|3x{`M;h`A7cP9Dr&`X*_BA#{PgL|xTHHAq z;a9QYk24bI%$f78AoHb_;iO5E?(3^vl@lv3FTbv>^wdOW<;s=s0zF?PML%$~XeueT z;pWWE&HY!DI(zo)`}gmEjtieLV@7Cb=;vUspFe*xGBPqVGp}B~`rW&CU%!53U|{(F z|38o%3_$TG3)mStAQF@(7&!hjuscY5Y*^sf#KdUQ9dw*m%Q<7mj|r2~PR>e`I4{s3 zrpv&j>-VMPQNh#jh5nl*d}j!pZD7q1VY;%ZsOyNZpQ1%hqwC4QR^f{xHqD+o6Q#l{ zIA*?>(CIG_nesxT`&xoV1H+O-GP9eVq;w^E_r2kq>ga5e9>yHP@L2o&l+;TuTX!-( zZ*9{`U#oP1(d&YqS;11#;)Bc*`k_o0oR~Lgy0^)8++&$0cCdc}ld6G6o?2$xTBWoZ zKGUWtc~6h%Y&Sbx#ByClpT{j&Oi@jLOPWr^!w)7Z+qT?4Fj4o?8Y>|I>!o5hCj9;F z_v$ul(b8Q{6xlxC-+L-zs^ik5OddsUtMet)9Glj8v5O^lEneX%pIA`OQvHQJpo!(8 zT~DMz@YLg8InVAI=4jLQS6+8Bvml5hP*)G9wkof`&3xhQPjRLJ} literal 0 HcmV?d00001 diff --git a/theme/custom_corners/ui/images/image.gif b/theme/custom_corners/ui/images/image.gif new file mode 100644 index 0000000000000000000000000000000000000000..f4366003edf38d2751f0cf4b085a25561939e544 GIT binary patch literal 397 zcmV;80doFFNk%w1VGsZi0M!5h0002U%Fm>vrCV`u042@l=I?W<&U<@%5++W?*W|dk zwmE{(h0FgTA|ek{|3_kJHeHxgr~EU3|3!SX_xJmqot@U!+@0M29xs=6!1+H$L#?Z( zOp?q`hO{awDiln~Z@>RWmi!t!ZI-sZ-rnZ#@AeD~3f|b*JZiIyjEk<|{&=s~zrVsD zL$xPw`eS2RA}uk@%*<+-xc~qEj?VwAtgQz+$lu)A00RwJdXHna{~1~{wz(NOVM?x+K!Hf=Y7_>Y?2e;9GX$BWQJSrC%5fUGNX)7ueGYJMc93hKm zfB`ZC3NtSc13L={JvCY}4FDP=9v(0NA|@=RKQ%EX001Vqxi~nprydQ%#KRsjv;q_s r%+1av6;2ftCDjGj*agti6eQl?-xk|XGu7tj1z1i)MMp_VO+f%V_*|_K literal 0 HcmV?d00001 diff --git a/theme/custom_corners/ui/images/inactive_tab.gif b/theme/custom_corners/ui/images/inactive_tab.gif new file mode 100644 index 0000000000000000000000000000000000000000..0c58287bd25aa0e091011ae569f3303a39ea0a24 GIT binary patch literal 201 zcmV;)05<+S<*`&Ck%!&d$%<+uYjP+S}XO+uPgQ+}q5} z&Ct-%+S%I8&Cb}_*xB0J+1c6H*x1m}(9O-w)YR0`(b3h_)zZ?^+}zyO*4ES0)7RJ6 z&d$!=-QCR0%>V!YA^8LW0018VEC2ui00jUU000F>U?+}biIG^E7DZAZL2wws^B51~ zKz!u?n_w_QBwCI~ic+a*HZM?UWjd8CBv`-zpd}DE0FIb5;WQ@bi9)dUxZj_6JOltc DwJCA5 literal 0 HcmV?d00001 diff --git a/theme/custom_corners/ui/images/none.gif b/theme/custom_corners/ui/images/none.gif new file mode 100644 index 0000000000000000000000000000000000000000..8fd24d720791517c350b660164cabe2062e9d270 GIT binary patch literal 463 zcmZ?wbhEHblw^=(xXQrrNlNOYq~xDJe_pC1~3 zzst-2WnpEvfz!$|*rvQ^dF~X?V&`6zNV=4G^kba%J&XWi3{%K9&W)=e8YBbvUHR zS!tD1AQbni!bwO)p{ydV%B`kOQ6Z?Qr7};gv%V)dthsyw`{eHS>HTd?Dk-&7+Fj?* zRAS>`OYNE(+9#K-BvZI-Vs#&DHjgR;>)c(Nm|4X3^N6u9FHdA=;t&^6l~ffG=U`$_ zOj22=Dkv=&%XV(}5(a)L{;j!pYYwtVud|?Ug%tph*!}Ql@jC>5zt|g;@3dEfe z`uX(0nF;R7I^w$_#-I@C$2{b~G|i|L)vXnhbOzqIB%`CF>BKUwi3s%8TH)d0`r%~Z zyCt%X3go^g$*e)q(b4(dY4OfP(X1Nfzbf_BR>7JK;I|yoxmLWD3AVPjhH40&d<)X5 z8SctHg?bFosulItVx@rz(5xP~kqFkX9>tvq*|Hkeuo>gjn$)fy>dW+1c5RZU@@39O=U_{r&sT z&(E-m37mNgfMf~7oetr=DXWGF-M1jiqz(fE1GWc}x7{NQ7+jS9@J zIP%d?@y|%_$~WW2RK%ks=)x@9wIsWh4cW9I*s>uUB^k@57099#$)OJQ+Gz67MSo=q z#<+i}gbB~55XqwxwwyHf_V(@V?ep{V^VC`I&sXovKlt_N-{0Tw@9*i-cIe~K^VVnc z>c#*6{>PvU^z`)b&rP$IC90~b{rvds%vNGd2bqB=&bC^$phxl0SInv-$f+v+<6s2{ z1?R*&?8i67o(#jC3i8)$*S0kC)m`+|UDmD>-nbpqt{1$#ywIl)(XlVntQDeu3c#g5 zu8j|`pbWI854x-qzOftIv>M#DAH1SG`rcvKv?k)cGUeXD^x0;>t6TWnU-#W*gJuZE zxP_K~D8I0G;kzi{yD#OxEyScL%cdI1rzFd!6V}$&-`2Db4hpoMNan;tp^ZlH%RJf7 zr|r;Fy_XHBg9#E65vzv?>&7q1!AQ-;R?4Cao_-1a<7Ms0Gn0M^nR*GRhYj4c81vFh z^V3l2$3gw#WB%e|_1I|j*lPXdXXn5s{^w@q!$0iFH15bW0RaK4tE<)3)$Hu-?(XjO z_4NP%0RR90EC2ui02BZe000R802B2aNU)$mf&$y9>7&M5H8l_+;=>nFjjToe{Ly1^ zj2JO2SOTqLK$0XAe>)8HGes|u5JnCfb=tC}kpo6J9r&}tZ>1XnD&}O8RO#QpN)P5_ zS=Yqhl%8$gxSBJgozbiR97V`h$6r3E@>FCwP!G&i4*xuOr~}R`R2J-JTnT~5sHK0j zP@t&s!EL`b#^^+-V~dwfFO`n!=@|_Hw0_WXxJ|8lBy0mim*BJO^lcn-Fl4Kek8sNG2aw2 z#1I+`VM`DCK{nBX3^u3+J|{%d4P;&0RTIl CPhrRa literal 0 HcmV?d00001 diff --git a/theme/custom_corners/ui/images/ok.gif b/theme/custom_corners/ui/images/ok.gif new file mode 100644 index 0000000000000000000000000000000000000000..2103c5c789c40a258a529591bf2ed33dfad9e8f1 GIT binary patch literal 1134 zcmV-!1d;nkNk%w1VH5xq0QUd@)b`9w;wSL%@Hfp8iSTZC^H?sn2rsz_YVt@%+aX2O zAz|`8k@a>($0R<{8D{cDQ`Ixd%F0gUDVq9zgY;!h+$zJv!}Iy^JDVddsR=Ee3oWGz z==kKLqoXmw3N5V(FT4pNcM0L);WEbzmGpTqwG5s4f>r4;(b3Ud?m36+ZKVE*I;|Zz z$rD-WHb>MYwzjra+A~7c9VC(lFvAKp$qrKEEhK;mJaqUty%nsSv*y52$cDFHNg=#z7;UP3N5e*Z}Lv|_V)Ah z^NQ_n?d|P^^k?ty@AUNas;a6<+9ZYaY2V-9Wb#2~@1(3Uif%If_>sFZdemKw(QQs~)))Rf+Wjoar zk<@^K?`3ARQfTi-P0uY@?J`Z)Dln`Nz2dY@#4z;x@?fb>VWdzip$R?28!xd7FS`oK z-^5<7NxZzgHNOvY^Hg;6Q(x~q(DlbFm>QN6551;&mPM$f9@p6p!Z$i@?Md2PY$_twAg>S%H zJE$RN+ekv$9N6j9MB5*J^k8lBO!WQojpBHT>T*cmB6zQA0RaK4tE<)3)$Hu-?(XjO z_4NP%0RR90EC2ui02BZe000R80ORxoQ%Q89r{FzuG zMiwLzB<6^muqjP1DfO;CYEZ!*pub(hrI4~Ml&u$NEwOl!2h1$UPPk!FhZYxF zA>R}zU{V8esQ~ttTtfTro;Ms0aO_Y7`I9|H4%(mmMQ0Q`g~;)o;Ku~I+)JJj7H Aga7~l literal 0 HcmV?d00001 diff --git a/theme/custom_corners/ui/images/parent.gif b/theme/custom_corners/ui/images/parent.gif new file mode 100644 index 0000000000000000000000000000000000000000..3f976b7329347d3f66252271a10978fbbb074156 GIT binary patch literal 402 zcmV;D0d4+ANk%w1VGsZi0M!5hRg5H(j*kDH007JY!iNFx=8UD%8QQ^GhGt5=(Y?By zS^wq$F1!O;|1j+A?3~(b+S=MJ+AY1ctx}jNhI@N+xmIHTLB*{p-NrHh`9=Tys{sE1 z+`j-&bU^>`C|IdUv9({L|C06ayr-w9Z_h+nxgd^)hX4P}EB`Gc{|*28pmU%A!otFY zZC*mVHqys|t&ns7|KGx^YybHJ|E~bSxkB6j*pvTx|Npz+(s_%sYrX%a|MzA8%m7_L zK>z>$A^8La6aYT}EC2ui01yBW000KBz@KnPWJMYYqEZNnSVAPolK4SAcaJ4YrU0N) zPus3CbT|~Em~OIZgdTv;&mp0h4zc_Q)wq>}GF&e?8Yd?rE-4KS9YQr48aR>~DitXk zDIXL<2Py?Bo**t88v_6=CPElIJSr0m0|N{z1OyTRLKhhsJT(Re95liNBO|#U$TJH) wJ;F2u0TMzA$}`H$!U6;oEJ6|($R5kh*)3Au0VWg_EiDM|2tMai^glrWI~}jBUH||9 literal 0 HcmV?d00001 diff --git a/theme/custom_corners/ui/images/tag.gif b/theme/custom_corners/ui/images/tag.gif new file mode 100644 index 0000000000000000000000000000000000000000..3bb11f5b0220cac4bd56964f09c2af1705831375 GIT binary patch literal 286 zcmZ?wbhEHb6krfwIKlt|_wL=BIdf)7Nl8dZ$o~ENEiElSeE87Q)1#!Mv}DPW@87>m zNJyMHbLQEzXK86^RaI5%*ROYUbmZsf|NsC0)TvXiU%#H4o2#j*dF05En3xz&PR_>0 z#?6~IdwF>Q6)65>VHIJJXV3xJ1hSKXb@l`GI;R4QxrPaLzZd?#;4uUI^*GOuN?x)F1Yk_>ydx;8t1yHdZe$XZEG iDHbL@F&Vk}E?mOiE0v=qIi!R(u(InNKXF`L}_10pzqf@q#3-ZoC*s>nHmI=n9 z8S>6X^3O!CkQmLU6}yxP&9zzY$~)q{GQF1$>d!k-z$oecEUR-Swd@5(pa!e4)73gWyd!<-EE_V)Ah^X={J z@bK{R&q(#yXYtKG^z`)d&_eI;@A1w+-{0S=s;cqv@$kz$^x0;>pC8G-Jg=Y(x~vnK zeH6o;3jXJ2p^G*C<6y>~4)oP#qL2#W$z;x_5uJ<*^Vw(e*K7CNVC>IRyu7^n-eK0( z*8bvR!@yow9VtQm{#{DJ z3KXO%Q|^Q^K$0Yqe>4d7b9d*rt;fQM^DtHJuP^^Uo1`LF>gKu?R?(NSXu zgOV|0Gy%$hBEeoXJfe78DpR6FmOOa?xv?@N!JO~*lv%RUW5|*jGf;eCF<_6F?;P~7 zgnld}Fu(wF%%RO5{xvqygAhh&20kAs(hnmMNRiKm9Cpaz6A?HPh#-XUW8#S@qNs=? I{R9L6JI&)+?f?J) literal 0 HcmV?d00001 diff --git a/theme/custom_corners/ui/sarissa.js b/theme/custom_corners/ui/sarissa.js new file mode 100644 index 0000000000..a6e138189b --- /dev/null +++ b/theme/custom_corners/ui/sarissa.js @@ -0,0 +1,648 @@ + +/** + * ==================================================================== + * About + * ==================================================================== + * Sarissa is an ECMAScript library acting as a cross-browser wrapper for native XML APIs. + * The library supports Gecko based browsers like Mozilla and Firefox, + * Internet Explorer (5.5+ with MSXML3.0+), Konqueror, Safari and a little of Opera + * @version 0.9.6.1 + * @author: Manos Batsis, mailto: mbatsis at users full stop sourceforge full stop net + * ==================================================================== + * Licence + * ==================================================================== + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 or + * the GNU Lesser General Public License version 2.1 as published by + * the Free Software Foundation (your choice between the two). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License or GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * or GNU Lesser General Public License along with this program; if not, + * write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * or visit http://www.gnu.org + * + */ +/** + *

    Sarissa is a utility class. Provides "static" methods for DOMDocument and + * XMLHTTP objects, DOM Node serializatrion to XML strings and other goodies.

    + * @constructor + */ +function Sarissa(){}; +/** @private */ +Sarissa.PARSED_OK = "Document contains no parsing errors"; +/** + * Tells you whether transformNode and transformNodeToObject are available. This functionality + * is contained in sarissa_ieemu_xslt.js and is deprecated. If you want to control XSLT transformations + * use the XSLTProcessor + * @deprecated + * @type boolean + */ +Sarissa.IS_ENABLED_TRANSFORM_NODE = false; +/** + * tells you whether XMLHttpRequest (or equivalent) is available + * @type boolean + */ +Sarissa.IS_ENABLED_XMLHTTP = false; +/** + * tells you whether selectNodes/selectSingleNode is available + * @type boolean + */ +Sarissa.IS_ENABLED_SELECT_NODES = false; +var _sarissa_iNsCounter = 0; +var _SARISSA_IEPREFIX4XSLPARAM = ""; +var _SARISSA_HAS_DOM_IMPLEMENTATION = document.implementation && true; +var _SARISSA_HAS_DOM_CREATE_DOCUMENT = _SARISSA_HAS_DOM_IMPLEMENTATION && document.implementation.createDocument; +var _SARISSA_HAS_DOM_FEATURE = _SARISSA_HAS_DOM_IMPLEMENTATION && document.implementation.hasFeature; +var _SARISSA_IS_MOZ = _SARISSA_HAS_DOM_CREATE_DOCUMENT && _SARISSA_HAS_DOM_FEATURE; +var _SARISSA_IS_SAFARI = (navigator.userAgent && navigator.vendor && (navigator.userAgent.toLowerCase().indexOf("applewebkit") != -1 || navigator.vendor.indexOf("Apple") != -1)); +var _SARISSA_IS_IE = document.all && window.ActiveXObject && navigator.userAgent.toLowerCase().indexOf("msie") > -1 && navigator.userAgent.toLowerCase().indexOf("opera") == -1; +if(!window.Node || !window.Node.ELEMENT_NODE){ + var Node = {ELEMENT_NODE: 1, ATTRIBUTE_NODE: 2, TEXT_NODE: 3, CDATA_SECTION_NODE: 4, ENTITY_REFERENCE_NODE: 5, ENTITY_NODE: 6, PROCESSING_INSTRUCTION_NODE: 7, COMMENT_NODE: 8, DOCUMENT_NODE: 9, DOCUMENT_TYPE_NODE: 10, DOCUMENT_FRAGMENT_NODE: 11, NOTATION_NODE: 12}; +}; + +// IE initialization +if(_SARISSA_IS_IE){ + // for XSLT parameter names, prefix needed by IE + _SARISSA_IEPREFIX4XSLPARAM = "xsl:"; + // used to store the most recent ProgID available out of the above + var _SARISSA_DOM_PROGID = ""; + var _SARISSA_XMLHTTP_PROGID = ""; + /** + * Called when the Sarissa_xx.js file is parsed, to pick most recent + * ProgIDs for IE, then gets destroyed. + * @param idList an array of MSXML PROGIDs from which the most recent will be picked for a given object + * @param enabledList an array of arrays where each array has two items; the index of the PROGID for which a certain feature is enabled + */ + pickRecentProgID = function (idList, enabledList){ + // found progID flag + var bFound = false; + for(var i=0; i < idList.length && !bFound; i++){ + try{ + var oDoc = new ActiveXObject(idList[i]); + o2Store = idList[i]; + bFound = true; + for(var j=0;j"); + // don't use the same prefix again + ++_sarissa_iNsCounter; + } + else + oDoc.loadXML("<" + sName + "/>"); + }; + return oDoc; + }; + // see non-IE version + Sarissa.getParseErrorText = function (oDoc) { + var parseErrorText = Sarissa.PARSED_OK; + if(oDoc.parseError != 0){ + parseErrorText = "XML Parsing Error: " + oDoc.parseError.reason + + "\nLocation: " + oDoc.parseError.url + + "\nLine Number " + oDoc.parseError.line + ", Column " + + oDoc.parseError.linepos + + ":\n" + oDoc.parseError.srcText + + "\n"; + for(var i = 0; i < oDoc.parseError.linepos;i++){ + parseErrorText += "-"; + }; + parseErrorText += "^\n"; + }; + return parseErrorText; + }; + // see non-IE version + Sarissa.setXpathNamespaces = function(oDoc, sNsSet) { + oDoc.setProperty("SelectionLanguage", "XPath"); + oDoc.setProperty("SelectionNamespaces", sNsSet); + }; + /** + * Basic implementation of Mozilla's XSLTProcessor for IE. + * Reuses the same XSLT stylesheet for multiple transforms + * @constructor + */ + XSLTProcessor = function(){ + this.template = new ActiveXObject(_SARISSA_XSLTEMPLATE_PROGID); + this.processor = null; + }; + /** + * Impoprts the given XSLT DOM and compiles it to a reusable transform + * @argument xslDoc The XSLT DOMDocument to import + */ + XSLTProcessor.prototype.importStylesheet = function(xslDoc){ + // convert stylesheet to free threaded + var converted = new ActiveXObject(_SARISSA_THREADEDDOM_PROGID); + converted.loadXML(xslDoc.xml); + this.template.stylesheet = converted; + this.processor = this.template.createProcessor(); + // (re)set default param values + this.paramsSet = new Array(); + }; + /** + * Transform the given XML DOM + * @argument sourceDoc The XML DOMDocument to transform + * @return The transformation result as a DOM Document + */ + XSLTProcessor.prototype.transformToDocument = function(sourceDoc){ + this.processor.input = sourceDoc; + var outDoc = new ActiveXObject(_SARISSA_DOM_PROGID); + this.processor.output = outDoc; + this.processor.transform(); + return outDoc; + }; + /** + * Set global XSLT parameter of the imported stylesheet + * @argument nsURI The parameter namespace URI + * @argument name The parameter base name + * @argument value The new parameter value + */ + XSLTProcessor.prototype.setParameter = function(nsURI, name, value){ + /* nsURI is optional but cannot be null */ + if(nsURI){ + this.processor.addParameter(name, value, nsURI); + }else{ + this.processor.addParameter(name, value); + }; + /* update updated params for getParameter */ + if(!this.paramsSet[""+nsURI]){ + this.paramsSet[""+nsURI] = new Array(); + }; + this.paramsSet[""+nsURI][name] = value; + }; + /** + * Gets a parameter if previously set by setParameter. Returns null + * otherwise + * @argument name The parameter base name + * @argument value The new parameter value + * @return The parameter value if reviously set by setParameter, null otherwise + */ + XSLTProcessor.prototype.getParameter = function(nsURI, name){ + nsURI = nsURI || ""; + if(nsURI in this.paramsSet && name in this.paramsSet[nsURI]){ + return this.paramsSet[nsURI][name]; + }else{ + return null; + }; + }; +} +else{ /* end IE initialization, try to deal with real browsers now ;-) */ + if(_SARISSA_HAS_DOM_CREATE_DOCUMENT){ + /** + *

    Ensures the document was loaded correctly, otherwise sets the + * parseError to -1 to indicate something went wrong. Internal use

    + * @private + */ + Sarissa.__handleLoad__ = function(oDoc){ + if (!oDoc.documentElement || oDoc.documentElement.tagName == "parsererror") + oDoc.parseError = -1; + Sarissa.__setReadyState__(oDoc, 4); + }; + /** + *

    Attached by an event handler to the load event. Internal use.

    + * @private + */ + _sarissa_XMLDocument_onload = function(){ + Sarissa.__handleLoad__(this); + }; + /** + *

    Sets the readyState property of the given DOM Document object. + * Internal use.

    + * @private + * @argument oDoc the DOM Document object to fire the + * readystatechange event + * @argument iReadyState the number to change the readystate property to + */ + Sarissa.__setReadyState__ = function(oDoc, iReadyState){ + oDoc.readyState = iReadyState; + if (oDoc.onreadystatechange != null && typeof oDoc.onreadystatechange == "function") + oDoc.onreadystatechange(); + }; + Sarissa.getDomDocument = function(sUri, sName){ + var oDoc = document.implementation.createDocument(sUri?sUri:"", sName?sName:"", null); + oDoc.addEventListener("load", _sarissa_XMLDocument_onload, false); + return oDoc; + }; + if(window.XMLDocument){ + /** + *

    Emulate IE's onreadystatechange attribute

    + */ + XMLDocument.prototype.onreadystatechange = null; + /** + *

    Emulates IE's readyState property, which always gives an integer from 0 to 4:

    + *
    • 1 == LOADING,
    • + *
    • 2 == LOADED,
    • + *
    • 3 == INTERACTIVE,
    • + *
    • 4 == COMPLETED
    + */ + XMLDocument.prototype.readyState = 0; + /** + *

    Emulate IE's parseError attribute

    + */ + XMLDocument.prototype.parseError = 0; + + // NOTE: setting async to false will only work with documents + // called over HTTP (meaning a server), not the local file system, + // unless you are using Moz 1.4+. + // BTW the try>catch block is for 1.4; I haven't found a way to check if + // the property is implemented without + // causing an error and I dont want to use user agent stuff for that... + var _SARISSA_SYNC_NON_IMPLEMENTED = false;// ("async" in XMLDocument.prototype) ? false: true; + /** + *

    Keeps a handle to the original load() method. Internal use and only + * if Mozilla version is lower than 1.4

    + * @private + */ + XMLDocument.prototype._sarissa_load = XMLDocument.prototype.load; + + /** + *

    Overrides the original load method to provide synchronous loading for + * Mozilla versions prior to 1.4, using an XMLHttpRequest object (if + * async is set to false)

    + * @returns the DOM Object as it was before the load() call (may be empty) + */ + XMLDocument.prototype.load = function(sURI) { + var oDoc = document.implementation.createDocument("", "", null); + Sarissa.copyChildNodes(this, oDoc); + this.parseError = 0; + Sarissa.__setReadyState__(this, 1); + try { + if(this.async == false && _SARISSA_SYNC_NON_IMPLEMENTED) { + var tmp = new XMLHttpRequest(); + tmp.open("GET", sURI, false); + tmp.send(null); + Sarissa.__setReadyState__(this, 2); + Sarissa.copyChildNodes(tmp.responseXML, this); + Sarissa.__setReadyState__(this, 3); + } + else { + this._sarissa_load(sURI); + }; + } + catch (objException) { + this.parseError = -1; + } + finally { + if(this.async == false){ + Sarissa.__handleLoad__(this); + }; + }; + return oDoc; + }; + + + }//if(window.XMLDocument) + else if(document.implementation && document.implementation.hasFeature && document.implementation.hasFeature('LS', '3.0')){ + Document.prototype.async = true; + Document.prototype.onreadystatechange = null; + Document.prototype.parseError = 0; + Document.prototype.load = function(sURI) { + var parser = document.implementation.createLSParser(this.async ? document.implementation.MODE_ASYNCHRONOUS : document.implementation.MODE_SYNCHRONOUS, null); + if(this.async){ + var self = this; + parser.addEventListener("load", + function(e) { + self.readyState = 4; + Sarissa.copyChildNodes(e.newDocument, self.documentElement, false); + self.onreadystatechange.call(); + }, + false); + }; + try { + var oDoc = parser.parseURI(sURI); + } + catch(e){ + this.parseError = -1; + }; + if(!this.async) + Sarissa.copyChildNodes(oDoc, this.documentElement, false); + return oDoc; + }; + /** + *

    Factory method to obtain a new DOM Document object

    + * @argument sUri the namespace of the root node (if any) + * @argument sUri the local name of the root node (if any) + * @returns a new DOM Document + */ + Sarissa.getDomDocument = function(sUri, sName){ + return document.implementation.createDocument(sUri?sUri:"", sName?sName:"", null); + }; + }; + };//if(_SARISSA_HAS_DOM_CREATE_DOCUMENT) +}; +//========================================== +// Common stuff +//========================================== +if(!window.DOMParser){ + /* + * DOMParser is a utility class, used to construct DOMDocuments from XML strings + * @constructor + */ + DOMParser = function() { + }; + if(_SARISSA_IS_SAFARI){ + /** + * Construct a new DOM Document from the given XMLstring + * @param sXml the given XML string + * @param contentType the content type of the document the given string represents (one of text/xml, application/xml, application/xhtml+xml). + * @return a new DOM Document from the given XML string + */ + DOMParser.prototype.parseFromString = function(sXml, contentType){ + if(contentType.toLowerCase() != "application/xml"){ + throw "Cannot handle content type: \"" + contentType + "\""; + }; + var xmlhttp = new XMLHttpRequest(); + xmlhttp.open("GET", "data:text/xml;charset=utf-8," + encodeURIComponent(str), false); + xmlhttp.send(null); + return xmlhttp.responseXML; + }; + }else if(Sarissa.getDomDocument && Sarissa.getDomDocument() && "loadXML" in Sarissa.getDomDocument()){ + DOMParser.prototype.parseFromString = function(sXml, contentType){ + var doc = Sarissa.getDomDocument(); + doc.loadXML(sXml); + return doc; + }; + }; +}; + +if(window.XMLHttpRequest){ + Sarissa.IS_ENABLED_XMLHTTP = true; +} +else if(_SARISSA_IS_IE){ + /** + * Emulate XMLHttpRequest + * @constructor + */ + XMLHttpRequest = function() { + return new ActiveXObject(_SARISSA_XMLHTTP_PROGID); + }; + Sarissa.IS_ENABLED_XMLHTTP = true; +}; + +if(!window.document.importNode && _SARISSA_IS_IE){ + try{ + /** + * Implements importNode for the current window document in IE using innerHTML. + * Testing showed that DOM was multiple times slower than innerHTML for this, + * sorry folks. If you encounter trouble (who knows what IE does behind innerHTML) + * please gimme a call. + * @param oNode the Node to import + * @param bChildren whether to include the children of oNode + * @returns the imported node for further use + */ + window.document.importNode = function(oNode, bChildren){ + var importNode = document.createElement("div"); + if(bChildren) + importNode.innerHTML = Sarissa.serialize(oNode); + else + importNode.innerHTML = Sarissa.serialize(oNode.cloneNode(false)); + return importNode.firstChild; + }; + }catch(e){}; +}; +if(!Sarissa.getParseErrorText){ + /** + *

    Returns a human readable description of the parsing error. Usefull + * for debugging. Tip: append the returned error string in a <pre> + * element if you want to render it.

    + *

    Many thanks to Christian Stocker for the initial patch.

    + * @argument oDoc The target DOM document + * @returns The parsing error description of the target Document in + * human readable form (preformated text) + */ + Sarissa.getParseErrorText = function (oDoc){ + var parseErrorText = Sarissa.PARSED_OK; + if(oDoc && oDoc.parseError && oDoc.parseError != 0){ + /*moz*/ + if(oDoc.documentElement.tagName == "parsererror"){ + parseErrorText = oDoc.documentElement.firstChild.data; + parseErrorText += "\n" + oDoc.documentElement.firstChild.nextSibling.firstChild.data; + }/*konq*/ + else{ + parseErrorText = Sarissa.getText(oDoc.documentElement);/*.getElementsByTagName("h1")[0], false) + "\n"; + parseErrorText += Sarissa.getText(oDoc.documentElement.getElementsByTagName("body")[0], false) + "\n"; + parseErrorText += Sarissa.getText(oDoc.documentElement.getElementsByTagName("pre")[0], false);*/ + }; + }; + return parseErrorText; + }; +}; +Sarissa.getText = function(oNode, deep){ + var s = ""; + var nodes = oNode.childNodes; + for(var i=0; i < nodes.length; i++){ + var node = nodes[i]; + var nodeType = node.nodeType; + if(nodeType == Node.TEXT_NODE || nodeType == Node.CDATA_SECTION_NODE){ + s += node.data; + }else if(deep == true + && (nodeType == Node.ELEMENT_NODE + || nodeType == Node.DOCUMENT_NODE + || nodeType == Node.DOCUMENT_FRAGMENT_NODE)){ + s += Sarissa.getText(node, true); + }; + }; + return s; +}; +if(window.XMLSerializer){ + /** + *

    Factory method to obtain the serialization of a DOM Node

    + * @returns the serialized Node as an XML string + */ + Sarissa.serialize = function(oDoc){ + var s = null; + if(oDoc){ + s = oDoc.innerHTML?oDoc.innerHTML:(new XMLSerializer()).serializeToString(oDoc); + }; + return s; + }; +}else{ + if(Sarissa.getDomDocument && (Sarissa.getDomDocument("","foo", null)).xml){ + // see non-IE version + Sarissa.serialize = function(oDoc) { + var s = null; + if(oDoc){ + s = oDoc.innerHTML?oDoc.innerHTML:oDoc.xml; + }; + return s; + }; + /** + * Utility class to serialize DOM Node objects to XML strings + * @constructor + */ + XMLSerializer = function(){}; + /** + * Serialize the given DOM Node to an XML string + * @param oNode the DOM Node to serialize + */ + XMLSerializer.prototype.serializeToString = function(oNode) { + return oNode.xml; + }; + }; +}; + +/** + * strips tags from a markup string + */ +Sarissa.stripTags = function (s) { + return s.replace(/<[^>]+>/g,""); +}; +/** + *

    Deletes all child nodes of the given node

    + * @argument oNode the Node to empty + */ +Sarissa.clearChildNodes = function(oNode) { + // need to check for firstChild due to opera 8 bug with hasChildNodes + while(oNode.firstChild){ + oNode.removeChild(oNode.firstChild); + }; +}; +/** + *

    Copies the childNodes of nodeFrom to nodeTo

    + *

    Note: The second object's original content is deleted before + * the copy operation, unless you supply a true third parameter

    + * @argument nodeFrom the Node to copy the childNodes from + * @argument nodeTo the Node to copy the childNodes to + * @argument bPreserveExisting whether to preserve the original content of nodeTo, default is false + */ +Sarissa.copyChildNodes = function(nodeFrom, nodeTo, bPreserveExisting) { + if((!nodeFrom) || (!nodeTo)){ + throw "Both source and destination nodes must be provided"; + }; + if(!bPreserveExisting){ + Sarissa.clearChildNodes(nodeTo); + }; + var ownerDoc = nodeTo.nodeType == Node.DOCUMENT_NODE ? nodeTo : nodeTo.ownerDocument; + var nodes = nodeFrom.childNodes; + if(ownerDoc.importNode && (!_SARISSA_IS_IE)) { + for(var i=0;i < nodes.length;i++) { + nodeTo.appendChild(ownerDoc.importNode(nodes[i], true)); + }; + } + else{ + for(var i=0;i < nodes.length;i++) { + nodeTo.appendChild(nodes[i].cloneNode(true)); + }; + }; +}; + +/** + *

    Moves the childNodes of nodeFrom to nodeTo

    + *

    Note: The second object's original content is deleted before + * the move operation, unless you supply a true third parameter

    + * @argument nodeFrom the Node to copy the childNodes from + * @argument nodeTo the Node to copy the childNodes to + * @argument bPreserveExisting whether to preserve the original content of nodeTo, default is + */ +Sarissa.moveChildNodes = function(nodeFrom, nodeTo, bPreserveExisting) { + if((!nodeFrom) || (!nodeTo)){ + throw "Both source and destination nodes must be provided"; + }; + if(!bPreserveExisting){ + Sarissa.clearChildNodes(nodeTo); + }; + var nodes = nodeFrom.childNodes; + // if within the same doc, just move, else copy and delete + if(nodeFrom.ownerDocument == nodeTo.ownerDocument){ + while(nodeFrom.firstChild){ + nodeTo.appendChild(nodeFrom.firstChild); + }; + }else{ + var ownerDoc = nodeTo.nodeType == Node.DOCUMENT_NODE ? nodeTo : nodeTo.ownerDocument; + if(ownerDoc.importNode && (!_SARISSA_IS_IE)) { + for(var i=0;i < nodes.length;i++) { + nodeTo.appendChild(ownerDoc.importNode(nodes[i], true)); + }; + }else{ + for(var i=0;i < nodes.length;i++) { + nodeTo.appendChild(nodes[i].cloneNode(true)); + }; + }; + Sarissa.clearChildNodes(nodeFrom); + }; +}; + +/** + *

    Serialize any object to an XML string. All properties are serialized using the property name + * as the XML element name. Array elements are rendered as array-item elements, + * using their index/key as the value of the key attribute.

    + * @argument anyObject the object to serialize + * @argument objectName a name for that object + * @return the XML serializationj of the given object as a string + */ +Sarissa.xmlize = function(anyObject, objectName, indentSpace){ + indentSpace = indentSpace?indentSpace:''; + var s = indentSpace + '<' + objectName + '>'; + var isLeaf = false; + if(!(anyObject instanceof Object) || anyObject instanceof Number || anyObject instanceof String + || anyObject instanceof Boolean || anyObject instanceof Date){ + s += Sarissa.escape(""+anyObject); + isLeaf = true; + }else{ + s += "\n"; + var itemKey = ''; + var isArrayItem = anyObject instanceof Array; + for(var name in anyObject){ + s += Sarissa.xmlize(anyObject[name], (isArrayItem?"array-item key=\""+name+"\"":name), indentSpace + " "); + }; + s += indentSpace; + }; + return s += (objectName.indexOf(' ')!=-1?"\n":"\n"); +}; + +/** + * Escape the given string chacters that correspond to the five predefined XML entities + * @param sXml the string to escape + */ +Sarissa.escape = function(sXml){ + return sXml.replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"); +}; + +/** + * Unescape the given string. This turns the occurences of the predefined XML + * entities to become the characters they represent correspond to the five predefined XML entities + * @param sXml the string to unescape + */ +Sarissa.unescape = function(sXml){ + return sXml.replace(/'/g,"'") + .replace(/"/g,"\"") + .replace(/>/g,">") + .replace(/</g,"<") + .replace(/&/g,"&"); +}; +// \ No newline at end of file diff --git a/theme/custom_corners/user_styles.css b/theme/custom_corners/user_styles.css new file mode 100644 index 0000000000..9b72005489 --- /dev/null +++ b/theme/custom_corners/user_styles.css @@ -0,0 +1,941 @@ +div#infowrapper { + position: fixed; + overflow: auto; + top: 1px; + left: 25%; + right: 25%; + width: 450px; + padding: 3px; + opacity: 0.9; + color: #000; + background-color: #ffffcc; + z-index: 200; + border: 2px solid #FF0; + min-height: 2px; +} +/*div#infooverlay { + height: 0; +}*/ +body { + font-size: 100%; + color: #333333; + font-family: verdana, arial, helvetica, sans-serif; + margin: 0; + padding: 0; + background-image: url(pix/bg.jpg); +} +div#page { + margin: 0 4%; + padding-top: 2px; + width: auto; +} +div.clearer { + clear: both; +} +a:link { + color: #116699; +} +a:visited { + color: #AA2200; +} +a:hover { + color: #0066FF; +} +table.generaltable { + background-color: #EEEEEE; +} +img.resize { + width: 1em; + height: 1em; +} +p.helplink { + margin: 0.5em 0; +} +h1.headermain { + color: #0066ff; + margin: 10px 0 10px 5px; + font-size: 180%; +} +h2.main { + background-image: url(pix/header.png); + background-repeat: repeat-x; + background-position: center top; + padding: 5px 5px 6px; + color: #444; + font-size: 120%; + border-right-width: 1px; + border-left-width: 1px; + border-right-style: solid; + border-left-style: solid; + border-right-color: #F1ECE6; + border-left-color: #F1ECE6; +} +h2.headingblock { + background-image: url(pix/header.png); + background-repeat: repeat-x; + background-position: center top; + padding: 5px 5px 6px; + color: #444; + font-size: 100%; + border-right-width: 1px; + border-left-width: 1px; + border-style: none solid; + border-right-color: #F1ECE6; + border-left-color: #F1ECE6; +} +.loginbox { + border: 1px solid #F1ECE6; +} +div.block_login form.loginform div.c1 { + margin: 0.3em 0; +} +div.noticebox { + background-color: #EEEEEE; + border-width: 1px; + border-style: solid; + border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF; +} +div.generalbox { + border: 1px solid #F1ECE6; +} +table.generalbox { + border-top-width: 1px; + border-style: solid none none; + border-top-color: #DDDDDD; +} +table.generaltable th.header { + padding-bottom: 10px; + border-width: 1px; + border-style: solid; + border-color: #EEEEEE #CCCCCC #CCCCCC #EEEEEE; +} +table.generaltable td.cell { + white-space: normal; + border-color: #DDDDDD; +} +div.informationbox { + background-color: #EEEEEE; + border-width: 1px; + border-style: solid; + border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF; +} +table.userinfobox { + border: 1px solid #DDDDDD; +} +div.errorbox { + background-color: #E88; + border-color: #660000; +} +p.copyright { + text-align: center; +} +div.headermenu { + font-size: 0.75em; + position: absolute; + top: 12px; + right: 12px; + /* background-color: #cccccc; + */ + padding: 3px; +} +div.headermenu div.logininfo { + margin-bottom: 0.2em; +} +div.breadcrumb { + font-size: 0.8em; + padding-left: 0.3em; +} +div.navbar div.navbutton form { + float: left; +} +div.navbar div.navbutton { + margin-top: 3px; +} +div.navbar { + padding: 3px 3px 6px 0; + margin-top: 5px; + clear: both; + background-image: url(pix/header.png); + background-repeat: repeat-x; + background-position: center bottom; + border-right-width: 1px; + border-left-width: 1px; + border-style: none solid; + border-right-color: #cccccc; + border-left-color: #cccccc; +} +div#footer { + font-size: 0.75em; + padding: 0; + margin: 5px auto; + border-style: none; +} +div#content { + padding: 0; + font-size: 0.75em; + line-height: 1.6em; + clear: both; + border-top-style: none; + border-bottom-style: none; +} +ul.section li { + margin: 0.2em 0; +} +div.sideblock div.content * { + text-align: left; +} +div.sideblock ul.list span.c1 { + padding-left: 0; +} +div.sideblock div.title h2 { + font-size: 1em; + line-height: 1.1em; +} +div.sideblock div.header { + padding: 0; + border-style: none; + border-color: #DDDDDD #CCCCCC #88DD55 #DDDDDD; +} +div.sideblock div.content { + padding: 0.3em 0.3em 0.5em; + border-style: none; + border-right-color: #DDDDDD; + border-bottom-color: #DDDDDD; + border-left-color: #FFFFFF; +} +div.sideblock table.minicalendar td.day { + text-align: center; + font-size: 0.9em; +} +div.sideblock table.minicalendar { + border-style: none; +} +body#admin-lang h2.main { + font-size: 1em; + text-align: left; +} +body#course-index table.generalbox { + background-color: #EEEEEE; + border-width: 1px; + border-style: solid; + border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF; +} +table.minicalendar td.today { + line-height: 1.4em; + border: 2px solid #0066FF; +} +div.sideblock table.minicalendar tr.weekdays { + font-size: 0.8em; +} +div.coursebox { + border-style: solid; + border-color: #F1ECE6; +} +div.courseboxcontent { + background-color: #EEEEEE; + border-width: 1px; + border-style: solid; + border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF; +} +td.courseboxcontent { + background-color: #EEEEEE; + border-width: 1px; + border-style: solid; + border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF; +} +.tabrow td { + border: 1px solid #88DD55; +} +.tabrow td.selected { + border-top-width: 1px; + border-right-width: 1px; + border-left-width: 1px; + border-style: solid solid none; + border-top-color: #88DD55; + border-right-color: #88DD55; + border-left-color: #88DD55; +} +.sideblock .content .message { + text-align: left; +} +.sideblock .header .hide-show img.hide-show-image { + background-image: url(../../pix/t/switch_minus.gif); + background-repeat: no-repeat; + margin-top: 0; +} +.sideblock.hidden .header .hide-show img.hide-show-image { + background-image: url(../../pix/t/switch_plus.gif); + background-repeat: no-repeat; + margin-top: 0; +} +#calendar .event_global { + background-color: #D6F8CD; + border-color: #D6F8CD; +} +.minicalendar .event_global { + background-color: #D6F8CD; + border-color: #D6F8CD; +} +.block_calendar_month .event_global { + background-color: #D6F8CD; + border-color: #D6F8CD; +} +#calendar .event_course { + background-color: #FFD3BD; + border-color: #FFD3BD; +} +.minicalendar .event_course { + background-color: #FFD3BD; + border-color: #FFD3BD; +} +.block_calendar_month .event_course { + background-color: #FFD3BD; + border-color: #FFD3BD; +} +#calendar .event_group { + background-color: #FEE7AE; + border-color: #FEE7AE; +} +.minicalendar .event_group { + background-color: #FEE7AE; + border-color: #FEE7AE; +} +.block_calendar_month .event_group { + background-color: #FEE7AE; + border-color: #FEE7AE; +} +#calendar .event_user { + background-color: #DCE7EC; + border-color: #DCE7EC; +} +.minicalendar .event_user { + background-color: #DCE7EC; + border-color: #DCE7EC; +} +.block_calendar_month .event_user { + background-color: #DCE7EC; + border-color: #DCE7EC; +} +div.sideblock div.calendar-controls span.current { + text-align: center; +} +body.admin table.generaltable { + width: 100%; +} +body#course-view tr.section td.side { + border-style: none; +} +body#course-view tr.section td.content { + padding-bottom: 1.5em; + border-style: none; +} +div.que { + border: 1px solid #F1ECE6; +} +td.sitetopiccontent { + border-style: none; +} +body#site-index td.categoryboxcontent { + border-style: none; +} +div.sideblock span.icon { + display: block; + float: left; + margin-right: 0.3em; +} +div.sideblock ul.list li { + clear: left; +} +td.categoryboxcontent { + background-color: #EEEEEE; + border-width: 1px; + border-style: solid; + border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF; +} +body#admin-roles-manage td.generalboxcontent table td { + padding-left: 0.5em; + padding-right: 0.5em; +} +div.breadcrumb span.sep { + font-family: arial, sans-serif; + color: #0066FF; +} +div.calendar-controls span.previous { + font-family: arial, sans-serif; +} +div.calendar-controls span.next { + font-family: arial, sans-serif; + text-align: right; +} +div.sideblock div.header div.commands { + height: 16px; + background-color: #ffffff; +} +fieldset.adminsettings span.form-shortname { + color: #cccccc; + font-size: 90%; +} +fieldset.adminsettings { + background-color: #EEEEEE; + border-width: 1px; + border-style: solid; + border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF; +} +form.mform div.textarea textarea { + width: 35em; +} +div#header-home { + position: relative; + margin: 0; + padding: 5px 5px 0 0; + background-color: #F1ECE6; +} +div#header { + position: relative; +} +td#left-column { + padding-top: 10px; + padding-right: 5px; +} +td#right-column { + padding-top: 10px; + padding-left: 5px; +} +table#layout-table { + margin-top: 0; + border-collapse: collapse; + border-spacing: 0; +} +table#layout-table td#middle-column { + padding: 10px 0 0; +} +div.sitetopic { + border-style: none; +} +div.categorybox { + border-style: solid; +} +div.mdescr div.images { + text-align: center; +} +fieldset { + border-style: none; +} +body#admin-auth td#middle-column { + padding-bottom: 10px; +} +div.sideblock h2 { + color: #666666; +} +table.cal_popup_bg { + background-color: #ffffff; + border-color: #F1ECE6; +} +div.homelink { + margin: 2px 0 0; + padding: 0; +} +div.logininfo { + white-space: nowrap; +} +div.sideblock div.header div.bt div { + background-image: url(pix/box.png); + background-repeat: no-repeat; + background-position: 0 0; + background-color: transparent; + height: 12px; + left: -13px; + position: relative; + width: 13px; +} +div.sideblock div.header div.bt { + background-image: url(pix/box.png); + background-repeat: no-repeat; + background-position: 100% 0; + margin: 0 0 0 13px; + height: 12px; + background-color: transparent; +} +div.sideblock div.header div.i1 { + background-image: url(pix/borders.png); + background-repeat: repeat-y; + background-position: 0 0; + background-color: transparent; + padding: 0 0 0 12px; +} +div.sideblock div.header div.i2 { + background-image: url(pix/borders.png); + background-repeat: repeat-y; + background-attachment: scroll; + background-position: 100% 0; + background-color: transparent; + padding: 0 12px 0 0; +} +div.sideblock div.header div.i3 { + padding: 0 0 5px; + background-color: #ffffff; + border-top-width: 1px; + border-right-width: 0; + border-bottom-width: 1px; + border-style: solid none; + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +div.sideblock div.i1 { + background-image: url(pix/beige_borders.png); + background-repeat: repeat-y; + background-position: 0 0; + background-color: transparent; + padding: 0 0 0 12px; +} +div.sideblock div.i2 { + background-image: url(pix/beige_borders.png); + background-repeat: repeat-y; + background-attachment: scroll; + background-position: 100% 0; + background-color: transparent; + padding: 0 12px 0 0; +} +div.sideblock div.i3 { + background-color: #f1ece6; + padding: 0; + border-style: none; +} +div.sideblock div.bb div { + background-image: url(pix/beige_box.png); + background-repeat: no-repeat; + background-position: 0 100%; + background-color: transparent; + height: 12px; + left: -13px; + position: relative; + width: 13px; +} +div.sideblock div.bb { + background-image: url(pix/beige_box.png); + background-repeat: no-repeat; + background-position: 100% 100%; + margin: 0 0 0 13px; + height: 12px; + background-color: transparent; +} +td#left-column div.hidden div.header { + border-bottom-style: none; +} +td#right-column div.hidden div.header { + border-bottom-style: none; +} +td#middle-column div.bt div { + background-image: url(pix/box.png); + background-repeat: no-repeat; + background-position: 0 0; + background-color: transparent; + height: 12px; + left: -13px; + position: relative; + width: 13px; +} +td#middle-column div.bt { + background-image: url(pix/box.png); + background-repeat: no-repeat; + background-position: 100% 0; + margin: 0 0 0 13px; + height: 12px; + background-color: transparent; +} +td#middle-column div.i1 { + background-image: url(pix/borders.png); + background-repeat: repeat-y; + background-position: 0 0; + background-color: transparent; + padding: 0 0 0 12px; +} +td#middle-column div.i2 { + background-image: url(pix/borders.png); + background-repeat: repeat-y; + background-attachment: scroll; + background-position: 100% 0; + background-color: transparent; + padding: 0 12px 0 0; +} +td#middle-column div.i3 { + background-color: #FFFFFF; + padding: 0 10px; + border-width: 1px 0; + border-style: solid; + border-color: #FFFFFF; +} +td#middle-column div.bb div { + background-image: url(pix/box.png); + background-repeat: no-repeat; + background-position: 0 100%; + background-color: transparent; + height: 12px; + left: -13px; + position: relative; + width: 13px; +} +td#middle-column div.bb { + background-image: url(pix/box.png); + background-repeat: no-repeat; + background-position: 100% 100%; + margin: 0 0 0 13px; + height: 12px; + background-color: transparent; +} +td#middle-column div.bt div { + z-index: 10; +} +div#footer div.bt div { + background-image: url(pix/beige_box.png); + background-repeat: no-repeat; + background-position: 0 0; + background-color: transparent; + height: 12px; + left: -13px; + position: relative; + width: 13px; +} +div#footer div.bt { + background-image: url(pix/beige_box.png); + background-repeat: no-repeat; + background-position: 100% 0; + margin: 0 0 0 13px; + height: 12px; + background-color: transparent; + text-align: left; +} +div#footer div.i1 { + background-image: url(pix/beige_borders.png); + background-repeat: repeat-y; + background-position: 0 0; + background-color: transparent; + padding: 0 0 0 12px; +} +div#footer div.i2 { + background-image: url(pix/beige_borders.png); + background-repeat: repeat-y; + background-attachment: scroll; + background-position: 100% 0; + background-color: transparent; + padding: 0 12px 0 0; +} +div#footer div.i3 { + background-color: #f1ece6; + padding: 0 10px; + border-width: 1px 0; + border-style: solid; + border-color: #f1ece6; +} +div#footer div.bb div { + background-image: url(pix/beige_box.png); + background-repeat: no-repeat; + background-position: 0 100%; + background-color: transparent; + height: 12px; + left: -13px; + position: relative; + width: 13px; +} +div#footer div.bb { + background-image: url(pix/beige_box.png); + background-repeat: no-repeat; + background-position: 100% 100%; + margin: 0 0 0 13px; + height: 12px; + background-color: transparent; + text-align: left; +} +div#header div.bt div { + background-image: url(pix/beige_box.png); + background-repeat: no-repeat; + background-position: 0 0; + background-color: transparent; + height: 12px; + left: -13px; + position: relative; + width: 13px; +} +div#header div.bt { + background-image: url(pix/beige_box.png); + background-repeat: no-repeat; + background-position: 100% 0; + margin: 0 0 0 13px; + height: 12px; + background-color: transparent; +} +div#header div.i1 { + background-image: url(pix/beige_borders.png); + background-repeat: repeat-y; + background-position: 0 0; + background-color: transparent; + padding: 0 0 0 12px; +} +div#header div.i2 { + background-image: url(pix/beige_borders.png); + background-repeat: repeat-y; + background-attachment: scroll; + background-position: 100% 0; + background-color: transparent; + padding: 0 12px 0 0; +} +div#header div.i3 { + background-color: #F1ECE6; + padding: 0 10px; + border-top-width: 1px; + border-bottom-width: 1px; + border-style: solid none; + border-top-color: #F1ECE6; + border-bottom-color: #F1ECE6; +} +div#header div.bb div { + background-image: url(pix/beige_box.png); + background-repeat: no-repeat; + background-position: 0 100%; + background-color: transparent; + height: 12px; + left: -13px; + position: relative; + width: 13px; +} +div#header div.bb { + background-image: url(pix/beige_box.png); + background-repeat: no-repeat; + background-position: 100% 100%; + margin: 0 0 0 13px; + height: 12px; + background-color: transparent; +} +div#header-home div.bt div { + background-image: url(pix/beige_box.png); + background-repeat: no-repeat; + background-position: 0 0; + background-color: transparent; + height: 12px; + left: -13px; + position: relative; + width: 13px; +} +div#header-home div.bt { + background-image: url(pix/beige_box.png); + background-repeat: no-repeat; + background-position: 100% 0; + margin: 0 0 0 13px; + height: 12px; + background-color: transparent; +} +div#header-home div.i1 { + background-image: url(pix/beige_borders.png); + background-repeat: repeat-y; + background-position: 0 0; + background-color: transparent; + padding: 0 0 0 12px; +} +div#header-home div.i2 { + background-image: url(pix/beige_borders.png); + background-repeat: repeat-y; + background-attachment: scroll; + background-position: 100% 0; + background-color: transparent; + padding: 0 12px 0 0; +} +div#header-home div.i3 { + background-color: #F1ECE6; + padding: 0 10px; + border-top-width: 1px; + border-bottom-width: 1px; + border-style: solid none; + border-top-color: #F1ECE6; + border-bottom-color: #F1ECE6; +} +div#header-home div.bb div { + background-image: url(pix/beige_box.png); + background-repeat: no-repeat; + background-position: 0 100%; + background-color: transparent; + height: 12px; + left: -13px; + position: relative; + width: 13px; +} +div#header-home div.bb { + background-image: url(pix/beige_box.png); + background-repeat: no-repeat; + background-position: 100% 100%; + margin: 0 0 0 13px; + height: 12px; + background-color: transparent; +} +body.nocoursepage div#content div.bt div { + background-image: url(pix/box.png); + background-repeat: no-repeat; + background-position: 0 0; + background-color: transparent; + height: 12px; + left: -13px; + position: relative; + width: 13px; +} +body.nocoursepage div#content div.bt { + background-image: url(pix/box.png); + background-repeat: no-repeat; + background-position: 100% 0; + margin: 0 0 0 13px; + height: 12px; + background-color: transparent; +} +body.nocoursepage div#content div.i1 { + background-image: url(pix/borders.png); + background-repeat: repeat-y; + background-position: 0 0; + background-color: transparent; + padding: 0 0 0 12px; +} +body.nocoursepage div#content div.i2 { + background-image: url(pix/borders.png); + background-repeat: repeat-y; + background-attachment: scroll; + background-position: 100% 0; + background-color: transparent; + padding: 0 12px 0 0; +} +body.nocoursepage div#content div.i3 { + background-color: #FFFFFF; + padding: 0 10px; + border-width: 1px 0; + border-style: solid; + border-color: #FFFFFF; +} +body.nocoursepage div#content div.bb div { + background-image: url(pix/box.png); + background-repeat: no-repeat; + background-position: 0 100%; + background-color: transparent; + height: 12px; + left: -13px; + position: relative; + width: 13px; +} +body.nocoursepage div#content div.bb { + background-image: url(pix/box.png); + background-repeat: no-repeat; + background-position: 100% 100%; + margin: 0 0 0 13px; + height: 12px; + background-color: transparent; +} +td#middle-column tr.section { + background-image: url(pix/bottom_shadow_to_top.png); + background-repeat: repeat-x; + background-position: center bottom; + border: 1px solid #F1ECE6; +} +td#middle-column tr.separator { + background-image: none; + height: 1.5em; + border-style: none; +} +fieldset.clearfix { + background-image: url(pix/bottom_shadow_to_top.png); + background-repeat: repeat-x; + background-position: center bottom; +} +th.header { + background-image: url(pix/header.png); + background-repeat: repeat-x; + background-position: center bottom; + background-color: #FFFFFF; + padding-bottom: 5px; +} +form.mform legend { + color: #0066ff; + font-size: 120%; +} +div.coursebox div.summary { + width: 45%; +} +table.forumpost tr.header { + background-image: url(pix/header.png); + background-repeat: repeat-x; + background-position: left bottom; +} +table.forumpost { + margin-top: 20px; + border-style: none; +} +table.forumpost tr.header td.topic { + padding-bottom: 10px; + border-style: none; +} +table.forumpost div.commands { + background-image: url(pix/bottom_shadow_to_top.png); + background-repeat: repeat-x; + background-position: center bottom; + padding-bottom: 7px; + border-top-width: 1px; + border-bottom-width: 1px; + border-style: solid none; + border-top-color: #0066FF; + border-bottom-color: #F1ECE6; +} +table.forumheaderlist { + border-color: #F1ECE6; +} +table.forumheaderlist tr.discussion td { + border-color: #F1ECE6; +} +td.content { + border-right-width: 1px; + border-right-style: solid; + border-right-color: #F1ECE6; +} +div.glossarydisplay table.glossarypost { + border-color: #F1ECE6; +} +div.glossarydisplay div.entrybox { + border-color: #F1ECE6; +} +div.glossarydisplay hr { + color: #F1ECE6; + background-image: url(pix/bottom_shadow.png); + background-repeat: repeat-x; + background-position: left top; + height: 10px; + border-style: none; +} +div.mwiki div.tabtree { + margin-top: 10px; +} +table#categoryquestions { + margin-top: 10px; +} +div.que div.info { + padding-bottom: 7px; +} +div.que div.ablock { + padding-bottom: 5px; + border-bottom-width: 1px; + border-bottom-style: solid; + border-top-style: none; + border-bottom-color: #0066FF; +} +div.que div.qtext { + background-image: url(pix/bottom_shadow_to_top.png); + background-repeat: repeat-x; + background-position: center bottom; + padding-bottom: 7px; + margin-bottom: 10px; + padding-left: 5px; + border-left-width: 1px; + border-left-style: solid; + border-left-color: #F1ECE6; +} +div.que div.content { + margin: 5px 0 0; +} +body#course-user div.section { + border: 1px solid #F1ECE6; +} +body#course-user div.tabtree { + margin-bottom: 10px; +} -- 2.39.5