Changeset 6898
- Timestamp:
- 03/25/10 10:28:02 (2 years ago)
- Location:
- trunk/JQueryPlugin
- Files:
-
- 12 edited
-
data/System/JQueryPlugin.txt (modified) (1 diff)
-
lib/Foswiki/Plugins/JQueryPlugin.pm (modified) (1 diff)
-
lib/Foswiki/Plugins/JQueryPlugin/FOSWIKI.pm (modified) (1 diff)
-
lib/Foswiki/Plugins/JQueryPlugin/GRID.pm (modified) (2 diffs)
-
lib/Foswiki/Plugins/JQueryPlugin/Plugin.pm (modified) (3 diffs)
-
lib/Foswiki/Plugins/JQueryPlugin/Plugins.pm (modified) (1 diff)
-
lib/Foswiki/Plugins/JQueryPlugin/TOGGLE.pm (modified) (1 diff)
-
lib/Foswiki/Plugins/JQueryPlugin/VALIDATE.pm (modified) (1 diff)
-
pub/System/JQueryPlugin/i18n/Makefile (modified) (1 diff)
-
pub/System/JQueryPlugin/plugins/foswiki/jquery.foswiki.uncompressed.js (modified) (4 diffs)
-
pub/System/JQueryPlugin/plugins/textboxlist/jquery.textboxlist.uncompressed.js (modified) (5 diffs)
-
pub/System/JQueryPlugin/plugins/treeview/jquery.treeview.uncompressed.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JQueryPlugin/data/System/JQueryPlugin.txt
r6803 r6898 102 102 | Version: | %$VERSION% | 103 103 | Change History: | <!-- versions below in reverse order --> | 104 | 20 Mar 2010 (3.31): |Minifier CPAN libs removed from plugin. They will be in core CPAN lib in Foswiki 1.1 |105 | 14 Mar 2010 (3.30): |upgraded =validate= to v1.7; added =wikiword= validation method; \104 | 20 Mar 2010: | (3.31) Minifier CPAN libs removed from plugin. They will be in core CPAN lib in Foswiki 1.1 | 105 | 14 Mar 2010: | (3.30) upgraded =validate= to v1.7; added =wikiword= validation method; \ 106 106 fixed computation of line-height in =fluidfont=; \ 107 107 fixed height issue in =tabpane= | -
trunk/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin.pm
r6803 r6898 417 417 } 418 418 419 =begin TML420 421 ---++ ourAddToZone($zone, $tag, $text, $requires)422 423 This is a simple wrapper to call Foswiki::Func::addToZone() if available, or424 Foswiki::Func::addToHead() otherwise (in which case, everything is added to head)425 426 =cut427 428 sub ourAddToZone {429 my ($zone, $tag, $text, $requires) = @_;430 431 if (not exists &Foswiki::Func::addToZone) {432 Foswiki::Func::addToHEAD($tag, $text, $requires);433 } else {434 Foswiki::Func::addToZone($zone, $tag, $text, $requires);435 }436 437 return;438 }439 440 441 419 1; -
trunk/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/FOSWIKI.pm
r6642 r6898 91 91 my $footer = "<script type='text/javascript' src='%PUBURLPATH%/%SYSTEMWEB%/JQueryPlugin/plugins/foswiki/$js'></script>\n"; 92 92 93 Foswiki:: Plugins::JQueryPlugin::ourAddToZone('head', 'JQUERYPLUGIN::FOSWIKI', $header, 'JQUERYPLUGIN');94 Foswiki:: Plugins::JQueryPlugin::ourAddToZone('body', 'JQUERYPLUGIN::FOSWIKI', $footer, 'JQUERYPLUGIN');93 Foswiki::Func::addToZone('head', 'JQUERYPLUGIN::FOSWIKI', $header, 'JQUERYPLUGIN'); 94 Foswiki::Func::addToZone('body', 'JQUERYPLUGIN::FOSWIKI', $footer, 'JQUERYPLUGIN'); 95 95 96 96 } -
trunk/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/GRID.pm
r6748 r6898 87 87 88 88 my $header .= "<script type='text/javascript' src='$Foswiki::cfg{PubUrlPath}/$localePath'></script>\n"; 89 Foswiki:: Plugins::JQueryPlugin::ourAddToZone('body', "JQUERYPLUGIN::GRID::LANG", $header, 'JQUERYPLUGIN::UI');89 Foswiki::Func::addToZone('body', "JQUERYPLUGIN::GRID::LANG", $header, 'JQUERYPLUGIN::UI'); 90 90 } 91 91 … … 223 223 HERE 224 224 225 Foswiki:: Plugins::JQueryPlugin::ourAddToZone('body', "JQUERYPLUGIN::GRID::$gridId", $jsTemplate, 'JQUERYPLUGIN::GRID');225 Foswiki::Func::addToZone('body', "JQUERYPLUGIN::GRID::$gridId", $jsTemplate, 'JQUERYPLUGIN::GRID'); 226 226 227 227 my $result = "<table id='$gridId'></table>"; -
trunk/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/Plugin.pm
r6642 r6898 76 76 } 77 77 78 78 79 return $this; 79 80 } … … 99 100 # load all css 100 101 foreach my $css (@{$this->{css}}) { 101 $css =~ s/\.css$/.uncompressed.css/ if $this->{debug}; 102 $css .= '?version='.$this->{version}; 103 $header .= "<link rel='stylesheet' href='$this->{puburl}/$css' type='text/css' media='all' />\n"; 102 $header .= $this->renderCSS($css); 104 103 } 105 104 106 105 # load all javascript 107 106 foreach my $js (@{$this->{javascript}}) { 108 $js =~ s/\.js$/.uncompressed.js/ if $this->{debug}; 109 $js .= '?version='.$this->{version}; 110 $footer .= "<script type='text/javascript' src='$this->{puburl}/$js'></script>\n"; 107 $footer .= $this->renderJS($js); 111 108 } 112 109 … … 122 119 } 123 120 124 Foswiki:: Plugins::JQueryPlugin::ourAddToZone('head', "JQUERYPLUGIN::".uc($this->{name}), $header, join(', ', @dependencies))121 Foswiki::Func::addToZone('head', "JQUERYPLUGIN::".uc($this->{name}), $header, join(', ', @dependencies)) 125 122 if $header; 126 Foswiki:: Plugins::JQueryPlugin::ourAddToZone('body', "JQUERYPLUGIN::".uc($this->{name}), $footer, join(', ', @dependencies))123 Foswiki::Func::addToZone('body', "JQUERYPLUGIN::".uc($this->{name}), $footer, join(', ', @dependencies)) 127 124 if $footer; 128 125 129 126 return 1; 127 } 128 129 sub renderCSS { 130 my ($this, $text) = @_; 131 132 $text =~ s/\.css$/.uncompressed.css/ if $this->{debug}; 133 $text .= '?version='.$this->{version}; 134 $text = "<link rel='stylesheet' href='$this->{puburl}/$text' type='text/css' media='all' />\n"; 135 136 return $text; 137 } 138 139 sub renderJS { 140 my ($this, $text) = @_; 141 142 $text =~ s/\.js$/.uncompressed.js/ if $this->{debug}; 143 $text .= '?version='.$this->{version}; 144 $text = "<script type='text/javascript' src='$this->{puburl}/$text'></script>\n"; 145 146 return $text; 130 147 } 131 148 -
trunk/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/Plugins.pm
r6642 r6898 63 63 if $Foswiki::cfg{JQueryPlugin}{NoConflict}; 64 64 65 Foswiki:: Plugins::JQueryPlugin::ourAddToZone('body', 'JQUERYPLUGIN', $footer);65 Foswiki::Func::addToZone('body', 'JQUERYPLUGIN', $footer); 66 66 67 67 # initial plugins 68 68 createPlugin('Foswiki'); # this one is needed anyway 69 69 70 my $defaultPlugins = $Foswiki::cfg{JQueryPlugin}{DefaultPlugins}; 70 71 if ($defaultPlugins) { -
trunk/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/TOGGLE.pm
r6642 r6898 97 97 my $toggleId = "jqToggle".Foswiki::Plugins::JQueryPlugin::Plugins::getRandom(); 98 98 99 Foswiki:: Plugins::JQueryPlugin::ourAddToZone("head", "JQUERYPLUGIN::TOGGLE::$toggleId", <<"HERE", 'JQUERYPLUGIN::TOGGLE');99 Foswiki::Func::addToZone("head", "JQUERYPLUGIN::TOGGLE::$toggleId", <<"HERE", 'JQUERYPLUGIN::TOGGLE'); 100 100 <meta name="foswiki.jquery.toggle.$toggleId" content="{id:'$toggleId', onclick:$cmd}" /> 101 101 HERE -
trunk/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/VALIDATE.pm
r6748 r6898 74 74 if (-f $messageFile) { 75 75 $header .= "<script type='text/javascript' src='$Foswiki::cfg{PubUrlPath}/$messagePath'></script>\n"; 76 Foswiki:: Plugins::JQueryPlugin::ourAddToZone('body', "JQUERYPLUGIN::VALIDATE::LANG", $header, 'JQUERYPLUGIN::VALIDATE');76 Foswiki::Func::addToZone('body', "JQUERYPLUGIN::VALIDATE::LANG", $header, 'JQUERYPLUGIN::VALIDATE'); 77 77 } 78 78 -
trunk/JQueryPlugin/pub/System/JQueryPlugin/i18n/Makefile
r3748 r6898 1 all: jquery-ui-i18n.js jquery-ui-i18n.js.gz 1 TARGET=jquery-ui-i18n.js 2 2 -include ../Makefile.include 3 4 UI_DATEPICKER_SOURCE=\ 5 ui.datepicker-ar.js\ 6 ui.datepicker-bg.js\ 7 ui.datepicker-ca.js\ 8 ui.datepicker-cs.js\ 9 ui.datepicker-da.js\ 10 ui.datepicker-de.js\ 11 ui.datepicker-el.js\ 12 ui.datepicker-eo.js\ 13 ui.datepicker-es.js\ 14 ui.datepicker-fa.js\ 15 ui.datepicker-fi.js\ 16 ui.datepicker-fr.js\ 17 ui.datepicker-he.js\ 18 ui.datepicker-hr.js\ 19 ui.datepicker-hu.js\ 20 ui.datepicker-hy.js\ 21 ui.datepicker-id.js\ 22 ui.datepicker-is.js\ 23 ui.datepicker-it.js\ 24 ui.datepicker-ja.js\ 25 ui.datepicker-ko.js\ 26 ui.datepicker-lt.js\ 27 ui.datepicker-lv.js\ 28 ui.datepicker-ms.js\ 29 ui.datepicker-nl.js\ 30 ui.datepicker-no.js\ 31 ui.datepicker-pl.js\ 32 ui.datepicker-pt-BR.js\ 33 ui.datepicker-ro.js\ 34 ui.datepicker-ru.js\ 35 ui.datepicker-sk.js\ 36 ui.datepicker-sl.js\ 37 ui.datepicker-sq.js\ 38 ui.datepicker-sr-SR.js\ 39 ui.datepicker-sr.js\ 40 ui.datepicker-sv.js\ 41 ui.datepicker-th.js\ 42 ui.datepicker-tr.js\ 43 ui.datepicker-uk.js\ 44 ui.datepicker-zh-CN.js\ 45 ui.datepicker-zh-TW.js 46 47 jquery-ui-i18n.uncompressed.js: $(UI_DATEPICKER_SOURCE) 48 @echo "creating $@" 49 @$(CAT) $(UI_DATEPICKER_SOURCE) > $@ 50 -
trunk/JQueryPlugin/pub/System/JQueryPlugin/plugins/foswiki/jquery.foswiki.uncompressed.js
r6600 r6898 5 5 */ 6 6 var foswiki; 7 if (typeof(foswiki) == "undefined") {7 if (typeof(foswiki) === "undefined") { 8 8 foswiki = {}; 9 9 } … … 34 34 * based on the keys descriptor. 35 35 */ 36 f unction createMember(obj, keys, val) {36 foswiki.createMember = function(obj, keys, val) { 37 37 var key = keys.shift(); 38 38 if (keys.length > 0) { … … 42 42 } 43 43 // recurse 44 createMember(obj[key], keys, val);44 foswiki.createMember(obj[key], keys, val); 45 45 } else { 46 46 // store value … … 66 66 keys = this.name.split(/\./); 67 67 keys.shift(); // take out the first one 68 createMember(foswiki, keys, val);68 foswiki.createMember(foswiki, keys, val); 69 69 }); 70 70 }); -
trunk/JQueryPlugin/pub/System/JQueryPlugin/plugins/textboxlist/jquery.textboxlist.uncompressed.js
r6600 r6898 34 34 var self = this, autocompleteOpts; 35 35 self.input = $(elem); 36 elem.textboxList = self; 36 37 37 38 // build element specific options. … … 164 165 $.TextboxLister.prototype.select = function(values, suppressCallback) { 165 166 $.log("TEXTBOXLIST: called select("+values+") "+typeof(values)); 166 var self = this, i, j, val, found, currentVal, input, close;167 var self = this, i, j, val, label, found, currentVal, input, close; 167 168 168 169 if (typeof(values) === 'object') { … … 183 184 continue; 184 185 } 185 $.log("val='"+val+"'");186 186 for (j = 0; j < self.currentValues.length; j++) { 187 187 currentVal = self.currentValues[j]; … … 213 213 self.container.find("."+self.opts.listValueClass).remove(); 214 214 for (i = self.currentValues.length-1; i >= 0; i--) { 215 val = self.currentValues[i];215 val = label = self.currentValues[i]; 216 216 if (!val) { 217 217 continue; 218 218 } 219 if (val.match(/^(.+)=(.+)$/)) { 220 val = RegExp.$1; 221 label = RegExp.$2; 222 } 223 $.log("val="+val+" label="+label); 219 224 input = "<input type='hidden' name='"+self.opts.inputName+"' value='"+val+"' />"; 220 225 close = $("<a href='#' title='remove "+val+"'></a>"). 221 226 addClass(self.opts.closeClass). 222 click(function() { 223 self.deselect.call(self, $(this).parent().find("input").val()); 227 click(function(e) { 228 e.preventDefault(); 229 self.input.trigger("DeleteValue", $(this).parent().find("input").val()); 224 230 return false; 225 231 }); … … 227 233 append(input). 228 234 append(close). 229 append( val).235 append(label). 230 236 prependTo(self.container); 231 237 } -
trunk/JQueryPlugin/pub/System/JQueryPlugin/plugins/treeview/jquery.treeview.uncompressed.css
r4688 r6898 128 128 display: block; 129 129 } 130 130 .treeview .open .placeholder { 131 display:none; 132 } 133 .treeview .open .placeholder { 134 display:none; 135 }
Note: See TracChangeset
for help on using the changeset viewer.
