Commit c43522f248d01ff226297b223539dc1ab9b17e39
1 parent
c003b973
Exists in
master
and in
1 other branch
--no commit message
Showing
14 changed files
with
338 additions
and
40 deletions
Show diff stats
admin/index.html
@@ -85,7 +85,7 @@ que por sua vez contém temas.</p> | @@ -85,7 +85,7 @@ que por sua vez contém temas.</p> | ||
85 | <tr onclick="ajuda('a2',this)"><td><div class=ajuda ></div></td><td>Ajuda</td></tr> | 85 | <tr onclick="ajuda('a2',this)"><td><div class=ajuda ></div></td><td>Ajuda</td></tr> |
86 | <tr onclick="abre('html/i3geoadmin_perfis.html')"><td><div class=aplicar ></div></td><td>Editar a lista de perfis</td></tr> | 86 | <tr onclick="abre('html/i3geoadmin_perfis.html')"><td><div class=aplicar ></div></td><td>Editar a lista de perfis</td></tr> |
87 | <tr onclick="abre('html/i3geoadmin_tags.html')"><td><div class=aplicar ></div></td><td>Editar a lista de tags (palavras-chave)</td></tr> | 87 | <tr onclick="abre('html/i3geoadmin_tags.html')"><td><div class=aplicar ></div></td><td>Editar a lista de tags (palavras-chave)</td></tr> |
88 | -<tr onclick="abre('html/i3geoadmin_menus.html')"><td><div class=aplicar ></div></td><td>Editar a lista de menus</td></tr> | 88 | +<tr onclick="abre('html/menus.html')"><td><div class=aplicar ></div></td><td>Editar a lista de menus</td></tr> |
89 | <tr onclick="abre('html/i3geoadmin_grupos.html')"><td><div class=aplicar ></div></td><td>Editar a lista de grupos</td></tr> | 89 | <tr onclick="abre('html/i3geoadmin_grupos.html')"><td><div class=aplicar ></div></td><td>Editar a lista de grupos</td></tr> |
90 | <tr onclick="abre('html/i3geoadmin_subgrupos.html')"><td><div class=aplicar ></div></td><td>Editar a lista de sub-grupos</td></tr> | 90 | <tr onclick="abre('html/i3geoadmin_subgrupos.html')"><td><div class=aplicar ></div></td><td>Editar a lista de sub-grupos</td></tr> |
91 | <tr onclick="abre('html/i3geoadmin_temas.html')"><td><div class=aplicar ></div></td><td>Editar a lista de temas</td></tr> | 91 | <tr onclick="abre('html/i3geoadmin_temas.html')"><td><div class=aplicar ></div></td><td>Editar a lista de temas</td></tr> |
admin/js/core.js
@@ -183,11 +183,124 @@ botao - id do elemento que deverá ser lcicado para abrir o painel | @@ -183,11 +183,124 @@ botao - id do elemento que deverá ser lcicado para abrir o painel | ||
183 | */ | 183 | */ |
184 | function core_ativaPainelAjuda(id,botao) | 184 | function core_ativaPainelAjuda(id,botao) |
185 | { | 185 | { |
186 | - YAHOO.example.container.panelAjuda = new YAHOO.widget.Panel(id, { width:"350px", height:"200px",overflow:"auto", visible:false,constraintoviewport:true } ); | ||
187 | - YAHOO.example.container.panelAjuda.render(); | 186 | + if(!YAHOO.example.container.panelAjuda) |
187 | + { | ||
188 | + YAHOO.example.container.panelAjuda = new YAHOO.widget.Panel(id, { width:"350px", height:"200px",overflow:"auto", visible:false,constraintoviewport:true } ); | ||
189 | + YAHOO.example.container.panelAjuda.render(); | ||
190 | + } | ||
188 | YAHOO.util.Event.addListener(botao, "click", YAHOO.example.container.panelAjuda.show, YAHOO.example.container.panelAjuda, true); | 191 | YAHOO.util.Event.addListener(botao, "click", YAHOO.example.container.panelAjuda.show, YAHOO.example.container.panelAjuda, true); |
189 | } | 192 | } |
193 | +/* | ||
194 | +function: core_pegaPerfis | ||
195 | + | ||
196 | +Pega a lista de perfis | ||
197 | + | ||
198 | +Parameters: | ||
199 | + | ||
200 | +funcao - (opcional) string com o nome da funcao que será executada após a chamada ajax ter tido sucesso | ||
201 | + | ||
202 | +Return | ||
203 | + | ||
204 | +$perfis - variável global com o objeto perfis | ||
205 | + | ||
206 | +$perfisArray - array com a lista de perfis | ||
207 | +*/ | ||
208 | +function core_pegaPerfis(funcao) | ||
209 | +{ | ||
210 | + if(arguments.length == 0) | ||
211 | + {var funcao = "";} | ||
212 | + //pega a lista de perfis | ||
213 | + var sUrl = "../php/menutemas.php?funcao=pegaPerfisYUI"; | ||
214 | + var callback = | ||
215 | + { | ||
216 | + success:function(o) | ||
217 | + { | ||
218 | + try | ||
219 | + { | ||
220 | + $perfis = YAHOO.lang.JSON.parse(o.responseText); | ||
221 | + $perfisArray = new Array(); | ||
222 | + for (i=0;i<$perfis.length;i++) | ||
223 | + {$perfisArray.push($perfis[i].perfil);} | ||
224 | + if(funcao != "") | ||
225 | + eval(funcao); | ||
226 | + } | ||
227 | + catch(e){core_handleFailure(o,o.responseText);} | ||
228 | + }, | ||
229 | + failure:core_handleFailure, | ||
230 | + argument: { foo:"foo", bar:"bar" } | ||
231 | + }; | ||
232 | + core_makeRequest(sUrl,callback) | ||
233 | +} | ||
234 | +/* | ||
235 | +Function: gera uma janela flutuante com opções de escolha baseadas em checkbox | ||
236 | + | ||
237 | +Parameters: | ||
238 | + | ||
239 | +valores - array com os valores de cada checkbox | ||
240 | + | ||
241 | +textos - array com os nomes de cada checkbox | ||
242 | + | ||
243 | +selecionados - array com os valores marcados | ||
190 | 244 | ||
245 | +target - objeto para receber o resultado | ||
246 | +*/ | ||
247 | +function core_menuCheckBox(valores,textos,selecionados,target,record,key) | ||
248 | +{ | ||
249 | + function on_menuCheckBoxChange(p_oEvent) | ||
250 | + { | ||
251 | + var ins = ""; | ||
252 | + if(p_oEvent.newValue.get("value") == "OK") | ||
253 | + { | ||
254 | + var cks = $i("core_menuCK_bd").getElementsByTagName("input"); | ||
255 | + var ins = new Array(); | ||
256 | + for (i=0;i<cks.length;i++) | ||
257 | + { | ||
258 | + if(cks[i].checked) | ||
259 | + ins.push(cks[i].value) | ||
260 | + } | ||
261 | + target.innerHTML = "<pre ><p>"+ins.toString()+"</pre>" | ||
262 | + record.setData(key,ins.toString()); | ||
263 | + } | ||
264 | + YAHOO.example.container.panelCK.destroy(); | ||
265 | + }; | ||
266 | + if(!$i("core_menuCK")) | ||
267 | + { | ||
268 | + var novoel = document.createElement("div"); | ||
269 | + novoel.id = "core_menuCK"; | ||
270 | + var ndiv = document.createElement("div"); | ||
271 | + ndiv.className= "yui-dt-editor"; | ||
272 | + ndiv.style.height = "144px"; | ||
273 | + ndiv.style.overflow = "auto"; | ||
274 | + ndiv.innerHTML = "<div id='okcancel_checkbox'></div><div id='core_menuCK_bd'></div>"; | ||
275 | + novoel.appendChild(ndiv); | ||
276 | + document.body.appendChild(novoel); | ||
277 | + var og_core = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id", name: "okcancel_checkbox_id", container: "okcancel_checkbox" }); | ||
278 | + og_core.addButtons([ | ||
279 | + { label: "OK", value: "OK", checked: false}, | ||
280 | + { label: "Cancel", value: "CANCEL", checked: false } | ||
281 | + ]); | ||
282 | + og_core.on("checkedButtonChange", on_menuCheckBoxChange); | ||
283 | + YAHOO.example.container.panelCK = new YAHOO.widget.Overlay("core_menuCK", { close:false,underlay:false,width:"200px", height:"200px",overflow:"auto", visible:false,constraintoviewport:true } ); | ||
284 | + YAHOO.example.container.panelCK.render(); | ||
285 | + } | ||
286 | + var onde = $i("core_menuCK_bd"); | ||
287 | + onde.innerHTML = ""; | ||
288 | + for (i=0;i<valores.length;i++) | ||
289 | + { | ||
290 | + var novoCK = document.createElement("div"); | ||
291 | + var ck = ""; | ||
292 | + for(j=0;j<selecionados.length;j++) | ||
293 | + { | ||
294 | + if(selecionados[j] == valores[i]) | ||
295 | + var ck = "CHECKED"; | ||
296 | + } | ||
297 | + var ins = "<input type=checkbox id='CK_"+valores[i]+"' value='"+valores[i]+"' "+ck+" />"+textos[i]+"<br>"; | ||
298 | + novoCK.innerHTML = ins; | ||
299 | + onde.appendChild(novoCK); | ||
300 | + } | ||
301 | + YAHOO.example.container.panelCK.moveTo(YAHOO.util.Dom.getX(target),YAHOO.util.Dom.getY(target)); | ||
302 | + YAHOO.example.container.panelCK.show(); | ||
303 | +} | ||
191 | // | 304 | // |
192 | //define o local correto dos programas | 305 | //define o local correto dos programas |
193 | var scriptLocation = ""; | 306 | var scriptLocation = ""; |
@@ -207,15 +320,19 @@ for (i = 0; i < scripts.length; i++) { | @@ -207,15 +320,19 @@ for (i = 0; i < scripts.length; i++) { | ||
207 | // | 320 | // |
208 | //arquivos javascript que serão carregados | 321 | //arquivos javascript que serão carregados |
209 | // | 322 | // |
323 | +/* | ||
324 | +<?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?> | ||
325 | +<?php if(extension_loaded('zlib')){ob_end_flush();}?> | ||
326 | +*/ | ||
210 | var jsfiles = new Array( | 327 | var jsfiles = new Array( |
211 | -"../../pacotes/yui252/build/utilities/utilities.js", | ||
212 | -"../../pacotes/yui252/build/yahoo-dom-event/yahoo-dom-event.js", | 328 | +"../../pacotes/yui252/build/utilities/utilities.php", |
329 | +"../../pacotes/yui252/build/yahoo-dom-event/yahoo-dom-event.php", | ||
213 | "../../pacotes/yui252/build/element/element-beta-min.js", | 330 | "../../pacotes/yui252/build/element/element-beta-min.js", |
214 | "../../pacotes/yui252/build/datasource/datasource-beta-min.js", | 331 | "../../pacotes/yui252/build/datasource/datasource-beta-min.js", |
215 | -"../../pacotes/yui252/build/datatable/datatable-beta-min.js", | ||
216 | -"../../pacotes/yui252/build/button/button-min.js", | ||
217 | -"../../pacotes/yui252/build/dragdrop/dragdrop-min.js", | ||
218 | -"../../pacotes/yui252/build/container/container-min.js", | 332 | +"../../pacotes/yui252/build/datatable/datatable-beta-min.php", |
333 | +"../../pacotes/yui252/build/button/button-min.php", | ||
334 | +"../../pacotes/yui252/build/dragdrop/dragdrop-min.php", | ||
335 | +"../../pacotes/yui252/build/container/container-min.php", | ||
219 | "../../pacotes/yui252/build/connection/connection-min.js", | 336 | "../../pacotes/yui252/build/connection/connection-min.js", |
220 | "../../pacotes/yui252/build/json/json-min.js" | 337 | "../../pacotes/yui252/build/json/json-min.js" |
221 | ); | 338 | ); |
admin/js/menu.js
@@ -4,8 +4,7 @@ function initMenu() | @@ -4,8 +4,7 @@ function initMenu() | ||
4 | ativaBotaoAdicionaMenu() | 4 | ativaBotaoAdicionaMenu() |
5 | core_carregando(); | 5 | core_carregando(); |
6 | core_ativaPainelAjuda("ajuda","botaoAjuda"); | 6 | core_ativaPainelAjuda("ajuda","botaoAjuda"); |
7 | - pegaMenus(); | ||
8 | - pegaPerfis(); | 7 | + core_pegaPerfis("pegaMenus()"); |
9 | } | 8 | } |
10 | function ativaBotaoAdicionaMenu() | 9 | function ativaBotaoAdicionaMenu() |
11 | { | 10 | { |
@@ -29,23 +28,6 @@ function ativaBotaoAdicionaMenu() | @@ -29,23 +28,6 @@ function ativaBotaoAdicionaMenu() | ||
29 | //cria o botão de adição de um novo menu | 28 | //cria o botão de adição de um novo menu |
30 | var adiciona = new YAHOO.widget.Button("adiciona",{ onclick: { fn: adicionalinha } }); | 29 | var adiciona = new YAHOO.widget.Button("adiciona",{ onclick: { fn: adicionalinha } }); |
31 | } | 30 | } |
32 | -function pegaPerfis() | ||
33 | -{ | ||
34 | - //pega a lista de perfis | ||
35 | - var sUrl = "../php/menutemas.php?funcao=pegaPerfisYUI"; | ||
36 | - var callback = | ||
37 | - { | ||
38 | - success:function(o) | ||
39 | - { | ||
40 | - try | ||
41 | - {$perfis = YAHOO.lang.JSON.parse(o.responseText);} | ||
42 | - catch(e){core_handleFailure(o,o.responseText);} | ||
43 | - }, | ||
44 | - failure:core_handleFailure, | ||
45 | - argument: { foo:"foo", bar:"bar" } | ||
46 | - }; | ||
47 | - core_makeRequest(sUrl,callback) | ||
48 | -} | ||
49 | function pegaMenus() | 31 | function pegaMenus() |
50 | { | 32 | { |
51 | var sUrl = "../php/menutemas.php?funcao=pegaMenusYUI"; | 33 | var sUrl = "../php/menutemas.php?funcao=pegaMenusYUI"; |
@@ -77,15 +59,15 @@ function montaTabela(dados) | @@ -77,15 +59,15 @@ function montaTabela(dados) | ||
77 | }; | 59 | }; |
78 | var formatExclui = function(elCell, oRecord, oColumn) | 60 | var formatExclui = function(elCell, oRecord, oColumn) |
79 | { | 61 | { |
80 | - elCell.innerHTML = "<div class=excluir style='text-align:center' onclick='excluiLinha(\""+oRecord.getData("id_menu")+"\",\""+oRecord.getId()+"\")'></div>"; | 62 | + elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>";//onclick='excluiLinha(\""+oRecord.getData("id_menu")+"\",\""+oRecord.getId()+"\")'></div>"; |
81 | }; | 63 | }; |
82 | var myColumnDefs = [ | 64 | var myColumnDefs = [ |
83 | - {label:"exclui",formatter:formatExclui}, | ||
84 | - {label:"salva",formatter:formatSalva}, | 65 | + {key:"excluir",label:"",formatter:formatExclui}, |
66 | + {label:"salvar",formatter:formatSalva}, | ||
85 | {label:"id",key:"id_menu", formatter:formatTexto}, | 67 | {label:"id",key:"id_menu", formatter:formatTexto}, |
86 | {label:"nome",resizeable:true,key:"nome_menu", formatter:formatTexto, editor:"textbox"}, | 68 | {label:"nome",resizeable:true,key:"nome_menu", formatter:formatTexto, editor:"textbox"}, |
87 | {label:"publicado?",key:"publicado_menu",editor:"radio" ,editorOptions:{radioOptions:["SIM","NAO"],disableBtns:false}}, | 69 | {label:"publicado?",key:"publicado_menu",editor:"radio" ,editorOptions:{radioOptions:["SIM","NAO"],disableBtns:false}}, |
88 | - {label:"perfis",resizeable:true,key:"perfil_menu", formatter:formatTexto, editor:"textbox"}, | 70 | + {label:"perfis",resizeable:true,key:"perfil_menu", formatter:formatTexto,editor:"textbox"}, |
89 | {label:"aberto?",key:"aberto", editor:"radio" ,editorOptions:{radioOptions:["SIM","NAO"],disableBtns:false}}, | 71 | {label:"aberto?",key:"aberto", editor:"radio" ,editorOptions:{radioOptions:["SIM","NAO"],disableBtns:false}}, |
90 | {label:"descrição",resizeable:true,key:"desc_menu", formatter:formatTexto, editor:"textbox"} | 72 | {label:"descrição",resizeable:true,key:"desc_menu", formatter:formatTexto, editor:"textbox"} |
91 | ]; | 73 | ]; |
@@ -107,7 +89,29 @@ function montaTabela(dados) | @@ -107,7 +89,29 @@ function montaTabela(dados) | ||
107 | }; | 89 | }; |
108 | myDataTable.subscribe("cellMouseoverEvent", myDataTable.highlightEditableCell); | 90 | myDataTable.subscribe("cellMouseoverEvent", myDataTable.highlightEditableCell); |
109 | myDataTable.subscribe("cellMouseoutEvent", myDataTable.onEventUnhighlightCell); | 91 | myDataTable.subscribe("cellMouseoutEvent", myDataTable.onEventUnhighlightCell); |
110 | - myDataTable.subscribe("cellClickEvent", myDataTable.onEventShowCellEditor); | 92 | + //myDataTable.subscribe("cellClickEvent", myDataTable.onEventShowCellEditor); |
93 | + myDataTable.subscribe('cellClickEvent',function(ev) | ||
94 | + { | ||
95 | + var target = YAHOO.util.Event.getTarget(ev); | ||
96 | + var column = this.getColumn(target); | ||
97 | + if (column.key == 'excluir') | ||
98 | + { | ||
99 | + var record = this.getRecord(target); | ||
100 | + excluiLinha(record.getData('id_menu'),target); | ||
101 | + } | ||
102 | + else | ||
103 | + { | ||
104 | + if (column.key == 'perfil_menu') | ||
105 | + { | ||
106 | + var record = this.getRecord(target); | ||
107 | + var selecionados = record.getData('perfil_menu'); | ||
108 | + var selecionados = selecionados.split(","); | ||
109 | + core_menuCheckBox($perfisArray,$perfisArray,selecionados,target,record,"perfil_menu"); | ||
110 | + } | ||
111 | + else | ||
112 | + {this.onEventShowCellEditor(ev);} | ||
113 | + } | ||
114 | + }); | ||
111 | 115 | ||
112 | // Hook into custom event to customize save-flow of "radio" editor | 116 | // Hook into custom event to customize save-flow of "radio" editor |
113 | myDataTable.subscribe("editorUpdateEvent", function(oArgs) | 117 | myDataTable.subscribe("editorUpdateEvent", function(oArgs) |
@@ -161,9 +165,8 @@ function excluiLinha(id,row) | @@ -161,9 +165,8 @@ function excluiLinha(id,row) | ||
161 | { | 165 | { |
162 | try | 166 | try |
163 | { | 167 | { |
164 | - pegaMenus(); | ||
165 | - //ativaBotaoAdicionaMenu(); | ||
166 | - //core_ativaPainelAjuda("ajuda","botaoAjuda"); | 168 | + myDataTable.deleteRow(row); |
169 | + YAHOO.example.container.wait.hide(); | ||
167 | } | 170 | } |
168 | catch(e){core_handleFailure(o,o.responseText);} | 171 | catch(e){core_handleFailure(o,o.responseText);} |
169 | }, | 172 | }, |
admin/php/menutemas.php
@@ -51,8 +51,7 @@ switch ($funcao) | @@ -51,8 +51,7 @@ switch ($funcao) | ||
51 | 51 | ||
52 | case "pegaMenusYUI": | 52 | case "pegaMenusYUI": |
53 | $dados = pegaDados('SELECT * from i3geoadmin_menus order by nome_menu'); | 53 | $dados = pegaDados('SELECT * from i3geoadmin_menus order by nome_menu'); |
54 | - echo json_encode($dados); | ||
55 | - exit; | 54 | + retornaJSON($dados); |
56 | break; | 55 | break; |
57 | 56 | ||
58 | case "pegaTags": | 57 | case "pegaTags": |
@@ -67,8 +66,7 @@ switch ($funcao) | @@ -67,8 +66,7 @@ switch ($funcao) | ||
67 | 66 | ||
68 | case "pegaPerfisYUI": | 67 | case "pegaPerfisYUI": |
69 | $dados = pegaDados('SELECT * from i3geoadmin_perfis order by perfil'); | 68 | $dados = pegaDados('SELECT * from i3geoadmin_perfis order by perfil'); |
70 | - echo json_encode($dados); | ||
71 | - exit; | 69 | + retornaJSON($dados); |
72 | break; | 70 | break; |
73 | 71 | ||
74 | case "alteraMenus": | 72 | case "alteraMenus": |
@@ -148,6 +146,13 @@ switch ($funcao) | @@ -148,6 +146,13 @@ switch ($funcao) | ||
148 | $cp->return_data(); | 146 | $cp->return_data(); |
149 | break; | 147 | break; |
150 | } | 148 | } |
149 | +function retornaJSON($obj) | ||
150 | +{ | ||
151 | + if(extension_loaded('zlib')){ob_start('ob_gzhandler');} | ||
152 | + echo json_encode($obj); | ||
153 | + if(extension_loaded('zlib')){ob_end_flush();} | ||
154 | + exit; | ||
155 | +} | ||
151 | function excluiPerfil($id) | 156 | function excluiPerfil($id) |
152 | { | 157 | { |
153 | require_once("conexao.php"); | 158 | require_once("conexao.php"); |
menutemas/admin.db
No preview for this file type
@@ -0,0 +1,25 @@ | @@ -0,0 +1,25 @@ | ||
1 | +<?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?> | ||
2 | +/* | ||
3 | +Copyright (c) 2008, Yahoo! Inc. All rights reserved. | ||
4 | +Code licensed under the BSD License: | ||
5 | +http://developer.yahoo.net/yui/license.txt | ||
6 | +version: 2.5.2 | ||
7 | +*/ | ||
8 | +(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F);};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames);},setAttribute:function(C,E,D){if(this.patterns.noNegatives.test(C)){E=(E>0)?E:0;}B.Dom.setStyle(this.getEl(),C,E+D);},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}return G;},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1;}}else{E=I+F[D]["by"]*1;}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true;},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M);};this.getEl=function(){return E;};this.isAnimated=function(){return D;};this.getStartTime=function(){return F;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}B.AnimMgr.registerElement(this);return true;};this.stop=function(M){if(!this.isAnimated()){return false;}if(M){this.currentFrame=this.totalFrames;this._onTween.fire();}B.AnimMgr.stop(this);};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M);}D=true;H=0;F=new Date();};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame);};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit);}H+=1;};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps);};D=false;H=0;this.onComplete.fire(N);};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G);}};B.Anim=A;})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false;}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval(this.run,this.delay);}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0);}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G;}}return -1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H);};A.NAME="ColorAnim";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E;}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)];}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)];}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)];}return null;};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var H=YAHOO.util.Dom.getStyle(G,E); | ||
9 | +if(this.patterns.transparent.test(H)){var F=G.parentNode;H=C.Dom.getStyle(F,E);while(F&&this.patterns.transparent.test(H)){F=F.parentNode;H=C.Dom.getStyle(F,E);if(F.tagName.toUpperCase()=="HTML"){H="#fff";}}}}else{H=D.getAttribute.call(this,E);}return H;};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H]);}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")";}else{I=D.doMethod.call(this,F,J,G);}return I;};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I];}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G;}};C.ColorAnim=A;})(); | ||
10 | +/* | ||
11 | +TERMS OF USE - EASING EQUATIONS | ||
12 | +Open source under the BSD License. | ||
13 | +Copyright 2001 Robert Penner All rights reserved. | ||
14 | + | ||
15 | +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | ||
16 | + | ||
17 | + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
18 | + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | ||
19 | + * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. | ||
20 | + | ||
21 | +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
22 | +*/ | ||
23 | +YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return -D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return -D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return -D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return -(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return -0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J);}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H);}else{F.setAttribute.call(this,G,I,H);}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")];}else{H=F.getAttribute.call(this,G);}return H;};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I);}else{J=F.doMethod.call(this,G,K,H);}return J;};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0] instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M];}L=K;}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative");}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"]);}else{E.Dom.setXY(H,E.Dom.getXY(H));}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G); | ||
24 | +var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.5.2",build:"1076"}); | ||
25 | +<?php if(extension_loaded('zlib')){ob_end_flush();}?> | ||
0 | \ No newline at end of file | 26 | \ No newline at end of file |
@@ -0,0 +1,13 @@ | @@ -0,0 +1,13 @@ | ||
1 | +<?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?> | ||
2 | +/* | ||
3 | +Copyright (c) 2008, Yahoo! Inc. All rights reserved. | ||
4 | +Code licensed under the BSD License: | ||
5 | +http://developer.yahoo.net/yui/license.txt | ||
6 | +version: 2.5.2 | ||
7 | +*/ | ||
8 | +(function(){var G=YAHOO.util.Dom,M=YAHOO.util.Event,I=YAHOO.lang,L=YAHOO.env.ua,B=YAHOO.widget.Overlay,J=YAHOO.widget.Menu,D={},K=null,E=null,C=null;function F(O,N,R,P){var S,Q;if(I.isString(O)&&I.isString(N)){if(L.ie){Q='<input type="'+O+'" name="'+N+'"';if(P){Q+=" checked";}Q+=">";S=document.createElement(Q);}else{S=document.createElement("input");S.name=N;S.type=O;if(P){S.checked=true;}}S.value=R;return S;}}function H(O,U){var N=O.nodeName.toUpperCase(),S=this,T,P,Q;function V(W){if(!(W in U)){T=O.getAttributeNode(W);if(T&&("value" in T)){U[W]=T.value;}}}function R(){V("type");if(U.type=="button"){U.type="push";}if(!("disabled" in U)){U.disabled=O.disabled;}V("name");V("value");V("title");}switch(N){case"A":U.type="link";V("href");V("target");break;case"INPUT":R();if(!("checked" in U)){U.checked=O.checked;}break;case"BUTTON":R();P=O.parentNode.parentNode;if(G.hasClass(P,this.CSS_CLASS_NAME+"-checked")){U.checked=true;}if(G.hasClass(P,this.CSS_CLASS_NAME+"-disabled")){U.disabled=true;}O.removeAttribute("value");O.setAttribute("type","button");break;}O.removeAttribute("id");O.removeAttribute("name");if(!("tabindex" in U)){U.tabindex=O.tabIndex;}if(!("label" in U)){Q=N=="INPUT"?O.value:O.innerHTML;if(Q&&Q.length>0){U.label=Q;}}}function A(P){var O=P.attributes,N=O.srcelement,R=N.nodeName.toUpperCase(),Q=this;if(R==this.NODE_NAME){P.element=N;P.id=N.id;G.getElementsBy(function(S){switch(S.nodeName.toUpperCase()){case"BUTTON":case"A":case"INPUT":H.call(Q,S,O);break;}},"*",N);}else{switch(R){case"BUTTON":case"A":case"INPUT":H.call(this,N,O);break;}}}YAHOO.widget.Button=function(R,O){if(!B&&YAHOO.widget.Overlay){B=YAHOO.widget.Overlay;}if(!J&&YAHOO.widget.Menu){J=YAHOO.widget.Menu;}var Q=YAHOO.widget.Button.superclass.constructor,P,N;if(arguments.length==1&&!I.isString(R)&&!R.nodeName){if(!R.id){R.id=G.generateId();}Q.call(this,(this.createButtonElement(R.type)),R);}else{P={element:null,attributes:(O||{})};if(I.isString(R)){N=G.get(R);if(N){if(!P.attributes.id){P.attributes.id=R;}P.attributes.srcelement=N;A.call(this,P);if(!P.element){P.element=this.createButtonElement(P.attributes.type);}Q.call(this,P.element,P.attributes);}}else{if(R.nodeName){if(!P.attributes.id){if(R.id){P.attributes.id=R.id;}else{P.attributes.id=G.generateId();}}P.attributes.srcelement=R;A.call(this,P);if(!P.element){P.element=this.createButtonElement(P.attributes.type);}Q.call(this,P.element,P.attributes);}}}};YAHOO.extend(YAHOO.widget.Button,YAHOO.util.Element,{_button:null,_menu:null,_hiddenFields:null,_onclickAttributeValue:null,_activationKeyPressed:false,_activationButtonPressed:false,_hasKeyEventHandlers:false,_hasMouseEventHandlers:false,NODE_NAME:"SPAN",CHECK_ACTIVATION_KEYS:[32],ACTIVATION_KEYS:[13,32],OPTION_AREA_WIDTH:20,CSS_CLASS_NAME:"yui-button",RADIO_DEFAULT_TITLE:"Unchecked. Click to check.",RADIO_CHECKED_TITLE:"Checked. Click another button to uncheck",CHECKBOX_DEFAULT_TITLE:"Unchecked. Click to check.",CHECKBOX_CHECKED_TITLE:"Checked. Click to uncheck.",MENUBUTTON_DEFAULT_TITLE:"Menu collapsed. Click to expand.",MENUBUTTON_MENU_VISIBLE_TITLE:"Menu expanded. Click or press Esc to collapse.",SPLITBUTTON_DEFAULT_TITLE:("Menu collapsed. Click inside option "+"region or press Ctrl + Shift + M to show the menu."),SPLITBUTTON_OPTION_VISIBLE_TITLE:"Menu expanded. Press Esc or Ctrl + Shift + M to hide the menu.",SUBMIT_TITLE:"Click to submit form.",_setType:function(N){if(N=="split"){this.on("option",this._onOption);}},_setLabel:function(O){this._button.innerHTML=O;var P,N=L.gecko;if(N&&N<1.9&&G.inDocument(this.get("element"))){P=this.CSS_CLASS_NAME;this.removeClass(P);I.later(0,this,this.addClass,P);}},_setTabIndex:function(N){this._button.tabIndex=N;},_setTitle:function(O){var N=O;if(this.get("type")!="link"){if(!N){switch(this.get("type")){case"radio":N=this.RADIO_DEFAULT_TITLE;break;case"checkbox":N=this.CHECKBOX_DEFAULT_TITLE;break;case"menu":N=this.MENUBUTTON_DEFAULT_TITLE;break;case"split":N=this.SPLITBUTTON_DEFAULT_TITLE;break;case"submit":N=this.SUBMIT_TITLE;break;}}this._button.title=N;}},_setDisabled:function(N){if(this.get("type")!="link"){if(N){if(this._menu){this._menu.hide();}if(this.hasFocus()){this.blur();}this._button.setAttribute("disabled","disabled");this.addStateCSSClasses("disabled");this.removeStateCSSClasses("hover");this.removeStateCSSClasses("active");this.removeStateCSSClasses("focus");}else{this._button.removeAttribute("disabled");this.removeStateCSSClasses("disabled");}}},_setHref:function(N){if(this.get("type")=="link"){this._button.href=N;}},_setTarget:function(N){if(this.get("type")=="link"){this._button.setAttribute("target",N);}},_setChecked:function(O){var P=this.get("type"),N;if(P=="checkbox"||P=="radio"){if(O){this.addStateCSSClasses("checked");N=(P=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE;}else{this.removeStateCSSClasses("checked");N=(P=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE;}this.set("title",N);}},_setMenu:function(X){var R=this.get("lazyloadmenu"),U=this.get("element"),N,Z=false,a,Q,T,P,O,W,S;if(!B){return false;}if(J){N=J.prototype.CSS_CLASS_NAME;}function Y(){a.render(U.parentNode);this.removeListener("appendTo",Y);}function V(){if(a){G.addClass(a.element,this.get("menuclassname"));G.addClass(a.element,"yui-"+this.get("type")+"-button-menu");a.showEvent.subscribe(this._onMenuShow,null,this);a.hideEvent.subscribe(this._onMenuHide,null,this);a.renderEvent.subscribe(this._onMenuRender,null,this);if(J&&a instanceof J){a.keyDownEvent.subscribe(this._onMenuKeyDown,this,true);a.subscribe("click",this._onMenuClick,this,true);a.itemAddedEvent.subscribe(this._onMenuItemAdded,this,true);T=a.srcElement;if(T&&T.nodeName.toUpperCase()=="SELECT"){T.style.display="none";T.parentNode.removeChild(T);}}else{if(B&&a instanceof B){if(!K){K=new YAHOO.widget.OverlayManager();}K.register(a);}}this._menu=a;if(!Z){if(R&&J&&!(a instanceof J)){a.beforeShowEvent.subscribe(this._onOverlayBeforeShow,null,this);}else{if(!R){if(G.inDocument(U)){a.render(U.parentNode); | ||
9 | +}else{this.on("appendTo",Y);}}}}}}if(X&&J&&(X instanceof J)){a=X;P=a.getItems();O=P.length;Z=true;if(O>0){S=O-1;do{W=P[S];if(W){W.cfg.subscribeToConfigEvent("selected",this._onMenuItemSelected,W,this);}}while(S--);}V.call(this);}else{if(B&&X&&(X instanceof B)){a=X;Z=true;a.cfg.setProperty("visible",false);a.cfg.setProperty("context",[U,"tl","bl"]);V.call(this);}else{if(J&&I.isArray(X)){this.on("appendTo",function(){a=new J(G.generateId(),{lazyload:R,itemdata:X});V.call(this);});}else{if(I.isString(X)){Q=G.get(X);if(Q){if(J&&G.hasClass(Q,N)||Q.nodeName.toUpperCase()=="SELECT"){a=new J(X,{lazyload:R});V.call(this);}else{if(B){a=new B(X,{visible:false,context:[U,"tl","bl"]});V.call(this);}}}}else{if(X&&X.nodeName){if(J&&G.hasClass(X,N)||X.nodeName.toUpperCase()=="SELECT"){a=new J(X,{lazyload:R});V.call(this);}else{if(B){if(!X.id){G.generateId(X);}a=new B(X,{visible:false,context:[U,"tl","bl"]});V.call(this);}}}}}}}},_setOnClick:function(N){if(this._onclickAttributeValue&&(this._onclickAttributeValue!=N)){this.removeListener("click",this._onclickAttributeValue.fn);this._onclickAttributeValue=null;}if(!this._onclickAttributeValue&&I.isObject(N)&&I.isFunction(N.fn)){this.on("click",N.fn,N.obj,N.scope);this._onclickAttributeValue=N;}},_setSelectedMenuItem:function(O){var N=this._menu,P;if(J&&N&&N instanceof J){P=N.getItem(O);if(P&&!P.cfg.getProperty("selected")){P.cfg.setProperty("selected",true);}}},_isActivationKey:function(N){var R=this.get("type"),O=(R=="checkbox"||R=="radio")?this.CHECK_ACTIVATION_KEYS:this.ACTIVATION_KEYS,Q=O.length,P;if(Q>0){P=Q-1;do{if(N==O[P]){return true;}}while(P--);}},_isSplitButtonOptionKey:function(P){var O=(P.ctrlKey&&P.shiftKey&&M.getCharCode(P)==77);function N(Q){M.preventDefault(Q);this.removeListener("keypress",N);}if(O&&L.opera){this.on("keypress",N);}return O;},_addListenersToForm:function(){var T=this.getForm(),S=YAHOO.widget.Button.onFormKeyPress,R,N,Q,P,O;if(T){M.on(T,"reset",this._onFormReset,null,this);M.on(T,"submit",this.createHiddenFields,null,this);N=this.get("srcelement");if(this.get("type")=="submit"||(N&&N.type=="submit")){Q=M.getListeners(T,"keypress");R=false;if(Q){P=Q.length;if(P>0){O=P-1;do{if(Q[O].fn==S){R=true;break;}}while(O--);}}if(!R){M.on(T,"keypress",S);}}}},_showMenu:function(S){if(YAHOO.widget.MenuManager){YAHOO.widget.MenuManager.hideVisible();}if(K){K.hideAll();}var Q=B.VIEWPORT_OFFSET,Z=this._menu,X=this,a=X.get("element"),U=false,W=G.getY(a),V=G.getDocumentScrollTop(),N,R,c;if(V){W=W-V;}var P=W,O=(G.getViewportHeight()-(W+a.offsetHeight));function T(){if(U){return(P-Q);}else{return(O-Q);}}function b(){var d=T();if(R>d){N=Z.cfg.getProperty("minscrollheight");if(d>N){Z.cfg.setProperty("maxheight",d);if(U){Z.align("bl","tl");}else{Z.align("tl","bl");}}if(d<N){if(U){Z.cfg.setProperty("context",[a,"tl","bl"],true);Z.align("tl","bl");}else{Z.cfg.setProperty("context",[a,"bl","tl"],true);Z.align("bl","tl");U=true;return b();}}}}if(J&&Z&&(Z instanceof J)){Z.cfg.applyConfig({context:[a,"tl","bl"],clicktohide:false});Z.cfg.fireQueue();Z.show();Z.cfg.setProperty("maxheight",0);Z.align("tl","bl");if(S.type=="mousedown"){M.stopPropagation(S);}R=Z.element.offsetHeight;c=Z.element.lastChild;b();if(this.get("focusmenu")){this._menu.focus();}}else{if(B&&Z&&(Z instanceof B)){Z.show();Z.align("tl","bl");var Y=T();R=Z.element.offsetHeight;if(Y<R){Z.align("bl","tl");U=true;Y=T();if(Y<R){Z.align("tl","bl");}}}}},_hideMenu:function(){var N=this._menu;if(N){N.hide();}},_onMouseOver:function(N){if(!this._hasMouseEventHandlers){this.on("mouseout",this._onMouseOut);this.on("mousedown",this._onMouseDown);this.on("mouseup",this._onMouseUp);this._hasMouseEventHandlers=true;}this.addStateCSSClasses("hover");if(this._activationButtonPressed){this.addStateCSSClasses("active");}if(this._bOptionPressed){this.addStateCSSClasses("activeoption");}if(this._activationButtonPressed||this._bOptionPressed){M.removeListener(document,"mouseup",this._onDocumentMouseUp);}},_onMouseOut:function(N){this.removeStateCSSClasses("hover");if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationButtonPressed||this._bOptionPressed){M.on(document,"mouseup",this._onDocumentMouseUp,null,this);}},_onDocumentMouseUp:function(P){this._activationButtonPressed=false;this._bOptionPressed=false;var Q=this.get("type"),N,O;if(Q=="menu"||Q=="split"){N=M.getTarget(P);O=this._menu.element;if(N!=O&&!G.isAncestor(O,N)){this.removeStateCSSClasses((Q=="menu"?"active":"activeoption"));this._hideMenu();}}M.removeListener(document,"mouseup",this._onDocumentMouseUp);},_onMouseDown:function(Q){var S,O,R,P;function N(){this._hideMenu();this.removeListener("mouseup",N);}if((Q.which||Q.button)==1){if(!this.hasFocus()){this.focus();}S=this.get("type");if(S=="split"){O=this.get("element");R=M.getPageX(Q)-G.getX(O);if((O.offsetWidth-this.OPTION_AREA_WIDTH)<R){this.fireEvent("option",Q);}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}else{if(S=="menu"){if(this.isActive()){this._hideMenu();this._activationButtonPressed=false;}else{this._showMenu(Q);this._activationButtonPressed=true;}}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}if(S=="split"||S=="menu"){P=this;this._hideMenuTimerId=window.setTimeout(function(){P.on("mouseup",N);},250);}}},_onMouseUp:function(N){var O=this.get("type");if(this._hideMenuTimerId){window.clearTimeout(this._hideMenuTimerId);}if(O=="checkbox"||O=="radio"){this.set("checked",!(this.get("checked")));}this._activationButtonPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}},_onFocus:function(O){var N;this.addStateCSSClasses("focus");if(this._activationKeyPressed){this.addStateCSSClasses("active");}C=this;if(!this._hasKeyEventHandlers){N=this._button;M.on(N,"blur",this._onBlur,null,this);M.on(N,"keydown",this._onKeyDown,null,this);M.on(N,"keyup",this._onKeyUp,null,this);this._hasKeyEventHandlers=true;}this.fireEvent("focus",O);},_onBlur:function(N){this.removeStateCSSClasses("focus"); | ||
10 | +if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationKeyPressed){M.on(document,"keyup",this._onDocumentKeyUp,null,this);}C=null;this.fireEvent("blur",N);},_onDocumentKeyUp:function(N){if(this._isActivationKey(M.getCharCode(N))){this._activationKeyPressed=false;M.removeListener(document,"keyup",this._onDocumentKeyUp);}},_onKeyDown:function(O){var N=this._menu;if(this.get("type")=="split"&&this._isSplitButtonOptionKey(O)){this.fireEvent("option",O);}else{if(this._isActivationKey(M.getCharCode(O))){if(this.get("type")=="menu"){this._showMenu(O);}else{this._activationKeyPressed=true;this.addStateCSSClasses("active");}}}if(N&&N.cfg.getProperty("visible")&&M.getCharCode(O)==27){N.hide();this.focus();}},_onKeyUp:function(N){var O;if(this._isActivationKey(M.getCharCode(N))){O=this.get("type");if(O=="checkbox"||O=="radio"){this.set("checked",!(this.get("checked")));}this._activationKeyPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}}},_onClick:function(Q){var T=this.get("type"),N,R,O,P,S;switch(T){case"radio":case"checkbox":if(this.get("checked")){N=(T=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE;}else{N=(T=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE;}this.set("title",N);break;case"submit":this.submitForm();break;case"reset":R=this.getForm();if(R){R.reset();}break;case"menu":N=this._menu.cfg.getProperty("visible")?this.MENUBUTTON_MENU_VISIBLE_TITLE:this.MENUBUTTON_DEFAULT_TITLE;this.set("title",N);break;case"split":P=this.get("element");S=M.getPageX(Q)-G.getX(P);if((P.offsetWidth-this.OPTION_AREA_WIDTH)<S){return false;}else{this._hideMenu();O=this.get("srcelement");if(O&&O.type=="submit"){this.submitForm();}}N=this._menu.cfg.getProperty("visible")?this.SPLITBUTTON_OPTION_VISIBLE_TITLE:this.SPLITBUTTON_DEFAULT_TITLE;this.set("title",N);break;}},_onAppendTo:function(O){var N=this;window.setTimeout(function(){N._addListenersToForm();},0);},_onFormReset:function(O){var P=this.get("type"),N=this._menu;if(P=="checkbox"||P=="radio"){this.resetValue("checked");}if(J&&N&&(N instanceof J)){this.resetValue("selectedMenuItem");}},_onDocumentMouseDown:function(Q){var N=M.getTarget(Q),P=this.get("element"),O=this._menu.element;if(N!=P&&!G.isAncestor(P,N)&&N!=O&&!G.isAncestor(O,N)){this._hideMenu();M.removeListener(document,"mousedown",this._onDocumentMouseDown);}},_onOption:function(N){if(this.hasClass("yui-split-button-activeoption")){this._hideMenu();this._bOptionPressed=false;}else{this._showMenu(N);this._bOptionPressed=true;}},_onOverlayBeforeShow:function(O){var N=this._menu;N.render(this.get("element").parentNode);N.beforeShowEvent.unsubscribe(this._onOverlayBeforeShow);},_onMenuShow:function(O){M.on(document,"mousedown",this._onDocumentMouseDown,null,this);var N,P;if(this.get("type")=="split"){N=this.SPLITBUTTON_OPTION_VISIBLE_TITLE;P="activeoption";}else{N=this.MENUBUTTON_MENU_VISIBLE_TITLE;P="active";}this.addStateCSSClasses(P);this.set("title",N);},_onMenuHide:function(P){var O=this._menu,N,Q;if(this.get("type")=="split"){N=this.SPLITBUTTON_DEFAULT_TITLE;Q="activeoption";}else{N=this.MENUBUTTON_DEFAULT_TITLE;Q="active";}this.removeStateCSSClasses(Q);this.set("title",N);if(this.get("type")=="split"){this._bOptionPressed=false;}},_onMenuKeyDown:function(P,O){var N=O[0];if(M.getCharCode(N)==27){this.focus();if(this.get("type")=="split"){this._bOptionPressed=false;}}},_onMenuRender:function(O){var Q=this.get("element"),N=Q.parentNode,P=this._menu.element;if(N!=P.parentNode){N.appendChild(P);}this.set("selectedMenuItem",this.get("selectedMenuItem"));},_onMenuItemSelected:function(P,O,N){var Q=O[0];if(Q){this.set("selectedMenuItem",N);}},_onMenuItemAdded:function(P,O,N){var Q=O[0];Q.cfg.subscribeToConfigEvent("selected",this._onMenuItemSelected,Q,this);},_onMenuClick:function(O,N){var Q=N[1],P;if(Q){P=this.get("srcelement");if(P&&P.type=="submit"){this.submitForm();}this._hideMenu();}},createButtonElement:function(N){var P=this.NODE_NAME,O=document.createElement(P);O.innerHTML="<"+P+' class="first-child">'+(N=="link"?"<a></a>":'<button type="button"></button>')+"</"+P+">";return O;},addStateCSSClasses:function(N){var O=this.get("type");if(I.isString(N)){if(N!="activeoption"){this.addClass(this.CSS_CLASS_NAME+("-"+N));}this.addClass("yui-"+O+("-button-"+N));}},removeStateCSSClasses:function(N){var O=this.get("type");if(I.isString(N)){this.removeClass(this.CSS_CLASS_NAME+("-"+N));this.removeClass("yui-"+O+("-button-"+N));}},createHiddenFields:function(){this.removeHiddenFields();var S=this.getForm(),V,O,Q,T,U,P,R,N;if(S&&!this.get("disabled")){O=this.get("type");Q=(O=="checkbox"||O=="radio");if(Q||(E==this)){V=F((Q?O:"hidden"),this.get("name"),this.get("value"),this.get("checked"));if(V){if(Q){V.style.display="none";}S.appendChild(V);}}T=this._menu;if(J&&T&&(T instanceof J)){N=T.srcElement;U=this.get("selectedMenuItem");if(U){if(N&&N.nodeName.toUpperCase()=="SELECT"){S.appendChild(N);N.selectedIndex=U.index;}else{R=(U.value===null||U.value==="")?U.cfg.getProperty("text"):U.value;P=this.get("name");if(R&&P){N=F("hidden",(P+"_options"),R);S.appendChild(N);}}}}if(V&&N){this._hiddenFields=[V,N];}else{if(!V&&N){this._hiddenFields=N;}else{if(V&&!N){this._hiddenFields=V;}}}return this._hiddenFields;}},removeHiddenFields:function(){var Q=this._hiddenFields,O,P;function N(R){if(G.inDocument(R)){R.parentNode.removeChild(R);}}if(Q){if(I.isArray(Q)){O=Q.length;if(O>0){P=O-1;do{N(Q[P]);}while(P--);}}else{N(Q);}this._hiddenFields=null;}},submitForm:function(){var Q=this.getForm(),P=this.get("srcelement"),O=false,N;if(Q){if(this.get("type")=="submit"||(P&&P.type=="submit")){E=this;}if(L.ie){O=Q.fireEvent("onsubmit");}else{N=document.createEvent("HTMLEvents");N.initEvent("submit",true,true);O=Q.dispatchEvent(N);}if((L.ie||L.webkit)&&O){Q.submit();}}return O;},init:function(N,U){var P=U.type=="link"?"a":"button",R=U.srcelement,T=N.getElementsByTagName(P)[0],S;if(!T){S=N.getElementsByTagName("input")[0];if(S){T=document.createElement("button"); | ||
11 | +T.setAttribute("type","button");S.parentNode.replaceChild(T,S);}}this._button=T;YAHOO.widget.Button.superclass.init.call(this,N,U);D[this.get("id")]=this;this.addClass(this.CSS_CLASS_NAME);this.addClass("yui-"+this.get("type")+"-button");M.on(this._button,"focus",this._onFocus,null,this);this.on("mouseover",this._onMouseOver);this.on("click",this._onClick);this.on("appendTo",this._onAppendTo);var W=this.get("container"),O=this.get("element"),V=G.inDocument(O),Q;if(W){if(R&&R!=O){Q=R.parentNode;if(Q){Q.removeChild(R);}}if(I.isString(W)){M.onContentReady(W,function(){this.appendTo(W);},null,this);}else{this.appendTo(W);}}else{if(!V&&R&&R!=O){Q=R.parentNode;if(Q){this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:Q});Q.replaceChild(O,R);this.fireEvent("appendTo",{type:"appendTo",target:Q});}}else{if(this.get("type")!="link"&&V&&R&&R==O){this._addListenersToForm();}}}},initAttributes:function(O){var N=O||{};YAHOO.widget.Button.superclass.initAttributes.call(this,N);this.setAttributeConfig("type",{value:(N.type||"push"),validator:I.isString,writeOnce:true,method:this._setType});this.setAttributeConfig("label",{value:N.label,validator:I.isString,method:this._setLabel});this.setAttributeConfig("value",{value:N.value});this.setAttributeConfig("name",{value:N.name,validator:I.isString});this.setAttributeConfig("tabindex",{value:N.tabindex,validator:I.isNumber,method:this._setTabIndex});this.configureAttribute("title",{value:N.title,validator:I.isString,method:this._setTitle});this.setAttributeConfig("disabled",{value:(N.disabled||false),validator:I.isBoolean,method:this._setDisabled});this.setAttributeConfig("href",{value:N.href,validator:I.isString,method:this._setHref});this.setAttributeConfig("target",{value:N.target,validator:I.isString,method:this._setTarget});this.setAttributeConfig("checked",{value:(N.checked||false),validator:I.isBoolean,method:this._setChecked});this.setAttributeConfig("container",{value:N.container,writeOnce:true});this.setAttributeConfig("srcelement",{value:N.srcelement,writeOnce:true});this.setAttributeConfig("menu",{value:null,method:this._setMenu,writeOnce:true});this.setAttributeConfig("lazyloadmenu",{value:(N.lazyloadmenu===false?false:true),validator:I.isBoolean,writeOnce:true});this.setAttributeConfig("menuclassname",{value:(N.menuclassname||"yui-button-menu"),validator:I.isString,method:this._setMenuClassName,writeOnce:true});this.setAttributeConfig("selectedMenuItem",{value:null,method:this._setSelectedMenuItem});this.setAttributeConfig("onclick",{value:N.onclick,method:this._setOnClick});this.setAttributeConfig("focusmenu",{value:(N.focusmenu===false?false:true),validator:I.isBoolean});},focus:function(){if(!this.get("disabled")){this._button.focus();}},blur:function(){if(!this.get("disabled")){this._button.blur();}},hasFocus:function(){return(C==this);},isActive:function(){return this.hasClass(this.CSS_CLASS_NAME+"-active");},getMenu:function(){return this._menu;},getForm:function(){return this._button.form;},getHiddenFields:function(){return this._hiddenFields;},destroy:function(){var P=this.get("element"),O=P.parentNode,N=this._menu,R;if(N){if(K&&K.find(N)){K.remove(N);}N.destroy();}M.purgeElement(P);M.purgeElement(this._button);M.removeListener(document,"mouseup",this._onDocumentMouseUp);M.removeListener(document,"keyup",this._onDocumentKeyUp);M.removeListener(document,"mousedown",this._onDocumentMouseDown);var Q=this.getForm();if(Q){M.removeListener(Q,"reset",this._onFormReset);M.removeListener(Q,"submit",this.createHiddenFields);}this.unsubscribeAll();if(O){O.removeChild(P);}delete D[this.get("id")];R=G.getElementsByClassName(this.CSS_CLASS_NAME,this.NODE_NAME,Q);if(I.isArray(R)&&R.length===0){M.removeListener(Q,"keypress",YAHOO.widget.Button.onFormKeyPress);}},fireEvent:function(O,N){var P=arguments[0];if(this.DOM_EVENTS[P]&&this.get("disabled")){return ;}return YAHOO.widget.Button.superclass.fireEvent.apply(this,arguments);},toString:function(){return("Button "+this.get("id"));}});YAHOO.widget.Button.onFormKeyPress=function(R){var P=M.getTarget(R),S=M.getCharCode(R),Q=P.nodeName&&P.nodeName.toUpperCase(),N=P.type,T=false,V,W,O,X;function U(a){var Z,Y;switch(a.nodeName.toUpperCase()){case"INPUT":case"BUTTON":if(a.type=="submit"&&!a.disabled){if(!T&&!O){O=a;}if(W&&!X){X=a;}}break;default:Z=a.id;if(Z){V=D[Z];if(V){T=true;if(!V.get("disabled")){Y=V.get("srcelement");if(!W&&(V.get("type")=="submit"||(Y&&Y.type=="submit"))){W=V;}}}}break;}}if(S==13&&((Q=="INPUT"&&(N=="text"||N=="password"||N=="checkbox"||N=="radio"||N=="file"))||Q=="SELECT")){G.getElementsBy(U,"*",this);if(O){O.focus();}else{if(!O&&W){if(X){M.preventDefault(R);}W.submitForm();}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(N){var S=G.getElementsByClassName(YAHOO.widget.Button.prototype.CSS_CLASS_NAME,"*",N),Q=S.length,R,O,P;if(Q>0){for(P=0;P<Q;P++){O=S[P].id;if(O){R=D[O];if(R){R.createHiddenFields();}}}}};YAHOO.widget.Button.getButton=function(N){var O=D[N];if(O){return O;}};})();(function(){var C=YAHOO.util.Dom,B=YAHOO.util.Event,D=YAHOO.lang,A=YAHOO.widget.Button,E={};YAHOO.widget.ButtonGroup=function(J,H){var I=YAHOO.widget.ButtonGroup.superclass.constructor,K,G,F;if(arguments.length==1&&!D.isString(J)&&!J.nodeName){if(!J.id){F=C.generateId();J.id=F;}I.call(this,(this._createGroupElement()),J);}else{if(D.isString(J)){G=C.get(J);if(G){if(G.nodeName.toUpperCase()==this.NODE_NAME){I.call(this,G,H);}}}else{K=J.nodeName.toUpperCase();if(K&&K==this.NODE_NAME){if(!J.id){J.id=C.generateId();}I.call(this,J,H);}}}};YAHOO.extend(YAHOO.widget.ButtonGroup,YAHOO.util.Element,{_buttons:null,NODE_NAME:"DIV",CSS_CLASS_NAME:"yui-buttongroup",_createGroupElement:function(){var F=document.createElement(this.NODE_NAME);return F;},_setDisabled:function(G){var H=this.getCount(),F;if(H>0){F=H-1;do{this._buttons[F].set("disabled",G);}while(F--);}},_onKeyDown:function(K){var G=B.getTarget(K),I=B.getCharCode(K),H=G.parentNode.parentNode.id,J=E[H],F=-1;if(I==37||I==38){F=(J.index===0)?(this._buttons.length-1):(J.index-1); | ||
12 | +}else{if(I==39||I==40){F=(J.index===(this._buttons.length-1))?0:(J.index+1);}}if(F>-1){this.check(F);this.getButton(F).focus();}},_onAppendTo:function(H){var I=this._buttons,G=I.length,F;for(F=0;F<G;F++){I[F].appendTo(this.get("element"));}},_onButtonCheckedChange:function(G,F){var I=G.newValue,H=this.get("checkedButton");if(I&&H!=F){if(H){H.set("checked",false,true);}this.set("checkedButton",F);this.set("value",F.get("value"));}else{if(H&&!H.set("checked")){H.set("checked",true,true);}}},init:function(I,H){this._buttons=[];YAHOO.widget.ButtonGroup.superclass.init.call(this,I,H);this.addClass(this.CSS_CLASS_NAME);var J=this.getElementsByClassName("yui-radio-button");if(J.length>0){this.addButtons(J);}function F(K){return(K.type=="radio");}J=C.getElementsBy(F,"input",this.get("element"));if(J.length>0){this.addButtons(J);}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var G=this.get("container");if(G){if(D.isString(G)){B.onContentReady(G,function(){this.appendTo(G);},null,this);}else{this.appendTo(G);}}},initAttributes:function(G){var F=G||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,F);this.setAttributeConfig("name",{value:F.name,validator:D.isString});this.setAttributeConfig("disabled",{value:(F.disabled||false),validator:D.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:F.value});this.setAttributeConfig("container",{value:F.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null});},addButton:function(J){var L,K,G,F,H,I;if(J instanceof A&&J.get("type")=="radio"){L=J;}else{if(!D.isString(J)&&!J.nodeName){J.type="radio";L=new A(J);}else{L=new A(J,{type:"radio"});}}if(L){F=this._buttons.length;H=L.get("name");I=this.get("name");L.index=F;this._buttons[F]=L;E[L.get("id")]=L;if(H!=I){L.set("name",I);}if(this.get("disabled")){L.set("disabled",true);}if(L.get("checked")){this.set("checkedButton",L);}K=L.get("element");G=this.get("element");if(K.parentNode!=G){G.appendChild(K);}L.on("checkedChange",this._onButtonCheckedChange,L,this);return L;}},addButtons:function(G){var H,I,J,F;if(D.isArray(G)){H=G.length;J=[];if(H>0){for(F=0;F<H;F++){I=this.addButton(G[F]);if(I){J[J.length]=I;}}if(J.length>0){return J;}}}},removeButton:function(H){var I=this.getButton(H),G,F;if(I){this._buttons.splice(H,1);delete E[I.get("id")];I.removeListener("checkedChange",this._onButtonCheckedChange);I.destroy();G=this._buttons.length;if(G>0){F=this._buttons.length-1;do{this._buttons[F].index=F;}while(F--);}}},getButton:function(F){if(D.isNumber(F)){return this._buttons[F];}},getButtons:function(){return this._buttons;},getCount:function(){return this._buttons.length;},focus:function(H){var I,G,F;if(D.isNumber(H)){I=this._buttons[H];if(I){I.focus();}}else{G=this.getCount();for(F=0;F<G;F++){I=this._buttons[F];if(!I.get("disabled")){I.focus();break;}}}},check:function(F){var G=this.getButton(F);if(G){G.set("checked",true);}},destroy:function(){var I=this._buttons.length,H=this.get("element"),F=H.parentNode,G;if(I>0){G=this._buttons.length-1;do{this._buttons[G].destroy();}while(G--);}B.purgeElement(H);F.removeChild(H);},toString:function(){return("ButtonGroup "+this.get("id"));}});})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.5.2",build:"1076"}); | ||
13 | +<?php if(extension_loaded('zlib')){ob_end_flush();}?> | ||
0 | \ No newline at end of file | 14 | \ No newline at end of file |
@@ -0,0 +1,19 @@ | @@ -0,0 +1,19 @@ | ||
1 | +<?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?> | ||
2 | +/* | ||
3 | +Copyright (c) 2008, Yahoo! Inc. All rights reserved. | ||
4 | +Code licensed under the BSD License: | ||
5 | +http://developer.yahoo.net/yui/license.txt | ||
6 | +version: 2.5.2 | ||
7 | +*/ | ||
8 | +(function(){YAHOO.util.Config=function(D){if(D){this.init(D);}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE);},checkNumber:function(D){return(!isNaN(D));},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F);}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner);}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(E,D.value);}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value;}}return D;},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value;}else{return undefined;}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true;}}else{return false;}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true;}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false;}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G]);}return true;}}else{return false;}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false;}else{if(!B.isUndefined(P)){R.value=P;}else{P=R.value;}K=false;J=this.eventQueue.length;for(L=0;L<J;L++){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break;}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P]);}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D);}else{this.fireEvent(D,E.value);}}},applyConfig:function(D,G){var F,E;if(G){E={};for(F in D){if(B.hasOwnProperty(D,F)){E[F.toLowerCase()]=D[F];}}this.initialConfig=E;}for(F in D){if(B.hasOwnProperty(D,F)){this.queueProperty(F,D[F]);}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D);}},fireQueue:function(){var E,H,D,G,F;this.queueInProgress=true;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G);}else{return false;}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]";}return D;},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", ";}}return D;},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null;}};A.alreadySubscribed=function(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(Q,P){if(Q){this.init(Q,P);}else{}};var F=YAHOO.util.Dom,D=YAHOO.util.Config,M=YAHOO.util.Event,L=YAHOO.util.CustomEvent,G=YAHOO.widget.Module,H,O,N,E,A={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},I={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};G.IMG_ROOT=null;G.IMG_ROOT_SSL=null;G.CSS_MODULE="yui-module";G.CSS_HEADER="hd";G.CSS_BODY="bd";G.CSS_FOOTER="ft";G.RESIZE_MONITOR_SECURE_URL="javascript:false;";G.textResizeEvent=new L("textResize");function K(){if(!H){H=document.createElement("div");H.innerHTML=('<div class="'+G.CSS_HEADER+'"></div>'+'<div class="'+G.CSS_BODY+'"></div><div class="'+G.CSS_FOOTER+'"></div>');O=H.firstChild;N=O.nextSibling;E=N.nextSibling;}return H;}function J(){if(!O){K();}return(O.cloneNode(false));}function B(){if(!N){K();}return(N.cloneNode(false));}function C(){if(!E){K();}return(E.cloneNode(false));}G.prototype={constructor:G,element:null,header:null,body:null,footer:null,id:null,imageRoot:G.IMG_ROOT,initEvents:function(){var P=L.LIST;this.beforeInitEvent=this.createEvent(A.BEFORE_INIT);this.beforeInitEvent.signature=P;this.initEvent=this.createEvent(A.INIT);this.initEvent.signature=P;this.appendEvent=this.createEvent(A.APPEND); | ||
9 | +this.appendEvent.signature=P;this.beforeRenderEvent=this.createEvent(A.BEFORE_RENDER);this.beforeRenderEvent.signature=P;this.renderEvent=this.createEvent(A.RENDER);this.renderEvent.signature=P;this.changeHeaderEvent=this.createEvent(A.CHANGE_HEADER);this.changeHeaderEvent.signature=P;this.changeBodyEvent=this.createEvent(A.CHANGE_BODY);this.changeBodyEvent.signature=P;this.changeFooterEvent=this.createEvent(A.CHANGE_FOOTER);this.changeFooterEvent.signature=P;this.changeContentEvent=this.createEvent(A.CHANGE_CONTENT);this.changeContentEvent.signature=P;this.destroyEvent=this.createEvent(A.DESTORY);this.destroyEvent.signature=P;this.beforeShowEvent=this.createEvent(A.BEFORE_SHOW);this.beforeShowEvent.signature=P;this.showEvent=this.createEvent(A.SHOW);this.showEvent.signature=P;this.beforeHideEvent=this.createEvent(A.BEFORE_HIDE);this.beforeHideEvent.signature=P;this.hideEvent=this.createEvent(A.HIDE);this.hideEvent.signature=P;},platform:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("windows")!=-1||P.indexOf("win32")!=-1){return"windows";}else{if(P.indexOf("macintosh")!=-1){return"mac";}else{return false;}}}(),browser:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("opera")!=-1){return"opera";}else{if(P.indexOf("msie 7")!=-1){return"ie7";}else{if(P.indexOf("msie")!=-1){return"ie";}else{if(P.indexOf("safari")!=-1){return"safari";}else{if(P.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(I.VISIBLE.key,{handler:this.configVisible,value:I.VISIBLE.value,validator:I.VISIBLE.validator});this.cfg.addProperty(I.EFFECT.key,{suppressEvent:I.EFFECT.suppressEvent,supercedes:I.EFFECT.supercedes});this.cfg.addProperty(I.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:I.MONITOR_RESIZE.value});this.cfg.addProperty(I.APPEND_TO_DOCUMENT_BODY.key,{value:I.APPEND_TO_DOCUMENT_BODY.value});},init:function(U,T){var R,V;this.initEvents();this.beforeInitEvent.fire(G);this.cfg=new D(this);if(this.isSecure){this.imageRoot=G.IMG_ROOT_SSL;}if(typeof U=="string"){R=U;U=document.getElementById(U);if(!U){U=(K()).cloneNode(false);U.id=R;}}this.element=U;if(U.id){this.id=U.id;}V=this.element.firstChild;if(V){var Q=false,P=false,S=false;do{if(1==V.nodeType){if(!Q&&F.hasClass(V,G.CSS_HEADER)){this.header=V;Q=true;}else{if(!P&&F.hasClass(V,G.CSS_BODY)){this.body=V;P=true;}else{if(!S&&F.hasClass(V,G.CSS_FOOTER)){this.footer=V;S=true;}}}}}while((V=V.nextSibling));}this.initDefaultConfig();F.addClass(this.element,G.CSS_MODULE);if(T){this.cfg.applyConfig(T,true);}if(!D.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}this.initEvent.fire(G);},initResizeMonitor:function(){var Q=(YAHOO.env.ua.gecko&&this.platform=="windows");if(Q){var P=this;setTimeout(function(){P._initResizeMonitor();},0);}else{this._initResizeMonitor();}},_initResizeMonitor:function(){var P,R,T;function V(){G.textResizeEvent.fire();}if(!YAHOO.env.ua.opera){R=F.get("_yuiResizeMonitor");var U=this._supportsCWResize();if(!R){R=document.createElement("iframe");if(this.isSecure&&G.RESIZE_MONITOR_SECURE_URL&&YAHOO.env.ua.ie){R.src=G.RESIZE_MONITOR_SECURE_URL;}if(!U){T=["<html><head><script ",'type="text/javascript">',"window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","/script></head>","<body></body></html>"].join("");R.src="data:text/html;charset=utf-8,"+encodeURIComponent(T);}R.id="_yuiResizeMonitor";R.style.position="absolute";R.style.visibility="hidden";var Q=document.body,S=Q.firstChild;if(S){Q.insertBefore(R,S);}else{Q.appendChild(R);}R.style.width="10em";R.style.height="10em";R.style.top=(-1*R.offsetHeight)+"px";R.style.left=(-1*R.offsetWidth)+"px";R.style.borderWidth="0";R.style.visibility="visible";if(YAHOO.env.ua.webkit){P=R.contentWindow.document;P.open();P.close();}}if(R&&R.contentWindow){G.textResizeEvent.subscribe(this.onDomResize,this,true);if(!G.textResizeInitialized){if(U){if(!M.on(R.contentWindow,"resize",V)){M.on(R,"resize",V);}}G.textResizeInitialized=true;}this.resizeMonitor=R;}}},_supportsCWResize:function(){var P=true;if(YAHOO.env.ua.gecko&&YAHOO.env.ua.gecko<=1.8){P=false;}return P;},onDomResize:function(S,R){var Q=-1*this.resizeMonitor.offsetWidth,P=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=P+"px";this.resizeMonitor.style.left=Q+"px";},setHeader:function(Q){var P=this.header||(this.header=J());if(Q.nodeName){P.innerHTML="";P.appendChild(Q);}else{P.innerHTML=Q;}this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},appendToHeader:function(Q){var P=this.header||(this.header=J());P.appendChild(Q);this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},setBody:function(Q){var P=this.body||(this.body=B());if(Q.nodeName){P.innerHTML="";P.appendChild(Q);}else{P.innerHTML=Q;}this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},appendToBody:function(Q){var P=this.body||(this.body=B());P.appendChild(Q);this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},setFooter:function(Q){var P=this.footer||(this.footer=C());if(Q.nodeName){P.innerHTML="";P.appendChild(Q);}else{P.innerHTML=Q;}this.changeFooterEvent.fire(Q);this.changeContentEvent.fire();},appendToFooter:function(Q){var P=this.footer||(this.footer=C());P.appendChild(Q);this.changeFooterEvent.fire(Q);this.changeContentEvent.fire();},render:function(R,P){var S=this,T;function Q(U){if(typeof U=="string"){U=document.getElementById(U);}if(U){S._addToParent(U,S.element);S.appendEvent.fire();}}this.beforeRenderEvent.fire();if(!P){P=this.element;}if(R){Q(R);}else{if(!F.inDocument(this.element)){return false;}}if(this.header&&!F.inDocument(this.header)){T=P.firstChild;if(T){P.insertBefore(this.header,T);}else{P.appendChild(this.header);}}if(this.body&&!F.inDocument(this.body)){if(this.footer&&F.isAncestor(this.moduleElement,this.footer)){P.insertBefore(this.body,this.footer); | ||
10 | +}else{P.appendChild(this.body);}}if(this.footer&&!F.inDocument(this.footer)){P.appendChild(this.footer);}this.renderEvent.fire();return true;},destroy:function(){var P,Q;if(this.element){M.purgeElement(this.element,true);P=this.element.parentNode;}if(P){P.removeChild(this.element);}this.element=null;this.header=null;this.body=null;this.footer=null;G.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();for(Q in this){if(Q instanceof L){Q.unsubscribeAll();}}},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(Q,P,R){var S=P[0];if(S){this.beforeShowEvent.fire();F.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();F.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(R,Q,S){var P=Q[0];if(P){this.initResizeMonitor();}else{G.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}},_addToParent:function(P,Q){if(!this.cfg.getProperty("appendtodocumentbody")&&P===document.body&&P.firstChild){P.insertBefore(Q,P.firstChild);}else{P.appendChild(Q);}},toString:function(){return"Module "+this.id;}};YAHOO.lang.augmentProto(G,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Overlay=function(L,K){YAHOO.widget.Overlay.superclass.constructor.call(this,L,K);};var F=YAHOO.lang,I=YAHOO.util.CustomEvent,E=YAHOO.widget.Module,J=YAHOO.util.Event,D=YAHOO.util.Dom,C=YAHOO.util.Config,B=YAHOO.widget.Overlay,G,A={"BEFORE_MOVE":"beforeMove","MOVE":"move"},H={"X":{key:"x",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,validator:F.isBoolean,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:F.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(YAHOO.env.ua.ie==6?true:false),validator:F.isBoolean,supercedes:["zindex"]}};B.IFRAME_SRC="javascript:false;";B.IFRAME_OFFSET=3;B.VIEWPORT_OFFSET=10;B.TOP_LEFT="tl";B.TOP_RIGHT="tr";B.BOTTOM_LEFT="bl";B.BOTTOM_RIGHT="br";B.CSS_OVERLAY="yui-overlay";B.windowScrollEvent=new I("windowScroll");B.windowResizeEvent=new I("windowResize");B.windowScrollHandler=function(K){if(YAHOO.env.ua.ie){if(!window.scrollEnd){window.scrollEnd=-1;}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){B.windowScrollEvent.fire();},1);}else{B.windowScrollEvent.fire();}};B.windowResizeHandler=function(K){if(YAHOO.env.ua.ie){if(!window.resizeEnd){window.resizeEnd=-1;}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){B.windowResizeEvent.fire();},100);}else{B.windowResizeEvent.fire();}};B._initialized=null;if(B._initialized===null){J.on(window,"scroll",B.windowScrollHandler);J.on(window,"resize",B.windowResizeHandler);B._initialized=true;}YAHOO.extend(B,E,{init:function(L,K){B.superclass.init.call(this,L);this.beforeInitEvent.fire(B);D.addClass(this.element,B.CSS_OVERLAY);if(K){this.cfg.applyConfig(K,true);}if(this.platform=="mac"&&YAHOO.env.ua.gecko){if(!C.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}if(!C.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}this.initEvent.fire(B);},initEvents:function(){B.superclass.initEvents.call(this);var K=I.LIST;this.beforeMoveEvent=this.createEvent(A.BEFORE_MOVE);this.beforeMoveEvent.signature=K;this.moveEvent=this.createEvent(A.MOVE);this.moveEvent.signature=K;},initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.X.key,{handler:this.configX,validator:H.X.validator,suppressEvent:H.X.suppressEvent,supercedes:H.X.supercedes});this.cfg.addProperty(H.Y.key,{handler:this.configY,validator:H.Y.validator,suppressEvent:H.Y.suppressEvent,supercedes:H.Y.supercedes});this.cfg.addProperty(H.XY.key,{handler:this.configXY,suppressEvent:H.XY.suppressEvent,supercedes:H.XY.supercedes});this.cfg.addProperty(H.CONTEXT.key,{handler:this.configContext,suppressEvent:H.CONTEXT.suppressEvent,supercedes:H.CONTEXT.supercedes});this.cfg.addProperty(H.FIXED_CENTER.key,{handler:this.configFixedCenter,value:H.FIXED_CENTER.value,validator:H.FIXED_CENTER.validator,supercedes:H.FIXED_CENTER.supercedes});this.cfg.addProperty(H.WIDTH.key,{handler:this.configWidth,suppressEvent:H.WIDTH.suppressEvent,supercedes:H.WIDTH.supercedes});this.cfg.addProperty(H.HEIGHT.key,{handler:this.configHeight,suppressEvent:H.HEIGHT.suppressEvent,supercedes:H.HEIGHT.supercedes});this.cfg.addProperty(H.ZINDEX.key,{handler:this.configzIndex,value:H.ZINDEX.value});this.cfg.addProperty(H.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:H.CONSTRAIN_TO_VIEWPORT.value,validator:H.CONSTRAIN_TO_VIEWPORT.validator,supercedes:H.CONSTRAIN_TO_VIEWPORT.supercedes});this.cfg.addProperty(H.IFRAME.key,{handler:this.configIframe,value:H.IFRAME.value,validator:H.IFRAME.validator,supercedes:H.IFRAME.supercedes});},moveTo:function(K,L){this.cfg.setProperty("xy",[K,L]);},hideMacGeckoScrollbars:function(){D.removeClass(this.element,"show-scrollbars");D.addClass(this.element,"hide-scrollbars");},showMacGeckoScrollbars:function(){D.removeClass(this.element,"hide-scrollbars");D.addClass(this.element,"show-scrollbars");},configVisible:function(N,K,T){var M=K[0],O=D.getStyle(this.element,"visibility"),U=this.cfg.getProperty("effect"),R=[],Q=(this.platform=="mac"&&YAHOO.env.ua.gecko),b=C.alreadySubscribed,S,L,a,Y,X,W,Z,V,P; | ||
11 | +if(O=="inherit"){a=this.element.parentNode;while(a.nodeType!=9&&a.nodeType!=11){O=D.getStyle(a,"visibility");if(O!="inherit"){break;}a=a.parentNode;}if(O=="inherit"){O="visible";}}if(U){if(U instanceof Array){V=U.length;for(Y=0;Y<V;Y++){S=U[Y];R[R.length]=S.effect(this,S.duration);}}else{R[R.length]=U.effect(this,U.duration);}}if(M){if(Q){this.showMacGeckoScrollbars();}if(U){if(M){if(O!="visible"||O===""){this.beforeShowEvent.fire();P=R.length;for(X=0;X<P;X++){L=R[X];if(X===0&&!b(L.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){L.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}L.animateIn();}}}}else{if(O!="visible"||O===""){this.beforeShowEvent.fire();D.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire();}}}else{if(Q){this.hideMacGeckoScrollbars();}if(U){if(O=="visible"){this.beforeHideEvent.fire();P=R.length;for(W=0;W<P;W++){Z=R[W];if(W===0&&!b(Z.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){Z.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}Z.animateOut();}}else{if(O===""){D.setStyle(this.element,"visibility","hidden");}}}else{if(O=="visible"||O===""){this.beforeHideEvent.fire();D.setStyle(this.element,"visibility","hidden");this.hideEvent.fire();}}}},doCenterOnDOMEvent:function(){if(this.cfg.getProperty("visible")){this.center();}},configFixedCenter:function(O,M,P){var Q=M[0],L=C.alreadySubscribed,N=B.windowResizeEvent,K=B.windowScrollEvent;if(Q){this.center();if(!L(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center);}if(!L(N,this.doCenterOnDOMEvent,this)){N.subscribe(this.doCenterOnDOMEvent,this,true);}if(!L(K,this.doCenterOnDOMEvent,this)){K.subscribe(this.doCenterOnDOMEvent,this,true);}}else{this.beforeShowEvent.unsubscribe(this.center);N.unsubscribe(this.doCenterOnDOMEvent,this);K.unsubscribe(this.doCenterOnDOMEvent,this);}},configHeight:function(N,L,O){var K=L[0],M=this.element;D.setStyle(M,"height",K);this.cfg.refireEvent("iframe");},configWidth:function(N,K,O){var M=K[0],L=this.element;D.setStyle(L,"width",M);this.cfg.refireEvent("iframe");},configzIndex:function(M,K,N){var O=K[0],L=this.element;if(!O){O=D.getStyle(L,"zIndex");if(!O||isNaN(O)){O=0;}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(O<=0){O=1;}}D.setStyle(L,"zIndex",O);this.cfg.setProperty("zIndex",O,true);if(this.iframe){this.stackIframe();}},configXY:function(M,L,N){var P=L[0],K=P[0],O=P[1];this.cfg.setProperty("x",K);this.cfg.setProperty("y",O);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configX:function(M,L,N){var K=L[0],O=this.cfg.getProperty("y");this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setX(this.element,K,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configY:function(M,L,N){var K=this.cfg.getProperty("x"),O=L[0];this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setY(this.element,O,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},showIframe:function(){var L=this.iframe,K;if(L){K=this.element.parentNode;if(K!=L.parentNode){this._addToParent(K,L);}L.style.display="block";}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none";}},syncIframe:function(){var K=this.iframe,M=this.element,O=B.IFRAME_OFFSET,L=(O*2),N;if(K){K.style.width=(M.offsetWidth+L+"px");K.style.height=(M.offsetHeight+L+"px");N=this.cfg.getProperty("xy");if(!F.isArray(N)||(isNaN(N[0])||isNaN(N[1]))){this.syncPosition();N=this.cfg.getProperty("xy");}D.setXY(K,[(N[0]-O),(N[1]-O)]);}},stackIframe:function(){if(this.iframe){var K=D.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(K)&&!isNaN(K)){D.setStyle(this.iframe,"zIndex",(K-1));}}},configIframe:function(N,M,O){var K=M[0];function P(){var R=this.iframe,S=this.element,T;if(!R){if(!G){G=document.createElement("iframe");if(this.isSecure){G.src=B.IFRAME_SRC;}if(YAHOO.env.ua.ie){G.style.filter="alpha(opacity=0)";G.frameBorder=0;}else{G.style.opacity="0";}G.style.position="absolute";G.style.border="none";G.style.margin="0";G.style.padding="0";G.style.display="none";}R=G.cloneNode(false);T=S.parentNode;var Q=T||document.body;this._addToParent(Q,R);this.iframe=R;}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true;}}function L(){P.call(this);this.beforeShowEvent.unsubscribe(L);this._iframeDeferred=false;}if(K){if(this.cfg.getProperty("visible")){P.call(this);}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(L);this._iframeDeferred=true;}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false;}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);}},configConstrainToViewport:function(L,K,M){var N=K[0];if(N){if(!C.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}if(!C.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM);}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}},configContext:function(M,L,O){var Q=L[0],N,P,K;if(Q){N=Q[0];P=Q[1]; | ||
12 | +K=Q[2];if(N){if(typeof N=="string"){this.cfg.setProperty("context",[document.getElementById(N),P,K],true);}if(P&&K){this.align(P,K);}}}},align:function(L,K){var Q=this.cfg.getProperty("context"),P=this,O,N,R;function M(S,T){switch(L){case B.TOP_LEFT:P.moveTo(T,S);break;case B.TOP_RIGHT:P.moveTo((T-N.offsetWidth),S);break;case B.BOTTOM_LEFT:P.moveTo(T,(S-N.offsetHeight));break;case B.BOTTOM_RIGHT:P.moveTo((T-N.offsetWidth),(S-N.offsetHeight));break;}}if(Q){O=Q[0];N=this.element;P=this;if(!L){L=Q[1];}if(!K){K=Q[2];}if(N&&O){R=D.getRegion(O);switch(K){case B.TOP_LEFT:M(R.top,R.left);break;case B.TOP_RIGHT:M(R.top,R.right);break;case B.BOTTOM_LEFT:M(R.bottom,R.left);break;case B.BOTTOM_RIGHT:M(R.bottom,R.right);break;}}}},enforceConstraints:function(L,K,M){var O=K[0];var N=this.getConstrainedXY(O[0],O[1]);this.cfg.setProperty("x",N[0],true);this.cfg.setProperty("y",N[1],true);this.cfg.setProperty("xy",N,true);},getConstrainedXY:function(V,T){var N=B.VIEWPORT_OFFSET,U=D.getViewportWidth(),Q=D.getViewportHeight(),M=this.element.offsetHeight,S=this.element.offsetWidth,Y=D.getDocumentScrollLeft(),W=D.getDocumentScrollTop();var P=V;var L=T;if(S+N<U){var R=Y+N;var X=Y+U-S-N;if(V<R){P=R;}else{if(V>X){P=X;}}}else{P=N+Y;}if(M+N<Q){var O=W+N;var K=W+Q-M-N;if(T<O){L=O;}else{if(T>K){L=K;}}}else{L=N+W;}return[P,L];},center:function(){var N=B.VIEWPORT_OFFSET,O=this.element.offsetWidth,M=this.element.offsetHeight,L=D.getViewportWidth(),P=D.getViewportHeight(),K,Q;if(O<L){K=(L/2)-(O/2)+D.getDocumentScrollLeft();}else{K=N+D.getDocumentScrollLeft();}if(M<P){Q=(P/2)-(M/2)+D.getDocumentScrollTop();}else{Q=N+D.getDocumentScrollTop();}this.cfg.setProperty("xy",[parseInt(K,10),parseInt(Q,10)]);this.cfg.refireEvent("iframe");},syncPosition:function(){var K=D.getXY(this.element);this.cfg.setProperty("x",K[0],true);this.cfg.setProperty("y",K[1],true);this.cfg.setProperty("xy",K,true);},onDomResize:function(M,L){var K=this;B.superclass.onDomResize.call(this,M,L);setTimeout(function(){K.syncPosition();K.cfg.refireEvent("iframe");K.cfg.refireEvent("context");},0);},bringToTop:function(){var O=[],N=this.element;function R(V,U){var X=D.getStyle(V,"zIndex"),W=D.getStyle(U,"zIndex"),T=(!X||isNaN(X))?0:parseInt(X,10),S=(!W||isNaN(W))?0:parseInt(W,10);if(T>S){return -1;}else{if(T<S){return 1;}else{return 0;}}}function M(U){var S=D.hasClass(U,B.CSS_OVERLAY),T=YAHOO.widget.Panel;if(S&&!D.isAncestor(N,S)){if(T&&D.hasClass(U,T.CSS_PANEL)){O[O.length]=U.parentNode;}else{O[O.length]=U;}}}D.getElementsBy(M,"DIV",document.body);O.sort(R);var K=O[0],Q;if(K){Q=D.getStyle(K,"zIndex");if(!isNaN(Q)){var P=false;if(K!=N){P=true;}else{if(O.length>1){var L=D.getStyle(O[1],"zIndex");if(!isNaN(L)&&(Q==L)){P=true;}}}if(P){this.cfg.setProperty("zindex",(parseInt(Q,10)+2));}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;B.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.superclass.destroy.call(this);},toString:function(){return"Overlay "+this.id;}});}());(function(){YAHOO.widget.OverlayManager=function(G){this.init(G);};var D=YAHOO.widget.Overlay,C=YAHOO.util.Event,E=YAHOO.util.Dom,B=YAHOO.util.Config,F=YAHOO.util.CustomEvent,A=YAHOO.widget.OverlayManager;A.CSS_FOCUSED="focused";A.prototype={constructor:A,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(I){this.cfg=new B(this);this.initDefaultConfig();if(I){this.cfg.applyConfig(I,true);}this.cfg.fireQueue();var H=null;this.getActive=function(){return H;};this.focus=function(J){var K=this.find(J);if(K){if(H!=K){if(H){H.blur();}this.bringToTop(K);H=K;E.addClass(H.element,A.CSS_FOCUSED);K.focusEvent.fire();}}};this.remove=function(K){var M=this.find(K),J;if(M){if(H==M){H=null;}var L=(M.element===null&&M.cfg===null)?true:false;if(!L){J=E.getStyle(M.element,"zIndex");M.cfg.setProperty("zIndex",-1000,true);}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));M.hideEvent.unsubscribe(M.blur);M.destroyEvent.unsubscribe(this._onOverlayDestroy,M);if(!L){C.removeListener(M.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);M.cfg.setProperty("zIndex",J,true);M.cfg.setProperty("manager",null);}M.focusEvent.unsubscribeAll();M.blurEvent.unsubscribeAll();M.focusEvent=null;M.blurEvent=null;M.focus=null;M.blur=null;}};this.blurAll=function(){var K=this.overlays.length,J;if(K>0){J=K-1;do{this.overlays[J].blur();}while(J--);}};this._onOverlayBlur=function(K,J){H=null;};var G=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}if(G){this.register(G);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(I){var G=C.getTarget(I),H=this.close;if(H&&(G==H||E.isAncestor(H,G))){this.blur();}else{this.focus();}},_onOverlayDestroy:function(H,G,I){this.remove(I);},register:function(G){var K=this,L,I,H,J;if(G instanceof D){G.cfg.addProperty("manager",{value:this});G.focusEvent=G.createEvent("focus");G.focusEvent.signature=F.LIST;G.blurEvent=G.createEvent("blur");G.blurEvent.signature=F.LIST;G.focus=function(){K.focus(this);};G.blur=function(){if(K.getActive()==this){E.removeClass(this.element,A.CSS_FOCUSED);this.blurEvent.fire();}};G.blurEvent.subscribe(K._onOverlayBlur);G.hideEvent.subscribe(G.blur);G.destroyEvent.subscribe(this._onOverlayDestroy,G,this);C.on(G.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus,null,G);L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){G.cfg.setProperty("zIndex",parseInt(L,10));}else{G.cfg.setProperty("zIndex",0);}this.overlays.push(G);this.bringToTop(G);return true;}else{if(G instanceof Array){I=0;J=G.length;for(H=0;H<J;H++){if(this.register(G[H])){I++;}}if(I>0){return true;}}else{return false;}}},bringToTop:function(M){var I=this.find(M),L,G,J;if(I){J=this.overlays;J.sort(this.compareZIndexDesc);G=J[0];if(G){L=E.getStyle(G.element,"zIndex"); | ||
13 | +if(!isNaN(L)){var K=false;if(G!==I){K=true;}else{if(J.length>1){var H=E.getStyle(J[1].element,"zIndex");if(!isNaN(H)&&(L==H)){K=true;}}}if(K){I.cfg.setProperty("zindex",(parseInt(L,10)+2));}}J.sort(this.compareZIndexDesc);}}},find:function(G){var I=this.overlays,J=I.length,H;if(J>0){H=J-1;if(G instanceof D){do{if(I[H]==G){return I[H];}}while(H--);}else{if(typeof G=="string"){do{if(I[H].id==G){return I[H];}}while(H--);}}return null;}},compareZIndexDesc:function(J,I){var H=(J.cfg)?J.cfg.getProperty("zIndex"):null,G=(I.cfg)?I.cfg.getProperty("zIndex"):null;if(H===null&&G===null){return 0;}else{if(H===null){return 1;}else{if(G===null){return -1;}else{if(H>G){return -1;}else{if(H<G){return 1;}else{return 0;}}}}}},showAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].show();}while(G--);}},hideAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].hide();}while(G--);}},toString:function(){return"OverlayManager";}};}());(function(){YAHOO.widget.Tooltip=function(N,M){YAHOO.widget.Tooltip.superclass.constructor.call(this,N,M);};var E=YAHOO.lang,L=YAHOO.util.Event,K=YAHOO.util.CustomEvent,C=YAHOO.util.Dom,G=YAHOO.widget.Tooltip,F,H={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:E.isBoolean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:200,validator:E.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:E.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:E.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"},"DISABLED":{key:"disabled",value:false,suppressEvent:true}},A={"CONTEXT_MOUSE_OVER":"contextMouseOver","CONTEXT_MOUSE_OUT":"contextMouseOut","CONTEXT_TRIGGER":"contextTrigger"};G.CSS_TOOLTIP="yui-tt";function I(N,M,O){var R=O[0],P=O[1],Q=this.cfg,S=Q.getProperty("width");if(S==P){Q.setProperty("width",R);}this.unsubscribe("hide",this._onHide,O);}function D(N,M){var O=document.body,S=this.cfg,R=S.getProperty("width"),P,Q;if((!R||R=="auto")&&(S.getProperty("container")!=O||S.getProperty("x")>=C.getViewportWidth()||S.getProperty("y")>=C.getViewportHeight())){Q=this.element.cloneNode(true);Q.style.visibility="hidden";Q.style.top="0px";Q.style.left="0px";O.appendChild(Q);P=(Q.offsetWidth+"px");O.removeChild(Q);Q=null;S.setProperty("width",P);S.refireEvent("xy");this.subscribe("hide",I,[(R||""),P]);}}function B(N,M,O){this.render(O);}function J(){L.onDOMReady(B,this.cfg.getProperty("container"),this);}YAHOO.extend(G,YAHOO.widget.Overlay,{init:function(N,M){G.superclass.init.call(this,N);this.beforeInitEvent.fire(G);C.addClass(this.element,G.CSS_TOOLTIP);if(M){this.cfg.applyConfig(M,true);}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("beforeShow",D);this.subscribe("init",J);this.subscribe("render",this.onRender);this.initEvent.fire(G);},initEvents:function(){G.superclass.initEvents.call(this);var M=K.LIST;this.contextMouseOverEvent=this.createEvent(A.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature=M;this.contextMouseOutEvent=this.createEvent(A.CONTEXT_MOUSE_OUT);this.contextMouseOutEvent.signature=M;this.contextTriggerEvent=this.createEvent(A.CONTEXT_TRIGGER);this.contextTriggerEvent.signature=M;},initDefaultConfig:function(){G.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.PREVENT_OVERLAP.key,{value:H.PREVENT_OVERLAP.value,validator:H.PREVENT_OVERLAP.validator,supercedes:H.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(H.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:H.SHOW_DELAY.validator});this.cfg.addProperty(H.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:H.AUTO_DISMISS_DELAY.value,validator:H.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(H.HIDE_DELAY.key,{handler:this.configHideDelay,value:H.HIDE_DELAY.value,validator:H.HIDE_DELAY.validator});this.cfg.addProperty(H.TEXT.key,{handler:this.configText,suppressEvent:H.TEXT.suppressEvent});this.cfg.addProperty(H.CONTAINER.key,{handler:this.configContainer,value:document.body});this.cfg.addProperty(H.DISABLED.key,{handler:this.configContainer,value:H.DISABLED.value,supressEvent:H.DISABLED.suppressEvent});},configText:function(N,M,O){var P=M[0];if(P){this.setBody(P);}},configContainer:function(O,N,P){var M=N[0];if(typeof M=="string"){this.cfg.setProperty("container",document.getElementById(M),true);}},_removeEventListeners:function(){var P=this._context,M,O,N;if(P){M=P.length;if(M>0){N=M-1;do{O=P[N];L.removeListener(O,"mouseover",this.onContextMouseOver);L.removeListener(O,"mousemove",this.onContextMouseMove);L.removeListener(O,"mouseout",this.onContextMouseOut);}while(N--);}}},configContext:function(R,N,S){var Q=N[0],T,M,P,O;if(Q){if(!(Q instanceof Array)){if(typeof Q=="string"){this.cfg.setProperty("context",[document.getElementById(Q)],true);}else{this.cfg.setProperty("context",[Q],true);}Q=this.cfg.getProperty("context");}this._removeEventListeners();this._context=Q;T=this._context;if(T){M=T.length;if(M>0){O=M-1;do{P=T[O];L.on(P,"mouseover",this.onContextMouseOver,this);L.on(P,"mousemove",this.onContextMouseMove,this);L.on(P,"mouseout",this.onContextMouseOut,this);}while(O--);}}}},onContextMouseMove:function(N,M){M.pageX=L.getPageX(N);M.pageY=L.getPageY(N);},onContextMouseOver:function(O,N){var M=this;if(M.title){N._tempTitle=M.title;M.title="";}if(N.fireEvent("contextMouseOver",M,O)!==false&&!N.cfg.getProperty("disabled")){if(N.hideProcId){clearTimeout(N.hideProcId);N.hideProcId=null;}L.on(M,"mousemove",N.onContextMouseMove,N);N.showProcId=N.doShow(O,M);}},onContextMouseOut:function(O,N){var M=this;if(N._tempTitle){M.title=N._tempTitle;N._tempTitle=null;}if(N.showProcId){clearTimeout(N.showProcId);N.showProcId=null;}if(N.hideProcId){clearTimeout(N.hideProcId);N.hideProcId=null;}N.fireEvent("contextMouseOut",M,O);N.hideProcId=setTimeout(function(){N.hide();},N.cfg.getProperty("hidedelay"));},doShow:function(O,M){var P=25,N=this;if(YAHOO.env.ua.opera&&M.tagName&&M.tagName.toUpperCase()=="A"){P+=12; | ||
14 | +}return setTimeout(function(){var Q=N.cfg.getProperty("text");if(N._tempTitle&&(Q===""||YAHOO.lang.isUndefined(Q)||YAHOO.lang.isNull(Q))){N.setBody(N._tempTitle);}else{N.cfg.refireEvent("text");}N.moveTo(N.pageX,N.pageY+P);if(N.cfg.getProperty("preventoverlap")){N.preventOverlap(N.pageX,N.pageY);}L.removeListener(M,"mousemove",N.onContextMouseMove);N.contextTriggerEvent.fire(M);N.show();N.hideProcId=N.doHide();},this.cfg.getProperty("showdelay"));},doHide:function(){var M=this;return setTimeout(function(){M.hide();},this.cfg.getProperty("autodismissdelay"));},preventOverlap:function(Q,P){var M=this.element.offsetHeight,O=new YAHOO.util.Point(Q,P),N=C.getRegion(this.element);N.top-=5;N.left-=5;N.right+=5;N.bottom+=5;if(N.contains(O)){this.cfg.setProperty("y",(P-M-5));}},onRender:function(Q,P){function R(){var U=this.element,T=this._shadow;if(T){T.style.width=(U.offsetWidth+6)+"px";T.style.height=(U.offsetHeight+1)+"px";}}function N(){C.addClass(this._shadow,"yui-tt-shadow-visible");}function M(){C.removeClass(this._shadow,"yui-tt-shadow-visible");}function S(){var V=this._shadow,U,T,X,W;if(!V){U=this.element;T=YAHOO.widget.Module;X=YAHOO.env.ua.ie;W=this;if(!F){F=document.createElement("div");F.className="yui-tt-shadow";}V=F.cloneNode(false);U.appendChild(V);this._shadow=V;N.call(this);this.subscribe("beforeShow",N);this.subscribe("beforeHide",M);if(X==6||(X==7&&document.compatMode=="BackCompat")){window.setTimeout(function(){R.call(W);},0);this.cfg.subscribeToConfigEvent("width",R);this.cfg.subscribeToConfigEvent("height",R);this.subscribe("changeContent",R);T.textResizeEvent.subscribe(R,this,true);this.subscribe("destroy",function(){T.textResizeEvent.unsubscribe(R,this);});}}}function O(){S.call(this);this.unsubscribe("beforeShow",O);}if(this.cfg.getProperty("visible")){S.call(this);}else{this.subscribe("beforeShow",O);}},destroy:function(){this._removeEventListeners();G.superclass.destroy.call(this);},toString:function(){return"Tooltip "+this.id;}});}());(function(){YAHOO.widget.Panel=function(R,Q){YAHOO.widget.Panel.superclass.constructor.call(this,R,Q);};var I=YAHOO.lang,E=YAHOO.util.DD,F=YAHOO.util.Dom,P=YAHOO.util.Event,B=YAHOO.widget.Overlay,O=YAHOO.util.CustomEvent,C=YAHOO.util.Config,N=YAHOO.widget.Panel,H,L,D,A={"SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},J={"CLOSE":{key:"close",value:true,validator:I.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(E?true:false),validator:I.isBoolean,supercedes:["visible"]},"DRAG_ONLY":{key:"dragonly",value:false,validator:I.isBoolean,supercedes:["draggable"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:"modal",value:false,validator:I.isBoolean,supercedes:["visible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]}};N.CSS_PANEL="yui-panel";N.CSS_PANEL_CONTAINER="yui-panel-container";N.FOCUSABLE=["a","button","select","textarea","input"];function M(R,Q){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader(" ");}}function K(R,Q,S){var V=S[0],T=S[1],U=this.cfg,W=U.getProperty("width");if(W==T){U.setProperty("width",V);}this.unsubscribe("hide",K,S);}function G(R,Q){var V=YAHOO.env.ua.ie,U,T,S;if(V==6||(V==7&&document.compatMode=="BackCompat")){U=this.cfg;T=U.getProperty("width");if(!T||T=="auto"){S=(this.element.offsetWidth+"px");U.setProperty("width",S);this.subscribe("hide",K,[(T||""),S]);}}}YAHOO.extend(N,B,{init:function(R,Q){N.superclass.init.call(this,R);this.beforeInitEvent.fire(N);F.addClass(this.element,N.CSS_PANEL);this.buildWrapper();if(Q){this.cfg.applyConfig(Q,true);}this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",M);this.initEvent.fire(N);},_onElementFocus:function(Q){this.blur();},_addFocusHandlers:function(Y,S){var V=this,Z="focus",U="hidden";function X(a){if(a.type!==U&&!F.isAncestor(V.element,a)){P.on(a,Z,V._onElementFocus);return true;}return false;}var W=N.FOCUSABLE,Q=W.length,T=[];for(var R=0;R<Q;R++){T=T.concat(F.getElementsBy(X,W[R]));}this.focusableElements=T;},_removeFocusHandlers:function(T,S){var V=this.focusableElements,Q=V.length,R="focus";if(V){for(var U=0;U<Q;U++){P.removeListener(V[U],R,this._onElementFocus);}}},initEvents:function(){N.superclass.initEvents.call(this);var Q=O.LIST;this.showMaskEvent=this.createEvent(A.SHOW_MASK);this.showMaskEvent.signature=Q;this.hideMaskEvent=this.createEvent(A.HIDE_MASK);this.hideMaskEvent.signature=Q;this.dragEvent=this.createEvent(A.DRAG);this.dragEvent.signature=Q;},initDefaultConfig:function(){N.superclass.initDefaultConfig.call(this);this.cfg.addProperty(J.CLOSE.key,{handler:this.configClose,value:J.CLOSE.value,validator:J.CLOSE.validator,supercedes:J.CLOSE.supercedes});this.cfg.addProperty(J.DRAGGABLE.key,{handler:this.configDraggable,value:J.DRAGGABLE.value,validator:J.DRAGGABLE.validator,supercedes:J.DRAGGABLE.supercedes});this.cfg.addProperty(J.DRAG_ONLY.key,{value:J.DRAG_ONLY.value,validator:J.DRAG_ONLY.validator,supercedes:J.DRAG_ONLY.supercedes});this.cfg.addProperty(J.UNDERLAY.key,{handler:this.configUnderlay,value:J.UNDERLAY.value,supercedes:J.UNDERLAY.supercedes});this.cfg.addProperty(J.MODAL.key,{handler:this.configModal,value:J.MODAL.value,validator:J.MODAL.validator,supercedes:J.MODAL.supercedes});this.cfg.addProperty(J.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:J.KEY_LISTENERS.suppressEvent,supercedes:J.KEY_LISTENERS.supercedes});},configClose:function(S,Q,U){var V=Q[0],R=this.close;function T(X,W){W.hide();}if(V){if(!R){if(!D){D=document.createElement("span");D.innerHTML=" ";D.className="container-close";}R=D.cloneNode(true);this.innerElement.appendChild(R);P.on(R,"click",T,this);this.close=R;}else{R.style.display="block";}}else{if(R){R.style.display="none";}}},configDraggable:function(R,Q,S){var T=Q[0];if(T){if(!E){this.cfg.setProperty("draggable",false);return ;}if(this.header){F.setStyle(this.header,"cursor","move");this.registerDragDrop(); | ||
15 | +}this.subscribe("beforeShow",G);}else{if(this.dd){this.dd.unreg();}if(this.header){F.setStyle(this.header,"cursor","auto");}this.unsubscribe("beforeShow",G);}},configUnderlay:function(b,a,V){var Z=YAHOO.env.ua,X=(this.platform=="mac"&&Z.gecko),Y=(Z.ie==6||(Z.ie==7&&document.compatMode=="BackCompat")),c=a[0].toLowerCase(),R=this.underlay,S=this.element;function d(){var e=this.underlay;F.addClass(e,"yui-force-redraw");window.setTimeout(function(){F.removeClass(e,"yui-force-redraw");},0);}function T(){var e=false;if(!R){if(!L){L=document.createElement("div");L.className="underlay";}R=L.cloneNode(false);this.element.appendChild(R);this.underlay=R;if(Y){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true);}if(Z.webkit&&Z.webkit<420){this.changeContentEvent.subscribe(d);}e=true;}}function W(){var e=T.call(this);if(!e&&Y){this.sizeUnderlay();}this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(W);}function U(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(W);this._underlayDeferred=false;}if(R){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(d);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(R);this.underlay=null;}}switch(c){case"shadow":F.removeClass(S,"matte");F.addClass(S,"shadow");break;case"matte":if(!X){U.call(this);}F.removeClass(S,"shadow");F.addClass(S,"matte");break;default:if(!X){U.call(this);}F.removeClass(S,"shadow");F.removeClass(S,"matte");break;}if((c=="shadow")||(X&&!R)){if(this.cfg.getProperty("visible")){var Q=T.call(this);if(!Q&&Y){this.sizeUnderlay();}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(W);this._underlayDeferred=true;}}}},configModal:function(R,Q,T){var S=Q[0];if(S){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);B.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true;}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask();}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);B.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false;}}},removeMask:function(){var R=this.mask,Q;if(R){this.hideMask();Q=R.parentNode;if(Q){Q.removeChild(R);}this.mask=null;}},configKeyListeners:function(T,Q,W){var S=Q[0],V,U,R;if(S){if(S instanceof Array){U=S.length;for(R=0;R<U;R++){V=S[R];if(!C.alreadySubscribed(this.showEvent,V.enable,V)){this.showEvent.subscribe(V.enable,V,true);}if(!C.alreadySubscribed(this.hideEvent,V.disable,V)){this.hideEvent.subscribe(V.disable,V,true);this.destroyEvent.subscribe(V.disable,V,true);}}}else{if(!C.alreadySubscribed(this.showEvent,S.enable,S)){this.showEvent.subscribe(S.enable,S,true);}if(!C.alreadySubscribed(this.hideEvent,S.disable,S)){this.hideEvent.subscribe(S.disable,S,true);this.destroyEvent.subscribe(S.disable,S,true);}}}},configHeight:function(T,R,U){var Q=R[0],S=this.innerElement;F.setStyle(S,"height",Q);this.cfg.refireEvent("iframe");},configWidth:function(T,Q,U){var S=Q[0],R=this.innerElement;F.setStyle(R,"width",S);this.cfg.refireEvent("iframe");},configzIndex:function(R,Q,T){N.superclass.configzIndex.call(this,R,Q,T);if(this.mask||this.cfg.getProperty("modal")===true){var S=F.getStyle(this.element,"zIndex");if(!S||isNaN(S)){S=0;}if(S===0){this.cfg.setProperty("zIndex",1);}else{this.stackMask();}}},buildWrapper:function(){var S=this.element.parentNode,Q=this.element,R=document.createElement("div");R.className=N.CSS_PANEL_CONTAINER;R.id=Q.id+"_c";if(S){S.insertBefore(R,Q);}R.appendChild(Q);this.element=R;this.innerElement=Q;F.setStyle(this.innerElement,"visibility","inherit");},sizeUnderlay:function(){var R=this.underlay,Q;if(R){Q=this.element;R.style.width=Q.offsetWidth+"px";R.style.height=Q.offsetHeight+"px";}},registerDragDrop:function(){var R=this;if(this.header){if(!E){return ;}var Q=(this.cfg.getProperty("dragonly")===true);this.dd=new E(this.element.id,this.id,{dragOnly:Q});if(!this.header.id){this.header.id=this.id+"_h";}this.dd.startDrag=function(){var T,V,S,Y,X,W;if(YAHOO.env.ua.ie==6){F.addClass(R.element,"drag");}if(R.cfg.getProperty("constraintoviewport")){var U=B.VIEWPORT_OFFSET;T=R.element.offsetHeight;V=R.element.offsetWidth;S=F.getViewportWidth();Y=F.getViewportHeight();X=F.getDocumentScrollLeft();W=F.getDocumentScrollTop();if(T+U<Y){this.minY=W+U;this.maxY=W+Y-T-U;}else{this.minY=W+U;this.maxY=W+U;}if(V+U<S){this.minX=X+U;this.maxX=X+S-V-U;}else{this.minX=X+U;this.maxX=X+U;}this.constrainX=true;this.constrainY=true;}else{this.constrainX=false;this.constrainY=false;}R.dragEvent.fire("startDrag",arguments);};this.dd.onDrag=function(){R.syncPosition();R.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars();}R.dragEvent.fire("onDrag",arguments);};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){F.removeClass(R.element,"drag");}R.dragEvent.fire("endDrag",arguments);R.moveEvent.fire(R.cfg.getProperty("xy"));};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA");}},buildMask:function(){var Q=this.mask;if(!Q){if(!H){H=document.createElement("div");H.className="mask";H.innerHTML=" ";}Q=H.cloneNode(true);Q.id=this.id+"_mask";document.body.insertBefore(Q,document.body.firstChild);this.mask=Q;if(YAHOO.env.ua.gecko&&this.platform=="mac"){F.addClass(this.mask,"block-scrollbars"); | ||
16 | +}this.stackMask();}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";this.hideMaskEvent.fire();F.removeClass(document.body,"masked");}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){F.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire();}},sizeMask:function(){if(this.mask){this.mask.style.height=F.getDocumentHeight()+"px";this.mask.style.width=F.getDocumentWidth()+"px";}},stackMask:function(){if(this.mask){var Q=F.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(Q)&&!isNaN(Q)){F.setStyle(this.mask,"zIndex",Q-1);}}},render:function(Q){return N.superclass.render.call(this,Q,this.innerElement);},destroy:function(){B.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){P.purgeElement(this.close);}N.superclass.destroy.call(this);},toString:function(){return"Panel "+this.id;}});}());(function(){YAHOO.widget.Dialog=function(L,K){YAHOO.widget.Dialog.superclass.constructor.call(this,L,K);};var J=YAHOO.util.Event,I=YAHOO.util.CustomEvent,D=YAHOO.util.Dom,B=YAHOO.util.KeyListener,H=YAHOO.util.Connect,F=YAHOO.widget.Dialog,E=YAHOO.lang,A={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},G={"POST_METHOD":{key:"postmethod",value:"async"},"BUTTONS":{key:"buttons",value:"none"},"HIDEAFTERSUBMIT":{key:"hideaftersubmit",value:true}};F.CSS_DIALOG="yui-dialog";function C(){var N=this._aButtons,L,M,K;if(E.isArray(N)){L=N.length;if(L>0){K=L-1;do{M=N[K];if(YAHOO.widget.Button&&M instanceof YAHOO.widget.Button){M.destroy();}else{if(M.tagName.toUpperCase()=="BUTTON"){J.purgeElement(M);J.purgeElement(M,false);}}}while(K--);}}}YAHOO.extend(F,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){F.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(G.POST_METHOD.key,{handler:this.configPostMethod,value:G.POST_METHOD.value,validator:function(K){if(K!="form"&&K!="async"&&K!="none"&&K!="manual"){return false;}else{return true;}}});this.cfg.addProperty(G.HIDEAFTERSUBMIT.key,{value:G.HIDEAFTERSUBMIT.value});this.cfg.addProperty(G.BUTTONS.key,{handler:this.configButtons,value:G.BUTTONS.value});},initEvents:function(){F.superclass.initEvents.call(this);var K=I.LIST;this.beforeSubmitEvent=this.createEvent(A.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=K;this.submitEvent=this.createEvent(A.SUBMIT);this.submitEvent.signature=K;this.manualSubmitEvent=this.createEvent(A.MANUAL_SUBMIT);this.manualSubmitEvent.signature=K;this.asyncSubmitEvent=this.createEvent(A.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=K;this.formSubmitEvent=this.createEvent(A.FORM_SUBMIT);this.formSubmitEvent.signature=K;this.cancelEvent=this.createEvent(A.CANCEL);this.cancelEvent.signature=K;},init:function(L,K){F.superclass.init.call(this,L);this.beforeInitEvent.fire(F);D.addClass(this.element,F.CSS_DIALOG);this.cfg.setProperty("visible",false);if(K){this.cfg.applyConfig(K,true);}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(F);},doSubmit:function(){var Q=this.form,O=false,N=false,P,K,M,L;switch(this.cfg.getProperty("postmethod")){case"async":P=Q.elements;K=P.length;if(K>0){M=K-1;do{if(P[M].type=="file"){O=true;break;}}while(M--);}if(O&&YAHOO.env.ua.ie&&this.isSecure){N=true;}L=(Q.getAttribute("method")||"POST").toUpperCase();H.setForm(Q,O,N);H.asyncRequest(L,Q.getAttribute("action"),this.callback);this.asyncSubmitEvent.fire();break;case"form":Q.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}},registerForm:function(){var M=this.element.getElementsByTagName("form")[0],L=this,K,N;if(this.form){if(this.form==M&&D.isAncestor(this.element,this.form)){return ;}else{J.purgeElement(this.form);this.form=null;}}if(!M){M=document.createElement("form");M.name="frm_"+this.id;this.body.appendChild(M);}if(M){this.form=M;J.on(M,"submit",function(O){J.stopEvent(O);this.submit();this.form.blur();},this,true);this.firstFormElement=function(){var Q,P,O=M.elements.length;for(Q=0;Q<O;Q++){P=M.elements[Q];if(P.focus&&!P.disabled&&P.type!="hidden"){return P;}}return null;}();this.lastFormElement=function(){var Q,P,O=M.elements.length;for(Q=O-1;Q>=0;Q--){P=M.elements[Q];if(P.focus&&!P.disabled&&P.type!="hidden"){return P;}}return null;}();if(this.cfg.getProperty("modal")){K=this.firstFormElement||this.firstButton;if(K){this.preventBackTab=new B(K,{shift:true,keys:9},{fn:L.focusLast,scope:L,correctScope:true});this.showEvent.subscribe(this.preventBackTab.enable,this.preventBackTab,true);this.hideEvent.subscribe(this.preventBackTab.disable,this.preventBackTab,true);}N=this.lastButton||this.lastFormElement;if(N){this.preventTabOut=new B(N,{shift:false,keys:9},{fn:L.focusFirst,scope:L,correctScope:true});this.showEvent.subscribe(this.preventTabOut.enable,this.preventTabOut,true);this.hideEvent.subscribe(this.preventTabOut.disable,this.preventTabOut,true);}}}},configClose:function(M,K,N){var O=K[0];function L(Q,P){P.cancel();}if(O){if(!this.close){this.close=document.createElement("div");D.addClass(this.close,"container-close");this.close.innerHTML=" ";this.innerElement.appendChild(this.close);J.on(this.close,"click",L,this);}else{this.close.style.display="block";}}else{if(this.close){this.close.style.display="none";}}},configButtons:function(U,T,O){var P=YAHOO.widget.Button,W=T[0],M=this.innerElement,V,R,L,S,Q,K,N;C.call(this);this._aButtons=null;if(E.isArray(W)){Q=document.createElement("span");Q.className="button-group";S=W.length;this._aButtons=[];for(N=0;N<S;N++){V=W[N];if(P){L=new P({label:V.text,container:Q});R=L.get("element");if(V.isDefault){L.addClass("default");this.defaultHtmlButton=R;}if(E.isFunction(V.handler)){L.set("onclick",{fn:V.handler,obj:this,scope:this}); | ||
17 | +}else{if(E.isObject(V.handler)&&E.isFunction(V.handler.fn)){L.set("onclick",{fn:V.handler.fn,obj:((!E.isUndefined(V.handler.obj))?V.handler.obj:this),scope:(V.handler.scope||this)});}}this._aButtons[this._aButtons.length]=L;}else{R=document.createElement("button");R.setAttribute("type","button");if(V.isDefault){R.className="default";this.defaultHtmlButton=R;}R.innerHTML=V.text;if(E.isFunction(V.handler)){J.on(R,"click",V.handler,this,true);}else{if(E.isObject(V.handler)&&E.isFunction(V.handler.fn)){J.on(R,"click",V.handler.fn,((!E.isUndefined(V.handler.obj))?V.handler.obj:this),(V.handler.scope||this));}}Q.appendChild(R);this._aButtons[this._aButtons.length]=R;}V.htmlButton=R;if(N===0){this.firstButton=R;}if(N==(S-1)){this.lastButton=R;}}this.setFooter(Q);K=this.footer;if(D.inDocument(this.element)&&!D.isAncestor(M,K)){M.appendChild(K);}this.buttonSpan=Q;}else{Q=this.buttonSpan;K=this.footer;if(Q&&K){K.removeChild(Q);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}this.cfg.refireEvent("iframe");this.cfg.refireEvent("underlay");},getButtons:function(){var K=this._aButtons;if(K){return K;}},focusFirst:function(N,L,P){var M=this.firstFormElement,K;if(L){K=L[1];if(K){J.stopEvent(K);}}if(M){try{M.focus();}catch(O){}}else{this.focusDefaultButton();}},focusLast:function(N,L,P){var Q=this.cfg.getProperty("buttons"),M=this.lastFormElement,K;if(L){K=L[1];if(K){J.stopEvent(K);}}if(Q&&E.isArray(Q)){this.focusLastButton();}else{if(M){try{M.focus();}catch(O){}}}},focusDefaultButton:function(){var K=this.defaultHtmlButton;if(K){try{K.focus();}catch(L){}}},blurButtons:function(){var P=this.cfg.getProperty("buttons"),M,O,L,K;if(P&&E.isArray(P)){M=P.length;if(M>0){K=(M-1);do{O=P[K];if(O){L=O.htmlButton;if(L){try{L.blur();}catch(N){}}}}while(K--);}}},focusFirstButton:function(){var N=this.cfg.getProperty("buttons"),M,K;if(N&&E.isArray(N)){M=N[0];if(M){K=M.htmlButton;if(K){try{K.focus();}catch(L){}}}}},focusLastButton:function(){var O=this.cfg.getProperty("buttons"),L,N,K;if(O&&E.isArray(O)){L=O.length;if(L>0){N=O[(L-1)];if(N){K=N.htmlButton;if(K){try{K.focus();}catch(M){}}}}}},configPostMethod:function(L,K,M){this.registerForm();},validate:function(){return true;},submit:function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide();}return true;}else{return false;}},cancel:function(){this.cancelEvent.fire();this.hide();},getData:function(){var a=this.form,M,T,W,O,U,R,Q,L,X,N,Y,b,K,P,c,Z,V;function S(e){var d=e.tagName.toUpperCase();return((d=="INPUT"||d=="TEXTAREA"||d=="SELECT")&&e.name==O);}if(a){M=a.elements;T=M.length;W={};for(Z=0;Z<T;Z++){O=M[Z].name;U=D.getElementsBy(S,"*",a);R=U.length;if(R>0){if(R==1){U=U[0];Q=U.type;L=U.tagName.toUpperCase();switch(L){case"INPUT":if(Q=="checkbox"){W[O]=U.checked;}else{if(Q!="radio"){W[O]=U.value;}}break;case"TEXTAREA":W[O]=U.value;break;case"SELECT":X=U.options;N=X.length;Y=[];for(V=0;V<N;V++){b=X[V];if(b.selected){K=b.value;if(!K||K===""){K=b.text;}Y[Y.length]=K;}}W[O]=Y;break;}}else{Q=U[0].type;switch(Q){case"radio":for(V=0;V<R;V++){P=U[V];if(P.checked){W[O]=P.value;break;}}break;case"checkbox":Y=[];for(V=0;V<R;V++){c=U[V];if(c.checked){Y[Y.length]=c.value;}}W[O]=Y;break;}}}}}return W;},destroy:function(){C.call(this);this._aButtons=null;var K=this.element.getElementsByTagName("form"),L;if(K.length>0){L=K[0];if(L){J.purgeElement(L);if(L.parentNode){L.parentNode.removeChild(L);}this.form=null;}}F.superclass.destroy.call(this);},toString:function(){return"Dialog "+this.id;}});}());(function(){YAHOO.widget.SimpleDialog=function(E,D){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,E,D);};var C=YAHOO.util.Dom,B=YAHOO.widget.SimpleDialog,A={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};B.ICON_BLOCK="blckicon";B.ICON_ALARM="alrticon";B.ICON_HELP="hlpicon";B.ICON_INFO="infoicon";B.ICON_WARN="warnicon";B.ICON_TIP="tipicon";B.ICON_CSS_CLASSNAME="yui-icon";B.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(B,YAHOO.widget.Dialog,{initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(A.ICON.key,{handler:this.configIcon,value:A.ICON.value,suppressEvent:A.ICON.suppressEvent});this.cfg.addProperty(A.TEXT.key,{handler:this.configText,value:A.TEXT.value,suppressEvent:A.TEXT.suppressEvent,supercedes:A.TEXT.supercedes});},init:function(E,D){B.superclass.init.call(this,E);this.beforeInitEvent.fire(B);C.addClass(this.element,B.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(D){this.cfg.applyConfig(D,true);}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,true);this.initEvent.fire(B);},registerForm:function(){B.superclass.registerForm.call(this);this.form.innerHTML+='<input type="hidden" name="'+this.id+'" value=""/>';},configIcon:function(F,E,J){var K=E[0],D=this.body,I=B.ICON_CSS_CLASSNAME,H,G;if(K&&K!="none"){H=C.getElementsByClassName(I,"*",D);if(H){G=H.parentNode;if(G){G.removeChild(H);H=null;}}if(K.indexOf(".")==-1){H=document.createElement("span");H.className=(I+" "+K);H.innerHTML=" ";}else{H=document.createElement("img");H.src=(this.imageRoot+K);H.className=I;}if(H){D.insertBefore(H,D.firstChild);}}},configText:function(E,D,F){var G=D[0];if(G){this.setBody(G);this.cfg.refireEvent("icon");}},toString:function(){return"SimpleDialog "+this.id;}});}());(function(){YAHOO.widget.ContainerEffect=function(F,I,H,E,G){if(!G){G=YAHOO.util.Anim;}this.overlay=F;this.attrIn=I;this.attrOut=H;this.targetElement=E||F.element;this.animClass=G;};var B=YAHOO.util.Dom,D=YAHOO.util.CustomEvent,C=YAHOO.util.Easing,A=YAHOO.widget.ContainerEffect;A.FADE=function(E,G){var I={attributes:{opacity:{from:0,to:1}},duration:G,method:C.easeIn};var F={attributes:{opacity:{to:0}},duration:G,method:C.easeOut};var H=new A(E,I,F,E.element);H.handleUnderlayStart=function(){var K=this.overlay.underlay; | ||
18 | +if(K&&YAHOO.env.ua.ie){var J=(K.filters&&K.filters.length>0);if(J){B.addClass(E.element,"yui-effect-fade");}}};H.handleUnderlayComplete=function(){var J=this.overlay.underlay;if(J&&YAHOO.env.ua.ie){B.removeClass(E.element,"yui-effect-fade");}};H.handleStartAnimateIn=function(K,J,L){B.addClass(L.overlay.element,"hide-select");if(!L.overlay.underlay){L.overlay.cfg.refireEvent("underlay");}L.handleUnderlayStart();B.setStyle(L.overlay.element,"visibility","visible");B.setStyle(L.overlay.element,"opacity",0);};H.handleCompleteAnimateIn=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null;}L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.animateInCompleteEvent.fire();};H.handleStartAnimateOut=function(K,J,L){B.addClass(L.overlay.element,"hide-select");L.handleUnderlayStart();};H.handleCompleteAnimateOut=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null;}B.setStyle(L.overlay.element,"visibility","hidden");B.setStyle(L.overlay.element,"opacity",1);L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.animateOutCompleteEvent.fire();};H.init();return H;};A.SLIDE=function(G,I){var F=G.cfg.getProperty("x")||B.getX(G.element),K=G.cfg.getProperty("y")||B.getY(G.element),J=B.getClientWidth(),H=G.element.offsetWidth,E=new A(G,{attributes:{points:{to:[F,K]}},duration:I,method:C.easeIn},{attributes:{points:{to:[(J+25),K]}},duration:I,method:C.easeOut},G.element,YAHOO.util.Motion);E.handleStartAnimateIn=function(M,L,N){N.overlay.element.style.left=((-25)-H)+"px";N.overlay.element.style.top=K+"px";};E.handleTweenAnimateIn=function(O,N,P){var Q=B.getXY(P.overlay.element),M=Q[0],L=Q[1];if(B.getStyle(P.overlay.element,"visibility")=="hidden"&&M<F){B.setStyle(P.overlay.element,"visibility","visible");}P.overlay.cfg.setProperty("xy",[M,L],true);P.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateIn=function(M,L,N){N.overlay.cfg.setProperty("xy",[F,K],true);N.startX=F;N.startY=K;N.overlay.cfg.refireEvent("iframe");N.animateInCompleteEvent.fire();};E.handleStartAnimateOut=function(M,L,P){var N=B.getViewportWidth(),Q=B.getXY(P.overlay.element),O=Q[1];P.animOut.attributes.points.to=[(N+25),O];};E.handleTweenAnimateOut=function(N,M,O){var Q=B.getXY(O.overlay.element),L=Q[0],P=Q[1];O.overlay.cfg.setProperty("xy",[L,P],true);O.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateOut=function(M,L,N){B.setStyle(N.overlay.element,"visibility","hidden");N.overlay.cfg.setProperty("xy",[F,K]);N.animateOutCompleteEvent.fire();};E.init();return E;};A.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=D.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=D.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=D.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=D.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate();},handleStartAnimateIn:function(F,E,G){},handleTweenAnimateIn:function(F,E,G){},handleCompleteAnimateIn:function(F,E,G){},handleStartAnimateOut:function(F,E,G){},handleTweenAnimateOut:function(F,E,G){},handleCompleteAnimateOut:function(F,E,G){},toString:function(){var E="ContainerEffect";if(this.overlay){E+=" ["+this.overlay.toString()+"]";}return E;}};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.5.2",build:"1076"}); | ||
19 | +<?php if(extension_loaded('zlib')){ob_end_flush();}?> | ||
0 | \ No newline at end of file | 20 | \ No newline at end of file |
@@ -0,0 +1,31 @@ | @@ -0,0 +1,31 @@ | ||
1 | +<?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?> | ||
2 | +/* | ||
3 | +Copyright (c) 2008, Yahoo! Inc. All rights reserved. | ||
4 | +Code licensed under the BSD License: | ||
5 | +http://developer.yahoo.net/yui/license.txt | ||
6 | +version: 2.5.2 | ||
7 | +*/ | ||
8 | +YAHOO.util.Chain=function(){this.q=[].slice.call(arguments);this.createEvent("end");};YAHOO.util.Chain.prototype={id:0,run:function(){var F=this.q[0],C;if(!F){this.fireEvent("end");return this;}else{if(this.id){return this;}}C=F.method||F;if(typeof C==="function"){var E=F.scope||{},B=F.argument||[],A=F.timeout||0,D=this;if(!(B instanceof Array)){B=[B];}if(A<0){this.id=A;if(F.until){for(;!F.until();){C.apply(E,B);}}else{if(F.iterations){for(;F.iterations-->0;){C.apply(E,B);}}else{C.apply(E,B);}}this.q.shift();this.id=0;return this.run();}else{if(F.until){if(F.until()){this.q.shift();return this.run();}}else{if(!F.iterations||!--F.iterations){this.q.shift();}}this.id=setTimeout(function(){C.apply(E,B);if(D.id){D.id=0;D.run();}},A);}}return this;},add:function(A){this.q.push(A);return this;},pause:function(){clearTimeout(this.id);this.id=0;return this;},stop:function(){this.pause();this.q=[];return this;}};YAHOO.lang.augmentProto(YAHOO.util.Chain,YAHOO.util.EventProvider);YAHOO.widget.ColumnSet=function(A){this._sId="yui-cs"+YAHOO.widget.ColumnSet._nCount;A=YAHOO.widget.DataTable._cloneObject(A);this._init(A);YAHOO.widget.ColumnSet._nCount++;};YAHOO.widget.ColumnSet._nCount=0;YAHOO.widget.ColumnSet.prototype={_sId:null,_aDefinitions:null,tree:null,flat:null,keys:null,headers:null,_init:function(I){var J=[];var A=[];var G=[];var E=[];var C=-1;var B=function(M,S){C++;if(!J[C]){J[C]=[];}for(var O=0;O<M.length;O++){var K=M[O];var Q=new YAHOO.widget.Column(K);K.yuiColumnId=Q._sId=YAHOO.widget.Column._nCount+"";if(!YAHOO.lang.isValue(Q.key)){Q.key="yui-dt-col"+YAHOO.widget.Column._nCount;}YAHOO.widget.Column._nCount++;A.push(Q);if(S){Q.parent=S;}if(YAHOO.lang.isArray(K.children)){Q.children=K.children;var R=0;var P=function(V){var W=V.children;for(var U=0;U<W.length;U++){if(YAHOO.lang.isArray(W[U].children)){P(W[U]);}else{R++;}}};P(K);Q._nColspan=R;var T=K.children;for(var N=0;N<T.length;N++){var L=T[N];if(Q.className&&(L.className===undefined)){L.className=Q.className;}if(Q.editor&&(L.editor===undefined)){L.editor=Q.editor;}if(Q.editorOptions&&(L.editorOptions===undefined)){L.editorOptions=Q.editorOptions;}if(Q.formatter&&(L.formatter===undefined)){L.formatter=Q.formatter;}if(Q.resizeable&&(L.resizeable===undefined)){L.resizeable=Q.resizeable;}if(Q.sortable&&(L.sortable===undefined)){L.sortable=Q.sortable;}if(Q.width&&(L.width===undefined)){L.width=Q.width;}if(Q.type&&(L.type===undefined)){L.type=Q.type;}if(Q.type&&!Q.formatter){Q.formatter=Q.type;}if(Q.text&&!YAHOO.lang.isValue(Q.label)){Q.label=Q.text;}if(Q.parser){}if(Q.sortOptions&&((Q.sortOptions.ascFunction)||(Q.sortOptions.descFunction))){}}if(!J[C+1]){J[C+1]=[];}B(T,Q);}else{Q._nKeyIndex=G.length;Q._nColspan=1;G.push(Q);}J[C].push(Q);}C--;};if(YAHOO.lang.isArray(I)){B(I);this._aDefinitions=I;}else{return null;}var F;var D=function(L){var M=1;var O;var N;var P=function(T,S){S=S||1;for(var U=0;U<T.length;U++){var R=T[U];if(YAHOO.lang.isArray(R.children)){S++;P(R.children,S);S--;}else{if(S>M){M=S;}}}};for(var K=0;K<L.length;K++){O=L[K];P(O);for(var Q=0;Q<O.length;Q++){N=O[Q];if(!YAHOO.lang.isArray(N.children)){N._nRowspan=M;}else{N._nRowspan=1;}}M=1;}};D(J);for(F=0;F<J[0].length;F++){J[0][F]._nTreeIndex=F;}var H=function(K,L){E[K].push(L._sId);if(L.parent){H(K,L.parent);}};for(F=0;F<G.length;F++){E[F]=[];H(F,G[F]);E[F]=E[F].reverse();}this.tree=J;this.flat=A;this.keys=G;this.headers=E;},getId:function(){return this._sId;},toString:function(){return"ColumnSet instance "+this._sId;},getDefinitions:function(){var A=this._aDefinitions;var B=function(D,F){for(var C=0;C<D.length;C++){var E=D[C];var G=F.getColumnById(E.yuiColumnId);if(G){E.abbr=G.abbr;E.className=G.className;E.editor=G.editor;E.editorOptions=G.editorOptions;E.formatter=G.formatter;E.hidden=G.hidden;E.key=G.key;E.label=G.label;E.minWidth=G.minWidth;E.resizeable=G.resizeable;E.selected=G.selected;E.sortable=G.sortable;E.sortOptions=G.sortOptions;E.width=G.width;}if(YAHOO.lang.isArray(E.children)){B(E.children,F);}}};B(A,this);this._aDefinitions=A;return A;},getColumnById:function(C){if(YAHOO.lang.isString(C)){var A=this.flat;for(var B=A.length-1;B>-1;B--){if(A[B]._sId===C){return A[B];}}}return null;},getColumn:function(C){if(YAHOO.lang.isNumber(C)&&this.keys[C]){return this.keys[C];}else{if(YAHOO.lang.isString(C)){var A=this.flat;var D=[];for(var B=0;B<A.length;B++){if(A[B].key===C){D.push(A[B]);}}if(D.length===1){return D[0];}else{if(D.length>1){return D;}}}}return null;},getDescendants:function(D){var B=this;var C=[];var A;var E=function(F){C.push(F);if(F.children){for(A=0;A<F.children.length;A++){E(B.getColumn(F.children[A].key));}}};E(D);return C;}};YAHOO.widget.Column=function(B){if(B&&(B.constructor==Object)){for(var A in B){if(A){this[A]=B[A];}}}if(this.width&&!YAHOO.lang.isNumber(this.width)){this.width=null;}};YAHOO.lang.augmentObject(YAHOO.widget.Column,{_nCount:0,formatCheckbox:function(B,A,C,D){YAHOO.widget.DataTable.formatCheckbox(B,A,C,D);},formatCurrency:function(B,A,C,D){YAHOO.widget.DataTable.formatCurrency(B,A,C,D);},formatDate:function(B,A,C,D){YAHOO.widget.DataTable.formatDate(B,A,C,D);},formatEmail:function(B,A,C,D){YAHOO.widget.DataTable.formatEmail(B,A,C,D);},formatLink:function(B,A,C,D){YAHOO.widget.DataTable.formatLink(B,A,C,D);},formatNumber:function(B,A,C,D){YAHOO.widget.DataTable.formatNumber(B,A,C,D);},formatSelect:function(B,A,C,D){YAHOO.widget.DataTable.formatDropdown(B,A,C,D);}});YAHOO.widget.Column.prototype={_sId:null,_oDefinition:null,_nKeyIndex:null,_nTreeIndex:null,_nColspan:1,_nRowspan:1,_oParent:null,_elTh:null,_elResizer:null,_dd:null,_ddResizer:null,key:null,label:null,abbr:null,children:null,width:null,minWidth:10,hidden:false,selected:false,className:null,formatter:null,editor:null,editorOptions:null,resizeable:false,sortable:false,sortOptions:null,getId:function(){return this._sId;},toString:function(){return"Column instance "+this._sId;},getDefinition:function(){var A=this._oDefinition;A.abbr=this.abbr;A.className=this.className;A.editor=this.editor; | ||
9 | +A.editorOptions=this.editorOptions;A.formatter=this.formatter;A.key=this.key;A.label=this.label;A.minWidth=this.minWidth;A.resizeable=this.resizeable;A.sortable=this.sortable;A.sortOptions=this.sortOptions;A.width=this.width;return A;},getKey:function(){return this.key;},getKeyIndex:function(){return this._nKeyIndex;},getTreeIndex:function(){return this._nTreeIndex;},getParent:function(){return this._oParent;},getColspan:function(){return this._nColspan;},getColSpan:function(){return this.getColspan();},getRowspan:function(){return this._nRowspan;},getThEl:function(){return this._elTh;},getResizerEl:function(){return this._elResizer;},getColEl:function(){return this.getThEl();},getIndex:function(){return this.getKeyIndex();},format:function(){}};YAHOO.util.Sort={compare:function(B,A,C){if((B===null)||(typeof B=="undefined")){if((A===null)||(typeof A=="undefined")){return 0;}else{return 1;}}else{if((A===null)||(typeof A=="undefined")){return -1;}}if(B.constructor==String){B=B.toLowerCase();}if(A.constructor==String){A=A.toLowerCase();}if(B<A){return(C)?1:-1;}else{if(B>A){return(C)?-1:1;}else{return 0;}}}};YAHOO.widget.ColumnDD=function(D,A,C,B){if(D&&A&&C&&B){this.datatable=D;this.table=D.getTheadEl().parentNode;this.column=A;this.headCell=C;this.pointer=B;this.newIndex=null;this.init(C);this.initFrame();this.invalidHandleTypes={};this.setPadding(10,0,(this.datatable.getTheadEl().offsetHeight+10),0);}else{}};if(YAHOO.util.DDProxy){YAHOO.extend(YAHOO.widget.ColumnDD,YAHOO.util.DDProxy,{initConstraints:function(){var G=YAHOO.util.Dom.getRegion(this.table),D=this.getEl(),F=YAHOO.util.Dom.getXY(D),C=parseInt(YAHOO.util.Dom.getStyle(D,"width"),10),A=parseInt(YAHOO.util.Dom.getStyle(D,"height"),10),E=((F[0]-G.left)+15),B=((G.right-F[0]-C)+15);this.setXConstraint(E,B);this.setYConstraint(10,10);YAHOO.util.Event.on(window,"resize",function(){this.initConstraints();},this,true);},_resizeProxy:function(){this.constructor.superclass._resizeProxy.apply(this,arguments);var A=this.getDragEl(),B=this.getEl();YAHOO.util.Dom.setStyle(this.pointer,"height",(this.table.parentNode.offsetHeight+10)+"px");YAHOO.util.Dom.setStyle(this.pointer,"display","block");var C=YAHOO.util.Dom.getXY(B);YAHOO.util.Dom.setXY(this.pointer,[C[0],(C[1]-5)]);YAHOO.util.Dom.setStyle(A,"height",this.datatable.getContainerEl().offsetHeight+"px");YAHOO.util.Dom.setStyle(A,"width",(parseInt(YAHOO.util.Dom.getStyle(A,"width"),10)+4)+"px");YAHOO.util.Dom.setXY(this.dragEl,C);},onMouseDown:function(){this.initConstraints();this.resetConstraints();},clickValidator:function(B){if(!this.column.hidden){var A=YAHOO.util.Event.getTarget(B);return(this.isValidHandleChild(A)&&(this.id==this.handleElId||this.DDM.handleWasClicked(A,this.id)));}},onDragOver:function(G,A){var E=this.datatable.getColumn(A);if(E){var C=YAHOO.util.Event.getPageX(G),H=YAHOO.util.Dom.getX(A),I=H+((YAHOO.util.Dom.get(A).offsetWidth)/2),F=this.column.getTreeIndex(),B=E.getTreeIndex(),J=B;if(C<I){YAHOO.util.Dom.setX(this.pointer,H);}else{var D=parseInt(E.getThEl().offsetWidth,10);YAHOO.util.Dom.setX(this.pointer,(H+D));J++;}if(B>F){J--;}if(J<0){J=0;}else{if(J>this.datatable.getColumnSet().tree[0].length){J=this.datatable.getColumnSet().tree[0].length;}}this.newIndex=J;}},onDragDrop:function(){if(YAHOO.lang.isNumber(this.newIndex)&&(this.newIndex!==this.column.getTreeIndex())){var C=this.datatable;C._oChainRender.stop();var B=C._oColumnSet.getDefinitions();var A=B.splice(this.column.getTreeIndex(),1)[0];B.splice(this.newIndex,0,A);C._initColumnSet(B);C._initTheadEls();C.render();C.fireEvent("columnReorderEvent");}},endDrag:function(){this.newIndex=null;YAHOO.util.Dom.setStyle(this.pointer,"display","none");}});}YAHOO.util.ColumnResizer=function(E,C,D,A,B){if(E&&C&&D&&A){this.datatable=E;this.column=C;this.headCell=D;this.headCellLiner=D.firstChild;this.init(A,A,{dragOnly:true,dragElId:B.id});this.initFrame();}else{}};if(YAHOO.util.DD){YAHOO.extend(YAHOO.util.ColumnResizer,YAHOO.util.DDProxy,{resetResizerEl:function(){var A=YAHOO.util.Dom.get(this.handleElId).style;A.left="auto";A.right=0;A.top="auto";A.bottom=0;},onMouseUp:function(C){this.resetResizerEl();var A=this.headCell.firstChild;var B=A.offsetWidth-(parseInt(YAHOO.util.Dom.getStyle(A,"paddingLeft"),10)|0)-(parseInt(YAHOO.util.Dom.getStyle(A,"paddingRight"),10)|0);this.datatable.fireEvent("columnResizeEvent",{column:this.column,target:this.headCell,width:B});},onMouseDown:function(A){this.startWidth=this.headCell.firstChild.offsetWidth;this.startX=YAHOO.util.Event.getXY(A)[0];this.nLinerPadding=(parseInt(YAHOO.util.Dom.getStyle(this.headCellLiner,"paddingLeft"),10)|0)+(parseInt(YAHOO.util.Dom.getStyle(this.headCellLiner,"paddingRight"),10)|0);},clickValidator:function(B){if(!this.column.hidden){var A=YAHOO.util.Event.getTarget(B);return(this.isValidHandleChild(A)&&(this.id==this.handleElId||this.DDM.handleWasClicked(A,this.id)));}},onDrag:function(C){var D=YAHOO.util.Event.getXY(C)[0];if(D>YAHOO.util.Dom.getX(this.headCellLiner)){var A=D-this.startX;var B=this.startWidth+A-this.nLinerPadding;this.datatable.setColumnWidth(this.column,B);}}});}YAHOO.widget.RecordSet=function(A){this._sId="yui-rs"+YAHOO.widget.RecordSet._nCount;YAHOO.widget.RecordSet._nCount++;this._records=[];if(A){if(YAHOO.lang.isArray(A)){this.addRecords(A);}else{if(A.constructor==Object){this.addRecord(A);}}}this.createEvent("recordAddEvent");this.createEvent("recordsAddEvent");this.createEvent("recordSetEvent");this.createEvent("recordsSetEvent");this.createEvent("recordUpdateEvent");this.createEvent("recordDeleteEvent");this.createEvent("recordsDeleteEvent");this.createEvent("resetEvent");this.createEvent("keyUpdateEvent");this.createEvent("recordValueUpdateEvent");};YAHOO.widget.RecordSet._nCount=0;YAHOO.widget.RecordSet.prototype={_sId:null,_addRecord:function(C,A){var B=new YAHOO.widget.Record(C);if(YAHOO.lang.isNumber(A)&&(A>-1)){this._records.splice(A,0,B);}else{this._records[this._records.length]=B;}return B;},_setRecord:function(B,A){if(!YAHOO.lang.isNumber(A)||A<0){A=this._records.length; | ||
10 | +}return(this._records[A]=new YAHOO.widget.Record(B));},_deleteRecord:function(B,A){if(!YAHOO.lang.isNumber(A)||(A<0)){A=1;}this._records.splice(B,A);},getId:function(){return this._sId;},toString:function(){return"RecordSet instance "+this._sId;},getLength:function(){return this._records.length;},getRecord:function(A){var B;if(A instanceof YAHOO.widget.Record){for(B=0;B<this._records.length;B++){if(this._records[B]&&(this._records[B]._sId===A._sId)){return A;}}}else{if(YAHOO.lang.isNumber(A)){if((A>-1)&&(A<this.getLength())){return this._records[A];}}else{if(YAHOO.lang.isString(A)){for(B=0;B<this._records.length;B++){if(this._records[B]&&(this._records[B]._sId===A)){return this._records[B];}}}}}return null;},getRecords:function(B,A){if(!YAHOO.lang.isNumber(B)){return this._records;}if(!YAHOO.lang.isNumber(A)){return this._records.slice(B);}return this._records.slice(B,B+A);},hasRecords:function(B,A){var D=this.getRecords(B,A);for(var C=0;C<A;++C){if(typeof D[C]==="undefined"){return false;}}return true;},getRecordIndex:function(B){if(B){for(var A=this._records.length-1;A>-1;A--){if(this._records[A]&&B.getId()===this._records[A].getId()){return A;}}}return null;},addRecord:function(C,A){if(C&&(C.constructor==Object)){var B=this._addRecord(C,A);this.fireEvent("recordAddEvent",{record:B,data:C});return B;}else{return null;}},addRecords:function(C,B){if(YAHOO.lang.isArray(C)){var F=[];for(var D=0;D<C.length;D++){if(C[D]&&(C[D].constructor==Object)){var A=this._addRecord(C[D],B);F.push(A);}}this.fireEvent("recordsAddEvent",{records:F,data:C});return F;}else{if(C&&(C.constructor==Object)){var E=this._addRecord(C);this.fireEvent("recordsAddEvent",{records:[E],data:C});return E;}else{return null;}}},setRecord:function(C,A){if(C&&(C.constructor==Object)){var B=this._setRecord(C,A);this.fireEvent("recordSetEvent",{record:B,data:C});return B;}else{return null;}},setRecords:function(E,D){var H=YAHOO.widget.Record,B=YAHOO.lang.isArray(E)?E:[E],G=[],F=0,A=B.length,C=0;D=parseInt(D,10)|0;for(;F<A;++F){if(typeof B[F]==="object"&&B[F]){G[C++]=this._records[D+F]=new H(B[F]);}}this.fireEvent("recordsSet",{records:G,data:E});if(B.length&&!G.length){}return G.length>1?G:G[0];},updateRecord:function(A,E){var C=this.getRecord(A);if(C&&E&&(E.constructor==Object)){var D={};for(var B in C._oData){D[B]=C._oData[B];}C._oData=E;this.fireEvent("recordUpdateEvent",{record:C,newData:E,oldData:D});return C;}else{return null;}},updateKey:function(A,B,C){this.updateRecordValue(A,B,C);},updateRecordValue:function(A,D,G){var C=this.getRecord(A);if(C){var F=null;var E=C._oData[D];if(E&&E.constructor==Object){F={};for(var B in E){F[B]=E[B];}}else{F=E;}C._oData[D]=G;this.fireEvent("keyUpdateEvent",{record:C,key:D,newData:G,oldData:F});this.fireEvent("recordValueUpdateEvent",{record:C,key:D,newData:G,oldData:F});}else{}},replaceRecords:function(A){this.reset();return this.addRecords(A);},sortRecords:function(A,B){return this._records.sort(function(D,C){return A(D,C,B);});},reverseRecords:function(){return this._records.reverse();},deleteRecord:function(A){if(YAHOO.lang.isNumber(A)&&(A>-1)&&(A<this.getLength())){var B=YAHOO.widget.DataTable._cloneObject(this.getRecord(A).getData());this._deleteRecord(A);this.fireEvent("recordDeleteEvent",{data:B,index:A});return B;}else{return null;}},deleteRecords:function(C,A){if(!YAHOO.lang.isNumber(A)){A=1;}if(YAHOO.lang.isNumber(C)&&(C>-1)&&(C<this.getLength())){var E=this.getRecords(C,A);var B=[];for(var D=0;D<E.length;D++){B[B.length]=YAHOO.widget.DataTable._cloneObject(E[D]);}this._deleteRecord(C,A);this.fireEvent("recordsDeleteEvent",{data:B,index:C});return B;}else{return null;}},reset:function(){this._records=[];this.fireEvent("resetEvent");}};YAHOO.augment(YAHOO.widget.RecordSet,YAHOO.util.EventProvider);YAHOO.widget.Record=function(A){this._sId="yui-rec"+YAHOO.widget.Record._nCount;YAHOO.widget.Record._nCount++;this._oData={};if(A&&(A.constructor==Object)){for(var B in A){this._oData[B]=A[B];}}};YAHOO.widget.Record._nCount=0;YAHOO.widget.Record.prototype={_sId:null,_oData:null,getId:function(){return this._sId;},getData:function(A){if(YAHOO.lang.isString(A)){return this._oData[A];}else{return this._oData;}},setData:function(A,B){this._oData[A]=B;}};YAHOO.widget.Paginator=function(D){var H=YAHOO.widget.Paginator.VALUE_UNLIMITED,G=YAHOO.lang,E,A,B,C;D=G.isObject(D)?D:{};this.initConfig();this.initEvents();this.set("rowsPerPage",D.rowsPerPage,true);if(G.isNumber(D.totalRecords)){this.set("totalRecords",D.totalRecords,true);}this.initUIComponents();for(E in D){if(G.hasOwnProperty(D,E)){this.set(E,D[E],true);}}A=this.get("initialPage");B=this.get("totalRecords");C=this.get("rowsPerPage");if(A>1&&C!==H){var F=(A-1)*C;if(B===H||F<B){this.set("recordOffset",F,true);}}};YAHOO.lang.augmentObject(YAHOO.widget.Paginator,{id:0,ID_BASE:"yui-pg",VALUE_UNLIMITED:-1,TEMPLATE_DEFAULT:"{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}",TEMPLATE_ROWS_PER_PAGE:"{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"},true);YAHOO.widget.Paginator.prototype={_containers:[],initConfig:function(){var B=YAHOO.widget.Paginator.VALUE_UNLIMITED,A=YAHOO.lang;this.setAttributeConfig("rowsPerPage",{value:0,validator:A.isNumber});this.setAttributeConfig("containers",{value:null,writeOnce:true,validator:function(E){if(!A.isArray(E)){E=[E];}for(var D=0,C=E.length;D<C;++D){if(A.isString(E[D])||(A.isObject(E[D])&&E[D].nodeType===1)){continue;}return false;}return true;},method:function(C){C=YAHOO.util.Dom.get(C);if(!A.isArray(C)){C=[C];}this._containers=C;}});this.setAttributeConfig("totalRecords",{value:0,validator:A.isNumber,method:function(C){this._syncRecordOffset(C);}});this.setAttributeConfig("recordOffset",{value:0,validator:function(D){var C=this.get("totalRecords");if(A.isNumber(D)){return C===B||C>D;}return false;}});this.setAttributeConfig("initialPage",{value:1,validator:A.isNumber});this.setAttributeConfig("template",{value:YAHOO.widget.Paginator.TEMPLATE_DEFAULT,validator:A.isString}); | ||
11 | +this.setAttributeConfig("containerClass",{value:"yui-pg-container",validator:A.isString});this.setAttributeConfig("alwaysVisible",{value:true,validator:A.isBoolean});this.setAttributeConfig("updateOnChange",{value:false,validator:A.isBoolean});this.setAttributeConfig("id",{value:YAHOO.widget.Paginator.id++,readOnly:true});this.setAttributeConfig("rendered",{value:false,readOnly:true});},initUIComponents:function(){var C=YAHOO.widget.Paginator.ui;for(var B in C){var A=C[B];if(YAHOO.lang.isObject(A)&&YAHOO.lang.isFunction(A.init)){A.init(this);}}},initEvents:function(){this.createEvent("recordOffsetChange");this.createEvent("totalRecordsChange");this.createEvent("rowsPerPageChange");this.createEvent("alwaysVisibleChange");this.createEvent("rendered");this.createEvent("changeRequest");this.createEvent("beforeDestroy");this.subscribe("totalRecordsChange",this.updateVisibility,this,true);this.subscribe("alwaysVisibleChange",this.updateVisibility,this,true);},render:function(){if(this.get("rendered")){return ;}var M=this.get("totalRecords");if(M!==YAHOO.widget.Paginator.VALUE_UNLIMITED&&M<this.get("rowsPerPage")&&!this.get("alwaysVisible")){return ;}var F=YAHOO.util.Dom,N=this.get("template"),P=this.get("containerClass");N=N.replace(/\{([a-z0-9_ \-]+)\}/gi,'<span class="yui-pg-ui $1"></span>');for(var H=0,J=this._containers.length;H<J;++H){var L=this._containers[H],G=YAHOO.widget.Paginator.ID_BASE+this.get("id")+"-"+H;if(!L){continue;}L.style.display="none";F.addClass(L,P);L.innerHTML=N;var E=F.getElementsByClassName("yui-pg-ui","span",L);for(var D=0,O=E.length;D<O;++D){var C=E[D],B=C.parentNode,A=C.className.replace(/\s*yui-pg-ui\s+/g,""),K=YAHOO.widget.Paginator.ui[A];if(YAHOO.lang.isFunction(K)){var I=new K(this);if(YAHOO.lang.isFunction(I.render)){B.replaceChild(I.render(G),C);}}}L.style.display="";}if(this._containers.length){this.setAttributeConfig("rendered",{value:true});this.fireEvent("rendered",this.getState());}},destroy:function(){this.fireEvent("beforeDestroy");for(var B=0,A=this._containers.length;B<A;++B){this._containers[B].innerHTML="";}this.setAttributeConfig("rendered",{value:false});},updateVisibility:function(F){var B=this.get("alwaysVisible");if(F.type==="alwaysVisibleChange"||!B){var H=this.get("totalRecords"),G=true,D=this.get("rowsPerPage"),E=this.get("rowsPerPageOptions"),C,A;if(YAHOO.lang.isArray(E)){for(C=0,A=E.length;C<A;++C){D=Math.min(D,E[C]);}}if(H!==YAHOO.widget.Paginator.VALUE_UNLIMITED&&H<=D){G=false;}G=G||B;for(C=0,A=this._containers.length;C<A;++C){YAHOO.util.Dom.setStyle(this._containers[C],"display",G?"":"none");}}},getContainerNodes:function(){return this._containers;},getTotalPages:function(){var A=this.get("totalRecords");var B=this.get("rowsPerPage");if(!B){return null;}if(A===YAHOO.widget.Paginator.VALUE_UNLIMITED){return YAHOO.widget.Paginator.VALUE_UNLIMITED;}return Math.ceil(A/B);},hasPage:function(B){if(!YAHOO.lang.isNumber(B)||B<1){return false;}var A=this.getTotalPages();return(A===YAHOO.widget.Paginator.VALUE_UNLIMITED||A>=B);},getCurrentPage:function(){var A=this.get("rowsPerPage");if(!A||!this.get("totalRecords")){return 0;}return Math.floor(this.get("recordOffset")/A)+1;},hasNextPage:function(){var A=this.getCurrentPage(),B=this.getTotalPages();return A&&(B===YAHOO.widget.Paginator.VALUE_UNLIMITED||A<B);},getNextPage:function(){return this.hasNextPage()?this.getCurrentPage()+1:null;},hasPreviousPage:function(){return(this.getCurrentPage()>1);},getPreviousPage:function(){return(this.hasPreviousPage()?this.getCurrentPage()-1:1);},getPageRecords:function(D){if(!YAHOO.lang.isNumber(D)){D=this.getCurrentPage();}var C=this.get("rowsPerPage"),B=this.get("totalRecords"),E,A;if(!D||!C){return null;}E=(D-1)*C;if(B!==YAHOO.widget.Paginator.VALUE_UNLIMITED){if(E>=B){return null;}A=Math.min(E+C,B)-1;}else{A=E+C-1;}return[E,A];},setPage:function(B,A){if(this.hasPage(B)&&B!==this.getCurrentPage()){if(this.get("updateOnChange")||A){this.set("recordOffset",(B-1)*this.get("rowsPerPage"));}else{this.fireEvent("changeRequest",this.getState({"page":B}));}}},getRowsPerPage:function(){return this.get("rowsPerPage");},setRowsPerPage:function(B,A){if(YAHOO.lang.isNumber(B)&&B>0&&B!==this.get("rowsPerPage")){if(this.get("updateOnChange")||A){this.set("rowsPerPage",B);}else{this.fireEvent("changeRequest",this.getState({"rowsPerPage":B}));}}},getTotalRecords:function(){return this.get("totalRecords");},setTotalRecords:function(B,A){if(YAHOO.lang.isNumber(B)&&B>=0&&B!==this.get("totalRecords")){if(this.get("updateOnChange")||A){this.set("totalRecords",B);}else{this.fireEvent("changeRequest",this.getState({"totalRecords":B}));}}},getStartIndex:function(){return this.get("recordOffset");},setStartIndex:function(B,A){if(YAHOO.lang.isNumber(B)&&B>=0&&B!==this.get("recordOffset")){if(this.get("updateOnChange")||A){this.set("recordOffset",B);}else{this.fireEvent("changeRequest",this.getState({"recordOffset":B}));}}},getState:function(C){var F=YAHOO.widget.Paginator.VALUE_UNLIMITED,A=YAHOO.lang;var B={paginator:this,page:this.getCurrentPage(),totalRecords:this.get("totalRecords"),recordOffset:this.get("recordOffset"),rowsPerPage:this.get("rowsPerPage"),records:this.getPageRecords()};if(!C){return B;}var E=B.recordOffset;var D={paginator:this,before:B,rowsPerPage:C.rowsPerPage||B.rowsPerPage,totalRecords:(A.isNumber(C.totalRecords)?Math.max(C.totalRecords,F):B.totalRecords)};if(D.totalRecords===0){E=0;D.page=0;}else{if(!A.isNumber(C.recordOffset)&&A.isNumber(C.page)){E=(C.page-1)*D.rowsPerPage;if(D.totalRecords===F){D.page=C.page;}else{D.page=Math.min(C.page,Math.ceil(D.totalRecords/D.rowsPerPage));E=Math.min(E,D.totalRecords-1);}}else{E=Math.min(E,D.totalRecords-1);D.page=Math.floor(E/D.rowsPerPage)+1;}}D.recordOffset=D.recordOffset||E-(E%D.rowsPerPage);D.records=[D.recordOffset,D.recordOffset+D.rowsPerPage-1];if(D.totalRecords!==F&&D.recordOffset<D.totalRecords&&D.records[1]>D.totalRecords-1){D.records[1]=D.totalRecords-1;}return D;},_syncRecordOffset:function(A){if(A!==YAHOO.widget.Paginator.VALUE_UNLIMITED){var B=this.get("rowsPerPage"); | ||
12 | +if(B&&this.get("recordOffset")>=A){this.set("recordOffset",Math.max(0,(A-(A%B||B))));}}}};YAHOO.lang.augmentProto(YAHOO.widget.Paginator,YAHOO.util.AttributeProvider);(function(){YAHOO.widget.Paginator.ui={};var C=YAHOO.widget.Paginator,B=C.ui,A=YAHOO.lang;B.FirstPageLink=function(D){this.paginator=D;D.createEvent("firstPageLinkLabelChange");D.createEvent("firstPageLinkClassChange");D.subscribe("recordOffsetChange",this.update,this,true);D.subscribe("beforeDestroy",this.destroy,this,true);D.subscribe("firstPageLinkLabelChange",this.update,this,true);D.subscribe("firstPageLinkClassChange",this.update,this,true);};B.FirstPageLink.init=function(D){D.setAttributeConfig("firstPageLinkLabel",{value:"<< first",validator:A.isString});D.setAttributeConfig("firstPageLinkClass",{value:"yui-pg-first",validator:A.isString});};B.FirstPageLink.prototype={current:null,link:null,span:null,render:function(E){var F=this.paginator,G=F.get("firstPageLinkClass"),D=F.get("firstPageLinkLabel");this.link=document.createElement("a");this.span=document.createElement("span");this.link.id=E+"-first-link";this.link.href="#";this.link.className=G;this.link.innerHTML=D;YAHOO.util.Event.on(this.link,"click",this.onClick,this,true);this.span.id=E+"-first-span";this.span.className=G;this.span.innerHTML=D;this.current=F.get("recordOffset")<1?this.span:this.link;return this.current;},update:function(E){if(E&&E.prevValue===E.newValue){return ;}var D=this.current?this.current.parentNode:null;if(this.paginator.get("recordOffset")<1){if(D&&this.current===this.link){D.replaceChild(this.span,this.current);this.current=this.span;}}else{if(D&&this.current===this.span){D.replaceChild(this.link,this.current);this.current=this.link;}}},destroy:function(){YAHOO.util.Event.purgeElement(this.link);},onClick:function(D){YAHOO.util.Event.stopEvent(D);this.paginator.setPage(1);}};B.LastPageLink=function(D){this.paginator=D;D.createEvent("lastPageLinkLabelChange");D.createEvent("lastPageLinkClassChange");D.subscribe("recordOffsetChange",this.update,this,true);D.subscribe("totalRecordsChange",this.update,this,true);D.subscribe("rowsPerPageChange",this.update,this,true);D.subscribe("beforeDestroy",this.destroy,this,true);D.subscribe("lastPageLinkLabelChange",this.update,this,true);D.subscribe("lastPageLinkClassChange",this.update,this,true);};B.LastPageLink.init=function(D){D.setAttributeConfig("lastPageLinkLabel",{value:"last >>",validator:A.isString});D.setAttributeConfig("lastPageLinkClass",{value:"yui-pg-last",validator:A.isString});};B.LastPageLink.prototype={current:null,link:null,span:null,na:null,render:function(E){var G=this.paginator,H=G.get("lastPageLinkClass"),D=G.get("lastPageLinkLabel"),F=G.getTotalPages();this.link=document.createElement("a");this.span=document.createElement("span");this.na=this.span.cloneNode(false);this.link.id=E+"-last-link";this.link.href="#";this.link.className=H;this.link.innerHTML=D;YAHOO.util.Event.on(this.link,"click",this.onClick,this,true);this.span.id=E+"-last-span";this.span.className=H;this.span.innerHTML=D;this.na.id=E+"-last-na";switch(F){case C.VALUE_UNLIMITED:this.current=this.na;break;case G.getCurrentPage():this.current=this.span;break;default:this.current=this.link;}return this.current;},update:function(E){if(E&&E.prevValue===E.newValue){return ;}var D=this.current?this.current.parentNode:null,F=this.link;if(D){switch(this.paginator.getTotalPages()){case C.VALUE_UNLIMITED:F=this.na;break;case this.paginator.getCurrentPage():F=this.span;break;}if(this.current!==F){D.replaceChild(F,this.current);this.current=F;}}},destroy:function(){YAHOO.util.Event.purgeElement(this.link);},onClick:function(D){YAHOO.util.Event.stopEvent(D);this.paginator.setPage(this.paginator.getTotalPages());}};B.PreviousPageLink=function(D){this.paginator=D;D.createEvent("previousPageLinkLabelChange");D.createEvent("previousPageLinkClassChange");D.subscribe("recordOffsetChange",this.update,this,true);D.subscribe("beforeDestroy",this.destroy,this,true);D.subscribe("previousPageLinkLabelChange",this.update,this,true);D.subscribe("previousPageLinkClassChange",this.update,this,true);};B.PreviousPageLink.init=function(D){D.setAttributeConfig("previousPageLinkLabel",{value:"< prev",validator:A.isString});D.setAttributeConfig("previousPageLinkClass",{value:"yui-pg-previous",validator:A.isString});};B.PreviousPageLink.prototype={current:null,link:null,span:null,render:function(E){var F=this.paginator,G=F.get("previousPageLinkClass"),D=F.get("previousPageLinkLabel");this.link=document.createElement("a");this.span=document.createElement("span");this.link.id=E+"-prev-link";this.link.href="#";this.link.className=G;this.link.innerHTML=D;YAHOO.util.Event.on(this.link,"click",this.onClick,this,true);this.span.id=E+"-prev-span";this.span.className=G;this.span.innerHTML=D;this.current=F.get("recordOffset")<1?this.span:this.link;return this.current;},update:function(E){if(E&&E.prevValue===E.newValue){return ;}var D=this.current?this.current.parentNode:null;if(this.paginator.get("recordOffset")<1){if(D&&this.current===this.link){D.replaceChild(this.span,this.current);this.current=this.span;}}else{if(D&&this.current===this.span){D.replaceChild(this.link,this.current);this.current=this.link;}}},destroy:function(){YAHOO.util.Event.purgeElement(this.link);},onClick:function(D){YAHOO.util.Event.stopEvent(D);this.paginator.setPage(this.paginator.getPreviousPage());}};B.NextPageLink=function(D){this.paginator=D;D.createEvent("nextPageLinkLabelChange");D.createEvent("nextPageLinkClassChange");D.subscribe("recordOffsetChange",this.update,this,true);D.subscribe("totalRecordsChange",this.update,this,true);D.subscribe("rowsPerPageChange",this.update,this,true);D.subscribe("beforeDestroy",this.destroy,this,true);D.subscribe("nextPageLinkLabelChange",this.update,this,true);D.subscribe("nextPageLinkClassChange",this.update,this,true);};B.NextPageLink.init=function(D){D.setAttributeConfig("nextPageLinkLabel",{value:"next >",validator:A.isString}); | ||
13 | +D.setAttributeConfig("nextPageLinkClass",{value:"yui-pg-next",validator:A.isString});};B.NextPageLink.prototype={current:null,link:null,span:null,render:function(E){var G=this.paginator,H=G.get("nextPageLinkClass"),D=G.get("nextPageLinkLabel"),F=G.getTotalPages();this.link=document.createElement("a");this.span=document.createElement("span");this.link.id=E+"-next-link";this.link.href="#";this.link.className=H;this.link.innerHTML=D;YAHOO.util.Event.on(this.link,"click",this.onClick,this,true);this.span.id=E+"-next-span";this.span.className=H;this.span.innerHTML=D;this.current=G.getCurrentPage()===F?this.span:this.link;return this.current;},update:function(F){if(F&&F.prevValue===F.newValue){return ;}var E=this.paginator.getTotalPages(),D=this.current?this.current.parentNode:null;if(this.paginator.getCurrentPage()!==E){if(D&&this.current===this.span){D.replaceChild(this.link,this.current);this.current=this.link;}}else{if(this.current===this.link){if(D){D.replaceChild(this.span,this.current);this.current=this.span;}}}},destroy:function(){YAHOO.util.Event.purgeElement(this.link);},onClick:function(D){YAHOO.util.Event.stopEvent(D);this.paginator.setPage(this.paginator.getNextPage());}};B.PageLinks=function(D){this.paginator=D;D.createEvent("pageLinkClassChange");D.createEvent("currentPageClassChange");D.createEvent("pageLinksContainerClassChange");D.createEvent("pageLinksChange");D.subscribe("recordOffsetChange",this.update,this,true);D.subscribe("pageLinksChange",this.rebuild,this,true);D.subscribe("totalRecordsChange",this.rebuild,this,true);D.subscribe("rowsPerPageChange",this.rebuild,this,true);D.subscribe("pageLinkClassChange",this.rebuild,this,true);D.subscribe("currentPageClassChange",this.rebuild,this,true);D.subscribe("beforeDestroy",this.destroy,this,true);D.subscribe("pageLinksContainerClassChange",this.rebuild,this,true);};B.PageLinks.init=function(D){D.setAttributeConfig("pageLinkClass",{value:"yui-pg-page",validator:A.isString});D.setAttributeConfig("currentPageClass",{value:"yui-pg-current-page",validator:A.isString});D.setAttributeConfig("pageLinksContainerClass",{value:"yui-pg-pages",validator:A.isString});D.setAttributeConfig("pageLinks",{value:10,validator:A.isNumber});D.setAttributeConfig("pageLabelBuilder",{value:function(E,F){return E;},validator:A.isFunction});};B.PageLinks.calculateRange=function(F,G,E){var J=C.VALUE_UNLIMITED,I,D,H;if(!F||E===0||G===0||(G===J&&E===J)){return[0,-1];}if(G!==J){E=E===J?G:Math.min(E,G);}I=Math.max(1,Math.ceil(F-(E/2)));if(G===J){D=I+E-1;}else{D=Math.min(G,I+E-1);}H=E-(D-I+1);I=Math.max(1,I-H);return[I,D];};B.PageLinks.prototype={current:0,container:null,render:function(D){var E=this.paginator;this.container=document.createElement("span");this.container.id=D+"-pages";this.container.className=E.get("pageLinksContainerClass");YAHOO.util.Event.on(this.container,"click",this.onClick,this,true);this.update({newValue:null,rebuild:true});return this.container;},update:function(K){if(K&&K.prevValue===K.newValue){return ;}var F=this.paginator,J=F.getCurrentPage();if(this.current!==J||K.rebuild){var M=F.get("pageLabelBuilder"),I=B.PageLinks.calculateRange(J,F.getTotalPages(),F.get("pageLinks")),E=I[0],G=I[1],L="",D,H;D='<a href="#" class="'+F.get("pageLinkClass")+'" page="';for(H=E;H<=G;++H){if(H===J){L+='<span class="'+F.get("currentPageClass")+" "+F.get("pageLinkClass")+'">'+M(H,F)+"</span>";}else{L+=D+H+'">'+M(H,F)+"</a>";}}this.container.innerHTML=L;}},rebuild:function(D){D.rebuild=true;this.update(D);},destroy:function(){YAHOO.util.Event.purgeElement(this.container,true);},onClick:function(E){var D=YAHOO.util.Event.getTarget(E);if(D&&YAHOO.util.Dom.hasClass(D,this.paginator.get("pageLinkClass"))){YAHOO.util.Event.stopEvent(E);this.paginator.setPage(parseInt(D.getAttribute("page"),10));}}};B.RowsPerPageDropdown=function(D){this.paginator=D;D.createEvent("rowsPerPageOptionsChange");D.createEvent("rowsPerPageDropdownClassChange");D.subscribe("rowsPerPageChange",this.update,this,true);D.subscribe("rowsPerPageOptionsChange",this.rebuild,this,true);D.subscribe("beforeDestroy",this.destroy,this,true);D.subscribe("rowsPerPageDropdownClassChange",this.rebuild,this,true);};B.RowsPerPageDropdown.init=function(D){D.setAttributeConfig("rowsPerPageOptions",{value:[],validator:A.isArray});D.setAttributeConfig("rowsPerPageDropdownClass",{value:"yui-pg-rpp-options",validator:A.isString});};B.RowsPerPageDropdown.prototype={select:null,render:function(D){this.select=document.createElement("select");this.select.id=D+"-rpp";this.select.className=this.paginator.get("rowsPerPageDropdownClass");this.select.title="Rows per page";YAHOO.util.Event.on(this.select,"change",this.onChange,this,true);this.rebuild();return this.select;},update:function(H){if(H&&H.prevValue===H.newValue){return ;}var G=this.paginator.get("rowsPerPage"),E=this.select.options,F,D;for(F=0,D=E.length;F<D;++F){if(parseInt(E[F].value,10)===G){E[F].selected=true;}}},rebuild:function(K){var F=this.paginator,G=this.select,L=F.get("rowsPerPageOptions"),D=document.createElement("option"),I,J;while(G.firstChild){G.removeChild(G.firstChild);}for(I=0,J=L.length;I<J;++I){var H=D.cloneNode(false),E=L[I];H.value=A.isValue(E.value)?E.value:E;H.innerHTML=A.isValue(E.text)?E.text:E;G.appendChild(H);}this.update();},destroy:function(){YAHOO.util.Event.purgeElement(this.select);},onChange:function(D){this.paginator.setRowsPerPage(parseInt(this.select.options[this.select.selectedIndex].value,10));}};B.CurrentPageReport=function(D){this.paginator=D;D.createEvent("pageReportClassChange");D.createEvent("pageReportTemplateChange");D.subscribe("recordOffsetChange",this.update,this,true);D.subscribe("totalRecordsChange",this.update,this,true);D.subscribe("rowsPerPageChange",this.update,this,true);D.subscribe("pageReportTemplateChange",this.update,this,true);D.subscribe("pageReportClassChange",this.update,this,true);};B.CurrentPageReport.init=function(D){D.setAttributeConfig("pageReportClass",{value:"yui-pg-current",validator:A.isString}); | ||
14 | +D.setAttributeConfig("pageReportTemplate",{value:"({currentPage} of {totalPages})",validator:A.isString});D.setAttributeConfig("pageReportValueGenerator",{value:function(G){var F=G.getCurrentPage(),E=G.getPageRecords();return{"currentPage":E?F:0,"totalPages":G.getTotalPages(),"startIndex":E?E[0]:0,"endIndex":E?E[1]:0,"startRecord":E?E[0]+1:0,"endRecord":E?E[1]+1:0,"totalRecords":G.get("totalRecords")};},validator:A.isFunction});};B.CurrentPageReport.sprintf=function(E,D){return E.replace(/{([\w\s\-]+)}/g,function(F,G){return(G in D)?D[G]:"";});};B.CurrentPageReport.prototype={span:null,render:function(D){this.span=document.createElement("span");this.span.id=D+"-page-report";this.span.className=this.paginator.get("pageReportClass");this.update();return this.span;},update:function(D){if(D&&D.prevValue===D.newValue){return ;}this.span.innerHTML=B.CurrentPageReport.sprintf(this.paginator.get("pageReportTemplate"),this.paginator.get("pageReportValueGenerator")(this.paginator));}};})();YAHOO.widget.DataTable=function(A,G,I,C){var E=YAHOO.widget.DataTable,F=YAHOO.util.DataSource;this._nIndex=E._nCount;this._sId="yui-dt"+this._nIndex;this._oChainRender=new YAHOO.util.Chain();this._oChainSync=new YAHOO.util.Chain();this._oChainRender.subscribe("end",this._sync,this,true);this._initConfigs(C);this._initDataSource(I);if(!this._oDataSource){return ;}this._initColumnSet(G);if(!this._oColumnSet){return ;}this._initRecordSet();if(!this._oRecordSet){return ;}this._initNodeTemplates();this._initContainerEl(A);if(!this._elContainer){return ;}this._initTableEl();if(!this._elContainer||!this._elThead||!this._elTbody){return ;}E.superclass.constructor.call(this,this._elContainer,this._oConfigs);var D=this.get("sortedBy");if(D){if(D.dir=="desc"){this._configs.sortedBy.value.dir=E.CLASS_DESC;}else{if(D.dir=="asc"){this._configs.sortedBy.value.dir=E.CLASS_ASC;}}}if(this._oConfigs.paginator&&!(this._oConfigs.paginator instanceof YAHOO.widget.Paginator)){this.updatePaginator(this._oConfigs.paginator);}this._initCellEditorEl();this._initColumnSort();YAHOO.util.Event.addListener(document,"click",this._onDocumentClick,this);E._nCount++;E._nCurrentCount++;var H={success:this.onDataReturnSetRows,failure:this.onDataReturnSetRows,scope:this,argument:{}};if(this.get("initialLoad")===true){this._oDataSource.sendRequest(this.get("initialRequest"),H);}else{if(this.get("initialLoad")===false){this.showTableMessage(E.MSG_EMPTY,E.CLASS_EMPTY);this._oChainRender.add({method:function(){if((this instanceof E)&&this._sId&&this._bInit){this._bInit=false;this.fireEvent("initEvent");}},scope:this});this._oChainRender.run();}else{var B=this.get("initialLoad");H.argument=B.argument;this._oDataSource.sendRequest(B.request,H);}}};(function(){var C=YAHOO.lang,F=YAHOO.util,E=YAHOO.widget,A=YAHOO.env.ua,D=F.Dom,I=F.Event,H=F.DataSource,G=E.DataTable,B=E.Paginator;C.augmentObject(G,{CLASS_LINER:"yui-dt-liner",CLASS_LABEL:"yui-dt-label",CLASS_COLTARGET:"yui-dt-coltarget",CLASS_RESIZER:"yui-dt-resizer",CLASS_RESIZERPROXY:"yui-dt-resizerproxy",CLASS_EDITOR:"yui-dt-editor",CLASS_PAGINATOR:"yui-dt-paginator",CLASS_PAGE:"yui-dt-page",CLASS_DEFAULT:"yui-dt-default",CLASS_PREVIOUS:"yui-dt-previous",CLASS_NEXT:"yui-dt-next",CLASS_FIRST:"yui-dt-first",CLASS_LAST:"yui-dt-last",CLASS_EVEN:"yui-dt-even",CLASS_ODD:"yui-dt-odd",CLASS_SELECTED:"yui-dt-selected",CLASS_HIGHLIGHTED:"yui-dt-highlighted",CLASS_HIDDEN:"yui-dt-hidden",CLASS_DISABLED:"yui-dt-disabled",CLASS_MSG:"yui-dt-msg",CLASS_EMPTY:"yui-dt-empty",CLASS_LOADING:"yui-dt-loading",CLASS_ERROR:"yui-dt-error",CLASS_EDITABLE:"yui-dt-editable",CLASS_DRAGGABLE:"yui-dt-draggable",CLASS_RESIZEABLE:"yui-dt-resizeable",CLASS_SCROLLABLE:"yui-dt-scrollable",COLOR_COLUMNFILLER:"#F2F2F2",CLASS_SORTABLE:"yui-dt-sortable",CLASS_ASC:"yui-dt-asc",CLASS_DESC:"yui-dt-desc",CLASS_BUTTON:"yui-dt-button",CLASS_CHECKBOX:"yui-dt-checkbox",CLASS_DROPDOWN:"yui-dt-dropdown",CLASS_RADIO:"yui-dt-radio",MSG_EMPTY:"No records found.",MSG_LOADING:"Loading data...",MSG_ERROR:"Data error.",_nCount:0,_nCurrentCount:0,_elStylesheet:null,_bStylesheetFallback:(A.ie&&(A.ie<7))?true:false,_oStylesheetRules:{},_elColumnDragTarget:null,_elColumnResizerProxy:null,_cloneObject:function(M){if(!C.isValue(M)){return M;}var O={};if(C.isArray(M)){var N=[];for(var L=0,K=M.length;L<K;L++){N[L]=G._cloneObject(M[L]);}O=N;}else{if(M.constructor&&(M.constructor==Object)){for(var J in M){if(C.hasOwnProperty(M,J)){if(C.isValue(M[J])&&(M[J].constructor==Object)||C.isArray(M[J])){O[J]=G._cloneObject(M[J]);}else{O[J]=M[J];}}}}else{O=M;}}return O;},_initColumnDragTargetEl:function(){if(!G._elColumnDragTarget){var J=document.createElement("div");J.id="yui-dt-coltarget";J.className=G.CLASS_COLTARGET;J.style.display="none";document.body.insertBefore(J,document.body.firstChild);G._elColumnDragTarget=J;}return G._elColumnDragTarget;},_initColumnResizerProxyEl:function(){if(!G._elColumnResizerProxy){var J=document.createElement("div");J.id="yui-dt-colresizerproxy";D.addClass(J,G.CLASS_RESIZERPROXY);document.body.insertBefore(J,document.body.firstChild);G._elColumnResizerProxy=J;}return G._elColumnResizerProxy;},formatTheadCell:function(J,L,M){var R=L.getKey();var Q=C.isValue(L.label)?L.label:R;if(L.sortable){var O=M.getColumnSortDir(L);var N=(O===G.CLASS_DESC)?"descending":"ascending";var K=M.getId()+"-sort"+L.getId()+"-"+N;var P="Click to sort "+N;J.innerHTML='<a href="'+K+'" title="'+P+'" class="'+G.CLASS_SORTABLE+'">'+Q+"</a>";}else{J.innerHTML=Q;}},formatButton:function(J,K,L,N){var M=C.isValue(N)?N:"Click";J.innerHTML='<button type="button" class="'+G.CLASS_BUTTON+'">'+M+"</button>";},formatCheckbox:function(J,K,L,N){var M=N;M=(M)?" checked":"";J.innerHTML='<input type="checkbox"'+M+' class="'+G.CLASS_CHECKBOX+'">';},formatCurrency:function(J,K,L,M){J.innerHTML=F.Number.format(M,{prefix:"$",decimalPlaces:2,decimalSeparator:".",thousandsSeparator:","});},formatDate:function(J,K,L,M){J.innerHTML=F.Date.format(M,{format:"MM/DD/YYYY"});},formatDropdown:function(L,S,Q,J){var R=(C.isValue(J))?J:S.getData(Q.key); | ||
15 | +var T=(C.isArray(Q.dropdownOptions))?Q.dropdownOptions:null;var K;var P=L.getElementsByTagName("select");if(P.length===0){K=document.createElement("select");D.addClass(K,G.CLASS_DROPDOWN);K=L.appendChild(K);I.addListener(K,"change",this._onDropdownChange,this);}K=P[0];if(K){K.innerHTML="";if(T){for(var N=0;N<T.length;N++){var O=T[N];var M=document.createElement("option");M.value=(C.isValue(O.value))?O.value:O;M.innerHTML=(C.isValue(O.text))?O.text:O;M=K.appendChild(M);if(M.value==R){M.selected=true;}}}else{K.innerHTML='<option selected value="'+R+'">'+R+"</option>";}}else{L.innerHTML=C.isValue(J)?J:"";}},formatEmail:function(J,K,L,M){if(C.isString(M)){J.innerHTML='<a href="mailto:'+M+'">'+M+"</a>";}else{J.innerHTML=C.isValue(M)?M:"";}},formatLink:function(J,K,L,M){if(C.isString(M)){J.innerHTML='<a href="'+M+'">'+M+"</a>";}else{J.innerHTML=C.isValue(M)?M:"";}},formatNumber:function(J,K,L,M){if(C.isNumber(M)){J.innerHTML=M;}else{J.innerHTML=C.isValue(M)?M:"";}},formatRadio:function(J,K,L,N){var M=N;M=(M)?" checked":"";J.innerHTML='<input type="radio"'+M+' name="col'+L.getId()+'-radio"'+' class="'+G.CLASS_RADIO+'">';},formatText:function(J,K,M,N){var L=(C.isValue(K.getData(M.key)))?K.getData(M.key):"";J.innerHTML=L.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");},formatTextarea:function(K,L,N,O){var M=(C.isValue(L.getData(N.key)))?L.getData(N.key):"";var J="<textarea>"+M+"</textarea>";K.innerHTML=J;},formatTextbox:function(K,L,N,O){var M=(C.isValue(L.getData(N.key)))?L.getData(N.key):"";var J='<input type="text" value="'+M+'">';K.innerHTML=J;},handleSimplePagination:function(K,J){K.paginator.setTotalRecords(K.totalRecords,true);K.paginator.setStartIndex(K.recordOffset,true);K.paginator.setRowsPerPage(K.rowsPerPage,true);J.render();},handleDataSourcePagination:function(K,J){var N=K.records[1]-K.recordOffset;var L=J.get("generateRequest");var M=L({pagination:K},J);var O={success:J.onDataReturnSetRows,failure:J.onDataReturnSetRows,argument:{startIndex:K.recordOffset,pagination:K},scope:J};J._oDataSource.sendRequest(M,O);},editCheckbox:function(S,R){var T=S.cell;var X=S.record;var P=S.column;var J=S.container;var M=S.value;if(!C.isArray(M)){M=[M];}if(P.editorOptions&&C.isArray(P.editorOptions.checkboxOptions)){var W=P.editorOptions.checkboxOptions;var O,U,N,L,K;for(L=0;L<W.length;L++){O=C.isValue(W[L].label)?W[L].label:W[L];U=R.getId()+"-editor-checkbox"+L;J.innerHTML+='<input type="checkbox"'+' name="'+R.getId()+'-editor-checkbox"'+' value="'+O+'"'+' id="'+U+'">';N=J.appendChild(document.createElement("label"));N.htmlFor=U;N.innerHTML=O;}var Q=[];var V;for(L=0;L<W.length;L++){V=D.get(R.getId()+"-editor-checkbox"+L);Q.push(V);for(K=0;K<M.length;K++){if(V.value===M[K]){V.checked=true;}}if(L===0){R._focusEl(V);}}for(L=0;L<W.length;L++){V=D.get(R.getId()+"-editor-checkbox"+L);I.addListener(V,"click",function(){var Z=[];for(var Y=0;Y<Q.length;Y++){if(Q[Y].checked){Z.push(Q[Y].value);}}R._oCellEditor.value=Z;R.fireEvent("editorUpdateEvent",{editor:R._oCellEditor});});}}},editDate:function(Q,N){var R=Q.cell;var U=Q.record;var L=Q.column;var J=Q.container;var S=Q.value;if(!(S instanceof Date)){S=Q.defaultValue||new Date();}if(YAHOO.widget.Calendar){var M=(S.getMonth()+1)+"/"+S.getDate()+"/"+S.getFullYear();var T=J.appendChild(document.createElement("div"));var P=L.getColEl();T.id=P+"-dateContainer";var K=new YAHOO.widget.Calendar(P+"-date",T.id,{selected:M,pagedate:S});K.render();T.style.cssFloat="none";if(A.ie){var O=J.appendChild(document.createElement("br"));O.style.clear="both";}K.selectEvent.subscribe(function(W,V,X){N._oCellEditor.value=new Date(V[0][0][0],V[0][0][1]-1,V[0][0][2]);N.fireEvent("editorUpdateEvent",{editor:N._oCellEditor});});}else{}},editDropdown:function(P,O){var Q=P.cell;var U=P.record;var M=P.column;var K=P.container;var R=P.value;if(!C.isValue(R)){R=P.defaultValue;}var T=K.appendChild(document.createElement("select"));var S=(M.editorOptions&&C.isArray(M.editorOptions.dropdownOptions))?M.editorOptions.dropdownOptions:[];for(var L=0;L<S.length;L++){var N=S[L];var J=document.createElement("option");J.value=(C.isValue(N.value))?N.value:N;J.innerHTML=(C.isValue(N.text))?N.text:N;J=T.appendChild(J);if(R===T.options[L].value){T.options[L].selected=true;}}I.addListener(T,"change",function(){O._oCellEditor.value=T[T.selectedIndex].value;O.fireEvent("editorUpdateEvent",{editor:O._oCellEditor});});O._focusEl(T);},editRadio:function(Q,O){var R=Q.cell;var V=Q.record;var N=Q.column;var J=Q.container;var S=Q.value;if(!C.isValue(S)){S=Q.defaultValue;}if(N.editorOptions&&C.isArray(N.editorOptions.radioOptions)){var P=N.editorOptions.radioOptions;var K,T,M,L;for(L=0;L<P.length;L++){K=C.isValue(P[L].label)?P[L].label:P[L];T=O.getId()+"-col"+N.getId()+"-radioeditor"+L;J.innerHTML+='<input type="radio"'+' name="'+O.getId()+'-editor-radio"'+' value="'+K+'"'+' id="'+T+'">';M=J.appendChild(document.createElement("label"));M.htmlFor=T;M.innerHTML=K;}for(L=0;L<P.length;L++){var U=D.get(O.getId()+"-col"+N.getId()+"-radioeditor"+L);if(S===U.value){U.checked=true;O._focusEl(U);}I.addListener(U,"click",function(){O._oCellEditor.value=this.value;O.fireEvent("editorUpdateEvent",{editor:O._oCellEditor});});}}},editTextarea:function(Q,K){var N=Q.cell;var L=Q.record;var P=Q.column;var O=Q.container;var M=Q.value;if(!C.isValue(M)){M=Q.defaultValue||"";}var J=O.appendChild(document.createElement("textarea"));J.style.width=N.offsetWidth+"px";J.style.height="3em";J.value=M;I.addListener(J,"keyup",function(){K._oCellEditor.value=J.value;K.fireEvent("editorUpdateEvent",{editor:K._oCellEditor});});J.focus();J.select();},editTextbox:function(P,J){var M=P.cell;var K=P.record;var O=P.column;var N=P.container;var L=P.value;if(!C.isValue(L)){L=P.defaultValue||"";}var Q;if(A.webkit>420){Q=N.appendChild(document.createElement("form")).appendChild(document.createElement("input"));}else{Q=N.appendChild(document.createElement("input"));}Q.type="text";Q.style.width=M.offsetWidth+"px";Q.value=L;I.addListener(Q,"keypress",function(R){if((R.keyCode===13)){YAHOO.util.Event.preventDefault(R); | ||
16 | +J.saveCellEditor();}});I.addListener(Q,"keyup",function(R){J._oCellEditor.value=Q.value;J.fireEvent("editorUpdateEvent",{editor:J._oCellEditor});});Q.focus();Q.select();},validateNumber:function(K){var J=K*1;if(C.isNumber(J)){return J;}else{return null;}},_generateRequest:function(L,K){var J=L;if(L.pagination){if(K._oDataSource.dataType===H.TYPE_XHR){J="?page="+L.pagination.page+"&recordOffset="+L.pagination.recordOffset+"&rowsPerPage="+L.pagination.rowsPerPage;}}return J;}});G.Formatter={button:G.formatButton,checkbox:G.formatCheckbox,currency:G.formatCurrency,"date":G.formatDate,dropdown:G.formatDropdown,email:G.formatEmail,link:G.formatLink,"number":G.formatNumber,radio:G.formatRadio,text:G.formatText,textarea:G.formatTextarea,textbox:G.formatTextbox};C.extend(G,F.Element,{initAttributes:function(J){J=J||{};G.superclass.initAttributes.call(this,J);this.setAttributeConfig("summary",{value:null,validator:C.isString,method:function(K){this._elThead.parentNode.summary=K;}});this.setAttributeConfig("selectionMode",{value:"standard",validator:C.isString});this.setAttributeConfig("initialRequest",{value:null});this.setAttributeConfig("initialLoad",{value:true});this.setAttributeConfig("generateRequest",{value:G._generateRequest,validator:C.isFunction});this.setAttributeConfig("sortedBy",{value:null,validator:function(K){if(K){return((K.constructor==Object)&&K.key);}else{return(K===null);}},method:function(K){var M=this.get("sortedBy");if(M&&(M.constructor==Object)&&M.key){var O=this._oColumnSet.getColumn(M.key);var N=this.getThEl(O);D.removeClass(N,G.CLASS_ASC);D.removeClass(N,G.CLASS_DESC);}if(K){var P=(K.column)?K.column:this._oColumnSet.getColumn(K.key);if(P){if(K.dir&&((K.dir=="asc")||(K.dir=="desc"))){var Q=(K.dir=="desc")?G.CLASS_DESC:G.CLASS_ASC;D.addClass(P.getThEl(),Q);}else{var L=K.dir||G.CLASS_ASC;D.addClass(P.getThEl(),L);}}}}});this.setAttributeConfig("paginator",{value:{rowsPerPage:500,currentPage:1,startRecordIndex:0,totalRecords:0,totalPages:0,rowsThisPage:0,pageLinks:0,pageLinksStart:1,dropdownOptions:null,containers:[],dropdowns:[],links:[]},validator:function(K){if(typeof K==="object"&&K){if(K instanceof B){return true;}else{if(K&&(K.constructor==Object)){if((K.rowsPerPage!==undefined)&&(K.currentPage!==undefined)&&(K.startRecordIndex!==undefined)&&(K.totalRecords!==undefined)&&(K.totalPages!==undefined)&&(K.rowsThisPage!==undefined)&&(K.pageLinks!==undefined)&&(K.pageLinksStart!==undefined)&&(K.dropdownOptions!==undefined)&&(K.containers!==undefined)&&(K.dropdowns!==undefined)&&(K.links!==undefined)){if(C.isNumber(K.rowsPerPage)&&C.isNumber(K.currentPage)&&C.isNumber(K.startRecordIndex)&&C.isNumber(K.totalRecords)&&C.isNumber(K.totalPages)&&C.isNumber(K.rowsThisPage)&&C.isNumber(K.pageLinks)&&C.isNumber(K.pageLinksStart)&&(C.isArray(K.dropdownOptions)||C.isNull(K.dropdownOptions))&&C.isArray(K.containers)&&C.isArray(K.dropdowns)&&C.isArray(K.links)){return true;}}}}}return false;},method:function(L){if(L instanceof B){L.subscribe("changeRequest",this.onPaginatorChange,this,true);var M=L.getContainerNodes();if(!M.length){var K=document.createElement("div");K.id=this._sId+"-paginator0";this._elContainer.insertBefore(K,this._elContainer.firstChild);var N=document.createElement("div");N.id=this._sId+"-paginator1";this._elContainer.appendChild(N);M=[K,N];D.addClass(M,G.CLASS_PAGINATOR);L.set("containers",M);}}}});this.setAttributeConfig("paginated",{value:false,validator:C.isBoolean,method:function(N){var P=this.get("paginated");var L,M;if(N==P){return ;}var Q=this.get("paginator");if(!(Q instanceof B)){Q=Q||{rowsPerPage:500,currentPage:1,startRecordIndex:0,totalRecords:0,totalPages:0,rowsThisPage:0,pageLinks:0,pageLinksStart:1,dropdownOptions:null,containers:[],dropdowns:[],links:[]};var O=Q.containers;if(N){if(O.length===0){var U=document.createElement("span");U.id=this._sId+"-paginator0";D.addClass(U,G.CLASS_PAGINATOR);U=this._elContainer.insertBefore(U,this._elContainer.firstChild);O.push(U);var S=document.createElement("span");S.id=this._sId+"-paginator1";D.addClass(S,G.CLASS_PAGINATOR);S=this._elContainer.appendChild(S);O.push(S);Q.containers=O;this._configs.paginator.value=Q;}else{for(L=0;L<O.length;L++){O[L].style.display="";}}if(Q.pageLinks>-1){var T=Q.links;if(T.length===0){for(L=0;L<O.length;L++){var R=document.createElement("span");R.id="yui-dt-pagselect"+L;R=O[L].appendChild(R);I.addListener(R,"click",this._onPaginatorLinkClick,this);this._configs.paginator.value.links.push(R);}}}for(L=0;L<O.length;L++){var K=document.createElement("select");D.addClass(K,G.CLASS_DROPDOWN);K=O[L].appendChild(K);K.id="yui-dt-pagselect"+L;I.addListener(K,"change",this._onPaginatorDropdownChange,this);this._configs.paginator.value.dropdowns.push(K);if(!Q.dropdownOptions){K.style.display="none";}}}else{if(O.length>0){for(L=0;L<O.length;L++){O[L].style.display="none";}}}}}});this.setAttributeConfig("paginationEventHandler",{value:G.handleSimplePagination,validator:C.isObject});this.setAttributeConfig("caption",{value:null,validator:C.isString,method:function(K){if(!this._elCaption){var L=this._elTbodyContainer.getElementsByTagName("table")[0];this._elCaption=L.createCaption();}this._elCaption.innerHTML=K;}});this.setAttributeConfig("scrollable",{value:false,validator:function(K){return(C.isBoolean(K));},method:function(O){var L=this._elTheadContainer.getElementsByTagName("table")[0],K=this._elTbodyContainer.getElementsByTagName("table")[0],N=L.getElementsByTagName("thead")[0],M=K.getElementsByTagName("thead")[0];if(O){D.addClass(this._elContainer,G.CLASS_SCROLLABLE);if(N){L.removeChild(N);}if(M){K.removeChild(M);}L.appendChild(this._elThead);K.insertBefore(this._elA11yThead,K.firstChild||null);if(K.caption){L.insertBefore(K.caption,L.firstChild);}K.style.marginTop="-"+this._elTbody.offsetTop+"px";this._syncColWidths();this._syncScrollX();this._syncScrollY();}else{if(N){L.removeChild(N);}if(M){K.removeChild(M);}L.appendChild(this._elA11yThead);K.insertBefore(this._elThead,K.firstChild||null); | ||
17 | +K.style.marginTop="";if(L.caption){K.insertBefore(L.caption,K.firstChild);}D.removeClass(this._elContainer,G.CLASS_SCROLLABLE);}}});this.setAttributeConfig("width",{value:null,validator:C.isString,method:function(K){if(this.get("scrollable")){this._elTheadContainer.style.width=K;this._elTbodyContainer.style.width=K;this._syncScrollX();this._syncScrollPadding();this._forceGeckoRedraw();}}});this.setAttributeConfig("height",{value:null,validator:C.isString,method:function(K){if(this.get("scrollable")){this._elTbodyContainer.style.height=K;this._syncScrollY();this._syncScrollPadding();}}});this.setAttributeConfig("draggableColumns",{value:false,validator:C.isBoolean,writeOnce:true});this.setAttributeConfig("renderLoopSize",{value:0,validator:C.isNumber});},_bInit:true,_nIndex:null,_nTrCount:0,_nTdCount:0,_sId:null,_oChainRender:null,_oChainSync:null,_aFallbackColResizer:[],_elContainer:null,_elTheadContainer:null,_elTbodyContainer:null,_elCaption:null,_elThead:null,_elTbody:null,_elMsgTbody:null,_elMsgTbodyRow:null,_elMsgTbodyCell:null,_oDataSource:null,_oColumnSet:null,_oRecordSet:null,_sFirstTrId:null,_sLastTrId:null,_tdElTemplate:null,_trElTemplate:null,_bScrollbarX:null,clearTextSelection:function(){var J;if(window.getSelection){J=window.getSelection();}else{if(document.getSelection){J=document.getSelection();}else{if(document.selection){J=document.selection;}}}if(J){if(J.empty){J.empty();}else{if(J.removeAllRanges){J.removeAllRanges();}else{if(J.collapse){J.collapse();}}}}},_focusEl:function(J){J=J||this._elTbody;setTimeout(function(){setTimeout(function(){try{J.focus();}catch(K){}},0);},0);},_sync:function(){this._syncColWidths();this._forceGeckoRedraw();},_syncColWidths:function(){var Q=this.get("scrollable");if(this._elTbody.rows.length>0){var T=this._oColumnSet.keys,J=this.getFirstTrEl();if(T&&J&&(J.cells.length===T.length)){if(Q){if(this.get("width")){this._elTheadContainer.style.width="";this._elTbodyContainer.style.width="";}this._elContainer.style.width="";}var P,S,M=J.cells.length;for(P=0;P<M;P++){S=T[P];if(!S.width){this._setColumnWidth(S,"auto","visible");}}for(P=0;P<M;P++){S=T[P];var O=0;var L="hidden";if(!S.width){var N=S.getThEl();var R=J.cells[P];if(Q){var U=(N.offsetWidth>R.offsetWidth)?N.firstChild:R.firstChild;if(N.offsetWidth!==R.offsetWidth||U.offsetWidth<S.minWidth){O=Math.max(0,S.minWidth,U.offsetWidth-(parseInt(D.getStyle(U,"paddingLeft"),10)|0)-(parseInt(D.getStyle(U,"paddingRight"),10)|0));}}else{if(R.offsetWidth<S.minWidth){L=R.offsetWidth?"visible":"hidden";O=Math.max(0,S.minWidth,R.offsetWidth-(parseInt(D.getStyle(R,"paddingLeft"),10)|0)-(parseInt(D.getStyle(R,"paddingRight"),10)|0));}}}else{O=S.width;}if(S.hidden){S._nLastWidth=O;this._setColumnWidth(S,"1px","hidden");}else{if(O){this._setColumnWidth(S,O+"px",L);}}}if(Q){var K=this.get("width");this._elTheadContainer.style.width=K;this._elTbodyContainer.style.width=K;}}}this._syncScroll();},_syncScroll:function(){if(this.get("scrollable")){this._syncScrollX();this._syncScrollY();this._syncScrollPadding();if(A.opera){this._elTheadContainer.scrollLeft=this._elTbodyContainer.scrollLeft;if(!this.get("width")){document.body.style+="";}}}},_syncScrollY:function(){var L=this._elTbody,N=this._elTbodyContainer,P,J,O,M,K;if(!this.get("width")){this._elContainer.style.width=(N.scrollHeight>=N.offsetHeight)?(L.parentNode.offsetWidth+19)+"px":(L.parentNode.offsetWidth+2)+"px";}},_syncScrollX:function(){var L=this._elTbody,N=this._elTbodyContainer,P,J,O,M,K;if(!this.get("height")&&(A.ie)){N.style.height=(N.scrollWidth>N.offsetWidth-2)?(L.parentNode.offsetHeight+19)+"px":L.parentNode.offsetHeight+"px";}if(this._elTbody.rows.length===0){this._elMsgTbody.parentNode.style.width=this.getTheadEl().parentNode.offsetWidth+"px";}else{this._elMsgTbody.parentNode.style.width="";}},_syncScrollPadding:function(){var L=this._elTbody,N=this._elTbodyContainer,P,J,O,M,K;if(N.scrollHeight>N.offsetHeight){P=this._oColumnSet.headers[this._oColumnSet.headers.length-1];J=P.length;O=this._sId+"-th";for(M=0;M<J;M++){K=D.get(O+P[M]).firstChild;K.parentNode.style.borderRight="18px solid "+G.COLOR_COLUMNFILLER;}}else{P=this._oColumnSet.headers[this._oColumnSet.headers.length-1];J=P.length;O=this._sId+"-th";for(M=0;M<J;M++){K=D.get(O+P[M]).firstChild;K.parentNode.style.borderRight="1px solid "+G.COLOR_COLUMNFILLER;}}},_forceGeckoRedraw:(A.gecko)?function(K){K=K||this._elContainer;var J=K.parentNode;var L=K.nextSibling;J.insertBefore(J.removeChild(K),L);}:function(){},_initNodeTemplates:function(){var K=document,J=K.createElement("tr"),M=K.createElement("td"),L=K.createElement("div");M.appendChild(L);this._tdElTemplate=M;this._trElTemplate=J;},_initContainerEl:function(J){if(this._elContainer){I.purgeElement(this._elContainer,true);this._elContainer.innerHTML="";}J=D.get(J);if(J&&J.nodeName&&(J.nodeName.toLowerCase()=="div")){I.purgeElement(J,true);J.innerHTML="";D.addClass(J,"yui-dt yui-dt-noop");this._elTheadContainer=J.appendChild(document.createElement("div"));D.addClass(this._elTheadContainer,"yui-dt-hd");this._elTheadContainer.style.backgroundColor=G.COLOR_COLUMNFILLER;this._elTbodyContainer=J.appendChild(document.createElement("div"));D.addClass(this._elTbodyContainer,"yui-dt-bd");this._elContainer=J;}},_initConfigs:function(J){if(J){if(J.constructor!=Object){J=null;}else{if(C.isBoolean(J.paginator)){}}this._oConfigs=J;}else{this._oConfigs={};}},_initColumnSet:function(L){if(this._oColumnSet){for(var K=0,J=this._oColumnSet.keys.length;K<J;K++){G._oStylesheetRules[".yui-dt-col-"+this._oColumnSet.keys[K].getId()]=undefined;}this._oColumnSet=null;}if(C.isArray(L)){this._oColumnSet=new YAHOO.widget.ColumnSet(L);}else{if(L instanceof YAHOO.widget.ColumnSet){this._oColumnSet=L;}}},_initDataSource:function(J){this._oDataSource=null;if(J&&(J instanceof H)){this._oDataSource=J;}else{var K=null;var O=this._elContainer;var L;if(O.hasChildNodes()){var N=O.childNodes;for(L=0;L<N.length;L++){if(N[L].nodeName&&N[L].nodeName.toLowerCase()=="table"){K=N[L];break; | ||
18 | +}}if(K){var M=[];for(L=0;L<this._oColumnSet.keys.length;L++){M.push({key:this._oColumnSet.keys[L].key});}this._oDataSource=new H(K);this._oDataSource.responseType=H.TYPE_HTMLTABLE;this._oDataSource.responseSchema={fields:M};}}}},_initRecordSet:function(){if(this._oRecordSet){this._oRecordSet.reset();}else{this._oRecordSet=new YAHOO.widget.RecordSet();}},_initTableEl:function(){var S;if(this._elThead){var N;var V=this._oColumnSet.tree[0];for(N=0;N<V.length;N++){if(V[N]._dd){V[N]._dd=V[N]._dd.unreg();}}var U=this._oColumnSet.keys;for(N=0;N<U.length;N++){if(U[N]._ddResizer){U[N]._ddResizer=U[N]._ddResizer.unreg();}}S=this._elThead.parentNode;I.purgeElement(S,true);S.parentNode.removeChild(S);this._elThead=null;}if(this._elTbody){S=this._elTbody.parentNode;I.purgeElement(S,true);S.parentNode.removeChild(S);this._elTbody=null;}var W=document.createElement("table");W.id=this._sId+"-headtable";W=this._elTheadContainer.appendChild(W);var T=document.createElement("table");T.id=this._sId+"-bodytable";this._elTbodyContainer.appendChild(T);this._initTheadEls();this._elTbody=T.appendChild(document.createElement("tbody"));this._elTbody.tabIndex=0;D.addClass(this._elTbody,G.CLASS_BODY);var Q=document.createElement("tbody");D.addClass(Q,G.CLASS_MSG);var J=Q.appendChild(document.createElement("tr"));D.addClass(J,G.CLASS_FIRST);D.addClass(J,G.CLASS_LAST);this._elMsgRow=J;var R=J.appendChild(document.createElement("td"));R.colSpan=this._oColumnSet.keys.length;D.addClass(R,G.CLASS_FIRST);D.addClass(R,G.CLASS_LAST);this._elMsgTd=R;this._elMsgTbody=T.appendChild(Q);var O=R.appendChild(document.createElement("div"));this.showTableMessage(G.MSG_LOADING,G.CLASS_LOADING);var L=this._elContainer;var M=this._elThead;var K=this._elTbody;if(A.ie){K.hideFocus=true;}var P=this._elTbodyContainer;I.addListener(L,"focus",this._onTableFocus,this);I.addListener(K,"focus",this._onTbodyFocus,this);I.addListener(K,"mouseover",this._onTableMouseover,this);I.addListener(K,"mouseout",this._onTableMouseout,this);I.addListener(K,"mousedown",this._onTableMousedown,this);I.addListener(K,"keydown",this._onTbodyKeydown,this);I.addListener(K,"keypress",this._onTableKeypress,this);I.addListener(K.parentNode,"dblclick",this._onTableDblclick,this);I.addListener(K,"click",this._onTbodyClick,this);I.addListener(P,"scroll",this._onScroll,this);},_initTheadEls:function(){var b,Z,X,d,M,Q;if(!this._elThead){d=this._elThead=document.createElement("thead");M=this._elA11yThead=document.createElement("thead");Q=[d,M];I.addListener(d,"focus",this._onTheadFocus,this);I.addListener(d,"keydown",this._onTheadKeydown,this);I.addListener(d,"mouseover",this._onTableMouseover,this);I.addListener(d,"mouseout",this._onTableMouseout,this);I.addListener(d,"mousedown",this._onTableMousedown,this);I.addListener(d,"mouseup",this._onTableMouseup,this);I.addListener(d,"click",this._onTheadClick,this);I.addListener(d.parentNode,"dblclick",this._onTableDblclick,this);this._elTheadContainer.firstChild.appendChild(M);this._elTbodyContainer.firstChild.appendChild(d);}else{d=this._elThead;M=this._elA11yThead;Q=[d,M];for(b=0;b<Q.length;b++){for(Z=Q[b].rows.length-1;Z>-1;Z--){I.purgeElement(Q[b].rows[Z],true);Q[b].removeChild(Q[b].rows[Z]);}}}var R,m=this._oColumnSet;var L=m.tree;var P,T;for(X=0;X<Q.length;X++){for(b=0;b<L.length;b++){var Y=Q[X].appendChild(document.createElement("tr"));T=(X===1)?this._sId+"-hdrow"+b+"-a11y":this._sId+"-hdrow"+b;Y.id=T;for(Z=0;Z<L[b].length;Z++){R=L[b][Z];P=Y.appendChild(document.createElement("th"));if(X===0){R._elTh=P;}T=(X===1)?this._sId+"-th"+R.getId()+"-a11y":this._sId+"-th"+R.getId();P.id=T;P.yuiCellIndex=Z;this._initThEl(P,R,b,Z,(X===1));}if(X===0){if(b===0){D.addClass(Y,G.CLASS_FIRST);}if(b===(L.length-1)){D.addClass(Y,G.CLASS_LAST);}}}if(X===0){var V=m.headers[0];var N=m.headers[m.headers.length-1];for(b=0;b<V.length;b++){D.addClass(D.get(this._sId+"-th"+V[b]),G.CLASS_FIRST);}for(b=0;b<N.length;b++){D.addClass(D.get(this._sId+"-th"+N[b]),G.CLASS_LAST);}var U=(F.DD)?true:false;var k=false;if(this._oConfigs.draggableColumns){for(b=0;b<this._oColumnSet.tree[0].length;b++){R=this._oColumnSet.tree[0][b];if(U){P=R.getThEl();D.addClass(P,G.CLASS_DRAGGABLE);var S=G._initColumnDragTargetEl();R._dd=new YAHOO.widget.ColumnDD(this,R,P,S);}else{k=true;}}}for(b=0;b<this._oColumnSet.keys.length;b++){R=this._oColumnSet.keys[b];if(R.resizeable){if(U){P=R.getThEl();D.addClass(P,G.CLASS_RESIZEABLE);var K=P.firstChild;var J=K.appendChild(document.createElement("div"));J.id=this._sId+"-colresizer"+R.getId();R._elResizer=J;D.addClass(J,G.CLASS_RESIZER);var n=G._initColumnResizerProxyEl();R._ddResizer=new YAHOO.util.ColumnResizer(this,R,P,J.id,n);var a=function(g){I.stopPropagation(g);};I.addListener(J,"click",a);}else{k=true;}}}if(k){}}else{}}for(var e=0,c=this._oColumnSet.keys.length;e<c;e++){if(this._oColumnSet.keys[e].hidden){var f=this._oColumnSet.keys[e];var W=f.getThEl();f._nLastWidth=W.offsetWidth-(parseInt(D.getStyle(W,"paddingLeft"),10)|0)-(parseInt(D.getStyle(W,"paddingRight"),10)|0);this._setColumnWidth(f.getKeyIndex(),"1px");}}if(A.webkit&&A.webkit<420){var O=this;setTimeout(function(){O._elThead.style.display="";},0);this._elThead.style.display="none";}},_initThEl:function(Q,O,S,K,R){var N=O.getKey();var J=O.getId();Q.yuiColumnKey=N;Q.yuiColumnId=J;Q.innerHTML="";Q.rowSpan=O.getRowspan();Q.colSpan=O.getColspan();var P=Q.appendChild(document.createElement("div"));var M=P.appendChild(document.createElement("span"));if(R){if(O.abbr){Q.abbr=O.abbr;}M.innerHTML=C.isValue(O.label)?O.label:N;}else{P.id=Q.id+"-liner";var L;if(C.isString(O.className)){L=[O.className];}else{if(C.isArray(O.className)){L=O.className;}else{L=[];}}L[L.length]="yui-dt-col-"+N.replace(/[^\w\-.:]/g,"");L[L.length]="yui-dt-col-"+O.getId();L[L.length]=G.CLASS_LINER;D.addClass(P,L.join(" "));D.addClass(M,G.CLASS_LABEL);L=[];if(O.resizeable){L[L.length]=G.CLASS_RESIZEABLE;}if(O.sortable){L[L.length]=G.CLASS_SORTABLE;}if(O.hidden){L[L.length]=G.CLASS_HIDDEN;}if(O.selected){L[L.length]=G.CLASS_SELECTED; | ||
19 | +}D.addClass(Q,L.join(" "));G.formatTheadCell(M,O,this);}},_initCellEditorEl:function(){var J=document.createElement("div");J.id=this._sId+"-celleditor";J.style.display="none";J.tabIndex=0;D.addClass(J,G.CLASS_EDITOR);var L=D.getFirstChild(document.body);if(L){J=D.insertBefore(J,L);}else{J=document.body.appendChild(J);}var K={};K.container=J;K.value=null;K.isActive=false;this._oCellEditor=K;},_initColumnSort:function(){this.subscribe("theadCellClickEvent",this.onEventSortColumn);},_createTrEl:function(K){var J=this._trElTemplate.cloneNode(true);J.id=this._sId+"-bdrow"+this._nTrCount;this._nTrCount++;return this._updateTrEl(J,K);},_updateTrEl:function(K,Y){var V=this._oColumnSet,O,L,N=this.get("sortedBy"),R,Q,T,X;if(N){O=N.key;L=N.dir;}K.style.display="none";var J=false;while(K.childNodes.length>V.keys.length){K.removeChild(K.firstChild);J=true;}for(R=K.childNodes.length||0,T=V.keys.length;R<T;++R){this._addTdEl(K,V.keys[R],R);J=true;}for(R=0,T=V.keys.length;R<T;++R){var S=V.keys[R],W=K.childNodes[R],P=W.firstChild,U="",M=this.get("scrollable")?"-a11y ":" ";for(Q=0,X=V.headers[R].length;Q<X;++Q){U+=this._sId+"-th"+V.headers[R][Q]+M;}W.headers=U;if(J){D.removeClass(W,G.CLASS_FIRST);D.removeClass(W,G.CLASS_LAST);if(R===0){D.addClass(W,G.CLASS_FIRST);}else{if(R===T-1){D.addClass(W,G.CLASS_LAST);}}}if(S.key===O){D.replaceClass(W,L===G.CLASS_ASC?G.CLASS_DESC:G.CLASS_ASC,L);}else{D.removeClass(W,G.CLASS_ASC);D.removeClass(W,G.CLASS_DESC);}if(S.hidden){D.addClass(W,G.CLASS_HIDDEN);}else{D.removeClass(W,G.CLASS_HIDDEN);}if(S.selected){D.addClass(W,G.CLASS_SELECTED);}else{D.removeClass(W,G.CLASS_SELECTED);}this.formatCell(P,Y,S);}K.yuiRecordId=Y.getId();K.style.display="";return K;},_addTdEl:function(J,M,K){var L=this._tdElTemplate.cloneNode(true),N=L.firstChild;K=K||J.cells.length;L.id=J.id+"-cell"+this._nTdCount;this._nTdCount++;L.yuiColumnKey=M.getKey();L.yuiColumnId=M.getId();L.yuiCellIndex=K;var O=J.cells[K]||null;return J.insertBefore(L,O);},_deleteTrEl:function(J){var K;if(!C.isNumber(J)){K=D.get(J).sectionRowIndex;}else{K=J;}if(C.isNumber(K)&&(K>-2)&&(K<this._elTbody.rows.length)){return this._elTbody.removeChild(this.getTrEl(J));}else{return null;}},_setFirstRow:function(){var J=this.getFirstTrEl();if(J){if(this._sFirstTrId){D.removeClass(this._sFirstTrId,G.CLASS_FIRST);}D.addClass(J,G.CLASS_FIRST);this._sFirstTrId=J.id;}else{this._sFirstTrId=null;}},_setLastRow:function(){var J=this.getLastTrEl();if(J){if(this._sLastTrId){D.removeClass(this._sLastTrId,G.CLASS_LAST);}D.addClass(J,G.CLASS_LAST);this._sLastTrId=J.id;}else{this._sLastTrId=null;}},_setRowStripes:function(T,L){var M=this._elTbody.rows,Q=0,S=M.length,P=[],R=0,N=[],J=0;if((T!==null)&&(T!==undefined)){var O=this.getTrEl(T);if(O){Q=O.sectionRowIndex;if(C.isNumber(L)&&(L>1)){S=Q+L;}}}for(var K=Q;K<S;K++){if(K%2){P[R++]=M[K];}else{N[J++]=M[K];}}if(P.length){D.replaceClass(P,G.CLASS_EVEN,G.CLASS_ODD);}if(N.length){D.replaceClass(N,G.CLASS_ODD,G.CLASS_EVEN);}},_onScroll:function(L,K){K._elTheadContainer.scrollLeft=K._elTbodyContainer.scrollLeft;if(K._oCellEditor&&K._oCellEditor.isActive){K.fireEvent("editorBlurEvent",{editor:K._oCellEditor});K.cancelCellEditor();}var M=I.getTarget(L);var J=M.nodeName.toLowerCase();K.fireEvent("tableScrollEvent",{event:L,target:M});},_onDocumentClick:function(L,K){var M=I.getTarget(L);var J=M.nodeName.toLowerCase();if(!D.isAncestor(K._elContainer,M)){K.fireEvent("tableBlurEvent");if(K._oCellEditor&&K._oCellEditor.isActive){if(!D.isAncestor(K._oCellEditor.container,M)&&(K._oCellEditor.container.id!==M.id)){K.fireEvent("editorBlurEvent",{editor:K._oCellEditor});}}}},_onTableFocus:function(K,J){J.fireEvent("tableFocusEvent");},_onTheadFocus:function(K,J){J.fireEvent("theadFocusEvent");J.fireEvent("tableFocusEvent");},_onTbodyFocus:function(K,J){J.fireEvent("tbodyFocusEvent");J.fireEvent("tableFocusEvent");},_onTableMouseover:function(M,K){var N=I.getTarget(M);var J=N.nodeName.toLowerCase();var L=true;while(N&&(J!="table")){switch(J){case"body":return ;case"a":break;case"td":L=K.fireEvent("cellMouseoverEvent",{target:N,event:M});break;case"span":if(D.hasClass(N,G.CLASS_LABEL)){L=K.fireEvent("theadLabelMouseoverEvent",{target:N,event:M});L=K.fireEvent("headerLabelMouseoverEvent",{target:N,event:M});}break;case"th":L=K.fireEvent("theadCellMouseoverEvent",{target:N,event:M});L=K.fireEvent("headerCellMouseoverEvent",{target:N,event:M});break;case"tr":if(N.parentNode.nodeName.toLowerCase()=="thead"){L=K.fireEvent("theadRowMouseoverEvent",{target:N,event:M});L=K.fireEvent("headerRowMouseoverEvent",{target:N,event:M});}else{L=K.fireEvent("rowMouseoverEvent",{target:N,event:M});}break;default:break;}if(L===false){return ;}else{N=N.parentNode;if(N){J=N.nodeName.toLowerCase();}}}K.fireEvent("tableMouseoverEvent",{target:(N||K._elContainer),event:M});},_onTableMouseout:function(M,K){var N=I.getTarget(M);var J=N.nodeName.toLowerCase();var L=true;while(N&&(J!="table")){switch(J){case"body":return ;case"a":break;case"td":L=K.fireEvent("cellMouseoutEvent",{target:N,event:M});break;case"span":if(D.hasClass(N,G.CLASS_LABEL)){L=K.fireEvent("theadLabelMouseoutEvent",{target:N,event:M});L=K.fireEvent("headerLabelMouseoutEvent",{target:N,event:M});}break;case"th":L=K.fireEvent("theadCellMouseoutEvent",{target:N,event:M});L=K.fireEvent("headerCellMouseoutEvent",{target:N,event:M});break;case"tr":if(N.parentNode.nodeName.toLowerCase()=="thead"){L=K.fireEvent("theadRowMouseoutEvent",{target:N,event:M});L=K.fireEvent("headerRowMouseoutEvent",{target:N,event:M});}else{L=K.fireEvent("rowMouseoutEvent",{target:N,event:M});}break;default:break;}if(L===false){return ;}else{N=N.parentNode;if(N){J=N.nodeName.toLowerCase();}}}K.fireEvent("tableMouseoutEvent",{target:(N||K._elContainer),event:M});},_onTableMousedown:function(M,K){var N=I.getTarget(M);var J=N.nodeName.toLowerCase();var L=true;while(N&&(J!="table")){switch(J){case"body":return ;case"a":break;case"td":L=K.fireEvent("cellMousedownEvent",{target:N,event:M});break;case"span":if(D.hasClass(N,G.CLASS_LABEL)){L=K.fireEvent("theadLabelMousedownEvent",{target:N,event:M}); | ||
20 | +L=K.fireEvent("headerLabelMousedownEvent",{target:N,event:M});}break;case"th":L=K.fireEvent("theadCellMousedownEvent",{target:N,event:M});L=K.fireEvent("headerCellMousedownEvent",{target:N,event:M});break;case"tr":if(N.parentNode.nodeName.toLowerCase()=="thead"){L=K.fireEvent("theadRowMousedownEvent",{target:N,event:M});L=K.fireEvent("headerRowMousedownEvent",{target:N,event:M});}else{L=K.fireEvent("rowMousedownEvent",{target:N,event:M});}break;default:break;}if(L===false){return ;}else{N=N.parentNode;if(N){J=N.nodeName.toLowerCase();}}}K.fireEvent("tableMousedownEvent",{target:(N||K._elContainer),event:M});},_onTableDblclick:function(M,K){var N=I.getTarget(M);var J=N.nodeName.toLowerCase();var L=true;while(N&&(J!="table")){switch(J){case"body":return ;case"td":L=K.fireEvent("cellDblclickEvent",{target:N,event:M});break;case"span":if(D.hasClass(N,G.CLASS_LABEL)){L=K.fireEvent("theadLabelDblclickEvent",{target:N,event:M});L=K.fireEvent("headerLabelDblclickEvent",{target:N,event:M});}break;case"th":L=K.fireEvent("theadCellDblclickEvent",{target:N,event:M});L=K.fireEvent("headerCellDblclickEvent",{target:N,event:M});break;case"tr":if(N.parentNode.nodeName.toLowerCase()=="thead"){L=K.fireEvent("theadRowDblclickEvent",{target:N,event:M});L=K.fireEvent("headerRowDblclickEvent",{target:N,event:M});}else{L=K.fireEvent("rowDblclickEvent",{target:N,event:M});}break;default:break;}if(L===false){return ;}else{N=N.parentNode;if(N){J=N.nodeName.toLowerCase();}}}K.fireEvent("tableDblclickEvent",{target:(N||K._elContainer),event:M});},_onTheadKeydown:function(M,K){if(I.getCharCode(M)===9){setTimeout(function(){if((K instanceof G)&&K._sId){K._elTbodyContainer.scrollLeft=K._elTheadContainer.scrollLeft;}},0);}var N=I.getTarget(M);var J=N.nodeName.toLowerCase();var L=true;while(N&&(J!="table")){switch(J){case"body":return ;case"input":case"textarea":break;case"thead":L=K.fireEvent("theadKeyEvent",{target:N,event:M});break;default:break;}if(L===false){return ;}else{N=N.parentNode;if(N){J=N.nodeName.toLowerCase();}}}K.fireEvent("tableKeyEvent",{target:(N||K._elContainer),event:M});},_onTbodyKeydown:function(N,L){var K=L.get("selectionMode");if(K=="standard"){L._handleStandardSelectionByKey(N);}else{if(K=="single"){L._handleSingleSelectionByKey(N);}else{if(K=="cellblock"){L._handleCellBlockSelectionByKey(N);}else{if(K=="cellrange"){L._handleCellRangeSelectionByKey(N);}else{if(K=="singlecell"){L._handleSingleCellSelectionByKey(N);}}}}}if(L._oCellEditor&&L._oCellEditor.isActive){L.fireEvent("editorBlurEvent",{editor:L._oCellEditor});}var O=I.getTarget(N);var J=O.nodeName.toLowerCase();var M=true;while(O&&(J!="table")){switch(J){case"body":return ;case"tbody":M=L.fireEvent("tbodyKeyEvent",{target:O,event:N});break;default:break;}if(M===false){return ;}else{O=O.parentNode;if(O){J=O.nodeName.toLowerCase();}}}L.fireEvent("tableKeyEvent",{target:(O||L._elContainer),event:N});},_onTableKeypress:function(L,K){if(A.webkit){var J=I.getCharCode(L);if(J==40){I.stopEvent(L);}else{if(J==38){I.stopEvent(L);}}}},_onTheadClick:function(M,K){if(K._oCellEditor&&K._oCellEditor.isActive){K.fireEvent("editorBlurEvent",{editor:K._oCellEditor});}var N=I.getTarget(M);var J=N.nodeName.toLowerCase();var L=true;while(N&&(J!="table")){switch(J){case"body":return ;case"input":if(N.type.toLowerCase()=="checkbox"){L=K.fireEvent("theadCheckboxClickEvent",{target:N,event:M});}else{if(N.type.toLowerCase()=="radio"){L=K.fireEvent("theadRadioClickEvent",{target:N,event:M});}}break;case"a":L=K.fireEvent("theadLinkClickEvent",{target:N,event:M});break;case"button":L=K.fireEvent("theadButtonClickEvent",{target:N,event:M});break;case"span":if(D.hasClass(N,G.CLASS_LABEL)){L=K.fireEvent("theadLabelClickEvent",{target:N,event:M});L=K.fireEvent("headerLabelClickEvent",{target:N,event:M});}break;case"th":L=K.fireEvent("theadCellClickEvent",{target:N,event:M});L=K.fireEvent("headerCellClickEvent",{target:N,event:M});break;case"tr":L=K.fireEvent("theadRowClickEvent",{target:N,event:M});L=K.fireEvent("headerRowClickEvent",{target:N,event:M});break;default:break;}if(L===false){return ;}else{N=N.parentNode;if(N){J=N.nodeName.toLowerCase();}}}K.fireEvent("tableClickEvent",{target:(N||K._elContainer),event:M});},_onTbodyClick:function(M,K){if(K._oCellEditor&&K._oCellEditor.isActive){K.fireEvent("editorBlurEvent",{editor:K._oCellEditor});}var N=I.getTarget(M);var J=N.nodeName.toLowerCase();var L=true;while(N&&(J!="table")){switch(J){case"body":return ;case"input":if(N.type.toLowerCase()=="checkbox"){L=K.fireEvent("checkboxClickEvent",{target:N,event:M});}else{if(N.type.toLowerCase()=="radio"){L=K.fireEvent("radioClickEvent",{target:N,event:M});}}break;case"a":L=K.fireEvent("linkClickEvent",{target:N,event:M});break;case"button":L=K.fireEvent("buttonClickEvent",{target:N,event:M});break;case"td":L=K.fireEvent("cellClickEvent",{target:N,event:M});break;case"tr":L=K.fireEvent("rowClickEvent",{target:N,event:M});break;default:break;}if(L===false){return ;}else{N=N.parentNode;if(N){J=N.nodeName.toLowerCase();}}}K.fireEvent("tableClickEvent",{target:(N||K._elContainer),event:M});},_onDropdownChange:function(K,J){var L=I.getTarget(K);J.fireEvent("dropdownChangeEvent",{event:K,target:L});},getId:function(){return this._sId;},toString:function(){return"DataTable instance "+this._sId;},getDataSource:function(){return this._oDataSource;},getColumnSet:function(){return this._oColumnSet;},getRecordSet:function(){return this._oRecordSet;},getCellEditor:function(){return this._oCellEditor;},getContainerEl:function(){return this._elContainer;},getBdContainerEl:function(){return this._elTbodyContainer;},getTheadEl:function(){return this._elThead;},getTbodyEl:function(){return this._elTbody;},getMsgTbodyEl:function(){return this._elMsgTbody;},getMsgTdEl:function(){return this._elMsgTd;},getTrEl:function(N){var M=this._elTbody.rows;if(N instanceof YAHOO.widget.Record){var L=this.getTrIndex(N);if(L!==null){return M[L];}else{return null;}}else{if(C.isNumber(N)&&(N>-1)&&(N<M.length)){return M[N]; | ||
21 | +}else{var J;var K=D.get(N);if(K&&(K.ownerDocument==document)){if(K.nodeName.toLowerCase()!="tr"){J=D.getAncestorByTagName(K,"tr");}else{J=K;}if(J&&(J.parentNode==this._elTbody)){return J;}}}}return null;},getFirstTrEl:function(){return this._elTbody.rows[0]||null;},getLastTrEl:function(){var J=this._elTbody.rows;if(J.length>0){return J[J.length-1]||null;}},getNextTrEl:function(L){var J=this.getTrIndex(L);if(J!==null){var K=this._elTbody.rows;if(J<K.length-1){return K[J+1];}}return null;},getPreviousTrEl:function(L){var J=this.getTrIndex(L);if(J!==null){var K=this._elTbody.rows;if(J>0){return K[J-1];}}return null;},getTdLinerEl:function(J){var K=this.getTdEl(J);return K.firstChild||null;},getTdEl:function(J){var O;var M=D.get(J);if(M&&(M.ownerDocument==document)){if(M.nodeName.toLowerCase()!="td"){O=D.getAncestorByTagName(M,"td");}else{O=M;}if(O&&(O.parentNode.parentNode==this._elTbody)){return O;}}else{if(J){var N,L;if(C.isString(J.columnId)&&C.isString(J.recordId)){N=this.getRecord(J.recordId);var P=this.getColumnById(J.columnId);if(P){L=P.getKeyIndex();}}if(J.record&&J.column&&J.column.getKeyIndex){N=J.record;L=J.column.getKeyIndex();}var K=this.getTrEl(N);if((L!==null)&&K&&K.cells&&K.cells.length>0){return K.cells[L]||null;}}}return null;},getFirstTdEl:function(K){var J=this.getTrEl(K)||this.getFirstTrEl();if(J&&(J.cells.length>0)){return J.cells[0];}return null;},getLastTdEl:function(K){var J=this.getTrEl(K)||this.getLastTrEl();if(J&&(J.cells.length>0)){return J.cells[J.cells.length-1];}return null;},getNextTdEl:function(J){var N=this.getTdEl(J);if(N){var L=N.yuiCellIndex;var K=this.getTrEl(N);if(L<K.cells.length-1){return K.cells[L+1];}else{var M=this.getNextTrEl(K);if(M){return M.cells[0];}}}return null;},getPreviousTdEl:function(J){var N=this.getTdEl(J);if(N){var L=N.yuiCellIndex;var K=this.getTrEl(N);if(L>0){return K.cells[L-1];}else{var M=this.getPreviousTrEl(K);if(M){return this.getLastTdEl(M);}}}return null;},getAboveTdEl:function(J){var L=this.getTdEl(J);if(L){var K=this.getPreviousTrEl(L);if(K){return K.cells[L.yuiCellIndex];}}return null;},getBelowTdEl:function(J){var L=this.getTdEl(J);if(L){var K=this.getNextTrEl(L);if(K){return K.cells[L.yuiCellIndex];}}return null;},getThLinerEl:function(K){var J=this.getThEl(K);return J.firstChild||null;},getThEl:function(M){var J;if(M instanceof YAHOO.widget.Column){var L=M;J=L.getThEl();if(J){return J;}}else{var K=D.get(M);if(K&&(K.ownerDocument==document)){if(K.nodeName.toLowerCase()!="th"){J=D.getAncestorByTagName(K,"th");}else{J=K;}if(J&&(J.parentNode.parentNode==this._elThead)){return J;}}}return null;},getTrIndex:function(O){var N;if(O instanceof YAHOO.widget.Record){N=this._oRecordSet.getRecordIndex(O);if(N===null){return null;}}else{if(C.isNumber(O)){N=O;}}if(C.isNumber(N)){if((N>-1)&&(N<this._oRecordSet.getLength())){var L=this.get("paginator");if(L instanceof B||this.get("paginated")){var M=0,P=0;if(L instanceof B){var K=L.getPageRecords();M=K[0];P=K[1];}else{M=L.startRecordIndex;P=M+L.rowsPerPage-1;}if((N>=M)&&(N<=P)){return N-M;}else{return null;}}else{return N;}}else{return null;}}else{var J=this.getTrEl(O);if(J&&(J.ownerDocument==document)&&(J.parentNode==this._elTbody)){return J.sectionRowIndex;}}return null;},initializeTable:function(){this._bInit=true;this._oRecordSet.reset();this._unselectAllTrEls();this._unselectAllTdEls();this._aSelections=null;this._oAnchorRecord=null;this._oAnchorCell=null;this.set("sortedBy",null);},render:function(){this._oChainRender.stop();this.showTableMessage(G.MSG_LOADING,G.CLASS_LOADING);var S,R,Q,P,U,X;var W=this.get("paginator");var Z=W instanceof B||this.get("paginated");if(Z){if(W instanceof B){X=this._oRecordSet.getRecords(W.getStartIndex(),W.getRowsPerPage());W.render();}else{this.updatePaginator();var N=W.rowsPerPage;var K=(W.currentPage-1)*N;X=this._oRecordSet.getRecords(K,N);this.formatPaginators();}}else{X=this._oRecordSet.getRecords();}var b=this._elTbody;var M=b.rows;if(C.isArray(X)&&(X.length>0)){var V=this.getSelectedRows();var a=this.getSelectedCells();var L=(V.length>0)||(a.length>0);while(b.hasChildNodes()&&(M.length>X.length)){b.removeChild(M[M.length-1]);}if(L){this._unselectAllTrEls();this._unselectAllTdEls();}this.hideTableMessage();var J=this.get("renderLoopSize");var O,T;if(M.length>0){T=M.length;this._oChainRender.add({method:function(e){if((this instanceof G)&&this._sId){var d=e.nCurrentRow,c=J>0?Math.min(d+J,M.length):M.length;for(;d<c;++d){this._updateTrEl(M[d],X[d]);}if(J>0){this._syncColWidths();}e.nCurrentRow=d;}},iterations:(J>0)?Math.ceil(T/J):1,argument:{nCurrentRow:0},scope:this,timeout:(J>0)?0:-1});}O=M.length;T=X.length;var Y=(T-O);if(Y>0){this._oChainRender.add({method:function(e){if((this instanceof G)&&this._sId){var d=e.nCurrentRow,c=J>0?Math.min(d+J,T):T,g=document.createDocumentFragment(),f;for(;d<c;++d){f=this._createTrEl(X[d]);f.className=(d%2)?G.CLASS_ODD:G.CLASS_EVEN;g.appendChild(f);}this._elTbody.appendChild(g);if(J>0){this._syncColWidths();}e.nCurrentRow=d;}},iterations:(J>0)?Math.ceil(Y/J):1,argument:{nCurrentRow:O},scope:this,timeout:(J>0)?0:-1});}this._oChainRender.add({method:function(d){if((this instanceof G)&&this._sId){this._setFirstRow();this._setLastRow();if(L){for(R=0;R<M.length;R++){var f=M[R];var c=this.get("selectionMode");if((c=="standard")||(c=="single")){for(Q=0;Q<V.length;Q++){if(V[Q]===f.yuiRecordId){D.addClass(f,G.CLASS_SELECTED);if(R===M.length-1){this._oAnchorRecord=this.getRecord(f.yuiRecordId);}}}}else{for(Q=0;Q<f.cells.length;Q++){var e=f.cells[Q];for(P=0;P<a.length;P++){if((a[P].recordId===f.yuiRecordId)&&(a[P].columnId===e.yuiColumnId)){D.addClass(e,G.CLASS_SELECTED);if(Q===f.cells.length-1){this._oAnchorCell={record:this.getRecord(f.yuiRecordId),column:this.getColumnById(e.yuiColumnId)};}}}}}}}}if(this._bInit){this._forceGeckoRedraw();this._oChainRender.add({method:function(){if((this instanceof G)&&this._sId&&this._bInit){this._bInit=false;this.fireEvent("initEvent");}},scope:this});this._oChainRender.run();}else{this.fireEvent("renderEvent"); | ||
22 | +this.fireEvent("refreshEvent");}},scope:this,timeout:(J>0)?0:-1});this._oChainRender.add({method:function(){if((this instanceof G)&&this._sId){this._syncColWidths();}},scope:this});this._oChainRender.run();}else{while(b.hasChildNodes()){b.removeChild(M[0]);}this.showTableMessage(G.MSG_EMPTY,G.CLASS_EMPTY);}},destroy:function(){this._oChainRender.stop();var L;var M=this._oColumnSet.tree[0];for(L=0;L<M.length;L++){if(M[L]._dd){M[L]._dd=M[L]._dd.unreg();}}var K=this._oColumnSet.keys;for(L=0;L<K.length;L++){if(K[L]._ddResizer){K[L]._ddResizer=K[L]._ddResizer.unreg();}}I.purgeElement(this._oCellEditor.container,true);document.body.removeChild(this._oCellEditor.container);var J=this.toString();var N=this._elContainer;this._oRecordSet.unsubscribeAll();this.unsubscribeAll();I.purgeElement(N,true);I.removeListener(document,"click",this._onDocumentClick);N.innerHTML="";for(var O in this){if(C.hasOwnProperty(this,O)){this[O]=null;}}G._nCurrentCount--;if(G._nCurrentCount<1){if(G._elStylesheet){document.getElementsByTagName("head")[0].removeChild(G._elStylesheet);G._elStylesheet=null;}}},showTableMessage:function(K,J){var L=this._elMsgTd;L.firstChild.className=(C.isString(J))?G.CLASS_LINER+" "+J:G.CLASS_LINER;if(C.isString(K)){L.firstChild.innerHTML=K;}this._elMsgTbody.parentNode.style.width=this.getTheadEl().parentNode.offsetWidth+"px";this._elMsgTbody.style.display="";this.fireEvent("tableMsgShowEvent",{html:K,className:J});},hideTableMessage:function(){if(this._elMsgTbody.style.display!="none"){this._elMsgTbody.style.display="none";this._elMsgTbody.parentNode.style.width="";this.fireEvent("tableMsgHideEvent");}},focus:function(){this.focusTbodyEl();},focusTheadEl:function(){this._focusEl(this._elThead);},focusTbodyEl:function(){this._focusEl(this._elTbody);},getRecordIndex:function(M){var L;if(!C.isNumber(M)){if(M instanceof YAHOO.widget.Record){return this._oRecordSet.getRecordIndex(M);}else{var K=this.getTrEl(M);if(K){L=K.sectionRowIndex;}}}else{L=M;}if(C.isNumber(L)){var J=this.get("paginator");if(J instanceof B){return J.get("recordOffset")+L;}else{if(this.get("paginated")){return J.startRecordIndex+L;}else{return L;}}}return null;},getRecord:function(L){var K=this._oRecordSet.getRecord(L);if(!K){var J=this.getTrEl(L);if(J){K=this._oRecordSet.getRecord(J.yuiRecordId);}}if(K instanceof YAHOO.widget.Record){return this._oRecordSet.getRecord(K);}else{return null;}},getColumn:function(J){var L=this._oColumnSet.getColumn(J);if(!L){var K=this.getTdEl(J);if(K){L=this._oColumnSet.getColumnById(K.yuiColumnId);}else{K=this.getThEl(J);if(K){L=this._oColumnSet.getColumnById(K.yuiColumnId);}}}if(!L){}return L;},getColumnById:function(J){return this._oColumnSet.getColumnById(J);},getColumnSortDir:function(L){if(L.sortOptions&&L.sortOptions.defaultOrder){if(L.sortOptions.defaultOrder=="asc"){L.sortOptions.defaultDir=G.CLASS_ASC;}else{if(L.sortOptions.defaultOrder=="desc"){L.sortOptions.defaultDir=G.CLASS_DESC;}}}var K=(L.sortOptions&&L.sortOptions.defaultDir)?L.sortOptions.defaultDir:G.CLASS_ASC;var J=false;var M=this.get("sortedBy");if(M&&(M.key===L.key)){J=true;if(M.dir){K=(M.dir==G.CLASS_ASC)?G.CLASS_DESC:G.CLASS_ASC;}else{K=(K==G.CLASS_ASC)?G.CLASS_DESC:G.CLASS_ASC;}}return K;},sortColumn:function(O,M){if(O&&(O instanceof YAHOO.widget.Column)){if(!O.sortable){D.addClass(this.getThEl(O),G.CLASS_SORTABLE);}if(M&&(M!==G.CLASS_ASC)&&(M!==G.CLASS_DESC)){M=null;}var L=M||this.getColumnSortDir(O);var P=this.get("sortedBy")||{};var K=(P.key===O.key)?true:false;if(!K||M){var N=(O.sortOptions&&C.isFunction(O.sortOptions.sortFunction))?O.sortOptions.sortFunction:function(R,Q,T){var S=YAHOO.util.Sort.compare(R.getData(O.key),Q.getData(O.key),T);if(S===0){return YAHOO.util.Sort.compare(R.getId(),Q.getId(),T);}else{return S;}};this._oRecordSet.sortRecords(N,((L==G.CLASS_DESC)?true:false));}else{this._oRecordSet.reverseRecords();}this.set("sortedBy",{key:O.key,dir:L,column:O});var J=this.get("paginator");if(J instanceof B){J.setPage(1,true);}else{if(this.get("paginated")){this.updatePaginator({currentPage:1});}}G.formatTheadCell(O.getThEl().firstChild.firstChild,O,this);this.render();this.fireEvent("columnSortEvent",{column:O,dir:L});}else{}},_setColumnWidth:function(P,K,Q){P=this.getColumn(P);if(P){Q=Q||"hidden";if(!G._bStylesheetFallback){var U;if(!G._elStylesheet){U=document.createElement("style");U.type="text/css";G._elStylesheet=document.getElementsByTagName("head").item(0).appendChild(U);}if(G._elStylesheet){U=G._elStylesheet;var T=".yui-dt-col-"+P.getId();var R=G._oStylesheetRules[T];if(!R){if(U.styleSheet&&U.styleSheet.addRule){U.styleSheet.addRule(T,"overflow:"+Q);U.styleSheet.addRule(T,"width:"+K);R=U.styleSheet.rules[U.styleSheet.rules.length-1];}else{if(U.sheet&&U.sheet.insertRule){U.sheet.insertRule(T+" {overflow:"+Q+";width:"+K+";}",U.sheet.cssRules.length);R=U.sheet.cssRules[U.sheet.cssRules.length-1];}else{G._bStylesheetFallback=true;}}G._oStylesheetRules[T]=R;}else{R.style.overflow=Q;R.style.width=K;}return ;}G._bStylesheetFallback=true;}if(G._bStylesheetFallback){if(K=="auto"){K="";}var J=this._elTbody?this._elTbody.rows.length:0;if(!this._aFallbackColResizer[J]){var O,N,M;var S=["var colIdx=oColumn.getKeyIndex();","oColumn.getThEl().firstChild.style.width="];for(O=J-1,N=2;O>=0;--O){S[N++]="this._elTbody.rows[";S[N++]=O;S[N++]="].cells[colIdx].firstChild.style.width=";S[N++]="this._elTbody.rows[";S[N++]=O;S[N++]="].cells[colIdx].style.width=";}S[N]="sWidth;";S[N+1]="oColumn.getThEl().firstChild.style.overflow=";for(O=J-1,M=N+2;O>=0;--O){S[M++]="this._elTbody.rows[";S[M++]=O;S[M++]="].cells[colIdx].firstChild.style.overflow=";S[M++]="this._elTbody.rows[";S[M++]=O;S[M++]="].cells[colIdx].style.overflow=";}S[M]="sOverflow;";this._aFallbackColResizer[J]=new Function("oColumn","sWidth","sOverflow",S.join(""));}var L=this._aFallbackColResizer[J];if(L){L.call(this,P,K,Q);return ;}}}else{}},setColumnWidth:function(K,J){K=this.getColumn(K);if(K){if(C.isNumber(J)){J=(J>K.minWidth)?J:K.minWidth;K.width=J;this._setColumnWidth(K,J+"px"); | ||
23 | +this._syncScroll();this.fireEvent("columnSetWidthEvent",{column:K,width:J});return ;}}},hideColumn:function(P){P=this.getColumn(P);if(P&&!P.hidden){if(P.getTreeIndex()!==null){var M=this.getTbodyEl().rows;var L=M.length;var K=this._oColumnSet.getDescendants(P);for(var O=0;O<K.length;O++){var Q=K[O];Q.hidden=true;var S=Q.getThEl();var R=S.firstChild;Q._nLastWidth=R.offsetWidth-(parseInt(D.getStyle(R,"paddingLeft"),10)|0)-(parseInt(D.getStyle(R,"paddingRight"),10)|0);D.addClass(S,G.CLASS_HIDDEN);var J=Q.getKeyIndex();if(J!==null){for(var N=0;N<L;N++){D.addClass(M[N].cells[J],G.CLASS_HIDDEN);}this._setColumnWidth(Q,"1px");if(Q.resizeable){D.removeClass(Q.getResizerEl(),G.CLASS_RESIZER);}if(Q.sortable){D.removeClass(Q.getThEl(),G.CLASS_SORTABLE);Q.getThEl().firstChild.firstChild.firstChild.style.display="none";}}else{S.firstChild.style.width="1px";}this.fireEvent("columnHideEvent",{column:Q});}}else{}}},showColumn:function(P){P=this.getColumn(P);if(P&&P.hidden){if(P.getTreeIndex()!==null){var M=this.getTbodyEl().rows;var L=M.length;var K=this._oColumnSet.getDescendants(P);for(var O=0;O<K.length;O++){var Q=K[O];Q.hidden=false;var R=Q.getThEl();D.removeClass(R,G.CLASS_HIDDEN);var J=Q.getKeyIndex();if(J!==null){for(var N=0;N<L;N++){D.removeClass(M[N].cells[J],G.CLASS_HIDDEN);}this.setColumnWidth(Q,(Q._nLastWidth||Q.minWidth),true);if(Q.sortable){Q.getThEl().firstChild.firstChild.firstChild.style.display="";D.removeClass(Q.getThEl(),G.CLASS_SORTABLE);}if(Q.resizeable){Q._ddResizer.resetResizerEl();D.addClass(Q.getResizerEl(),G.CLASS_RESIZER);}}else{R.firstChild.style.width="";}Q._nLastWidth=null;this.fireEvent("columnShowEvent",{column:Q});}}else{}}},removeColumn:function(L){var K=L.getTreeIndex();if(K!==null){this._oChainRender.stop();var J=this._oColumnSet.getDefinitions();L=J.splice(K,1)[0];this._initColumnSet(J);this._initTheadEls();this.render();this.fireEvent("columnRemoveEvent",{column:L});return L;}},insertColumn:function(M,J){if(M instanceof YAHOO.widget.Column){M=M.getDefinition();}else{if(M.constructor!==Object){return ;}}var K=this._oColumnSet;if(!C.isValue(J)||!C.isNumber(J)){J=K.tree[0].length;}this._oChainRender.stop();var L=this._oColumnSet.getDefinitions();L.splice(J,0,M);this._initColumnSet(L);this._initTheadEls();this.render();this.fireEvent("columnInsertEvent",{column:M,index:J});},selectColumn:function(L){L=this.getColumn(L);if(L&&!L.selected){if(L.getKeyIndex()!==null){L.selected=true;var M=L.getThEl();D.addClass(M,G.CLASS_SELECTED);var K=this.getTbodyEl().rows;var J=this._oChainRender;J.add({method:function(N){if((this instanceof G)&&this._sId&&K[N.rowIndex]&&K[N.rowIndex].cells[N.cellIndex]){D.addClass(K[N.rowIndex].cells[N.cellIndex],G.CLASS_SELECTED);}N.rowIndex++;},scope:this,iterations:K.length,argument:{rowIndex:0,cellIndex:L.getKeyIndex()}});J.run();this.fireEvent("columnSelectEvent",{column:L});}else{}}},unselectColumn:function(L){L=this.getColumn(L);if(L&&L.selected){if(L.getKeyIndex()!==null){L.selected=false;var M=L.getThEl();D.removeClass(M,G.CLASS_SELECTED);var K=this.getTbodyEl().rows;var J=this._oChainRender;J.add({method:function(N){if((this instanceof G)&&this._sId&&K[N.rowIndex]&&K[N.rowIndex].cells[N.cellIndex]){D.removeClass(K[N.rowIndex].cells[N.cellIndex],G.CLASS_SELECTED);}N.rowIndex++;},scope:this,iterations:K.length,argument:{rowIndex:0,cellIndex:L.getKeyIndex()}});J.run();this.fireEvent("columnUnselectEvent",{column:L});}else{}}},getSelectedColumns:function(N){var K=[];var L=this._oColumnSet.keys;for(var M=0,J=L.length;M<J;M++){if(L[M].selected){K[K.length]=L[M];}}return K;},highlightColumn:function(J){var M=this.getColumn(J);if(M&&(M.getKeyIndex()!==null)){var N=M.getThEl();D.addClass(N,G.CLASS_HIGHLIGHTED);var L=this.getTbodyEl().rows;var K=this._oChainRender;K.add({method:function(O){if((this instanceof G)&&this._sId&&L[O.rowIndex]&&L[O.rowIndex].cells[O.cellIndex]){D.addClass(L[O.rowIndex].cells[O.cellIndex],G.CLASS_HIGHLIGHTED);}O.rowIndex++;},scope:this,iterations:L.length,argument:{rowIndex:0,cellIndex:M.getKeyIndex()}});K.run();this.fireEvent("columnHighlightEvent",{column:M});}else{}},unhighlightColumn:function(J){var M=this.getColumn(J);if(M&&(M.getKeyIndex()!==null)){var N=M.getThEl();D.removeClass(N,G.CLASS_HIGHLIGHTED);var L=this.getTbodyEl().rows;var K=this._oChainRender;K.add({method:function(O){if((this instanceof G)&&this._sId&&L[O.rowIndex]&&L[O.rowIndex].cells[O.cellIndex]){D.removeClass(L[O.rowIndex].cells[O.cellIndex],G.CLASS_HIGHLIGHTED);}O.rowIndex++;},scope:this,iterations:L.length,argument:{rowIndex:0,cellIndex:M.getKeyIndex()}});K.run();this.fireEvent("columnUnhighlightEvent",{column:M});}else{}},_addTrEl:function(K,J){var L=this._createTrEl(K);if(L){if(J>=0&&J<this._elTbody.rows.length){this._elTbody.insertBefore(L,this._elTbody.rows[J]);if(!J){this._setFirstRow();}}else{this._elTbody.appendChild(L);this._setLastRow();J=this._elTbody.rows.length-1;}this._setRowStripes(J);}return L;},addRow:function(P,L){if(P&&(P.constructor==Object)){var N=this._oRecordSet.addRecord(P,L);if(N){var J;var K=this.get("paginator");if(K instanceof B||this.get("paginated")){J=this.getRecordIndex(N);var M;if(K instanceof B){var O=K.get("totalRecords");if(O!==B.VALUE_UNLIMITED){K.set("totalRecords",O+1);}M=(K.getPageRecords())[1];}else{M=K.startRecordIndex+K.rowsPerPage-1;this.updatePaginator();}if(J<=M){this.render();}this.fireEvent("rowAddEvent",{record:N});return ;}else{J=this.getTrIndex(N);if(C.isNumber(J)){this._oChainRender.add({method:function(Q){if((this instanceof G)&&this._sId){var R=this._addTrEl(N,J);if(R){this.hideTableMessage();this.fireEvent("rowAddEvent",{record:N});}}},scope:this,timeout:(this.get("renderLoopSize")>0)?0:-1});this._oChainRender.run();return ;}}}}},addRows:function(L,N){if(C.isArray(L)){var O=this._oRecordSet.addRecords(L,N);if(O){var S=this.getRecordIndex(O[0]);var R=this.get("paginator");if(R instanceof B||this.get("paginated")){var Q;if(R instanceof B){var P=R.get("totalRecords");if(P!==B.VALUE_UNLIMITED){R.set("totalRecords",P+O.length); | ||
24 | +}Q=(R.getPageRecords())[1];}else{Q=R.startRecordIndex+R.rowsPerPage-1;this.updatePaginator();}if(S<=Q){this.render();}this.fireEvent("rowsAddEvent",{records:O});return ;}else{var M=this.get("renderLoopSize");var K=S+L.length;var J=(K-S);this._oChainRender.add({method:function(W){if((this instanceof G)&&this._sId){var V=W.nCurrentRow,U=W.nCurrentRecord,T=M>0?Math.min(V+M,K):K;for(;V<T;++V,++U){this._addTrEl(O[U],V);}W.nCurrentRow=V;W.nCurrentRecord=U;}},iterations:(M>0)?Math.ceil(K/M):1,argument:{nCurrentRow:S,nCurrentRecord:0},scope:this,timeout:(M>0)?0:-1});this._oChainRender.add({method:function(){this.fireEvent("rowsAddEvent",{records:O});},scope:this,timeout:-1});this._oChainRender.run();this.hideTableMessage();return ;}}}},updateRow:function(O,P){var J,N,M,K;if((O instanceof YAHOO.widget.Record)||(C.isNumber(O))){J=this._oRecordSet.getRecord(O);K=this.getTrEl(J);}else{K=this.getTrEl(O);if(K){J=this.getRecord(K);}}if(J){var L=J.getData();N=YAHOO.widget.DataTable._cloneObject(L);M=this._oRecordSet.updateRecord(J,P);}else{return ;}if(K){this._oChainRender.add({method:function(){if((this instanceof G)&&this._sId){this._updateTrEl(K,M);this.fireEvent("rowUpdateEvent",{record:M,oldData:N});}},scope:this,timeout:(this.get("renderLoopSize")>0)?0:-1});this._oChainRender.run();}else{this.fireEvent("rowUpdateEvent",{record:M,oldData:N});}},deleteRow:function(U){var V;if((U instanceof YAHOO.widget.Record)||(C.isNumber(U))){V=this._oRecordSet.getRecord(U);}else{var K=this.getTrEl(U);if(K){V=this.getRecord(K);}}if(V){var R=V.getId();var T=this._aSelections||[];for(var O=T.length-1;O>-1;O--){if((C.isNumber(T[O])&&(T[O]===R))||((T[O].constructor==Object)&&(T[O].recordId===R))){T.splice(O,1);}}var J=this.getRecordIndex(V);var M=this.getTrIndex(V);var L=this._oRecordSet.deleteRecord(J);if(L){var S=this.get("paginator");if(S instanceof B||this.get("paginated")){var Q;if(S instanceof B){Q=(S.getPageRecords())?(S.getPageRecords())[1]:null;var P=S.get("totalRecords");if(P!==B.VALUE_UNLIMITED){var N=(P-1>0)?P-1:0;S.set("totalRecords",N);}}else{Q=S.startRecordIndex+S.rowsPerPage-1;this.updatePaginator();}if((Q===null)||(J<=Q)){this.render();}}else{if(C.isNumber(M)){this._oChainRender.add({method:function(){if((this instanceof G)&&this._sId){var W=(M==this.getLastTrEl().sectionRowIndex);this._deleteTrEl(M);if(this._elTbody.rows.length===0){this.showTableMessage(G.MSG_EMPTY,G.CLASS_EMPTY);}else{if(M===0){this._setFirstRow();}if(W){this._setLastRow();}if(M!=this._elTbody.rows.length){this._setRowStripes(M);}}}},scope:this,timeout:(this.get("renderLoopSize")>0)?0:-1});}}this._oChainRender.add({method:function(){this.fireEvent("rowDeleteEvent",{recordIndex:J,oldData:L,trElIndex:M});},scope:this,timeout:(this.get("renderLoopSize")>0)?0:-1});this._oChainRender.run();return ;}}return null;},deleteRows:function(P,Q){var a;if((P instanceof YAHOO.widget.Record)||(C.isNumber(P))){a=this._oRecordSet.getRecord(P);}else{var J=this.getTrEl(P);if(J){a=this.getRecord(J);}}if(a){var R=a.getId();var O=this._aSelections||[];for(var W=O.length-1;W>-1;W--){if((C.isNumber(O[W])&&(O[W]===R))||((O[W].constructor==Object)&&(O[W].recordId===R))){O.splice(W,1);}}var N=this.getRecordIndex(a);var M=this.getTrIndex(N);var U=N+1;var b=N;if(Q&&C.isNumber(Q)){U=(Q>0)?N+Q-1:N;b=(Q>0)?N:N+Q+1;Q=(Q>0)?Q:Q*-1;}else{Q=1;}var L=this._oRecordSet.deleteRecords(b,Q);if(L){var Y=this.get("paginator");if(Y instanceof B||this.get("paginated")){var V;if(Y instanceof B){V=(Y.getPageRecords())?(Y.getPageRecords())[1]:null;var T=Y.get("totalRecords");if(T!==B.VALUE_UNLIMITED){var S=(T-Q>0)?T-Q:0;Y.set("totalRecords",S);}}else{V=Y.startRecordIndex+Y.rowsPerPage-1;this.updatePaginator();}if((V===null)||(b<=V)){this.render();}}else{if(C.isNumber(M)){var K=this.get("renderLoopSize");var X=b;var Z=Q;this._oChainRender.add({method:function(e){if((this instanceof G)&&this._sId){var d=e.nCurrentRow,c=(K>0)?(Math.max(d-K,X)-1):X-1;for(;d>c;--d){this._deleteTrEl(d);}e.nCurrentRow=d;}},iterations:(K>0)?Math.ceil(Q/K):1,argument:{nCurrentRow:U},scope:this,timeout:(K>0)?0:-1});this._oChainRender.add({method:function(){if(this._elTbody.rows.length===0){this.showTableMessage(G.MSG_EMPTY,G.CLASS_EMPTY);}else{this._setFirstRow();this._setLastRow();this._setRowStripes();}},scope:this,timeout:-1});}}this._oChainRender.add({method:function(){this.fireEvent("rowsDeleteEvent",{recordIndex:Q,oldData:L,count:M});},scope:this,timeout:(this.get("renderLoopSize")>0)?0:-1});this._oChainRender.run();return ;}}return null;},formatCell:function(M,K,O){if(!(K instanceof YAHOO.widget.Record)){K=this.getRecord(M);}if(!(O instanceof YAHOO.widget.Column)){O=this._oColumnSet.getColumn(M.parentNode.yuiColumnKey);}if(K&&O){var L=O.key;var P=K.getData(L);var N;if(C.isString(O.className)){N=[O.className];}else{if(C.isArray(O.className)){N=O.className;}else{N=[];}}N[N.length]="yui-dt-col-"+L.replace(/[^\w\-.:]/g,"");N[N.length]="yui-dt-col-"+O.getId();N[N.length]=G.CLASS_LINER;if(O.sortable){N[N.length]=G.CLASS_SORTABLE;}if(O.resizeable){N[N.length]=G.CLASS_RESIZEABLE;}if(O.editor){N[N.length]=G.CLASS_EDITABLE;}M.className="";D.addClass(M,N.join(" "));var J=typeof O.formatter==="function"?O.formatter:G.Formatter[O.formatter+""];if(J){J.call(this,M,K,O,P);}else{M.innerHTML=P===undefined||P===null||(typeof P==="number"&&isNaN(P))?"":P.toString();}this.fireEvent("cellFormatEvent",{record:K,column:O,key:L,el:M});}else{}},onPaginatorChange:function(J){var K=this.get("paginationEventHandler");K(J,this);},_aSelections:null,_oAnchorRecord:null,_oAnchorCell:null,_unselectAllTrEls:function(){var J=D.getElementsByClassName(G.CLASS_SELECTED,"tr",this._elTbody);D.removeClass(J,G.CLASS_SELECTED);},_getSelectionTrigger:function(){var M=this.get("selectionMode");var L={};var P,J,K,O,N;if((M=="cellblock")||(M=="cellrange")||(M=="singlecell")){P=this.getLastSelectedCell();if(!P){return null;}else{J=this.getRecord(P.recordId);K=this.getRecordIndex(J);O=this.getTrEl(J);N=this.getTrIndex(O);if(N===null){return null;}else{L.record=J; | ||
25 | +L.recordIndex=K;L.el=this.getTdEl(P);L.trIndex=N;L.column=this.getColumnById(P.columnId);L.colKeyIndex=L.column.getKeyIndex();L.cell=P;return L;}}}else{J=this.getLastSelectedRecord();if(!J){return null;}else{J=this.getRecord(J);K=this.getRecordIndex(J);O=this.getTrEl(J);N=this.getTrIndex(O);if(N===null){return null;}else{L.record=J;L.recordIndex=K;L.el=O;L.trIndex=N;return L;}}}},_getSelectionAnchor:function(L){var K=this.get("selectionMode");var M={};var N,P,J;if((K=="cellblock")||(K=="cellrange")||(K=="singlecell")){var O=this._oAnchorCell;if(!O){if(L){O=this._oAnchorCell=L.cell;}else{return null;}}N=this._oAnchorCell.record;P=this._oRecordSet.getRecordIndex(N);J=this.getTrIndex(N);if(J===null){if(P<this.getRecordIndex(this.getFirstTrEl())){J=0;}else{J=this.getRecordIndex(this.getLastTrEl());}}M.record=N;M.recordIndex=P;M.trIndex=J;M.column=this._oAnchorCell.column;M.colKeyIndex=M.column.getKeyIndex();M.cell=O;return M;}else{N=this._oAnchorRecord;if(!N){if(L){N=this._oAnchorRecord=L.record;}else{return null;}}P=this.getRecordIndex(N);J=this.getTrIndex(N);if(J===null){if(P<this.getRecordIndex(this.getFirstTrEl())){J=0;}else{J=this.getRecordIndex(this.getLastTrEl());}}M.record=N;M.recordIndex=P;M.trIndex=J;return M;}},_handleStandardSelectionByMouse:function(K){var J=K.target;var M=this.getTrEl(J);if(M){var P=K.event;var S=P.shiftKey;var O=P.ctrlKey||((navigator.userAgent.toLowerCase().indexOf("mac")!=-1)&&P.metaKey);var R=this.getRecord(M);var L=this._oRecordSet.getRecordIndex(R);var Q=this._getSelectionAnchor();var N;if(S&&O){if(Q){if(this.isSelected(Q.record)){if(Q.recordIndex<L){for(N=Q.recordIndex+1;N<=L;N++){if(!this.isSelected(N)){this.selectRow(N);}}}else{for(N=Q.recordIndex-1;N>=L;N--){if(!this.isSelected(N)){this.selectRow(N);}}}}else{if(Q.recordIndex<L){for(N=Q.recordIndex+1;N<=L-1;N++){if(this.isSelected(N)){this.unselectRow(N);}}}else{for(N=L+1;N<=Q.recordIndex-1;N++){if(this.isSelected(N)){this.unselectRow(N);}}}this.selectRow(R);}}else{this._oAnchorRecord=R;if(this.isSelected(R)){this.unselectRow(R);}else{this.selectRow(R);}}}else{if(S){this.unselectAllRows();if(Q){if(Q.recordIndex<L){for(N=Q.recordIndex;N<=L;N++){this.selectRow(N);}}else{for(N=Q.recordIndex;N>=L;N--){this.selectRow(N);}}}else{this._oAnchorRecord=R;this.selectRow(R);}}else{if(O){this._oAnchorRecord=R;if(this.isSelected(R)){this.unselectRow(R);}else{this.selectRow(R);}}else{this._handleSingleSelectionByMouse(K);return ;}}}}},_handleStandardSelectionByKey:function(N){var J=I.getCharCode(N);if((J==38)||(J==40)){var L=N.shiftKey;var K=this._getSelectionTrigger();if(!K){return null;}I.stopEvent(N);var M=this._getSelectionAnchor(K);if(L){if((J==40)&&(M.recordIndex<=K.trIndex)){this.selectRow(this.getNextTrEl(K.el));}else{if((J==38)&&(M.recordIndex>=K.trIndex)){this.selectRow(this.getPreviousTrEl(K.el));}else{this.unselectRow(K.el);}}}else{this._handleSingleSelectionByKey(N);}}},_handleSingleSelectionByMouse:function(L){var M=L.target;var K=this.getTrEl(M);if(K){var J=this.getRecord(K);this._oAnchorRecord=J;this.unselectAllRows();this.selectRow(J);}},_handleSingleSelectionByKey:function(M){var J=I.getCharCode(M);if((J==38)||(J==40)){var K=this._getSelectionTrigger();if(!K){return null;}I.stopEvent(M);var L;if(J==38){L=this.getPreviousTrEl(K.el);if(L===null){L=this.getFirstTrEl();}}else{if(J==40){L=this.getNextTrEl(K.el);if(L===null){L=this.getLastTrEl();}}}this.unselectAllRows();this.selectRow(L);this._oAnchorRecord=this.getRecord(L);}},_handleCellBlockSelectionByMouse:function(Z){var a=Z.target;var K=this.getTdEl(a);if(K){var Y=Z.event;var P=Y.shiftKey;var L=Y.ctrlKey||((navigator.userAgent.toLowerCase().indexOf("mac")!=-1)&&Y.metaKey);var R=this.getTrEl(K);var Q=this.getTrIndex(R);var U=this.getColumn(K);var V=U.getKeyIndex();var T=this.getRecord(R);var c=this._oRecordSet.getRecordIndex(T);var O={record:T,column:U};var S=this._getSelectionAnchor();var N=this.getTbodyEl().rows;var M,J,b,X,W;if(P&&L){if(S){if(this.isSelected(S.cell)){if(S.recordIndex===c){if(S.colKeyIndex<V){for(X=S.colKeyIndex+1;X<=V;X++){this.selectCell(R.cells[X]);}}else{if(V<S.colKeyIndex){for(X=V;X<S.colKeyIndex;X++){this.selectCell(R.cells[X]);}}}}else{if(S.recordIndex<c){M=Math.min(S.colKeyIndex,V);J=Math.max(S.colKeyIndex,V);for(X=S.trIndex;X<=Q;X++){for(W=M;W<=J;W++){this.selectCell(N[X].cells[W]);}}}else{M=Math.min(S.trIndex,V);J=Math.max(S.trIndex,V);for(X=S.trIndex;X>=Q;X--){for(W=J;W>=M;W--){this.selectCell(N[X].cells[W]);}}}}}else{if(S.recordIndex===c){if(S.colKeyIndex<V){for(X=S.colKeyIndex+1;X<V;X++){this.unselectCell(R.cells[X]);}}else{if(V<S.colKeyIndex){for(X=V+1;X<S.colKeyIndex;X++){this.unselectCell(R.cells[X]);}}}}if(S.recordIndex<c){for(X=S.trIndex;X<=Q;X++){b=N[X];for(W=0;W<b.cells.length;W++){if(b.sectionRowIndex===S.trIndex){if(W>S.colKeyIndex){this.unselectCell(b.cells[W]);}}else{if(b.sectionRowIndex===Q){if(W<V){this.unselectCell(b.cells[W]);}}else{this.unselectCell(b.cells[W]);}}}}}else{for(X=Q;X<=S.trIndex;X++){b=N[X];for(W=0;W<b.cells.length;W++){if(b.sectionRowIndex==Q){if(W>V){this.unselectCell(b.cells[W]);}}else{if(b.sectionRowIndex==S.trIndex){if(W<S.colKeyIndex){this.unselectCell(b.cells[W]);}}else{this.unselectCell(b.cells[W]);}}}}}this.selectCell(K);}}else{this._oAnchorCell=O;if(this.isSelected(O)){this.unselectCell(O);}else{this.selectCell(O);}}}else{if(P){this.unselectAllCells();if(S){if(S.recordIndex===c){if(S.colKeyIndex<V){for(X=S.colKeyIndex;X<=V;X++){this.selectCell(R.cells[X]);}}else{if(V<S.colKeyIndex){for(X=V;X<=S.colKeyIndex;X++){this.selectCell(R.cells[X]);}}}}else{if(S.recordIndex<c){M=Math.min(S.colKeyIndex,V);J=Math.max(S.colKeyIndex,V);for(X=S.trIndex;X<=Q;X++){for(W=M;W<=J;W++){this.selectCell(N[X].cells[W]);}}}else{M=Math.min(S.colKeyIndex,V);J=Math.max(S.colKeyIndex,V);for(X=Q;X<=S.trIndex;X++){for(W=M;W<=J;W++){this.selectCell(N[X].cells[W]);}}}}}else{this._oAnchorCell=O;this.selectCell(O);}}else{if(L){this._oAnchorCell=O;if(this.isSelected(O)){this.unselectCell(O);}else{this.selectCell(O); | ||
26 | +}}else{this._handleSingleCellSelectionByMouse(Z);}}}}},_handleCellBlockSelectionByKey:function(O){var J=I.getCharCode(O);var T=O.shiftKey;if((J==9)||!T){this._handleSingleCellSelectionByKey(O);return ;}if((J>36)&&(J<41)){var U=this._getSelectionTrigger();if(!U){return null;}I.stopEvent(O);var R=this._getSelectionAnchor(U);var K,S,L,Q,M;var P=this.getTbodyEl().rows;var N=U.el.parentNode;if(J==40){if(R.recordIndex<=U.recordIndex){M=this.getNextTrEl(U.el);if(M){S=R.colKeyIndex;L=U.colKeyIndex;if(S>L){for(K=S;K>=L;K--){Q=M.cells[K];this.selectCell(Q);}}else{for(K=S;K<=L;K++){Q=M.cells[K];this.selectCell(Q);}}}}else{S=Math.min(R.colKeyIndex,U.colKeyIndex);L=Math.max(R.colKeyIndex,U.colKeyIndex);for(K=S;K<=L;K++){this.unselectCell(N.cells[K]);}}}else{if(J==38){if(R.recordIndex>=U.recordIndex){M=this.getPreviousTrEl(U.el);if(M){S=R.colKeyIndex;L=U.colKeyIndex;if(S>L){for(K=S;K>=L;K--){Q=M.cells[K];this.selectCell(Q);}}else{for(K=S;K<=L;K++){Q=M.cells[K];this.selectCell(Q);}}}}else{S=Math.min(R.colKeyIndex,U.colKeyIndex);L=Math.max(R.colKeyIndex,U.colKeyIndex);for(K=S;K<=L;K++){this.unselectCell(N.cells[K]);}}}else{if(J==39){if(R.colKeyIndex<=U.colKeyIndex){if(U.colKeyIndex<N.cells.length-1){S=R.trIndex;L=U.trIndex;if(S>L){for(K=S;K>=L;K--){Q=P[K].cells[U.colKeyIndex+1];this.selectCell(Q);}}else{for(K=S;K<=L;K++){Q=P[K].cells[U.colKeyIndex+1];this.selectCell(Q);}}}}else{S=Math.min(R.trIndex,U.trIndex);L=Math.max(R.trIndex,U.trIndex);for(K=S;K<=L;K++){this.unselectCell(P[K].cells[U.colKeyIndex]);}}}else{if(J==37){if(R.colKeyIndex>=U.colKeyIndex){if(U.colKeyIndex>0){S=R.trIndex;L=U.trIndex;if(S>L){for(K=S;K>=L;K--){Q=P[K].cells[U.colKeyIndex-1];this.selectCell(Q);}}else{for(K=S;K<=L;K++){Q=P[K].cells[U.colKeyIndex-1];this.selectCell(Q);}}}}else{S=Math.min(R.trIndex,U.trIndex);L=Math.max(R.trIndex,U.trIndex);for(K=S;K<=L;K++){this.unselectCell(P[K].cells[U.colKeyIndex]);}}}}}}}},_handleCellRangeSelectionByMouse:function(X){var Y=X.target;var J=this.getTdEl(Y);if(J){var W=X.event;var N=W.shiftKey;var K=W.ctrlKey||((navigator.userAgent.toLowerCase().indexOf("mac")!=-1)&&W.metaKey);var P=this.getTrEl(J);var O=this.getTrIndex(P);var S=this.getColumn(J);var T=S.getKeyIndex();var R=this.getRecord(P);var a=this._oRecordSet.getRecordIndex(R);var M={record:R,column:S};var Q=this._getSelectionAnchor();var L=this.getTbodyEl().rows;var Z,V,U;if(N&&K){if(Q){if(this.isSelected(Q.cell)){if(Q.recordIndex===a){if(Q.colKeyIndex<T){for(V=Q.colKeyIndex+1;V<=T;V++){this.selectCell(P.cells[V]);}}else{if(T<Q.colKeyIndex){for(V=T;V<Q.colKeyIndex;V++){this.selectCell(P.cells[V]);}}}}else{if(Q.recordIndex<a){for(V=Q.colKeyIndex+1;V<P.cells.length;V++){this.selectCell(P.cells[V]);}for(V=Q.trIndex+1;V<O;V++){for(U=0;U<L[V].cells.length;U++){this.selectCell(L[V].cells[U]);}}for(V=0;V<=T;V++){this.selectCell(P.cells[V]);}}else{for(V=T;V<P.cells.length;V++){this.selectCell(P.cells[V]);}for(V=O+1;V<Q.trIndex;V++){for(U=0;U<L[V].cells.length;U++){this.selectCell(L[V].cells[U]);}}for(V=0;V<Q.colKeyIndex;V++){this.selectCell(P.cells[V]);}}}}else{if(Q.recordIndex===a){if(Q.colKeyIndex<T){for(V=Q.colKeyIndex+1;V<T;V++){this.unselectCell(P.cells[V]);}}else{if(T<Q.colKeyIndex){for(V=T+1;V<Q.colKeyIndex;V++){this.unselectCell(P.cells[V]);}}}}if(Q.recordIndex<a){for(V=Q.trIndex;V<=O;V++){Z=L[V];for(U=0;U<Z.cells.length;U++){if(Z.sectionRowIndex===Q.trIndex){if(U>Q.colKeyIndex){this.unselectCell(Z.cells[U]);}}else{if(Z.sectionRowIndex===O){if(U<T){this.unselectCell(Z.cells[U]);}}else{this.unselectCell(Z.cells[U]);}}}}}else{for(V=O;V<=Q.trIndex;V++){Z=L[V];for(U=0;U<Z.cells.length;U++){if(Z.sectionRowIndex==O){if(U>T){this.unselectCell(Z.cells[U]);}}else{if(Z.sectionRowIndex==Q.trIndex){if(U<Q.colKeyIndex){this.unselectCell(Z.cells[U]);}}else{this.unselectCell(Z.cells[U]);}}}}}this.selectCell(J);}}else{this._oAnchorCell=M;if(this.isSelected(M)){this.unselectCell(M);}else{this.selectCell(M);}}}else{if(N){this.unselectAllCells();if(Q){if(Q.recordIndex===a){if(Q.colKeyIndex<T){for(V=Q.colKeyIndex;V<=T;V++){this.selectCell(P.cells[V]);}}else{if(T<Q.colKeyIndex){for(V=T;V<=Q.colKeyIndex;V++){this.selectCell(P.cells[V]);}}}}else{if(Q.recordIndex<a){for(V=Q.trIndex;V<=O;V++){Z=L[V];for(U=0;U<Z.cells.length;U++){if(Z.sectionRowIndex==Q.trIndex){if(U>=Q.colKeyIndex){this.selectCell(Z.cells[U]);}}else{if(Z.sectionRowIndex==O){if(U<=T){this.selectCell(Z.cells[U]);}}else{this.selectCell(Z.cells[U]);}}}}}else{for(V=O;V<=Q.trIndex;V++){Z=L[V];for(U=0;U<Z.cells.length;U++){if(Z.sectionRowIndex==O){if(U>=T){this.selectCell(Z.cells[U]);}}else{if(Z.sectionRowIndex==Q.trIndex){if(U<=Q.colKeyIndex){this.selectCell(Z.cells[U]);}}else{this.selectCell(Z.cells[U]);}}}}}}}else{this._oAnchorCell=M;this.selectCell(M);}}else{if(K){this._oAnchorCell=M;if(this.isSelected(M)){this.unselectCell(M);}else{this.selectCell(M);}}else{this._handleSingleCellSelectionByMouse(X);}}}}},_handleCellRangeSelectionByKey:function(N){var J=I.getCharCode(N);var R=N.shiftKey;if((J==9)||!R){this._handleSingleCellSelectionByKey(N);return ;}if((J>36)&&(J<41)){var S=this._getSelectionTrigger();if(!S){return null;}I.stopEvent(N);var Q=this._getSelectionAnchor(S);var K,L,P;var O=this.getTbodyEl().rows;var M=S.el.parentNode;if(J==40){L=this.getNextTrEl(S.el);if(Q.recordIndex<=S.recordIndex){for(K=S.colKeyIndex+1;K<M.cells.length;K++){P=M.cells[K];this.selectCell(P);}if(L){for(K=0;K<=S.colKeyIndex;K++){P=L.cells[K];this.selectCell(P);}}}else{for(K=S.colKeyIndex;K<M.cells.length;K++){this.unselectCell(M.cells[K]);}if(L){for(K=0;K<S.colKeyIndex;K++){this.unselectCell(L.cells[K]);}}}}else{if(J==38){L=this.getPreviousTrEl(S.el);if(Q.recordIndex>=S.recordIndex){for(K=S.colKeyIndex-1;K>-1;K--){P=M.cells[K];this.selectCell(P);}if(L){for(K=M.cells.length-1;K>=S.colKeyIndex;K--){P=L.cells[K];this.selectCell(P);}}}else{for(K=S.colKeyIndex;K>-1;K--){this.unselectCell(M.cells[K]);}if(L){for(K=M.cells.length-1;K>S.colKeyIndex;K--){this.unselectCell(L.cells[K]);}}}}else{if(J==39){L=this.getNextTrEl(S.el);if(Q.recordIndex<S.recordIndex){if(S.colKeyIndex<M.cells.length-1){P=M.cells[S.colKeyIndex+1]; | ||
27 | +this.selectCell(P);}else{if(L){P=L.cells[0];this.selectCell(P);}}}else{if(Q.recordIndex>S.recordIndex){this.unselectCell(M.cells[S.colKeyIndex]);if(S.colKeyIndex<M.cells.length-1){}else{}}else{if(Q.colKeyIndex<=S.colKeyIndex){if(S.colKeyIndex<M.cells.length-1){P=M.cells[S.colKeyIndex+1];this.selectCell(P);}else{if(S.trIndex<O.length-1){P=L.cells[0];this.selectCell(P);}}}else{this.unselectCell(M.cells[S.colKeyIndex]);}}}}else{if(J==37){L=this.getPreviousTrEl(S.el);if(Q.recordIndex<S.recordIndex){this.unselectCell(M.cells[S.colKeyIndex]);if(S.colKeyIndex>0){}else{}}else{if(Q.recordIndex>S.recordIndex){if(S.colKeyIndex>0){P=M.cells[S.colKeyIndex-1];this.selectCell(P);}else{if(S.trIndex>0){P=L.cells[L.cells.length-1];this.selectCell(P);}}}else{if(Q.colKeyIndex>=S.colKeyIndex){if(S.colKeyIndex>0){P=M.cells[S.colKeyIndex-1];this.selectCell(P);}else{if(S.trIndex>0){P=L.cells[L.cells.length-1];this.selectCell(P);}}}else{this.unselectCell(M.cells[S.colKeyIndex]);if(S.colKeyIndex>0){}else{}}}}}}}}}},_handleSingleCellSelectionByMouse:function(O){var P=O.target;var L=this.getTdEl(P);if(L){var K=this.getTrEl(L);var J=this.getRecord(K);var N=this.getColumn(L);var M={record:J,column:N};this._oAnchorCell=M;this.unselectAllCells();this.selectCell(M);}},_handleSingleCellSelectionByKey:function(N){var J=I.getCharCode(N);if((J==9)||((J>36)&&(J<41))){var L=N.shiftKey;var K=this._getSelectionTrigger();if(!K){return null;}var M;if(J==40){M=this.getBelowTdEl(K.el);if(M===null){M=K.el;}}else{if(J==38){M=this.getAboveTdEl(K.el);if(M===null){M=K.el;}}else{if((J==39)||(!L&&(J==9))){M=this.getNextTdEl(K.el);if(M===null){return ;}}else{if((J==37)||(L&&(J==9))){M=this.getPreviousTdEl(K.el);if(M===null){return ;}}}}}I.stopEvent(N);this.unselectAllCells();this.selectCell(M);this._oAnchorCell={record:this.getRecord(M),column:this.getColumn(M)};}},getSelectedTrEls:function(){return D.getElementsByClassName(G.CLASS_SELECTED,"tr",this._elTbody);},selectRow:function(P){var O,J;if(P instanceof YAHOO.widget.Record){O=this._oRecordSet.getRecord(P);J=this.getTrEl(O);}else{if(C.isNumber(P)){O=this.getRecord(P);J=this.getTrEl(O);}else{J=this.getTrEl(P);O=this.getRecord(J);}}if(O){var N=this._aSelections||[];var M=O.getId();var L=-1;if(N.indexOf){L=N.indexOf(M);}else{for(var K=N.length-1;K>-1;K--){if(N[K]===M){L=K;break;}}}if(L>-1){N.splice(L,1);}N.push(M);this._aSelections=N;if(!this._oAnchorRecord){this._oAnchorRecord=O;}if(J){D.addClass(J,G.CLASS_SELECTED);}this.fireEvent("rowSelectEvent",{record:O,el:J});}else{}},unselectRow:function(Q){var J=this.getTrEl(Q);var P;if(Q instanceof YAHOO.widget.Record){P=this._oRecordSet.getRecord(Q);}else{if(C.isNumber(Q)){P=this.getRecord(Q);}else{P=this.getRecord(J);}}if(P){var O=this._aSelections||[];var M=P.getId();var L=-1;var N=false;if(O.indexOf){L=O.indexOf(M);}else{for(var K=O.length-1;K>-1;K--){if(O[K]===M){L=K;break;}}}if(L>-1){O.splice(L,1);}if(N){this._aSelections=O;D.removeClass(J,G.CLASS_SELECTED);this.fireEvent("rowUnselectEvent",{record:P,el:J});return ;}D.removeClass(J,G.CLASS_SELECTED);this.fireEvent("rowUnselectEvent",{record:P,el:J});}},unselectAllRows:function(){var K=this._aSelections||[];for(var J=K.length-1;J>-1;J--){if(C.isString(K[J])){K.splice(J,1);}}this._aSelections=K;this._unselectAllTrEls();this.fireEvent("unselectAllRowsEvent");},_unselectAllTdEls:function(){var J=D.getElementsByClassName(G.CLASS_SELECTED,"td",this._elTbody);D.removeClass(J,G.CLASS_SELECTED);},getSelectedTdEls:function(){return D.getElementsByClassName(G.CLASS_SELECTED,"td",this._elTbody);},selectCell:function(J){var P=this.getTdEl(J);if(P){var O=this.getRecord(P);var N=P.yuiColumnId;if(O&&N){var M=this._aSelections||[];var L=O.getId();for(var K=M.length-1;K>-1;K--){if((M[K].recordId===L)&&(M[K].columnId===N)){M.splice(K,1);break;}}M.push({recordId:L,columnId:N});this._aSelections=M;if(!this._oAnchorCell){this._oAnchorCell={record:O,column:this.getColumnById(N)};}D.addClass(P,G.CLASS_SELECTED);this.fireEvent("cellSelectEvent",{record:O,column:this.getColumnById(N),key:P.yuiColumnKey,el:P});return ;}}},unselectCell:function(J){var O=this.getTdEl(J);if(O){var N=this.getRecord(O);var M=O.yuiColumnId;if(N&&M){var L=this._aSelections||[];var P=N.getId();for(var K=L.length-1;K>-1;K--){if((L[K].recordId===P)&&(L[K].columnId===M)){L.splice(K,1);this._aSelections=L;D.removeClass(O,G.CLASS_SELECTED);this.fireEvent("cellUnselectEvent",{record:N,column:this.getColumnById(M),key:O.yuiColumnKey,el:O});return ;}}}}},unselectAllCells:function(){var K=this._aSelections||[];for(var J=K.length-1;J>-1;J--){if(K[J].constructor==Object){K.splice(J,1);}}this._aSelections=K;this._unselectAllTdEls();this.fireEvent("unselectAllCellsEvent");},isSelected:function(O){if(O&&(O.ownerDocument==document)){return(D.hasClass(this.getTdEl(O),G.CLASS_SELECTED)||D.hasClass(this.getTrEl(O),G.CLASS_SELECTED));}else{var N,K,J;var M=this._aSelections;if(M&&M.length>0){if(O instanceof YAHOO.widget.Record){N=O;}else{if(C.isNumber(O)){N=this.getRecord(O);}}if(N){K=N.getId();if(M.indexOf){if(M.indexOf(K)>-1){return true;}}else{for(J=M.length-1;J>-1;J--){if(M[J]===K){return true;}}}}else{if(O.record&&O.column){K=O.record.getId();var L=O.column.getId();for(J=M.length-1;J>-1;J--){if((M[J].recordId===K)&&(M[J].columnId===L)){return true;}}}}}}return false;},getSelectedRows:function(){var J=[];var L=this._aSelections||[];for(var K=0;K<L.length;K++){if(C.isString(L[K])){J.push(L[K]);}}return J;},getSelectedCells:function(){var K=[];var L=this._aSelections||[];for(var J=0;J<L.length;J++){if(L[J]&&(L[J].constructor==Object)){K.push(L[J]);}}return K;},getLastSelectedRecord:function(){var K=this._aSelections;if(K&&K.length>0){for(var J=K.length-1;J>-1;J--){if(C.isString(K[J])){return K[J];}}}},getLastSelectedCell:function(){var K=this._aSelections;if(K&&K.length>0){for(var J=K.length-1;J>-1;J--){if(K[J].recordId&&K[J].columnId){return K[J];}}}},highlightRow:function(L){var J=this.getTrEl(L);if(J){var K=this.getRecord(J);D.addClass(J,G.CLASS_HIGHLIGHTED); | ||
28 | +this.fireEvent("rowHighlightEvent",{record:K,el:J});return ;}},unhighlightRow:function(L){var J=this.getTrEl(L);if(J){var K=this.getRecord(J);D.removeClass(J,G.CLASS_HIGHLIGHTED);this.fireEvent("rowUnhighlightEvent",{record:K,el:J});return ;}},highlightCell:function(J){var M=this.getTdEl(J);if(M){var L=this.getRecord(M);var K=M.yuiColumnId;D.addClass(M,G.CLASS_HIGHLIGHTED);this.fireEvent("cellHighlightEvent",{record:L,column:this.getColumnById(K),key:M.yuiColumnKey,el:M});return ;}},unhighlightCell:function(J){var L=this.getTdEl(J);if(L){var K=this.getRecord(L);D.removeClass(L,G.CLASS_HIGHLIGHTED);this.fireEvent("cellUnhighlightEvent",{record:K,column:this.getColumnById(L.yuiColumnId),key:L.yuiColumnKey,el:L});return ;}},showCellEditor:function(N,L,P){N=D.get(N);if(N&&(N.ownerDocument===document)){if(!L||!(L instanceof YAHOO.widget.Record)){L=this.getRecord(N);}if(!P||!(P instanceof YAHOO.widget.Column)){P=this.getColumn(N);}if(L&&P){var M=this._oCellEditor;if(M.isActive){this.cancelCellEditor();}if(!P.editor){return ;}M.cell=N;M.record=L;M.column=P;M.validator=(P.editorOptions&&C.isFunction(P.editorOptions.validator))?P.editorOptions.validator:null;M.value=L.getData(P.key);M.defaultValue=null;var O=M.container;var J=D.getX(N);var Q=D.getY(N);if(isNaN(J)||isNaN(Q)){J=N.offsetLeft+D.getX(this._elTbody.parentNode)-this._elTbody.scrollLeft;Q=N.offsetTop+D.getY(this._elTbody.parentNode)-this._elTbody.scrollTop+this._elThead.offsetHeight;}O.style.left=J+"px";O.style.top=Q+"px";this.doBeforeShowCellEditor(this._oCellEditor);O.style.display="";I.addListener(O,"keydown",function(S,R){if((S.keyCode==27)){R.cancelCellEditor();R.focusTbodyEl();}else{R.fireEvent("editorKeydownEvent",{editor:R._oCellEditor,event:S});}},this);var K;if(C.isString(P.editor)){switch(P.editor){case"checkbox":K=G.editCheckbox;break;case"date":K=G.editDate;break;case"dropdown":K=G.editDropdown;break;case"radio":K=G.editRadio;break;case"textarea":K=G.editTextarea;break;case"textbox":K=G.editTextbox;break;default:K=null;}}else{if(C.isFunction(P.editor)){K=P.editor;}}if(K){K(this._oCellEditor,this);if(!P.editorOptions||!P.editorOptions.disableBtns){this.showCellEditorBtns(O);}M.isActive=true;this.fireEvent("editorShowEvent",{editor:M});return ;}}}},doBeforeShowCellEditor:function(J){},showCellEditorBtns:function(L){var M=L.appendChild(document.createElement("div"));D.addClass(M,G.CLASS_BUTTON);var K=M.appendChild(document.createElement("button"));D.addClass(K,G.CLASS_DEFAULT);K.innerHTML="OK";I.addListener(K,"click",function(O,N){N.onEventSaveCellEditor(O,N);N.focusTbodyEl();},this,true);var J=M.appendChild(document.createElement("button"));J.innerHTML="Cancel";I.addListener(J,"click",function(O,N){N.onEventCancelCellEditor(O,N);N.focusTbodyEl();},this,true);},resetCellEditor:function(){var J=this._oCellEditor.container;J.style.display="none";I.purgeElement(J,true);J.innerHTML="";this._oCellEditor.value=null;this._oCellEditor.isActive=false;},saveCellEditor:function(){if(this._oCellEditor.isActive){var J=this._oCellEditor.value;var K=YAHOO.widget.DataTable._cloneObject(this._oCellEditor.record.getData(this._oCellEditor.column.key));if(this._oCellEditor.validator){J=this._oCellEditor.value=this._oCellEditor.validator.call(this,J,K,this._oCellEditor);if(J===null){this.resetCellEditor();this.fireEvent("editorRevertEvent",{editor:this._oCellEditor,oldData:K,newData:J});return ;}}this._oRecordSet.updateRecordValue(this._oCellEditor.record,this._oCellEditor.column.key,this._oCellEditor.value);this.formatCell(this._oCellEditor.cell.firstChild);this._oChainRender.add({method:function(){this._syncColWidths();},scope:this});this._oChainRender.run();this.resetCellEditor();this.fireEvent("editorSaveEvent",{editor:this._oCellEditor,oldData:K,newData:J});}else{}},cancelCellEditor:function(){if(this._oCellEditor.isActive){this.resetCellEditor();this.fireEvent("editorCancelEvent",{editor:this._oCellEditor});}else{}},doBeforeLoadData:function(J,K,L){return true;},onEventSortColumn:function(L){var J=L.event;var N=L.target;var K=this.getThEl(N)||this.getTdEl(N);if(K&&K.yuiColumnKey){var M=this.getColumn(K.yuiColumnKey);if(M.sortable){I.stopEvent(J);this.sortColumn(M);}}else{}},onEventSelectColumn:function(J){this.selectColumn(J.target);},onEventHighlightColumn:function(J){if(!D.isAncestor(J.target,I.getRelatedTarget(J.event))){this.highlightColumn(J.target);}},onEventUnhighlightColumn:function(J){if(!D.isAncestor(J.target,I.getRelatedTarget(J.event))){this.unhighlightColumn(J.target);}},onEventSelectRow:function(K){var J=this.get("selectionMode");if(J=="single"){this._handleSingleSelectionByMouse(K);}else{this._handleStandardSelectionByMouse(K);}},onEventSelectCell:function(K){var J=this.get("selectionMode");if(J=="cellblock"){this._handleCellBlockSelectionByMouse(K);}else{if(J=="cellrange"){this._handleCellRangeSelectionByMouse(K);}else{this._handleSingleCellSelectionByMouse(K);}}},onEventHighlightRow:function(J){if(!D.isAncestor(J.target,I.getRelatedTarget(J.event))){this.highlightRow(J.target);}},onEventUnhighlightRow:function(J){if(!D.isAncestor(J.target,I.getRelatedTarget(J.event))){this.unhighlightRow(J.target);}},onEventHighlightCell:function(J){if(!D.isAncestor(J.target,I.getRelatedTarget(J.event))){this.highlightCell(J.target);}},onEventUnhighlightCell:function(J){if(!D.isAncestor(J.target,I.getRelatedTarget(J.event))){this.unhighlightCell(J.target);}},onEventFormatCell:function(J){var M=J.target;var K=this.getTdEl(M);if(K&&K.yuiColumnKey){var L=this.getColumn(K.yuiColumnKey);this.formatCell(K.firstChild,this.getRecord(K),L);}else{}},onEventShowCellEditor:function(J){var L=J.target;var K=this.getTdEl(L);if(K){this.showCellEditor(K);}else{}},onEventSaveCellEditor:function(J){this.saveCellEditor();},onEventCancelCellEditor:function(J){this.cancelCellEditor();},onDataReturnInitializeTable:function(J,K,L){this.initializeTable();this.onDataReturnSetRows(J,K,L);},onDataReturnAppendRows:function(L,M,N){this.fireEvent("dataReturnEvent",{request:L,response:M,payload:N}); | ||
29 | +var K=this.doBeforeLoadData(L,M,N);if(K&&M&&!M.error&&C.isArray(M.results)){this.addRows(M.results);this._handleDataReturnPayload(L,M,this._mergeResponseMeta(N,M.meta));var J=this.get("paginator");if(J&&J instanceof B&&J.get("totalRecords")<this._oRecordSet.getLength()){J.set("totalRecords",this._oRecordSet.getLength());}}else{if(K&&M.error){this.showTableMessage(G.MSG_ERROR,G.CLASS_ERROR);}}},onDataReturnInsertRows:function(L,M,O){this.fireEvent("dataReturnEvent",{request:L,response:M,payload:O});var K=this.doBeforeLoadData(L,M,O);if(K&&M&&!M.error&&C.isArray(M.results)){var N=this._mergeResponseMeta({recordInsertIndex:(O?O.insertIndex||0:0)},O,M.meta);this.addRows(M.results,N.insertIndex);this._handleDataReturnPayload(L,M,N);var J=this.get("paginator");if(J&&J instanceof B&&J.get("totalRecords")<this._oRecordSet.getLength()){J.set("totalRecords",this._oRecordSet.getLength());}}else{if(K&&M.error){this.showTableMessage(G.MSG_ERROR,G.CLASS_ERROR);}}},onDataReturnSetRows:function(M,L,O){this.fireEvent("dataReturnEvent",{request:M,response:L,payload:O});var K=this.doBeforeLoadData(M,L,O);if(K&&L&&!L.error&&C.isArray(L.results)){var J=this.get("paginator");if(!(J instanceof B)){J=null;}var N=this._mergeResponseMeta({recordStartIndex:O?O.startIndex:null},O,L.meta);if(!C.isNumber(N.recordStartIndex)){N.recordStartIndex=J&&N.pagination?N.pagination.recordOffset||0:0;}this._oRecordSet.setRecords(L.results,N.recordStartIndex);this._handleDataReturnPayload(M,L,N);if(J&&J.get("totalRecords")<this._oRecordSet.getLength()){J.set("totalRecords",this._oRecordSet.getLength());}this.render();}else{if(K&&L.error){this.showTableMessage(G.MSG_ERROR,G.CLASS_ERROR);}}},_mergeResponseMeta:function(){var O={},K=arguments,N=0,J=K.length,L,P;for(;N<J;++N){P=K[N];if(C.isObject(P)){for(L in P){if(C.hasOwnProperty(P,L)){if(L.indexOf("pagination")===0&&L.charAt(10)){if(!O.pagination){O.pagination={};}O.pagination[L.substr(10,1).toLowerCase()+L.substr(11)]=P[L];}else{if(/^sort(Key|Dir)/.test(L)){if(!O.sorting){var M=this.get("sortedBy");O.sorting=M?{key:M.key}:{};}O.sorting[RegExp.$1.toLowerCase()]=P[L];}else{O[L]=P[L];}}}}}}return O;},_handleDataReturnPayload:function(L,K,M){if(M){var J=this.get("paginator");if(J instanceof B){if(!C.isUndefined(M.totalRecords)){J.set("totalRecords",parseInt(M.totalRecords,10)|0);}if(C.isObject(M.pagination)){J.set("rowsPerPage",M.pagination.rowsPerPage);J.set("recordOffset",M.pagination.recordOffset);}}if(M.sorting){this.set("sortedBy",M.sorting);}}},getBody:function(){return this.getTbodyEl();},getCell:function(J){return this.getTdEl(J);},getRow:function(J){return this.getTrEl(J);},refreshView:function(){this.render();},select:function(K){if(!C.isArray(K)){K=[K];}for(var J=0;J<K.length;J++){this.selectRow(K[J]);}},updatePaginator:function(K){var M=this.get("paginator");var J=M.currentPage;for(var L in K){if(C.hasOwnProperty(M,L)){M[L]=K[L];}}M.totalRecords=this._oRecordSet.getLength();M.rowsThisPage=Math.min(M.rowsPerPage,M.totalRecords);M.totalPages=Math.ceil(M.totalRecords/M.rowsThisPage);if(isNaN(M.totalPages)){M.totalPages=0;}if(M.currentPage>M.totalPages){if(M.totalPages<1){M.currentPage=1;}else{M.currentPage=M.totalPages;}}if(M.currentPage!==J){M.startRecordIndex=(M.currentPage-1)*M.rowsPerPage;}this.set("paginator",M);return this.get("paginator");},showPage:function(K){var J=this.get("paginator");if(!C.isNumber(K)||(K<1)){if(J instanceof B){if(!J.hasPage(K)){K=1;}}else{if(K>J.totalPages){K=1;}}}if(J instanceof B){J.setPage(K);}else{this.updatePaginator({currentPage:K});this.render();}},formatPaginators:function(){var K=this.get("paginator");if(K instanceof B){K.update();return ;}var J;var L=false;if(K.pageLinks>-1){for(J=0;J<K.links.length;J++){this.formatPaginatorLinks(K.links[J],K.currentPage,K.pageLinksStart,K.pageLinks,K.totalPages);}}for(J=0;J<K.dropdowns.length;J++){if(K.dropdownOptions){L=true;this.formatPaginatorDropdown(K.dropdowns[J],K.dropdownOptions);}else{K.dropdowns[J].style.display="none";}}if(L&&A.opera){document.body.style+="";}},formatPaginatorDropdown:function(O,N){if(O&&(O.ownerDocument==document)){while(O.firstChild){O.removeChild(O.firstChild);}for(var L=0;L<N.length;L++){var P=N[L];var J=document.createElement("option");J.value=(C.isValue(P.value))?P.value:P;J.innerHTML=(C.isValue(P.text))?P.text:P;J=O.appendChild(J);}var K=O.options;if(K.length){for(var M=K.length-1;M>-1;M--){if((this.get("paginator").rowsPerPage+"")===K[M].value){K[M].selected=true;}}}O.style.display="";return ;}},formatPaginatorLinks:function(N,J,W,M,T){if(N&&(N.ownerDocument==document)&&C.isNumber(J)&&C.isNumber(W)&&C.isNumber(T)){var P=(J==1)?true:false;var K=(J==T)?true:false;var R=(P)?' <span class="'+G.CLASS_DISABLED+" "+G.CLASS_FIRST+'"><<</span> ':' <a href="#" class="'+G.CLASS_FIRST+'"><<</a> ';var U=(P)?' <span class="'+G.CLASS_DISABLED+" "+G.CLASS_PREVIOUS+'"><</span> ':' <a href="#" class="'+G.CLASS_PREVIOUS+'"><</a> ';var X=(K)?' <span class="'+G.CLASS_DISABLED+" "+G.CLASS_NEXT+'">></span> ':' <a href="#" class="'+G.CLASS_NEXT+'">></a> ';var L=(K)?' <span class="'+G.CLASS_DISABLED+" "+G.CLASS_LAST+'">>></span> ':' <a href="#" class="'+G.CLASS_LAST+'">>></a> ';var Q=R+U;var Y=T;var S=1;var V=T;if(M>0){Y=(W+M<T)?W+M-1:T;S=(J-Math.floor(Y/2)>0)?J-Math.floor(Y/2):1;V=(J+Math.floor(Y/2)<=T)?J+Math.floor(Y/2):T;if(S===1){V=Y;}else{if(V===T){S=T-Y+1;}}if(V-S===Y){V--;}}for(var O=S;O<=V;O++){if(O!=J){Q+=' <a href="#" class="'+G.CLASS_PAGE+'">'+O+"</a> ";}else{Q+=' <span class="'+G.CLASS_SELECTED+'">'+O+"</span>";}}Q+=X+L;N.innerHTML=Q;return ;}},_onPaginatorLinkClick:function(L,K){var M=I.getTarget(L);var J=M.nodeName.toLowerCase();if(K._oCellEditor&&K._oCellEditor.isActive){K.fireEvent("editorBlurEvent",{editor:K._oCellEditor});}while(M&&(J!="table")){switch(J){case"body":return ;case"a":I.stopEvent(L);switch(M.className){case G.CLASS_PAGE:K.showPage(parseInt(M.innerHTML,10));return ;case G.CLASS_FIRST:K.showPage(1);return ;case G.CLASS_LAST:K.showPage(K.get("paginator").totalPages); | ||
30 | +return ;case G.CLASS_PREVIOUS:K.showPage(K.get("paginator").currentPage-1);return ;case G.CLASS_NEXT:K.showPage(K.get("paginator").currentPage+1);return ;}break;default:return ;}M=M.parentNode;if(M){J=M.nodeName.toLowerCase();}else{return ;}}},_onPaginatorDropdownChange:function(N,K){var O=I.getTarget(N);var M=O[O.selectedIndex].value;var J=C.isValue(parseInt(M,10))?parseInt(M,10):null;if(J!==null){var L=(K.get("paginator").currentPage-1)*J;K.updatePaginator({rowsPerPage:J,startRecordIndex:L});K.render();}else{}},onEventEditCell:function(J){this.onEventShowCellEditor(J);},onDataReturnReplaceRows:function(J,K){this.onDataReturnInitializeTable(J,K);}});G.prototype.onDataReturnSetRecords=G.prototype.onDataReturnSetRows;})();YAHOO.register("datatable",YAHOO.widget.DataTable,{version:"2.5.2",build:"1076"}); | ||
31 | +<?php if(extension_loaded('zlib')){ob_end_flush();}?> | ||
0 | \ No newline at end of file | 32 | \ No newline at end of file |
@@ -0,0 +1,10 @@ | @@ -0,0 +1,10 @@ | ||
1 | +<?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?> | ||
2 | +/* | ||
3 | +Copyright (c) 2008, Yahoo! Inc. All rights reserved. | ||
4 | +Code licensed under the BSD License: | ||
5 | +http://developer.yahoo.net/yui/license.txt | ||
6 | +version: 2.5.2 | ||
7 | +*/ | ||
8 | +(function(){var B=YAHOO.util,K,I,J={},F={},M=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var C=YAHOO.env.ua.opera,L=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var N=function(P){if(!E.HYPHEN.test(P)){return P;}if(J[P]){return J[P];}var Q=P;while(E.HYPHEN.exec(Q)){Q=Q.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}J[P]=Q;return Q;};var O=function(Q){var P=F[Q];if(!P){P=new RegExp("(?:^|\\s+)"+Q+"(?:\\s+|$)");F[Q]=P;}return P;};if(M.defaultView&&M.defaultView.getComputedStyle){K=function(P,S){var R=null;if(S=="float"){S="cssFloat";}var Q=P.ownerDocument.defaultView.getComputedStyle(P,"");if(Q){R=Q[N(S)];}return P.style[S]||R;};}else{if(M.documentElement.currentStyle&&G){K=function(P,R){switch(N(R)){case"opacity":var T=100;try{T=P.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(S){try{T=P.filters("alpha").opacity;}catch(S){}}return T/100;case"float":R="styleFloat";default:var Q=P.currentStyle?P.currentStyle[R]:null;return(P.style[R]||Q);}};}else{K=function(P,Q){return P.style[Q];};}}if(G){I=function(P,Q,R){switch(Q){case"opacity":if(YAHOO.lang.isString(P.style.filter)){P.style.filter="alpha(opacity="+R*100+")";if(!P.currentStyle||!P.currentStyle.hasLayout){P.style.zoom=1;}}break;case"float":Q="styleFloat";default:P.style[Q]=R;}};}else{I=function(P,Q,R){if(Q=="float"){Q="cssFloat";}P.style[Q]=R;};}var D=function(P,Q){return P&&P.nodeType==1&&(!Q||Q(P));};YAHOO.util.Dom={get:function(R){if(R&&(R.nodeType||R.item)){return R;}if(YAHOO.lang.isString(R)||!R){return M.getElementById(R);}if(R.length!==undefined){var S=[];for(var Q=0,P=R.length;Q<P;++Q){S[S.length]=B.Dom.get(R[Q]);}return S;}return R;},getStyle:function(P,R){R=N(R);var Q=function(S){return K(S,R);};return B.Dom.batch(P,Q,B.Dom,true);},setStyle:function(P,R,S){R=N(R);var Q=function(T){I(T,R,S);};B.Dom.batch(P,Q,B.Dom,true);},getXY:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false;}return H(R);};return B.Dom.batch(P,Q,B.Dom,true);},getX:function(P){var Q=function(R){return B.Dom.getXY(R)[0];};return B.Dom.batch(P,Q,B.Dom,true);},getY:function(P){var Q=function(R){return B.Dom.getXY(R)[1];};return B.Dom.batch(P,Q,B.Dom,true);},setXY:function(P,S,R){var Q=function(V){var U=this.getStyle(V,"position");if(U=="static"){this.setStyle(V,"position","relative");U="relative";}var X=this.getXY(V);if(X===false){return false;}var W=[parseInt(this.getStyle(V,"left"),10),parseInt(this.getStyle(V,"top"),10)];if(isNaN(W[0])){W[0]=(U=="relative")?0:V.offsetLeft;}if(isNaN(W[1])){W[1]=(U=="relative")?0:V.offsetTop;}if(S[0]!==null){V.style.left=S[0]-X[0]+W[0]+"px";}if(S[1]!==null){V.style.top=S[1]-X[1]+W[1]+"px";}if(!R){var T=this.getXY(V);if((S[0]!==null&&T[0]!=S[0])||(S[1]!==null&&T[1]!=S[1])){this.setXY(V,S,true);}}};B.Dom.batch(P,Q,B.Dom,true);},setX:function(Q,P){B.Dom.setXY(Q,[P,null]);},setY:function(P,Q){B.Dom.setXY(P,[null,Q]);},getRegion:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false;}var S=B.Region.getRegion(R);return S;};return B.Dom.batch(P,Q,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(T,X,U,V){X=X||"*";U=(U)?B.Dom.get(U):null||M;if(!U){return[];}var Q=[],P=U.getElementsByTagName(X),W=O(T);for(var R=0,S=P.length;R<S;++R){if(W.test(P[R].className)){Q[Q.length]=P[R];if(V){V.call(P[R],P[R]);}}}return Q;},hasClass:function(R,Q){var P=O(Q);var S=function(T){return P.test(T.className);};return B.Dom.batch(R,S,B.Dom,true);},addClass:function(Q,P){var R=function(S){if(this.hasClass(S,P)){return false;}S.className=YAHOO.lang.trim([S.className,P].join(" "));return true;};return B.Dom.batch(Q,R,B.Dom,true);},removeClass:function(R,Q){var P=O(Q);var S=function(T){if(!Q||!this.hasClass(T,Q)){return false;}var U=T.className;T.className=U.replace(P," ");if(this.hasClass(T,Q)){this.removeClass(T,Q);}T.className=YAHOO.lang.trim(T.className);return true;};return B.Dom.batch(R,S,B.Dom,true);},replaceClass:function(S,Q,P){if(!P||Q===P){return false;}var R=O(Q);var T=function(U){if(!this.hasClass(U,Q)){this.addClass(U,P);return true;}U.className=U.className.replace(R," "+P+" ");if(this.hasClass(U,Q)){this.replaceClass(U,Q,P);}U.className=YAHOO.lang.trim(U.className);return true;};return B.Dom.batch(S,T,B.Dom,true);},generateId:function(P,R){R=R||"yui-gen";var Q=function(S){if(S&&S.id){return S.id;}var T=R+YAHOO.env._id_counter++;if(S){S.id=T;}return T;};return B.Dom.batch(P,Q,B.Dom,true)||Q.apply(B.Dom,arguments);},isAncestor:function(P,Q){P=B.Dom.get(P);Q=B.Dom.get(Q);if(!P||!Q){return false;}if(P.contains&&Q.nodeType&&!L){return P.contains(Q);}else{if(P.compareDocumentPosition&&Q.nodeType){return !!(P.compareDocumentPosition(Q)&16);}else{if(Q.nodeType){return !!this.getAncestorBy(Q,function(R){return R==P;});}}}return false;},inDocument:function(P){return this.isAncestor(M.documentElement,P);},getElementsBy:function(W,Q,R,T){Q=Q||"*";R=(R)?B.Dom.get(R):null||M;if(!R){return[];}var S=[],V=R.getElementsByTagName(Q);for(var U=0,P=V.length;U<P;++U){if(W(V[U])){S[S.length]=V[U];if(T){T(V[U]);}}}return S;},batch:function(T,W,V,R){T=(T&&(T.tagName||T.item))?T:B.Dom.get(T);if(!T||!W){return false;}var S=(R)?V:window;if(T.tagName||T.length===undefined){return W.call(S,T,V);}var U=[];for(var Q=0,P=T.length;Q<P;++Q){U[U.length]=W.call(S,T[Q],V);}return U;},getDocumentHeight:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollHeight:M.documentElement.scrollHeight;var P=Math.max(Q,B.Dom.getViewportHeight());return P;},getDocumentWidth:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollWidth:M.documentElement.scrollWidth;var P=Math.max(Q,B.Dom.getViewportWidth());return P;},getViewportHeight:function(){var P=self.innerHeight; | ||
9 | +var Q=M.compatMode;if((Q||G)&&!C){P=(Q=="CSS1Compat")?M.documentElement.clientHeight:M.body.clientHeight;}return P;},getViewportWidth:function(){var P=self.innerWidth;var Q=M.compatMode;if(Q||G){P=(Q=="CSS1Compat")?M.documentElement.clientWidth:M.body.clientWidth;}return P;},getAncestorBy:function(P,Q){while(P=P.parentNode){if(D(P,Q)){return P;}}return null;},getAncestorByClassName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return B.Dom.hasClass(S,P);};return B.Dom.getAncestorBy(Q,R);},getAncestorByTagName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return S.tagName&&S.tagName.toUpperCase()==P.toUpperCase();};return B.Dom.getAncestorBy(Q,R);},getPreviousSiblingBy:function(P,Q){while(P){P=P.previousSibling;if(D(P,Q)){return P;}}return null;},getPreviousSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getPreviousSiblingBy(P);},getNextSiblingBy:function(P,Q){while(P){P=P.nextSibling;if(D(P,Q)){return P;}}return null;},getNextSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getNextSiblingBy(P);},getFirstChildBy:function(P,R){var Q=(D(P.firstChild,R))?P.firstChild:null;return Q||B.Dom.getNextSiblingBy(P.firstChild,R);},getFirstChild:function(P,Q){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getFirstChildBy(P);},getLastChildBy:function(P,R){if(!P){return null;}var Q=(D(P.lastChild,R))?P.lastChild:null;return Q||B.Dom.getPreviousSiblingBy(P.lastChild,R);},getLastChild:function(P){P=B.Dom.get(P);return B.Dom.getLastChildBy(P);},getChildrenBy:function(Q,S){var R=B.Dom.getFirstChildBy(Q,S);var P=R?[R]:[];B.Dom.getNextSiblingBy(R,function(T){if(!S||S(T)){P[P.length]=T;}return false;});return P;},getChildren:function(P){P=B.Dom.get(P);if(!P){}return B.Dom.getChildrenBy(P);},getDocumentScrollLeft:function(P){P=P||M;return Math.max(P.documentElement.scrollLeft,P.body.scrollLeft);},getDocumentScrollTop:function(P){P=P||M;return Math.max(P.documentElement.scrollTop,P.body.scrollTop);},insertBefore:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}return P.parentNode.insertBefore(Q,P);},insertAfter:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}if(P.nextSibling){return P.parentNode.insertBefore(Q,P.nextSibling);}else{return P.parentNode.appendChild(Q);}},getClientRegion:function(){var R=B.Dom.getDocumentScrollTop(),Q=B.Dom.getDocumentScrollLeft(),S=B.Dom.getViewportWidth()+Q,P=B.Dom.getViewportHeight()+R;return new B.Region(R,S,P,Q);}};var H=function(){if(M.documentElement.getBoundingClientRect){return function(Q){var R=Q.getBoundingClientRect();var P=Q.ownerDocument;return[R.left+B.Dom.getDocumentScrollLeft(P),R.top+B.Dom.getDocumentScrollTop(P)];};}else{return function(R){var S=[R.offsetLeft,R.offsetTop];var Q=R.offsetParent;var P=(L&&B.Dom.getStyle(R,"position")=="absolute"&&R.offsetParent==R.ownerDocument.body);if(Q!=R){while(Q){S[0]+=Q.offsetLeft;S[1]+=Q.offsetTop;if(!P&&L&&B.Dom.getStyle(Q,"position")=="absolute"){P=true;}Q=Q.offsetParent;}}if(P){S[0]-=R.ownerDocument.body.offsetLeft;S[1]-=R.ownerDocument.body.offsetTop;}Q=R.parentNode;while(Q.tagName&&!E.ROOT_TAG.test(Q.tagName)){if(Q.scrollTop||Q.scrollLeft){if(!E.OP_SCROLL.test(B.Dom.getStyle(Q,"display"))){if(!C||B.Dom.getStyle(Q,"overflow")!=="visible"){S[0]-=Q.scrollLeft;S[1]-=Q.scrollTop;}}}Q=Q.parentNode;}return S;};}}();})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.5.2",build:"1076"}); | ||
10 | +<?php if(extension_loaded('zlib')){ob_end_flush();}?> | ||
0 | \ No newline at end of file | 11 | \ No newline at end of file |
@@ -0,0 +1,12 @@ | @@ -0,0 +1,12 @@ | ||
1 | +<?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?> | ||
2 | +/* | ||
3 | +Copyright (c) 2008, Yahoo! Inc. All rights reserved. | ||
4 | +Code licensed under the BSD License: | ||
5 | +http://developer.yahoo.net/yui/license.txt | ||
6 | +version: 2.5.2 | ||
7 | +*/ | ||
8 | +if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(D,C){for(var E in this.ids){for(var B in this.ids[E]){var F=this.ids[E][B];if(!this.isTypeOfDD(F)){continue;}F[D].apply(F,C);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(B){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(C,B){if(!this.initialized){this.init();}if(!this.ids[B]){this.ids[B]={};}this.ids[B][C.id]=C;},removeDDFromGroup:function(D,B){if(!this.ids[B]){this.ids[B]={};}var C=this.ids[B];if(C&&C[D.id]){delete C[D.id];}},_remove:function(C){for(var B in C.groups){if(B&&this.ids[B][C.id]){delete this.ids[B][C.id];}}delete this.handleIds[C.id];},regHandle:function(C,B){if(!this.handleIds[C]){this.handleIds[C]={};}this.handleIds[C][B]=B;},isDragDrop:function(B){return(this.getDDById(B))?true:false;},getRelated:function(G,C){var F=[];for(var E in G.groups){for(var D in this.ids[E]){var B=this.ids[E][D];if(!this.isTypeOfDD(B)){continue;}if(!C||B.isTarget){F[F.length]=B;}}}return F;},isLegalTarget:function(F,E){var C=this.getRelated(F,true);for(var D=0,B=C.length;D<B;++D){if(C[D].id==E.id){return true;}}return false;},isTypeOfDD:function(B){return(B&&B.__ygDragDrop);},isHandle:function(C,B){return(this.handleIds[C]&&this.handleIds[C][B]);},getDDById:function(C){for(var B in this.ids){if(this.ids[B][C]){return this.ids[B][C];}}return null;},handleMouseDown:function(D,C){this.currentTarget=YAHOO.util.Event.getTarget(D);this.dragCurrent=C;var B=C.getEl();this.startX=YAHOO.util.Event.getPageX(D);this.startY=YAHOO.util.Event.getPageY(D);this.deltaX=this.startX-B.offsetLeft;this.deltaY=this.startY-B.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var E=YAHOO.util.DDM;E.startDrag(E.startX,E.startY);E.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(B,D){clearTimeout(this.clickTimeout);var C=this.dragCurrent;if(C&&C.events.b4StartDrag){C.b4StartDrag(B,D);C.fireEvent("b4StartDragEvent",{x:B,y:D});}if(C&&C.events.startDrag){C.startDrag(B,D);C.fireEvent("startDragEvent",{x:B,y:D});}this.dragThreshMet=true;},handleMouseUp:function(B){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(B);}this.fromTimeout=false;this.fireEvents(B,true);}else{}this.stopDrag(B);this.stopEvent(B);}},stopEvent:function(B){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(B);}if(this.preventDefault){YAHOO.util.Event.preventDefault(B);}},stopDrag:function(D,C){var B=this.dragCurrent;if(B&&!C){if(this.dragThreshMet){if(B.events.b4EndDrag){B.b4EndDrag(D);B.fireEvent("b4EndDragEvent",{e:D});}if(B.events.endDrag){B.endDrag(D);B.fireEvent("endDragEvent",{e:D});}}if(B.events.mouseUp){B.onMouseUp(D);B.fireEvent("mouseUpEvent",{e:D});}}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(E){var B=this.dragCurrent;if(B){if(YAHOO.util.Event.isIE&&!E.button){this.stopEvent(E);return this.handleMouseUp(E);}else{if(E.clientX<0||E.clientY<0){}}if(!this.dragThreshMet){var D=Math.abs(this.startX-YAHOO.util.Event.getPageX(E));var C=Math.abs(this.startY-YAHOO.util.Event.getPageY(E));if(D>this.clickPixelThresh||C>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(B&&B.events.b4Drag){B.b4Drag(E);B.fireEvent("b4DragEvent",{e:E});}if(B&&B.events.drag){B.onDrag(E);B.fireEvent("dragEvent",{e:E});}if(B){this.fireEvents(E,false);}}this.stopEvent(E);}},fireEvents:function(U,K){var Z=this.dragCurrent;if(!Z||Z.isLocked()||Z.dragOnly){return ;}var M=YAHOO.util.Event.getPageX(U),L=YAHOO.util.Event.getPageY(U),O=new YAHOO.util.Point(M,L),J=Z.getTargetCoord(O.x,O.y),E=Z.getDragEl(),D=["out","over","drop","enter"],T=new YAHOO.util.Region(J.y,J.x+E.offsetWidth,J.y+E.offsetHeight,J.x),H=[],C={},P=[],a={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var R in this.dragOvers){var c=this.dragOvers[R];if(!this.isTypeOfDD(c)){continue;}if(!this.isOverTarget(O,c,this.mode,T)){a.outEvts.push(c);}H[R]=true;delete this.dragOvers[R];}for(var Q in Z.groups){if("string"!=typeof Q){continue;}for(R in this.ids[Q]){var F=this.ids[Q][R];if(!this.isTypeOfDD(F)){continue;}if(F.isTarget&&!F.isLocked()&&F!=Z){if(this.isOverTarget(O,F,this.mode,T)){C[Q]=true;if(K){a.dropEvts.push(F);}else{if(!H[F.id]){a.enterEvts.push(F);}else{a.overEvts.push(F);}this.dragOvers[F.id]=F;}}}}}this.interactionInfo={out:a.outEvts,enter:a.enterEvts,over:a.overEvts,drop:a.dropEvts,point:O,draggedRegion:T,sourceRegion:this.locationCache[Z.id],validDrop:K};for(var B in C){P.push(B);}if(K&&!a.dropEvts.length){this.interactionInfo.validDrop=false;if(Z.events.invalidDrop){Z.onInvalidDrop(U);Z.fireEvent("invalidDropEvent",{e:U});}}for(R=0;R<D.length;R++){var X=null;if(a[D[R]+"Evts"]){X=a[D[R]+"Evts"];}if(X&&X.length){var G=D[R].charAt(0).toUpperCase()+D[R].substr(1),W="onDrag"+G,I="b4Drag"+G,N="drag"+G+"Event",V="drag"+G;if(this.mode){if(Z.events[I]){Z[I](U,X,P);Z.fireEvent(I+"Event",{event:U,info:X,group:P});}if(Z.events[V]){Z[W](U,X,P);Z.fireEvent(N,{event:U,info:X,group:P});}}else{for(var Y=0,S=X.length;Y<S;++Y){if(Z.events[I]){Z[I](U,X[Y].id,P[0]);Z.fireEvent(I+"Event",{event:U,info:X[Y].id,group:P[0]});}if(Z.events[V]){Z[W](U,X[Y].id,P[0]);Z.fireEvent(N,{event:U,info:X[Y].id,group:P[0]}); | ||
9 | +}}}}}},getBestMatch:function(D){var F=null;var C=D.length;if(C==1){F=D[0];}else{for(var E=0;E<C;++E){var B=D[E];if(this.mode==this.INTERSECT&&B.cursorIsOver){F=B;break;}else{if(!F||!F.overlap||(B.overlap&&F.overlap.getArea()<B.overlap.getArea())){F=B;}}}}return F;},refreshCache:function(C){var E=C||this.ids;for(var B in E){if("string"!=typeof B){continue;}for(var D in this.ids[B]){var F=this.ids[B][D];if(this.isTypeOfDD(F)){var G=this.getLocation(F);if(G){this.locationCache[F.id]=G;}else{delete this.locationCache[F.id];}}}}},verifyEl:function(C){try{if(C){var B=C.offsetParent;if(B){return true;}}}catch(D){}return false;},getLocation:function(G){if(!this.isTypeOfDD(G)){return null;}var E=G.getEl(),J,D,C,L,K,M,B,I,F;try{J=YAHOO.util.Dom.getXY(E);}catch(H){}if(!J){return null;}D=J[0];C=D+E.offsetWidth;L=J[1];K=L+E.offsetHeight;M=L-G.padding[0];B=C+G.padding[1];I=K+G.padding[2];F=D-G.padding[3];return new YAHOO.util.Region(M,B,I,F);},isOverTarget:function(J,B,D,E){var F=this.locationCache[B.id];if(!F||!this.useCache){F=this.getLocation(B);this.locationCache[B.id]=F;}if(!F){return false;}B.cursorIsOver=F.contains(J);var I=this.dragCurrent;if(!I||(!D&&!I.constrainX&&!I.constrainY)){return B.cursorIsOver;}B.overlap=null;if(!E){var G=I.getTargetCoord(J.x,J.y);var C=I.getDragEl();E=new YAHOO.util.Region(G.y,G.x+C.offsetWidth,G.y+C.offsetHeight,G.x);}var H=E.intersect(F);if(H){B.overlap=H;return(D)?true:B.cursorIsOver;}else{return false;}},_onUnload:function(C,B){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(C){var B=this.elementCache[C];if(!B||!B.el){B=this.elementCache[C]=new this.ElementWrapper(YAHOO.util.Dom.get(C));}return B;},getElement:function(B){return YAHOO.util.Dom.get(B);},getCss:function(C){var B=YAHOO.util.Dom.get(C);return(B)?B.style:null;},ElementWrapper:function(B){this.el=B||null;this.id=this.el&&B.id;this.css=this.el&&B.style;},getPosX:function(B){return YAHOO.util.Dom.getX(B);},getPosY:function(B){return YAHOO.util.Dom.getY(B);},swapNode:function(D,B){if(D.swapNode){D.swapNode(B);}else{var E=B.parentNode;var C=B.nextSibling;if(C==D){E.insertBefore(D,B);}else{if(B==D.nextSibling){E.insertBefore(B,D);}else{D.parentNode.replaceChild(B,D);E.insertBefore(D,C);}}}},getScroll:function(){var D,B,E=document.documentElement,C=document.body;if(E&&(E.scrollTop||E.scrollLeft)){D=E.scrollTop;B=E.scrollLeft;}else{if(C){D=C.scrollTop;B=C.scrollLeft;}else{}}return{top:D,left:B};},getStyle:function(C,B){return YAHOO.util.Dom.getStyle(C,B);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(B,D){var C=YAHOO.util.Dom.getXY(D);YAHOO.util.Dom.setXY(B,C);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(C,B){return(C-B);},_timeoutCount:0,_addListeners:function(){var B=YAHOO.util.DDM;if(YAHOO.util.Event&&document){B._onLoad();}else{if(B._timeoutCount>2000){}else{setTimeout(B._addListeners,10);if(document&&document.body){B._timeoutCount+=1;}}}},handleWasClicked:function(B,D){if(this.isHandle(D,B.id)){return true;}else{var C=B.parentNode;while(C){if(this.isHandle(D,C.id)){return true;}else{C=C.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id);}return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event");}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false;}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false); | ||
10 | +},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return ;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(H,G){var D=H.which||H.button;if(this.primaryButtonOnly&&D>1){return ;}if(this.isLocked()){return ;}var C=this.b4MouseDown(H);if(this.events.b4MouseDown){C=this.fireEvent("b4MouseDownEvent",H);}var E=this.onMouseDown(H);if(this.events.mouseDown){E=this.fireEvent("mouseDownEvent",H);}if((C===false)||(E===false)){return ;}this.DDM.refreshCache(this.groups);var F=new YAHOO.util.Point(A.getPageX(H),A.getPageY(H));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(F,this)){}else{if(this.clickValidator(H)){this.setStartPosition();this.DDM.handleMouseDown(H,this);this.DDM.stopEvent(H);}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.maxX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D);}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y]; | ||
11 | +}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return ;}var G=this.getDragEl(),E=YAHOO.util.Dom;if(!G){G=document.createElement("div");G.id=this.dragElId;var D=G.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");G.appendChild(C);if(YAHOO.env.ua.ie){var F=document.createElement("iframe");F.setAttribute("src","javascript:");F.setAttribute("scrolling","no");F.setAttribute("frameborder","0");G.insertBefore(F,G.firstChild);E.setStyle(F,"height","100%");E.setStyle(F,"width","100%");E.setStyle(F,"position","absolute");E.setStyle(F,"top","0");E.setStyle(F,"left","0");E.setStyle(F,"opacity","0");E.setStyle(F,"zIndex","-1");E.setStyle(F.nextSibling,"zIndex","2");}A.insertBefore(G,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.5.2",build:"1076"}); | ||
12 | +<?php if(extension_loaded('zlib')){ob_end_flush();}?> | ||
0 | \ No newline at end of file | 13 | \ No newline at end of file |
@@ -0,0 +1,40 @@ | @@ -0,0 +1,40 @@ | ||
1 | +<?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?> | ||
2 | + | ||
3 | +/* | ||
4 | +Copyright (c) 2008, Yahoo! Inc. All rights reserved. | ||
5 | +Code licensed under the BSD License: | ||
6 | +http://developer.yahoo.net/yui/license.txt | ||
7 | +version: 2.5.2 | ||
8 | +*/ | ||
9 | +if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var A=YAHOO.lang,C=["toString","valueOf"],B={isArray:function(D){if(D){return A.isNumber(D.length)&&A.isFunction(D.splice);}return false;},isBoolean:function(D){return typeof D==="boolean";},isFunction:function(D){return typeof D==="function";},isNull:function(D){return D===null;},isNumber:function(D){return typeof D==="number"&&isFinite(D);},isObject:function(D){return(D&&(typeof D==="object"||A.isFunction(D)))||false;},isString:function(D){return typeof D==="string";},isUndefined:function(D){return typeof D==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(F,E){for(var D=0;D<C.length;D=D+1){var H=C[D],G=E[H];if(A.isFunction(G)&&G!=Object.prototype[H]){F[H]=G;}}}:function(){},extend:function(H,I,G){if(!I||!H){throw new Error("extend failed, please check that "+"all dependencies are included.");}var E=function(){};E.prototype=I.prototype;H.prototype=new E();H.prototype.constructor=H;H.superclass=I.prototype;if(I.prototype.constructor==Object.prototype.constructor){I.prototype.constructor=I;}if(G){for(var D in G){if(A.hasOwnProperty(G,D)){H.prototype[D]=G[D];}}A._IEEnumFix(H.prototype,G);}},augmentObject:function(H,G){if(!G||!H){throw new Error("Absorb failed, verify dependencies.");}var D=arguments,F,I,E=D[2];if(E&&E!==true){for(F=2;F<D.length;F=F+1){H[D[F]]=G[D[F]];}}else{for(I in G){if(E||!(I in H)){H[I]=G[I];}}A._IEEnumFix(H,G);}},augmentProto:function(G,F){if(!F||!G){throw new Error("Augment failed, verify dependencies.");}var D=[G.prototype,F.prototype];for(var E=2;E<arguments.length;E=E+1){D.push(arguments[E]);}A.augmentObject.apply(this,D);},dump:function(D,I){var F,H,K=[],L="{...}",E="f(){...}",J=", ",G=" => ";if(!A.isObject(D)){return D+"";}else{if(D instanceof Date||("nodeType" in D&&"tagName" in D)){return D;}else{if(A.isFunction(D)){return E;}}}I=(A.isNumber(I))?I:3;if(A.isArray(D)){K.push("[");for(F=0,H=D.length;F<H;F=F+1){if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}if(K.length>1){K.pop();}K.push("]");}else{K.push("{");for(F in D){if(A.hasOwnProperty(D,F)){K.push(F+G);if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}}if(K.length>1){K.pop();}K.push("}");}return K.join("");},substitute:function(S,E,L){var I,H,G,O,P,R,N=[],F,J="dump",M=" ",D="{",Q="}";for(;;){I=S.lastIndexOf(D);if(I<0){break;}H=S.indexOf(Q,I);if(I+1>=H){break;}F=S.substring(I+1,H);O=F;R=null;G=O.indexOf(M);if(G>-1){R=O.substring(G+1);O=O.substring(0,G);}P=E[O];if(L){P=L(O,P,R);}if(A.isObject(P)){if(A.isArray(P)){P=A.dump(P,parseInt(R,10));}else{R=R||"";var K=R.indexOf(J);if(K>-1){R=R.substring(4);}if(P.toString===Object.prototype.toString||K>-1){P=A.dump(P,parseInt(R,10));}else{P=P.toString();}}}else{if(!A.isString(P)&&!A.isNumber(P)){P="~-"+N.length+"-~";N[N.length]=F;}}S=S.substring(0,I)+P+S.substring(H+1);}for(I=N.length-1;I>=0;I=I-1){S=S.replace(new RegExp("~-"+I+"-~"),"{"+N[I]+"}","g");}return S;},trim:function(D){try{return D.replace(/^\s+|\s+$/g,"");}catch(E){return D;}},merge:function(){var G={},E=arguments;for(var F=0,D=E.length;F<D;F=F+1){A.augmentObject(G,E[F],true);}return G;},later:function(K,E,L,G,H){K=K||0;E=E||{};var F=L,J=G,I,D;if(A.isString(L)){F=E[L];}if(!F){throw new TypeError("method undefined");}if(!A.isArray(J)){J=[G];}I=function(){F.apply(E,J);};D=(H)?setInterval(I,K):setTimeout(I,K);return{interval:H,cancel:function(){if(this.interval){clearInterval(D);}else{clearTimeout(D);}}};},isValue:function(D){return(A.isObject(D)||A.isString(D)||A.isNumber(D)||A.isBoolean(D));}};A.hasOwnProperty=(Object.prototype.hasOwnProperty)?function(D,E){return D&&D.hasOwnProperty(E);}:function(D,E){return !A.isUndefined(D[E])&&D.constructor.prototype[E]!==D[E];};B.augmentObject(A,B,true);YAHOO.util.Lang=A;A.augment=A.augmentProto;YAHOO.augment=A.augmentProto;YAHOO.extend=A.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.5.2",build:"1076"});YAHOO.util.Get=function(){var M={},L=0,Q=0,E=false,N=YAHOO.env.ua,R=YAHOO.lang;var J=function(V,S,W){var T=W||window,X=T.document,Y=X.createElement(V);for(var U in S){if(S[U]&&YAHOO.lang.hasOwnProperty(S,U)){Y.setAttribute(U,S[U]);}}return Y;};var H=function(S,T,V){var U=V||"utf-8";return J("link",{"id":"yui__dyn_"+(Q++),"type":"text/css","charset":U,"rel":"stylesheet","href":S},T); | ||
10 | +};var O=function(S,T,V){var U=V||"utf-8";return J("script",{"id":"yui__dyn_"+(Q++),"type":"text/javascript","charset":U,"src":S},T);};var A=function(S,T){return{tId:S.tId,win:S.win,data:S.data,nodes:S.nodes,msg:T,purge:function(){D(this.tId);}};};var B=function(S,V){var T=M[V],U=(R.isString(S))?T.win.document.getElementById(S):S;if(!U){P(V,"target node not found: "+S);}return U;};var P=function(V,U){var S=M[V];if(S.onFailure){var T=S.scope||S.win;S.onFailure.call(T,A(S,U));}};var C=function(V){var S=M[V];S.finished=true;if(S.aborted){var U="transaction "+V+" was aborted";P(V,U);return ;}if(S.onSuccess){var T=S.scope||S.win;S.onSuccess.call(T,A(S));}};var G=function(U,Y){var T=M[U];if(T.aborted){var W="transaction "+U+" was aborted";P(U,W);return ;}if(Y){T.url.shift();if(T.varName){T.varName.shift();}}else{T.url=(R.isString(T.url))?[T.url]:T.url;if(T.varName){T.varName=(R.isString(T.varName))?[T.varName]:T.varName;}}var b=T.win,a=b.document,Z=a.getElementsByTagName("head")[0],V;if(T.url.length===0){if(T.type==="script"&&N.webkit&&N.webkit<420&&!T.finalpass&&!T.varName){var X=O(null,T.win,T.charset);X.innerHTML='YAHOO.util.Get._finalize("'+U+'");';T.nodes.push(X);Z.appendChild(X);}else{C(U);}return ;}var S=T.url[0];if(T.type==="script"){V=O(S,b,T.charset);}else{V=H(S,b,T.charset);}F(T.type,V,U,S,b,T.url.length);T.nodes.push(V);if(T.insertBefore){var c=B(T.insertBefore,U);if(c){c.parentNode.insertBefore(V,c);}}else{Z.appendChild(V);}if((N.webkit||N.gecko)&&T.type==="css"){G(U,S);}};var K=function(){if(E){return ;}E=true;for(var S in M){var T=M[S];if(T.autopurge&&T.finished){D(T.tId);delete M[S];}}E=false;};var D=function(Z){var W=M[Z];if(W){var Y=W.nodes,S=Y.length,X=W.win.document,V=X.getElementsByTagName("head")[0];if(W.insertBefore){var U=B(W.insertBefore,Z);if(U){V=U.parentNode;}}for(var T=0;T<S;T=T+1){V.removeChild(Y[T]);}}W.nodes=[];};var I=function(T,S,U){var W="q"+(L++);U=U||{};if(L%YAHOO.util.Get.PURGE_THRESH===0){K();}M[W]=R.merge(U,{tId:W,type:T,url:S,finished:false,nodes:[]});var V=M[W];V.win=V.win||window;V.scope=V.scope||V.win;V.autopurge=("autopurge" in V)?V.autopurge:(T==="script")?true:false;R.later(0,V,G,W);return{tId:W};};var F=function(b,W,V,T,X,Y,a){var Z=a||G;if(N.ie){W.onreadystatechange=function(){var c=this.readyState;if("loaded"===c||"complete"===c){Z(V,T);}};}else{if(N.webkit){if(b==="script"){if(N.webkit>=420){W.addEventListener("load",function(){Z(V,T);});}else{var S=M[V];if(S.varName){var U=YAHOO.util.Get.POLL_FREQ;S.maxattempts=YAHOO.util.Get.TIMEOUT/U;S.attempts=0;S._cache=S.varName[0].split(".");S.timer=R.later(U,S,function(h){var e=this._cache,d=e.length,c=this.win,f;for(f=0;f<d;f=f+1){c=c[e[f]];if(!c){this.attempts++;if(this.attempts++>this.maxattempts){var g="Over retry limit, giving up";S.timer.cancel();P(V,g);}else{}return ;}}S.timer.cancel();Z(V,T);},null,true);}else{R.later(YAHOO.util.Get.POLL_FREQ,null,Z,[V,T]);}}}}else{W.onload=function(){Z(V,T);};}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(S){R.later(0,null,C,S);},abort:function(T){var U=(R.isString(T))?T:T.tId;var S=M[U];if(S){S.aborted=true;}},script:function(S,T){return I("script",S,T);},css:function(S,T){return I("css",S,T);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.5.2",build:"1076"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"base":"http://yui.yahooapis.com/2.5.2/build/","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-experimental-min.js","requires":["element","json","datasource"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"]},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-beta-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-beta-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-beta-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop"],"skinnable":true},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-beta-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-beta-min.js","requires":["dom","event"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-beta-min.js","requires":["dom","event","dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-beta-min.js","requires":["dom","event","element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-beta-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-beta-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-beta-min.js","requires":["dom","event","dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-beta-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-beta-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader-experimental.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-beta-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0; | ||
11 | +i<a.length;i=i+1){o[a[i]]=true;}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i);}}return a;}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2);},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i;}}return -1;},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true;}return o;},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a));}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name);}});this.skin=lang.merge(YUI.info.skin);this._config(o);};Y.util.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i]);}else{this[i]=o[i];}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger");}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y;};}this.filter=this.FILTERS[f];}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false;}o.ext=("ext" in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true;},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;YUI.ObjectUtil.appendArray(this.required,a);},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({"name":name,"type":"css","path":sinf.base+skin+"/"+sinf.path,"after":sinf.after,"rollup":sinf.rollup,"ext":ext});}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({"name":name,"type":"css","after":sinf.after,"path":pkg+"/"+sinf.base+skin+"/"+mod+".css","ext":ext});}}return name;},getRequires:function(mod){if(!mod){return[];}if(!this.dirty&&mod.expanded){return mod.expanded;}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m));}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]));}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded;},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o;}if(m[ckey]){return m[ckey];}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm));}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i]);}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey];},calculate:function(o){if(this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup();}this._reduce();this._sort();this.dirty=false;}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name);}}else{smod=this._addSkin(this.skin.defaultSkin,name);}m.requires.push(smod);}}var l=lang.merge(this.inserted);if(!this._sandbox){l=lang.merge(l,env.modules);}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore);}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i] in l){delete l[this.force[i]];}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j));}}this.loaded=l;},_explode:function(){var r=this.required,i,mod;for(i in r){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req);}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod;}return s;},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]};}return null;},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll;if(this.dirty||!this.rollups){for(i in this.moduleInfo){m=this.moduleInfo[i];if(m&&m.rollup){rollups[i]=m;}}this.rollups=rollups;}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=this.moduleInfo[i];s=m.supersedes;roll=false;if(!m.rollup){continue;}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break;}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break;}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break;}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m);}}}if(!rolled){break;}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i];}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j];}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j] in r){delete r[s[j]];}}}}}}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){if(loaded[bb]){return false;}var ii,mm=info[aa],rr=mm&&mm.expanded,after=mm&&mm.after,other=info[bb],optional=mm&&mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true;}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true; | ||
12 | +}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true;}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true;}}}if(mm.ext&&mm.type=="css"&&(!other.ext)){return true;}return false;};for(var i in this.required){s.push(i);}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break;}}if(moved){break;}else{p=p+1;}}if(!moved){break;}}this.sorted=s;},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1);},insert:function(o,type){this.calculate(o);if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js");};this.insert(null,"css");return ;}this._loading=true;this.loadType=type;this.loadNext();},sandbox:function(o,type){if(o){}else{}this._config(o);if(!this.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox");}this._sandbox=true;var self=this;if(!type||type!=="js"){this._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js");};this.insert(null,"css");return ;}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:this.base,filter:this.filter,require:"connection",insertBefore:this.insertBefore,charset:this.charset,onSuccess:function(){this.sandbox(null,"js");},scope:this},"js");return ;}this._scriptText=[];this._loadCount=0;this._stopCount=this.sorted.length;this._xhr=[];this.calculate();var s=this.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});for(var j=0;j<this._xhr.length;j=j+1){this._xhr[j].abort();}return ;}if(m.type!=="js"){this._loadCount++;continue;}url=m.fullpath||this._url(m.path);var xhrData={success:function(o){var idx=o.argument[0],name=o.argument[2];this._scriptText[idx]=o.responseText;if(this.onProgress){this.onProgress.call(this.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:this.data});}this._loadCount++;if(this._loadCount>=this._stopCount){var v=this.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+this._scriptText.join("\n")+b);this._pushEvents(ref);if(ref){this.onSuccess.call(this.scope,{reference:ref,data:this.data});}else{this.onFailure.call(this.scope,{msg:this.varName+" reference failure",data:this.data});}}},failure:function(o){this.onFailure.call(this.scope,{msg:"XHR failure",xhrResponse:o,data:this.data});},scope:this,argument:[i,url,s[i]]};this._xhr.push(util.Connect.asyncRequest("GET",url,xhrData));}},loadNext:function(mname){if(!this._loading){return ;}if(mname){if(mname!==this._loading){return ;}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data});}}var s=this.sorted,len=s.length,i,m;for(i=0;i<len;i=i+1){if(s[i] in this.inserted){continue;}if(s[i]===this._loading){return ;}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return ;}if(!this.loadType||this.loadType===m.type){this._loading=s[i];var fn=(m.type==="css")?util.Get.css:util.Get.script,url=m.fullpath||this._url(m.path),self=this,c=function(o){self.loadNext(o.data);};if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){c=null;this._useYahooListener=true;}fn(url,{data:s[i],onSuccess:c,insertBefore:this.insertBefore,charset:this.charset,varName:m.varName,scope:self});return ;}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this);}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data});}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load();}},_url:function(path){var u=this.base||"",f=this.filter;u=u+path;if(f){u=u.replace(new RegExp(f.searchExp),f.replaceStr);}return u;}};})();(function(){var B=YAHOO.util,K,I,J={},F={},M=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var C=YAHOO.env.ua.opera,L=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var N=function(P){if(!E.HYPHEN.test(P)){return P;}if(J[P]){return J[P];}var Q=P;while(E.HYPHEN.exec(Q)){Q=Q.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}J[P]=Q;return Q;};var O=function(Q){var P=F[Q];if(!P){P=new RegExp("(?:^|\\s+)"+Q+"(?:\\s+|$)");F[Q]=P;}return P;};if(M.defaultView&&M.defaultView.getComputedStyle){K=function(P,S){var R=null;if(S=="float"){S="cssFloat";}var Q=P.ownerDocument.defaultView.getComputedStyle(P,"");if(Q){R=Q[N(S)];}return P.style[S]||R;};}else{if(M.documentElement.currentStyle&&G){K=function(P,R){switch(N(R)){case"opacity":var T=100;try{T=P.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(S){try{T=P.filters("alpha").opacity;}catch(S){}}return T/100;case"float":R="styleFloat";default:var Q=P.currentStyle?P.currentStyle[R]:null;return(P.style[R]||Q);}};}else{K=function(P,Q){return P.style[Q];};}}if(G){I=function(P,Q,R){switch(Q){case"opacity":if(YAHOO.lang.isString(P.style.filter)){P.style.filter="alpha(opacity="+R*100+")";if(!P.currentStyle||!P.currentStyle.hasLayout){P.style.zoom=1;}}break;case"float":Q="styleFloat";default:P.style[Q]=R;}};}else{I=function(P,Q,R){if(Q=="float"){Q="cssFloat";}P.style[Q]=R;};}var D=function(P,Q){return P&&P.nodeType==1&&(!Q||Q(P));};YAHOO.util.Dom={get:function(R){if(R&&(R.nodeType||R.item)){return R;}if(YAHOO.lang.isString(R)||!R){return M.getElementById(R);}if(R.length!==undefined){var S=[];for(var Q=0,P=R.length;Q<P;++Q){S[S.length]=B.Dom.get(R[Q]);}return S;}return R;},getStyle:function(P,R){R=N(R);var Q=function(S){return K(S,R);};return B.Dom.batch(P,Q,B.Dom,true);},setStyle:function(P,R,S){R=N(R);var Q=function(T){I(T,R,S);};B.Dom.batch(P,Q,B.Dom,true);},getXY:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false;}return H(R);};return B.Dom.batch(P,Q,B.Dom,true);},getX:function(P){var Q=function(R){return B.Dom.getXY(R)[0];};return B.Dom.batch(P,Q,B.Dom,true);},getY:function(P){var Q=function(R){return B.Dom.getXY(R)[1];};return B.Dom.batch(P,Q,B.Dom,true);},setXY:function(P,S,R){var Q=function(V){var U=this.getStyle(V,"position");if(U=="static"){this.setStyle(V,"position","relative");U="relative";}var X=this.getXY(V);if(X===false){return false;}var W=[parseInt(this.getStyle(V,"left"),10),parseInt(this.getStyle(V,"top"),10)];if(isNaN(W[0])){W[0]=(U=="relative")?0:V.offsetLeft;}if(isNaN(W[1])){W[1]=(U=="relative")?0:V.offsetTop;}if(S[0]!==null){V.style.left=S[0]-X[0]+W[0]+"px";}if(S[1]!==null){V.style.top=S[1]-X[1]+W[1]+"px";}if(!R){var T=this.getXY(V);if((S[0]!==null&&T[0]!=S[0])||(S[1]!==null&&T[1]!=S[1])){this.setXY(V,S,true);}}};B.Dom.batch(P,Q,B.Dom,true);},setX:function(Q,P){B.Dom.setXY(Q,[P,null]);},setY:function(P,Q){B.Dom.setXY(P,[null,Q]);},getRegion:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false;}var S=B.Region.getRegion(R);return S;};return B.Dom.batch(P,Q,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(T,X,U,V){X=X||"*";U=(U)?B.Dom.get(U):null||M;if(!U){return[];}var Q=[],P=U.getElementsByTagName(X),W=O(T);for(var R=0,S=P.length;R<S;++R){if(W.test(P[R].className)){Q[Q.length]=P[R];if(V){V.call(P[R],P[R]);}}}return Q;},hasClass:function(R,Q){var P=O(Q);var S=function(T){return P.test(T.className);};return B.Dom.batch(R,S,B.Dom,true);},addClass:function(Q,P){var R=function(S){if(this.hasClass(S,P)){return false;}S.className=YAHOO.lang.trim([S.className,P].join(" "));return true;};return B.Dom.batch(Q,R,B.Dom,true);},removeClass:function(R,Q){var P=O(Q);var S=function(T){if(!Q||!this.hasClass(T,Q)){return false;}var U=T.className;T.className=U.replace(P," ");if(this.hasClass(T,Q)){this.removeClass(T,Q);}T.className=YAHOO.lang.trim(T.className);return true;};return B.Dom.batch(R,S,B.Dom,true);},replaceClass:function(S,Q,P){if(!P||Q===P){return false;}var R=O(Q);var T=function(U){if(!this.hasClass(U,Q)){this.addClass(U,P);return true;}U.className=U.className.replace(R," "+P+" ");if(this.hasClass(U,Q)){this.replaceClass(U,Q,P);}U.className=YAHOO.lang.trim(U.className);return true;};return B.Dom.batch(S,T,B.Dom,true);},generateId:function(P,R){R=R||"yui-gen";var Q=function(S){if(S&&S.id){return S.id;}var T=R+YAHOO.env._id_counter++;if(S){S.id=T;}return T;};return B.Dom.batch(P,Q,B.Dom,true)||Q.apply(B.Dom,arguments);},isAncestor:function(P,Q){P=B.Dom.get(P);Q=B.Dom.get(Q);if(!P||!Q){return false;}if(P.contains&&Q.nodeType&&!L){return P.contains(Q);}else{if(P.compareDocumentPosition&&Q.nodeType){return !!(P.compareDocumentPosition(Q)&16);}else{if(Q.nodeType){return !!this.getAncestorBy(Q,function(R){return R==P;});}}}return false;},inDocument:function(P){return this.isAncestor(M.documentElement,P);},getElementsBy:function(W,Q,R,T){Q=Q||"*";R=(R)?B.Dom.get(R):null||M;if(!R){return[];}var S=[],V=R.getElementsByTagName(Q);for(var U=0,P=V.length;U<P;++U){if(W(V[U])){S[S.length]=V[U];if(T){T(V[U]);}}}return S;},batch:function(T,W,V,R){T=(T&&(T.tagName||T.item))?T:B.Dom.get(T);if(!T||!W){return false;}var S=(R)?V:window;if(T.tagName||T.length===undefined){return W.call(S,T,V);}var U=[];for(var Q=0,P=T.length;Q<P;++Q){U[U.length]=W.call(S,T[Q],V);}return U;},getDocumentHeight:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollHeight:M.documentElement.scrollHeight;var P=Math.max(Q,B.Dom.getViewportHeight());return P;},getDocumentWidth:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollWidth:M.documentElement.scrollWidth;var P=Math.max(Q,B.Dom.getViewportWidth());return P;},getViewportHeight:function(){var P=self.innerHeight; | ||
13 | +var Q=M.compatMode;if((Q||G)&&!C){P=(Q=="CSS1Compat")?M.documentElement.clientHeight:M.body.clientHeight;}return P;},getViewportWidth:function(){var P=self.innerWidth;var Q=M.compatMode;if(Q||G){P=(Q=="CSS1Compat")?M.documentElement.clientWidth:M.body.clientWidth;}return P;},getAncestorBy:function(P,Q){while(P=P.parentNode){if(D(P,Q)){return P;}}return null;},getAncestorByClassName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return B.Dom.hasClass(S,P);};return B.Dom.getAncestorBy(Q,R);},getAncestorByTagName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return S.tagName&&S.tagName.toUpperCase()==P.toUpperCase();};return B.Dom.getAncestorBy(Q,R);},getPreviousSiblingBy:function(P,Q){while(P){P=P.previousSibling;if(D(P,Q)){return P;}}return null;},getPreviousSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getPreviousSiblingBy(P);},getNextSiblingBy:function(P,Q){while(P){P=P.nextSibling;if(D(P,Q)){return P;}}return null;},getNextSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getNextSiblingBy(P);},getFirstChildBy:function(P,R){var Q=(D(P.firstChild,R))?P.firstChild:null;return Q||B.Dom.getNextSiblingBy(P.firstChild,R);},getFirstChild:function(P,Q){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getFirstChildBy(P);},getLastChildBy:function(P,R){if(!P){return null;}var Q=(D(P.lastChild,R))?P.lastChild:null;return Q||B.Dom.getPreviousSiblingBy(P.lastChild,R);},getLastChild:function(P){P=B.Dom.get(P);return B.Dom.getLastChildBy(P);},getChildrenBy:function(Q,S){var R=B.Dom.getFirstChildBy(Q,S);var P=R?[R]:[];B.Dom.getNextSiblingBy(R,function(T){if(!S||S(T)){P[P.length]=T;}return false;});return P;},getChildren:function(P){P=B.Dom.get(P);if(!P){}return B.Dom.getChildrenBy(P);},getDocumentScrollLeft:function(P){P=P||M;return Math.max(P.documentElement.scrollLeft,P.body.scrollLeft);},getDocumentScrollTop:function(P){P=P||M;return Math.max(P.documentElement.scrollTop,P.body.scrollTop);},insertBefore:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}return P.parentNode.insertBefore(Q,P);},insertAfter:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}if(P.nextSibling){return P.parentNode.insertBefore(Q,P.nextSibling);}else{return P.parentNode.appendChild(Q);}},getClientRegion:function(){var R=B.Dom.getDocumentScrollTop(),Q=B.Dom.getDocumentScrollLeft(),S=B.Dom.getViewportWidth()+Q,P=B.Dom.getViewportHeight()+R;return new B.Region(R,S,P,Q);}};var H=function(){if(M.documentElement.getBoundingClientRect){return function(Q){var R=Q.getBoundingClientRect();var P=Q.ownerDocument;return[R.left+B.Dom.getDocumentScrollLeft(P),R.top+B.Dom.getDocumentScrollTop(P)];};}else{return function(R){var S=[R.offsetLeft,R.offsetTop];var Q=R.offsetParent;var P=(L&&B.Dom.getStyle(R,"position")=="absolute"&&R.offsetParent==R.ownerDocument.body);if(Q!=R){while(Q){S[0]+=Q.offsetLeft;S[1]+=Q.offsetTop;if(!P&&L&&B.Dom.getStyle(Q,"position")=="absolute"){P=true;}Q=Q.offsetParent;}}if(P){S[0]-=R.ownerDocument.body.offsetLeft;S[1]-=R.ownerDocument.body.offsetTop;}Q=R.parentNode;while(Q.tagName&&!E.ROOT_TAG.test(Q.tagName)){if(Q.scrollTop||Q.scrollLeft){if(!E.OP_SCROLL.test(B.Dom.getStyle(Q,"display"))){if(!C||B.Dom.getStyle(Q,"overflow")!=="visible"){S[0]-=Q.scrollLeft;S[1]-=Q.scrollTop;}}}Q=Q.parentNode;}return S;};}}();})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.5.2",build:"1076"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true;}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true;}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0];}try{G=M.fn.call(L,B,M.obj);}catch(F){this.lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.type,I,M.obj);}catch(H){this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.silent){}break;}}}return(G!==false);},unsubscribeAll:function(){for(var A=this.subscribers.length-1;A>-1;A--){this._delete(A);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach();};this._interval=setInterval(L,this.POLL_INTERVAL);}},onAvailable:function(P,M,Q,O,N){var K=(YAHOO.lang.isString(P))?[P]:P;for(var L=0;L<K.length;L=L+1){F.push({id:K[L],fn:M,obj:Q,override:O,checkReady:N});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(M,K,N,L){this.onAvailable(M,K,N,L,true);},onDOMReady:function(K,M,L){if(this.DOMReady){setTimeout(function(){var N=window;if(L){if(L===true){N=M;}else{N=L;}}K.call(N,"DOMReady",[],M);},0);}else{this.DOMReadyEvent.subscribe(K,M,L);}},addListener:function(M,K,V,Q,L){if(!V||!V.call){return false;}if(this._isValidCollection(M)){var W=true;for(var R=0,T=M.length;R<T;++R){W=this.on(M[R],K,V,Q,L)&&W;}return W;}else{if(YAHOO.lang.isString(M)){var P=this.getEl(M);if(P){M=P;}else{this.onAvailable(M,function(){YAHOO.util.Event.on(M,K,V,Q,L);});return true;}}}if(!M){return false;}if("unload"==K&&Q!==this){J[J.length]=[M,K,V,Q,L];return true;}var Y=M;if(L){if(L===true){Y=Q;}else{Y=L;}}var N=function(Z){return V.call(Y,YAHOO.util.Event.getEvent(Z,M),Q);};var X=[M,K,V,N,Y,Q,L];var S=I.length;I[S]=X;if(this.useLegacyEvent(M,K)){var O=this.getLegacyIndex(M,K);if(O==-1||M!=G[O][0]){O=G.length;B[M.id+K]=O;G[O]=[M,K,M["on"+K]];E[O]=[];M["on"+K]=function(Z){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(Z),O);};}E[O].push(X);}else{try{this._simpleAdd(M,K,N,false);}catch(U){this.lastError=U;this.removeListener(M,K,V);return false;}}return true;},fireLegacyEvent:function(O,M){var Q=true,K,S,R,T,P;S=E[M].slice();for(var L=0,N=S.length;L<N;++L){R=S[L];if(R&&R[this.WFN]){T=R[this.ADJ_SCOPE];P=R[this.WFN].call(T,O);Q=(Q&&P);}}K=G[M];if(K&&K[2]){K[2](O);}return Q;},getLegacyIndex:function(L,M){var K=this.generateId(L)+M;if(typeof B[K]=="undefined"){return -1;}else{return B[K];}},useLegacyEvent:function(L,M){if(this.webkit&&("click"==M||"dblclick"==M)){var K=parseInt(this.webkit,10);if(!isNaN(K)&&K<418){return true;}}return false;},removeListener:function(L,K,T){var O,R,V;if(typeof L=="string"){L=this.getEl(L);}else{if(this._isValidCollection(L)){var U=true;for(O=L.length-1;O>-1;O--){U=(this.removeListener(L[O],K,T)&&U);}return U;}}if(!T||!T.call){return this.purgeElement(L,false,K);}if("unload"==K){for(O=J.length-1;O>-1;O--){V=J[O];if(V&&V[0]==L&&V[1]==K&&V[2]==T){J.splice(O,1);return true;}}return false;}var P=null;var Q=arguments[3];if("undefined"===typeof Q){Q=this._getCacheIndex(L,K,T);}if(Q>=0){P=I[Q];}if(!L||!P){return false;}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=E[N];if(M){for(O=0,R=M.length;O<R;++O){V=M[O];if(V&&V[this.EL]==L&&V[this.TYPE]==K&&V[this.FN]==T){M.splice(O,1);break;}}}}else{try{this._simpleRemove(L,K,P[this.WFN],false);}catch(S){this.lastError=S;return false;}}delete I[Q][this.WFN];delete I[Q][this.FN];I.splice(Q,1);return true;},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K);},resolveTextNode:function(L){try{if(L&&3==L.nodeType){return L.parentNode;}}catch(K){}return L;},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft();}}return K;},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop();}}return L; | ||
14 | +},getXY:function(K){return[this.getPageX(K),this.getPageY(K)];},getRelatedTarget:function(L){var K=L.relatedTarget;if(!K){if(L.type=="mouseout"){K=L.toElement;}else{if(L.type=="mouseover"){K=L.fromElement;}}}return this.resolveTextNode(K);},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L;}catch(K){this.lastError=K;return L;}}return M.time;},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K);},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation();}else{K.cancelBubble=true;}},preventDefault:function(K){if(K.preventDefault){K.preventDefault();}else{K.returnValue=false;}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break;}N=N.caller;}}return L;},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(YAHOO.env.ua.webkit&&(K in D)){K=D[K];}return K;},_getCacheIndex:function(O,P,N){for(var M=0,L=I.length;M<L;M=M+1){var K=I[M];if(K&&K[this.FN]==N&&K[this.EL]==O&&K[this.TYPE]==P){return M;}}return -1;},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+A;++A;K.id=L;}return L;},_isValidCollection:function(L){try{return(L&&typeof L!=="string"&&L.length&&!L.tagName&&!L.alert&&typeof L[0]!=="undefined");}catch(K){return false;}},elCache:{},getEl:function(K){return(typeof K==="string")?document.getElementById(K):K;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(L){if(!H){H=true;var K=YAHOO.util.Event;K._ready();K._tryPreloadAttach();}},_ready:function(L){var K=YAHOO.util.Event;if(!K.DOMReady){K.DOMReady=true;K.DOMReadyEvent.fire();K._simpleRemove(document,"DOMContentLoaded",K._ready);}},_tryPreloadAttach:function(){if(F.length===0){C=0;clearInterval(this._interval);this._interval=null;return ;}if(this.locked){return ;}if(this.isIE){if(!this.DOMReady){this.startInterval();return ;}}this.locked=true;var Q=!H;if(!Q){Q=(C>0&&F.length>0);}var P=[];var R=function(T,U){var S=T;if(U.override){if(U.override===true){S=U.obj;}else{S=U.override;}}U.fn.call(S,U.obj);};var L,K,O,N,M=[];for(L=0,K=F.length;L<K;L=L+1){O=F[L];if(O){N=this.getEl(O.id);if(N){if(O.checkReady){if(H||N.nextSibling||!Q){M.push(O);F[L]=null;}}else{R(N,O);F[L]=null;}}else{P.push(O);}}}for(L=0,K=M.length;L<K;L=L+1){O=M[L];R(this.getEl(O.id),O);}C--;if(Q){for(L=F.length-1;L>-1;L--){O=F[L];if(!O||!O.id){F.splice(L,1);}}this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=Q.length-1;N>-1;N--){var L=Q[N];this.removeListener(M,L.type,L.fn);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N<K;++N){this.purgeElement(M.childNodes[N],P,R);}}},getListeners:function(M,K){var P=[],L;if(!K){L=[I,J];}else{if(K==="unload"){L=[J];}else{L=[I];}}var R=(YAHOO.lang.isString(M))?this.getEl(M):M;for(var O=0;O<L.length;O=O+1){var T=L[O];if(T){for(var Q=0,S=T.length;Q<S;++Q){var N=T[Q];if(N&&N[this.EL]===R&&(!K||K===N[this.TYPE])){P.push({type:N[this.TYPE],fn:N[this.FN],obj:N[this.OBJ],adjust:N[this.OVERRIDE],scope:N[this.ADJ_SCOPE],index:Q});}}}}return(P.length)?P:null;},_unload:function(Q){var K=YAHOO.util.Event,N,M,L,P,O,R=J.slice();for(N=0,P=J.length;N<P;++N){L=R[N];if(L){var S=window;if(L[K.ADJ_SCOPE]){if(L[K.ADJ_SCOPE]===true){S=L[K.UNLOAD_OBJ];}else{S=L[K.ADJ_SCOPE];}}L[K.FN].call(S,K.getEvent(Q,L[K.EL]),L[K.UNLOAD_OBJ]);R[N]=null;L=null;S=null;}}J=null;if(I){for(M=I.length-1;M>-1;M--){L=I[M];if(L){K.removeListener(L[K.EL],L[K.TYPE],L[K.FN],M);}}L=null;}G=null;K._simpleRemove(window,"unload",K._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){return function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener; | ||
15 | +/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */ | ||
16 | +if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events; | ||
17 | +if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(J,I){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(J.shiftKey==F.shift&&J.altKey==F.alt&&J.ctrlKey==F.ctrl){var G;if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){G=F.keys[H];if(G==J.charCode){D.fire(J.charCode,J);break;}else{if(G==J.keyCode){D.fire(J.keyCode,J);break;}}}}else{G=F.keys;if(G==J.charCode){D.fire(J.charCode,J);}else{if(G==J.keyCode){D.fire(J.keyCode,J);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.5.2",build:"1076"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(B){var A=YAHOO.util.Event.getTarget(B);if(A.nodeName.toLowerCase()=="input"&&(A.type&&A.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(A.name)+"="+encodeURIComponent(A.value);}});return true;}return false;})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A);YAHOO.log("ActiveX Program Id "+A+" added to _msxml_progid.","info","Connection");},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A;YAHOO.log("Default POST header set to "+A,"info","Connection");}else{if(typeof A=="boolean"){this._use_default_post_header=A;}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A;YAHOO.log("Default XHR header set to "+A,"info","Connection");}else{this._use_default_xhr_header=A;}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A;YAHOO.log("Default polling interval set to "+A+"ms","info","Connection");}},createXhrObject:function(E){var D,A;try{A=new XMLHttpRequest();D={conn:A,tId:E};YAHOO.log("XHR object created for transaction "+E,"info","Connection");}catch(C){for(var B=0;B<this._msxml_progid.length;++B){try{A=new ActiveXObject(this._msxml_progid[B]);D={conn:A,tId:E};YAHOO.log("ActiveX XHR object created for transaction "+E,"info","Connection");break;}catch(C){}}}finally{return D;}},getConnectionObject:function(A){var C;var D=this._transaction_id;try{if(!A){C=this.createXhrObject(D);}else{C={};C.tId=D;C.isUpload=true;}if(C){this._transaction_id++;}}catch(B){}finally{return C;}},asyncRequest:function(F,C,E,A){var D=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var B=(E&&E.argument)?E.argument:null;if(!D){YAHOO.log("Unable to create connection object.","error","Connection");return null;}else{if(E&&E.customevents){this.initCustomEvents(D,E);}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(D,E,C,A);return D;}if(F.toUpperCase()=="GET"){if(this._sFormData.length!==0){C+=((C.indexOf("?")==-1)?"?":"&")+this._sFormData;}}else{if(F.toUpperCase()=="POST"){A=A?this._sFormData+"&"+A:this._sFormData;}}}if(F.toUpperCase()=="GET"&&(E&&E.cache===false)){C+=((C.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString();}D.conn.open(F,C,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true);YAHOO.log("Initialize transaction header X-Request-Header to XMLHttpRequest.","info","Connection");}}if((F.toUpperCase()=="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header);YAHOO.log("Initialize header Content-Type to application/x-www-form-urlencoded; UTF-8 for POST transaction.","info","Connection");}if(this._has_default_headers||this._has_http_headers){this.setHeader(D);}this.handleReadyState(D,E);D.conn.send(A||"");YAHOO.log("Transaction "+D.tId+" sent.","info","Connection");if(this._isFormSubmit===true){this.resetFormState();}this.startEvent.fire(D,B);if(D.startEvent){D.startEvent.fire(D,B);}return D;}},initCustomEvents:function(A,C){for(var B in C.customevents){if(this._customEvents[B][0]){A[this._customEvents[B][0]]=new YAHOO.util.CustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);YAHOO.log("Transaction-specific Custom Event "+A[this._customEvents[B][1]]+" created.","info","Connection");A[this._customEvents[B][0]].subscribe(C.customevents[B]);YAHOO.log("Transaction-specific Custom Event "+A[this._customEvents[B][1]]+" subscribed.","info","Connection");}}},handleReadyState:function(C,D){var B=this;var A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){this._timeOut[C.tId]=window.setTimeout(function(){B.abort(C,D,true);},D.timeout);}this._poll[C.tId]=window.setInterval(function(){if(C.conn&&C.conn.readyState===4){window.clearInterval(B._poll[C.tId]);delete B._poll[C.tId];if(D&&D.timeout){window.clearTimeout(B._timeOut[C.tId]);delete B._timeOut[C.tId];}B.completeEvent.fire(C,A);if(C.completeEvent){C.completeEvent.fire(C,A);}B.handleTransactionResponse(C,D);}},this._polling_interval);},handleTransactionResponse:function(F,G,A){var D,C;var B=(G&&G.argument)?G.argument:null;try{if(F.conn.status!==undefined&&F.conn.status!==0){D=F.conn.status;}else{D=13030;}}catch(E){D=13030;}if(D>=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C);YAHOO.log("Success callback. HTTP code is "+D,"info","Connection");}else{G.success.apply(G.scope,[C]);YAHOO.log("Success callback with scope. HTTP code is "+D,"info","Connection");}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C);}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C); | ||
18 | +YAHOO.log("Failure callback. Exception detected. Status code is "+D,"warn","Connection");}else{G.failure.apply(G.scope,[C]);YAHOO.log("Failure callback with scope. Exception detected. Status code is "+D,"warn","Connection");}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C);YAHOO.log("Failure callback. HTTP status code is "+D,"warn","Connection");}else{G.failure.apply(G.scope,[C]);YAHOO.log("Failure callback with scope. HTTP status code is "+D,"warn","Connection");}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C);}}this.releaseObject(F);C=null;},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E<F.length;E++){var B=F[E].indexOf(":");if(B!=-1){I[F[E].substring(0,B)]=F[E].substring(B+2);}}}catch(H){}D.tId=A.tId;D.status=(A.conn.status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){D.argument=G;}return D;},createExceptionObject:function(H,D,A){var F=0;var G="communication failure";var C=-1;var B="transaction aborted";var E={};E.tId=H;if(A){E.status=C;E.statusText=B;}else{E.status=F;E.statusText=G;}if(D){E.argument=D;}return E;},initHeader:function(A,D,C){var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(C){this._has_default_headers=true;}else{this._has_http_headers=true;}},setHeader:function(A){if(this._has_default_headers){for(var B in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.setRequestHeader(B,this._default_headers[B]);YAHOO.log("Default HTTP header "+B+" set with value of "+this._default_headers[B],"info","Connection");}}}if(this._has_http_headers){for(var B in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHeader(B,this._http_headers[B]);YAHOO.log("HTTP header "+B+" set with value of "+this._http_headers[B],"info","Connection");}}delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false;},setForm:function(K,E,B){this.resetFormState();var J;if(typeof K=="string"){J=(document.getElementById(K)||document.forms[K]);}else{if(typeof K=="object"){J=K;}else{YAHOO.log("Unable to create form object "+K,"warn","Connection");return ;}}if(E){var F=this.createFrame((window.location.href.toLowerCase().indexOf("https")===0||B)?true:false);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=J;return ;}var A,I,G,L;var H=false;for(var D=0;D<J.elements.length;D++){A=J.elements[D];L=A.disabled;I=A.name;G=A.value;if(!L&&I){switch(A.type){case"select-one":case"select-multiple":for(var C=0;C<A.options.length;C++){if(A.options[C].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(A.options[C].attributes["value"].specified?A.options[C].value:A.options[C].text)+"&";}else{this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(A.options[C].hasAttribute("value")?A.options[C].value:A.options[C].text)+"&";}}}break;case"radio":case"checkbox":if(A.checked){this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&";}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(H===false){if(this._hasSubmitListener&&this._submitElementValue){this._sFormData+=this._submitElementValue+"&";}else{this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&";}H=true;}break;default:this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&";}}}this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);YAHOO.log("Form initialized for transaction. HTML form POST message is: "+this._sFormData,"info","Connection");this.initHeader("Content-Type",this._default_form_header);YAHOO.log("Initialize header Content-Type to application/x-www-form-urlencoded for setForm() transaction.","info","Connection");return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(A){var B="yuiIO"+this._transaction_id;var C;if(window.ActiveXObject){C=document.createElement('<iframe id="'+B+'" name="'+B+'" />');if(typeof A=="boolean"){C.src="javascript:false";}}else{C=document.createElement("iframe");C.id=B;C.name=B;}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C);YAHOO.log("File upload iframe created. Id is:"+B,"info","Connection");},appendPostData:function(A){var D=[];var B=A.split("&");for(var C=0;C<B.length;C++){var E=B[C].indexOf("=");if(E!=-1){D[C]=document.createElement("input");D[C].type="hidden";D[C].name=B[C].substring(0,E);D[C].value=B[C].substring(E+1);this._formNode.appendChild(D[C]);}}return D;},uploadFile:function(D,M,E,C){var N=this;var H="yuiIO"+D.tId;var I="multipart/form-data";var K=document.getElementById(H);var J=(M&&M.argument)?M.argument:null;var B={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",E);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",H);if(YAHOO.env.ua.ie){this._formNode.setAttribute("encoding",I);}else{this._formNode.setAttribute("enctype",I);}if(C){var L=this.appendPostData(C);}this._formNode.submit();this.startEvent.fire(D,J);if(D.startEvent){D.startEvent.fire(D,J);}if(M&&M.timeout){this._timeOut[D.tId]=window.setTimeout(function(){N.abort(D,M,true);},M.timeout);}if(L&&L.length>0){for(var G=0;G<L.length;G++){this._formNode.removeChild(L[G]);}}for(var A in B){if(YAHOO.lang.hasOwnProperty(B,A)){if(B[A]){this._formNode.setAttribute(A,B[A]);}else{this._formNode.removeAttribute(A);}}}this.resetFormState();var F=function(){if(M&&M.timeout){window.clearTimeout(N._timeOut[D.tId]); | ||
19 | +delete N._timeOut[D.tId];}N.completeEvent.fire(D,J);if(D.completeEvent){D.completeEvent.fire(D,J);}var P={};P.tId=D.tId;P.argument=M.argument;try{P.responseText=K.contentWindow.document.body?K.contentWindow.document.body.innerHTML:K.contentWindow.document.documentElement.textContent;P.responseXML=K.contentWindow.document.XMLDocument?K.contentWindow.document.XMLDocument:K.contentWindow.document;}catch(O){}if(M&&M.upload){if(!M.scope){M.upload(P);YAHOO.log("Upload callback.","info","Connection");}else{M.upload.apply(M.scope,[P]);YAHOO.log("Upload callback with scope.","info","Connection");}}N.uploadEvent.fire(P);if(D.uploadEvent){D.uploadEvent.fire(P);}YAHOO.util.Event.removeListener(K,"load",F);setTimeout(function(){document.body.removeChild(K);N.releaseObject(D);YAHOO.log("File upload iframe destroyed. Id is:"+H,"info","Connection");},100);};YAHOO.util.Event.addListener(K,"load",F);},abort:function(E,G,A){var D;var B=(G&&G.argument)?G.argument:null;if(E&&E.conn){if(this.isCallInProgress(E)){E.conn.abort();window.clearInterval(this._poll[E.tId]);delete this._poll[E.tId];if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{if(E&&E.isUpload===true){var C="yuiIO"+E.tId;var F=document.getElementById(C);if(F){YAHOO.util.Event.removeListener(F,"load");document.body.removeChild(F);YAHOO.log("File upload iframe destroyed. Id is:"+C,"info","Connection");if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{D=false;}}if(D===true){this.abortEvent.fire(E,B);if(E.abortEvent){E.abortEvent.fire(E,B);}this.handleTransactionResponse(E,G,true);YAHOO.log("Transaction "+E.tId+" aborted.","info","Connection");}return D;},isCallInProgress:function(B){if(B&&B.conn){return B.conn.readyState!==4&&B.conn.readyState!==0;}else{if(B&&B.isUpload===true){var A="yuiIO"+B.tId;return document.getElementById(A)?true:false;}else{return false;}}},releaseObject:function(A){if(A&&A.conn){A.conn=null;YAHOO.log("Connection object for transaction "+A.tId+" destroyed.","info","Connection");A=null;}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.5.2",build:"1076"});(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F);};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames);},setAttribute:function(C,E,D){if(this.patterns.noNegatives.test(C)){E=(E>0)?E:0;}B.Dom.setStyle(this.getEl(),C,E+D);},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}return G;},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1;}}else{E=I+F[D]["by"]*1;}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true;},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M);};this.getEl=function(){return E;};this.isAnimated=function(){return D;};this.getStartTime=function(){return F;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}B.AnimMgr.registerElement(this);return true;};this.stop=function(M){if(!this.isAnimated()){return false;}if(M){this.currentFrame=this.totalFrames;this._onTween.fire();}B.AnimMgr.stop(this);};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M);}D=true;H=0;F=new Date();};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame);};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit);}H+=1;};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps);};D=false;H=0;this.onComplete.fire(N);};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G);}};B.Anim=A;})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false;}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval(this.run,this.delay);}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0);}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G;}}return -1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H);};A.NAME="ColorAnim";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E;}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)];}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)];}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)];}return null;};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var H=YAHOO.util.Dom.getStyle(G,E); | ||
20 | +if(this.patterns.transparent.test(H)){var F=G.parentNode;H=C.Dom.getStyle(F,E);while(F&&this.patterns.transparent.test(H)){F=F.parentNode;H=C.Dom.getStyle(F,E);if(F.tagName.toUpperCase()=="HTML"){H="#fff";}}}}else{H=D.getAttribute.call(this,E);}return H;};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H]);}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")";}else{I=D.doMethod.call(this,F,J,G);}return I;};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I];}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G;}};C.ColorAnim=A;})(); | ||
21 | +/* | ||
22 | +TERMS OF USE - EASING EQUATIONS | ||
23 | +Open source under the BSD License. | ||
24 | +Copyright 2001 Robert Penner All rights reserved. | ||
25 | + | ||
26 | +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | ||
27 | + | ||
28 | + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
29 | + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | ||
30 | + * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. | ||
31 | + | ||
32 | +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
33 | +*/ | ||
34 | +YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return -D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return -D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return -D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return -(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return -0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J);}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H);}else{F.setAttribute.call(this,G,I,H);}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")];}else{H=F.getAttribute.call(this,G);}return H;};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I);}else{J=F.doMethod.call(this,G,K,H);}return J;};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0] instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M];}L=K;}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative");}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"]);}else{E.Dom.setXY(H,E.Dom.getXY(H));}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G); | ||
35 | +var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.5.2",build:"1076"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(D,C){for(var E in this.ids){for(var B in this.ids[E]){var F=this.ids[E][B];if(!this.isTypeOfDD(F)){continue;}F[D].apply(F,C);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(B){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(C,B){if(!this.initialized){this.init();}if(!this.ids[B]){this.ids[B]={};}this.ids[B][C.id]=C;},removeDDFromGroup:function(D,B){if(!this.ids[B]){this.ids[B]={};}var C=this.ids[B];if(C&&C[D.id]){delete C[D.id];}},_remove:function(C){for(var B in C.groups){if(B&&this.ids[B][C.id]){delete this.ids[B][C.id];}}delete this.handleIds[C.id];},regHandle:function(C,B){if(!this.handleIds[C]){this.handleIds[C]={};}this.handleIds[C][B]=B;},isDragDrop:function(B){return(this.getDDById(B))?true:false;},getRelated:function(G,C){var F=[];for(var E in G.groups){for(var D in this.ids[E]){var B=this.ids[E][D];if(!this.isTypeOfDD(B)){continue;}if(!C||B.isTarget){F[F.length]=B;}}}return F;},isLegalTarget:function(F,E){var C=this.getRelated(F,true);for(var D=0,B=C.length;D<B;++D){if(C[D].id==E.id){return true;}}return false;},isTypeOfDD:function(B){return(B&&B.__ygDragDrop);},isHandle:function(C,B){return(this.handleIds[C]&&this.handleIds[C][B]);},getDDById:function(C){for(var B in this.ids){if(this.ids[B][C]){return this.ids[B][C];}}return null;},handleMouseDown:function(D,C){this.currentTarget=YAHOO.util.Event.getTarget(D);this.dragCurrent=C;var B=C.getEl();this.startX=YAHOO.util.Event.getPageX(D);this.startY=YAHOO.util.Event.getPageY(D);this.deltaX=this.startX-B.offsetLeft;this.deltaY=this.startY-B.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var E=YAHOO.util.DDM;E.startDrag(E.startX,E.startY);E.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(B,D){clearTimeout(this.clickTimeout);var C=this.dragCurrent;if(C&&C.events.b4StartDrag){C.b4StartDrag(B,D);C.fireEvent("b4StartDragEvent",{x:B,y:D});}if(C&&C.events.startDrag){C.startDrag(B,D);C.fireEvent("startDragEvent",{x:B,y:D});}this.dragThreshMet=true;},handleMouseUp:function(B){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(B);}this.fromTimeout=false;this.fireEvents(B,true);}else{}this.stopDrag(B);this.stopEvent(B);}},stopEvent:function(B){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(B);}if(this.preventDefault){YAHOO.util.Event.preventDefault(B);}},stopDrag:function(D,C){var B=this.dragCurrent;if(B&&!C){if(this.dragThreshMet){if(B.events.b4EndDrag){B.b4EndDrag(D);B.fireEvent("b4EndDragEvent",{e:D});}if(B.events.endDrag){B.endDrag(D);B.fireEvent("endDragEvent",{e:D});}}if(B.events.mouseUp){B.onMouseUp(D);B.fireEvent("mouseUpEvent",{e:D});}}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(E){var B=this.dragCurrent;if(B){if(YAHOO.util.Event.isIE&&!E.button){this.stopEvent(E);return this.handleMouseUp(E);}else{if(E.clientX<0||E.clientY<0){}}if(!this.dragThreshMet){var D=Math.abs(this.startX-YAHOO.util.Event.getPageX(E));var C=Math.abs(this.startY-YAHOO.util.Event.getPageY(E));if(D>this.clickPixelThresh||C>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(B&&B.events.b4Drag){B.b4Drag(E);B.fireEvent("b4DragEvent",{e:E});}if(B&&B.events.drag){B.onDrag(E);B.fireEvent("dragEvent",{e:E});}if(B){this.fireEvents(E,false);}}this.stopEvent(E);}},fireEvents:function(U,K){var Z=this.dragCurrent;if(!Z||Z.isLocked()||Z.dragOnly){return ;}var M=YAHOO.util.Event.getPageX(U),L=YAHOO.util.Event.getPageY(U),O=new YAHOO.util.Point(M,L),J=Z.getTargetCoord(O.x,O.y),E=Z.getDragEl(),D=["out","over","drop","enter"],T=new YAHOO.util.Region(J.y,J.x+E.offsetWidth,J.y+E.offsetHeight,J.x),H=[],C={},P=[],a={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var R in this.dragOvers){var c=this.dragOvers[R];if(!this.isTypeOfDD(c)){continue;}if(!this.isOverTarget(O,c,this.mode,T)){a.outEvts.push(c);}H[R]=true;delete this.dragOvers[R];}for(var Q in Z.groups){if("string"!=typeof Q){continue;}for(R in this.ids[Q]){var F=this.ids[Q][R];if(!this.isTypeOfDD(F)){continue;}if(F.isTarget&&!F.isLocked()&&F!=Z){if(this.isOverTarget(O,F,this.mode,T)){C[Q]=true;if(K){a.dropEvts.push(F);}else{if(!H[F.id]){a.enterEvts.push(F);}else{a.overEvts.push(F);}this.dragOvers[F.id]=F;}}}}}this.interactionInfo={out:a.outEvts,enter:a.enterEvts,over:a.overEvts,drop:a.dropEvts,point:O,draggedRegion:T,sourceRegion:this.locationCache[Z.id],validDrop:K};for(var B in C){P.push(B);}if(K&&!a.dropEvts.length){this.interactionInfo.validDrop=false;if(Z.events.invalidDrop){Z.onInvalidDrop(U);Z.fireEvent("invalidDropEvent",{e:U});}}for(R=0;R<D.length;R++){var X=null;if(a[D[R]+"Evts"]){X=a[D[R]+"Evts"];}if(X&&X.length){var G=D[R].charAt(0).toUpperCase()+D[R].substr(1),W="onDrag"+G,I="b4Drag"+G,N="drag"+G+"Event",V="drag"+G;if(this.mode){if(Z.events[I]){Z[I](U,X,P);Z.fireEvent(I+"Event",{event:U,info:X,group:P});}if(Z.events[V]){Z[W](U,X,P);Z.fireEvent(N,{event:U,info:X,group:P});}}else{for(var Y=0,S=X.length;Y<S;++Y){if(Z.events[I]){Z[I](U,X[Y].id,P[0]);Z.fireEvent(I+"Event",{event:U,info:X[Y].id,group:P[0]});}if(Z.events[V]){Z[W](U,X[Y].id,P[0]);Z.fireEvent(N,{event:U,info:X[Y].id,group:P[0]}); | ||
36 | +}}}}}},getBestMatch:function(D){var F=null;var C=D.length;if(C==1){F=D[0];}else{for(var E=0;E<C;++E){var B=D[E];if(this.mode==this.INTERSECT&&B.cursorIsOver){F=B;break;}else{if(!F||!F.overlap||(B.overlap&&F.overlap.getArea()<B.overlap.getArea())){F=B;}}}}return F;},refreshCache:function(C){var E=C||this.ids;for(var B in E){if("string"!=typeof B){continue;}for(var D in this.ids[B]){var F=this.ids[B][D];if(this.isTypeOfDD(F)){var G=this.getLocation(F);if(G){this.locationCache[F.id]=G;}else{delete this.locationCache[F.id];}}}}},verifyEl:function(C){try{if(C){var B=C.offsetParent;if(B){return true;}}}catch(D){}return false;},getLocation:function(G){if(!this.isTypeOfDD(G)){return null;}var E=G.getEl(),J,D,C,L,K,M,B,I,F;try{J=YAHOO.util.Dom.getXY(E);}catch(H){}if(!J){return null;}D=J[0];C=D+E.offsetWidth;L=J[1];K=L+E.offsetHeight;M=L-G.padding[0];B=C+G.padding[1];I=K+G.padding[2];F=D-G.padding[3];return new YAHOO.util.Region(M,B,I,F);},isOverTarget:function(J,B,D,E){var F=this.locationCache[B.id];if(!F||!this.useCache){F=this.getLocation(B);this.locationCache[B.id]=F;}if(!F){return false;}B.cursorIsOver=F.contains(J);var I=this.dragCurrent;if(!I||(!D&&!I.constrainX&&!I.constrainY)){return B.cursorIsOver;}B.overlap=null;if(!E){var G=I.getTargetCoord(J.x,J.y);var C=I.getDragEl();E=new YAHOO.util.Region(G.y,G.x+C.offsetWidth,G.y+C.offsetHeight,G.x);}var H=E.intersect(F);if(H){B.overlap=H;return(D)?true:B.cursorIsOver;}else{return false;}},_onUnload:function(C,B){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(C){var B=this.elementCache[C];if(!B||!B.el){B=this.elementCache[C]=new this.ElementWrapper(YAHOO.util.Dom.get(C));}return B;},getElement:function(B){return YAHOO.util.Dom.get(B);},getCss:function(C){var B=YAHOO.util.Dom.get(C);return(B)?B.style:null;},ElementWrapper:function(B){this.el=B||null;this.id=this.el&&B.id;this.css=this.el&&B.style;},getPosX:function(B){return YAHOO.util.Dom.getX(B);},getPosY:function(B){return YAHOO.util.Dom.getY(B);},swapNode:function(D,B){if(D.swapNode){D.swapNode(B);}else{var E=B.parentNode;var C=B.nextSibling;if(C==D){E.insertBefore(D,B);}else{if(B==D.nextSibling){E.insertBefore(B,D);}else{D.parentNode.replaceChild(B,D);E.insertBefore(D,C);}}}},getScroll:function(){var D,B,E=document.documentElement,C=document.body;if(E&&(E.scrollTop||E.scrollLeft)){D=E.scrollTop;B=E.scrollLeft;}else{if(C){D=C.scrollTop;B=C.scrollLeft;}else{}}return{top:D,left:B};},getStyle:function(C,B){return YAHOO.util.Dom.getStyle(C,B);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(B,D){var C=YAHOO.util.Dom.getXY(D);YAHOO.util.Dom.setXY(B,C);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(C,B){return(C-B);},_timeoutCount:0,_addListeners:function(){var B=YAHOO.util.DDM;if(YAHOO.util.Event&&document){B._onLoad();}else{if(B._timeoutCount>2000){}else{setTimeout(B._addListeners,10);if(document&&document.body){B._timeoutCount+=1;}}}},handleWasClicked:function(B,D){if(this.isHandle(D,B.id)){return true;}else{var C=B.parentNode;while(C){if(this.isHandle(D,C.id)){return true;}else{C=C.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id);}return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event");}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false;}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false); | ||
37 | +},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return ;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(H,G){var D=H.which||H.button;if(this.primaryButtonOnly&&D>1){return ;}if(this.isLocked()){return ;}var C=this.b4MouseDown(H);if(this.events.b4MouseDown){C=this.fireEvent("b4MouseDownEvent",H);}var E=this.onMouseDown(H);if(this.events.mouseDown){E=this.fireEvent("mouseDownEvent",H);}if((C===false)||(E===false)){return ;}this.DDM.refreshCache(this.groups);var F=new YAHOO.util.Point(A.getPageX(H),A.getPageY(H));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(F,this)){}else{if(this.clickValidator(H)){this.setStartPosition();this.DDM.handleMouseDown(H,this);this.DDM.stopEvent(H);}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.maxX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D);}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y]; | ||
38 | +}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return ;}var G=this.getDragEl(),E=YAHOO.util.Dom;if(!G){G=document.createElement("div");G.id=this.dragElId;var D=G.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");G.appendChild(C);if(YAHOO.env.ua.ie){var F=document.createElement("iframe");F.setAttribute("src","javascript:");F.setAttribute("scrolling","no");F.setAttribute("frameborder","0");G.insertBefore(F,G.firstChild);E.setStyle(F,"height","100%");E.setStyle(F,"width","100%");E.setStyle(F,"position","absolute");E.setStyle(F,"top","0");E.setStyle(F,"left","0");E.setStyle(F,"opacity","0");E.setStyle(F,"zIndex","-1");E.setStyle(F.nextSibling,"zIndex","2");}A.insertBefore(G,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.5.2",build:"1076"});YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,validator:null,getValue:function(){return this.value;},setValue:function(F,B){var E;var A=this.owner;var C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(A,F)){return false;}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false;}}if(this.method){this.method.call(A,F);}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D);}return true;},configure:function(B,C){B=B||{};this._written=false;this._initialConfig=this._initialConfig||{};for(var A in B){if(A&&YAHOO.lang.hasOwnProperty(B,A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig);},refresh:function(A){this.setValue(this.value,A);}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B){return undefined;}return B.value;},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false;}return C.setValue(E,B);},getAttributeKeys:function(){this._configs=this._configs;var D=[];var B;for(var C in this._configs){B=this._configs[C];if(A.hasOwnProperty(this._configs,C)&&!A.isUndefined(B)){D[D.length]=C;}}return D;},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B);}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true;}return false;},refresh:function(E,C){this._configs=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(this._configs[E[D]]&&!A.isUndefined(this._configs[E[D]].value)&&!A.isNull(this._configs[E[D]].value)){this._configs[E[D]].refresh(C);}}},register:function(B,C){this.setAttributeConfig(B,C);},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C];}}return D;},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C);}else{this._configs[B].configure(C,D);}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D);},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig();},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C);},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B);},createAttribute:function(B){return new YAHOO.util.Attribute(B,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var D=YAHOO.util.Dom,F=YAHOO.util.AttributeProvider;YAHOO.util.Element=function(G,H){if(arguments.length){this.init(G,H);}};YAHOO.util.Element.prototype={DOM_EVENTS:null,appendChild:function(G){G=G.get?G.get("element"):G;this.get("element").appendChild(G);},getElementsByTagName:function(G){return this.get("element").getElementsByTagName(G);},hasChildNodes:function(){return this.get("element").hasChildNodes();},insertBefore:function(G,H){G=G.get?G.get("element"):G;H=(H&&H.get)?H.get("element"):H;this.get("element").insertBefore(G,H);},removeChild:function(G){G=G.get?G.get("element"):G;this.get("element").removeChild(G);return true;},replaceChild:function(G,H){G=G.get?G.get("element"):G;H=H.get?H.get("element"):H;return this.get("element").replaceChild(G,H);},initAttributes:function(G){},addListener:function(K,J,L,I){var H=this.get("element");I=I||this;H=this.get("id")||H;var G=this;if(!this._events[K]){if(this.DOM_EVENTS[K]){YAHOO.util.Event.addListener(H,K,function(M){if(M.srcElement&&!M.target){M.target=M.srcElement;}G.fireEvent(K,M);},L,I);}this.createEvent(K,this);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.addListener.apply(this,arguments);},subscribe:function(){this.addListener.apply(this,arguments);},removeListener:function(H,G){this.unsubscribe.apply(this,arguments);},addClass:function(G){D.addClass(this.get("element"),G);},getElementsByClassName:function(H,G){return D.getElementsByClassName(H,G,this.get("element"));},hasClass:function(G){return D.hasClass(this.get("element"),G);},removeClass:function(G){return D.removeClass(this.get("element"),G);},replaceClass:function(H,G){return D.replaceClass(this.get("element"),H,G);},setStyle:function(I,H){var G=this.get("element");if(!G){return this._queue[this._queue.length]=["setStyle",arguments];}return D.setStyle(G,I,H);},getStyle:function(G){return D.getStyle(this.get("element"),G);},fireQueue:function(){var H=this._queue;for(var I=0,G=H.length;I<G;++I){this[H[I][0]].apply(this,H[I][1]);}},appendTo:function(H,I){H=(H.get)?H.get("element"):D.get(H);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:H});I=(I&&I.get)?I.get("element"):D.get(I);var G=this.get("element");if(!G){return false;}if(!H){return false;}if(G.parent!=H){if(I){H.insertBefore(G,I);}else{H.appendChild(G);}}this.fireEvent("appendTo",{type:"appendTo",target:H});},get:function(G){var I=this._configs||{};var H=I.element;if(H&&!I[G]&&!YAHOO.lang.isUndefined(H.value[G])){return H.value[G];}return F.prototype.get.call(this,G);},setAttributes:function(L,H){var K=this.get("element"); | ||
39 | +for(var J in L){if(!this._configs[J]&&!YAHOO.lang.isUndefined(K[J])){this.setAttributeConfig(J);}}for(var I=0,G=this._configOrder.length;I<G;++I){if(L[this._configOrder[I]]!==undefined){this.set(this._configOrder[I],L[this._configOrder[I]],H);}}},set:function(H,J,G){var I=this.get("element");if(!I){this._queue[this._queue.length]=["set",arguments];if(this._configs[H]){this._configs[H].value=J;}return ;}if(!this._configs[H]&&!YAHOO.lang.isUndefined(I[H])){C.call(this,H);}return F.prototype.set.apply(this,arguments);},setAttributeConfig:function(G,I,J){var H=this.get("element");if(H&&!this._configs[G]&&!YAHOO.lang.isUndefined(H[G])){C.call(this,G,I);}else{F.prototype.setAttributeConfig.apply(this,arguments);}this._configOrder.push(G);},getAttributeKeys:function(){var H=this.get("element");var I=F.prototype.getAttributeKeys.call(this);for(var G in H){if(!this._configs[G]){I[G]=I[G]||H[G];}}return I;},createEvent:function(H,G){this._events[H]=true;F.prototype.createEvent.apply(this,arguments);},init:function(H,G){A.apply(this,arguments);}};var A=function(H,G){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];G=G||{};G.element=G.element||H||null;this.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true};var I=false;if(YAHOO.lang.isString(H)){C.call(this,"id",{value:G.element});}if(D.get(H)){I=true;E.call(this,G);B.call(this,G);}YAHOO.util.Event.onAvailable(G.element,function(){if(!I){E.call(this,G);}this.fireEvent("available",{type:"available",target:G.element});},this,true);YAHOO.util.Event.onContentReady(G.element,function(){if(!I){B.call(this,G);}this.fireEvent("contentReady",{type:"contentReady",target:G.element});},this,true);};var E=function(G){this.setAttributeConfig("element",{value:D.get(G.element),readOnly:true});};var B=function(G){this.initAttributes(G);this.setAttributes(G,true);this.fireQueue();};var C=function(G,I){var H=this.get("element");I=I||{};I.name=G;I.method=I.method||function(J){H[G]=J;};I.value=I.value||H[G];this._configs[G]=new YAHOO.util.Attribute(I,this);};YAHOO.augment(YAHOO.util.Element,F);})();YAHOO.register("element",YAHOO.util.Element,{version:"2.5.2",build:"1076"});YAHOO.register("utilities", YAHOO, {version: "2.5.2", build: "1076"}); | ||
40 | +<?php if(extension_loaded('zlib')){ob_end_flush();}?> | ||
0 | \ No newline at end of file | 41 | \ No newline at end of file |
pacotes/yui252/build/yahoo-dom-event/yahoo-dom-event.php
0 → 100644
@@ -0,0 +1,14 @@ | @@ -0,0 +1,14 @@ | ||
1 | +<?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?> | ||
2 | +/* | ||
3 | +Copyright (c) 2008, Yahoo! Inc. All rights reserved. | ||
4 | +Code licensed under the BSD License: | ||
5 | +http://developer.yahoo.net/yui/license.txt | ||
6 | +version: 2.5.2 | ||
7 | +*/ | ||
8 | +if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var A=YAHOO.lang,C=["toString","valueOf"],B={isArray:function(D){if(D){return A.isNumber(D.length)&&A.isFunction(D.splice);}return false;},isBoolean:function(D){return typeof D==="boolean";},isFunction:function(D){return typeof D==="function";},isNull:function(D){return D===null;},isNumber:function(D){return typeof D==="number"&&isFinite(D);},isObject:function(D){return(D&&(typeof D==="object"||A.isFunction(D)))||false;},isString:function(D){return typeof D==="string";},isUndefined:function(D){return typeof D==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(F,E){for(var D=0;D<C.length;D=D+1){var H=C[D],G=E[H];if(A.isFunction(G)&&G!=Object.prototype[H]){F[H]=G;}}}:function(){},extend:function(H,I,G){if(!I||!H){throw new Error("extend failed, please check that "+"all dependencies are included.");}var E=function(){};E.prototype=I.prototype;H.prototype=new E();H.prototype.constructor=H;H.superclass=I.prototype;if(I.prototype.constructor==Object.prototype.constructor){I.prototype.constructor=I;}if(G){for(var D in G){if(A.hasOwnProperty(G,D)){H.prototype[D]=G[D];}}A._IEEnumFix(H.prototype,G);}},augmentObject:function(H,G){if(!G||!H){throw new Error("Absorb failed, verify dependencies.");}var D=arguments,F,I,E=D[2];if(E&&E!==true){for(F=2;F<D.length;F=F+1){H[D[F]]=G[D[F]];}}else{for(I in G){if(E||!(I in H)){H[I]=G[I];}}A._IEEnumFix(H,G);}},augmentProto:function(G,F){if(!F||!G){throw new Error("Augment failed, verify dependencies.");}var D=[G.prototype,F.prototype];for(var E=2;E<arguments.length;E=E+1){D.push(arguments[E]);}A.augmentObject.apply(this,D);},dump:function(D,I){var F,H,K=[],L="{...}",E="f(){...}",J=", ",G=" => ";if(!A.isObject(D)){return D+"";}else{if(D instanceof Date||("nodeType" in D&&"tagName" in D)){return D;}else{if(A.isFunction(D)){return E;}}}I=(A.isNumber(I))?I:3;if(A.isArray(D)){K.push("[");for(F=0,H=D.length;F<H;F=F+1){if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}if(K.length>1){K.pop();}K.push("]");}else{K.push("{");for(F in D){if(A.hasOwnProperty(D,F)){K.push(F+G);if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}}if(K.length>1){K.pop();}K.push("}");}return K.join("");},substitute:function(S,E,L){var I,H,G,O,P,R,N=[],F,J="dump",M=" ",D="{",Q="}";for(;;){I=S.lastIndexOf(D);if(I<0){break;}H=S.indexOf(Q,I);if(I+1>=H){break;}F=S.substring(I+1,H);O=F;R=null;G=O.indexOf(M);if(G>-1){R=O.substring(G+1);O=O.substring(0,G);}P=E[O];if(L){P=L(O,P,R);}if(A.isObject(P)){if(A.isArray(P)){P=A.dump(P,parseInt(R,10));}else{R=R||"";var K=R.indexOf(J);if(K>-1){R=R.substring(4);}if(P.toString===Object.prototype.toString||K>-1){P=A.dump(P,parseInt(R,10));}else{P=P.toString();}}}else{if(!A.isString(P)&&!A.isNumber(P)){P="~-"+N.length+"-~";N[N.length]=F;}}S=S.substring(0,I)+P+S.substring(H+1);}for(I=N.length-1;I>=0;I=I-1){S=S.replace(new RegExp("~-"+I+"-~"),"{"+N[I]+"}","g");}return S;},trim:function(D){try{return D.replace(/^\s+|\s+$/g,"");}catch(E){return D;}},merge:function(){var G={},E=arguments;for(var F=0,D=E.length;F<D;F=F+1){A.augmentObject(G,E[F],true);}return G;},later:function(K,E,L,G,H){K=K||0;E=E||{};var F=L,J=G,I,D;if(A.isString(L)){F=E[L];}if(!F){throw new TypeError("method undefined");}if(!A.isArray(J)){J=[G];}I=function(){F.apply(E,J);};D=(H)?setInterval(I,K):setTimeout(I,K);return{interval:H,cancel:function(){if(this.interval){clearInterval(D);}else{clearTimeout(D);}}};},isValue:function(D){return(A.isObject(D)||A.isString(D)||A.isNumber(D)||A.isBoolean(D));}};A.hasOwnProperty=(Object.prototype.hasOwnProperty)?function(D,E){return D&&D.hasOwnProperty(E);}:function(D,E){return !A.isUndefined(D[E])&&D.constructor.prototype[E]!==D[E];};B.augmentObject(A,B,true);YAHOO.util.Lang=A;A.augment=A.augmentProto;YAHOO.augment=A.augmentProto;YAHOO.extend=A.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.5.2",build:"1076"});(function(){var B=YAHOO.util,K,I,J={},F={},M=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var C=YAHOO.env.ua.opera,L=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var N=function(P){if(!E.HYPHEN.test(P)){return P;}if(J[P]){return J[P];}var Q=P;while(E.HYPHEN.exec(Q)){Q=Q.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}J[P]=Q;return Q;};var O=function(Q){var P=F[Q];if(!P){P=new RegExp("(?:^|\\s+)"+Q+"(?:\\s+|$)");F[Q]=P;}return P;};if(M.defaultView&&M.defaultView.getComputedStyle){K=function(P,S){var R=null;if(S=="float"){S="cssFloat";}var Q=P.ownerDocument.defaultView.getComputedStyle(P,"");if(Q){R=Q[N(S)];}return P.style[S]||R;};}else{if(M.documentElement.currentStyle&&G){K=function(P,R){switch(N(R)){case"opacity":var T=100;try{T=P.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(S){try{T=P.filters("alpha").opacity;}catch(S){}}return T/100;case"float":R="styleFloat";default:var Q=P.currentStyle?P.currentStyle[R]:null;return(P.style[R]||Q);}};}else{K=function(P,Q){return P.style[Q];};}}if(G){I=function(P,Q,R){switch(Q){case"opacity":if(YAHOO.lang.isString(P.style.filter)){P.style.filter="alpha(opacity="+R*100+")";if(!P.currentStyle||!P.currentStyle.hasLayout){P.style.zoom=1;}}break;case"float":Q="styleFloat";default:P.style[Q]=R;}};}else{I=function(P,Q,R){if(Q=="float"){Q="cssFloat";}P.style[Q]=R;};}var D=function(P,Q){return P&&P.nodeType==1&&(!Q||Q(P));};YAHOO.util.Dom={get:function(R){if(R&&(R.nodeType||R.item)){return R;}if(YAHOO.lang.isString(R)||!R){return M.getElementById(R);}if(R.length!==undefined){var S=[];for(var Q=0,P=R.length;Q<P;++Q){S[S.length]=B.Dom.get(R[Q]);}return S;}return R;},getStyle:function(P,R){R=N(R);var Q=function(S){return K(S,R);};return B.Dom.batch(P,Q,B.Dom,true);},setStyle:function(P,R,S){R=N(R);var Q=function(T){I(T,R,S);};B.Dom.batch(P,Q,B.Dom,true);},getXY:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false;}return H(R);};return B.Dom.batch(P,Q,B.Dom,true);},getX:function(P){var Q=function(R){return B.Dom.getXY(R)[0];};return B.Dom.batch(P,Q,B.Dom,true);},getY:function(P){var Q=function(R){return B.Dom.getXY(R)[1];};return B.Dom.batch(P,Q,B.Dom,true);},setXY:function(P,S,R){var Q=function(V){var U=this.getStyle(V,"position");if(U=="static"){this.setStyle(V,"position","relative");U="relative";}var X=this.getXY(V);if(X===false){return false;}var W=[parseInt(this.getStyle(V,"left"),10),parseInt(this.getStyle(V,"top"),10)];if(isNaN(W[0])){W[0]=(U=="relative")?0:V.offsetLeft;}if(isNaN(W[1])){W[1]=(U=="relative")?0:V.offsetTop;}if(S[0]!==null){V.style.left=S[0]-X[0]+W[0]+"px";}if(S[1]!==null){V.style.top=S[1]-X[1]+W[1]+"px";}if(!R){var T=this.getXY(V);if((S[0]!==null&&T[0]!=S[0])||(S[1]!==null&&T[1]!=S[1])){this.setXY(V,S,true);}}};B.Dom.batch(P,Q,B.Dom,true);},setX:function(Q,P){B.Dom.setXY(Q,[P,null]);},setY:function(P,Q){B.Dom.setXY(P,[null,Q]);},getRegion:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false;}var S=B.Region.getRegion(R);return S;};return B.Dom.batch(P,Q,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(T,X,U,V){X=X||"*";U=(U)?B.Dom.get(U):null||M;if(!U){return[];}var Q=[],P=U.getElementsByTagName(X),W=O(T);for(var R=0,S=P.length;R<S;++R){if(W.test(P[R].className)){Q[Q.length]=P[R];if(V){V.call(P[R],P[R]);}}}return Q;},hasClass:function(R,Q){var P=O(Q);var S=function(T){return P.test(T.className);};return B.Dom.batch(R,S,B.Dom,true);},addClass:function(Q,P){var R=function(S){if(this.hasClass(S,P)){return false;}S.className=YAHOO.lang.trim([S.className,P].join(" "));return true;};return B.Dom.batch(Q,R,B.Dom,true);},removeClass:function(R,Q){var P=O(Q);var S=function(T){if(!Q||!this.hasClass(T,Q)){return false;}var U=T.className;T.className=U.replace(P," ");if(this.hasClass(T,Q)){this.removeClass(T,Q);}T.className=YAHOO.lang.trim(T.className);return true;};return B.Dom.batch(R,S,B.Dom,true);},replaceClass:function(S,Q,P){if(!P||Q===P){return false;}var R=O(Q);var T=function(U){if(!this.hasClass(U,Q)){this.addClass(U,P);return true;}U.className=U.className.replace(R," "+P+" ");if(this.hasClass(U,Q)){this.replaceClass(U,Q,P);}U.className=YAHOO.lang.trim(U.className);return true;};return B.Dom.batch(S,T,B.Dom,true);},generateId:function(P,R){R=R||"yui-gen";var Q=function(S){if(S&&S.id){return S.id;}var T=R+YAHOO.env._id_counter++;if(S){S.id=T;}return T;};return B.Dom.batch(P,Q,B.Dom,true)||Q.apply(B.Dom,arguments);},isAncestor:function(P,Q){P=B.Dom.get(P);Q=B.Dom.get(Q);if(!P||!Q){return false;}if(P.contains&&Q.nodeType&&!L){return P.contains(Q);}else{if(P.compareDocumentPosition&&Q.nodeType){return !!(P.compareDocumentPosition(Q)&16);}else{if(Q.nodeType){return !!this.getAncestorBy(Q,function(R){return R==P;});}}}return false;},inDocument:function(P){return this.isAncestor(M.documentElement,P);},getElementsBy:function(W,Q,R,T){Q=Q||"*";R=(R)?B.Dom.get(R):null||M;if(!R){return[];}var S=[],V=R.getElementsByTagName(Q);for(var U=0,P=V.length;U<P;++U){if(W(V[U])){S[S.length]=V[U];if(T){T(V[U]);}}}return S;},batch:function(T,W,V,R){T=(T&&(T.tagName||T.item))?T:B.Dom.get(T);if(!T||!W){return false;}var S=(R)?V:window;if(T.tagName||T.length===undefined){return W.call(S,T,V);}var U=[];for(var Q=0,P=T.length;Q<P;++Q){U[U.length]=W.call(S,T[Q],V);}return U;},getDocumentHeight:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollHeight:M.documentElement.scrollHeight;var P=Math.max(Q,B.Dom.getViewportHeight());return P;},getDocumentWidth:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollWidth:M.documentElement.scrollWidth;var P=Math.max(Q,B.Dom.getViewportWidth());return P;},getViewportHeight:function(){var P=self.innerHeight; | ||
9 | +var Q=M.compatMode;if((Q||G)&&!C){P=(Q=="CSS1Compat")?M.documentElement.clientHeight:M.body.clientHeight;}return P;},getViewportWidth:function(){var P=self.innerWidth;var Q=M.compatMode;if(Q||G){P=(Q=="CSS1Compat")?M.documentElement.clientWidth:M.body.clientWidth;}return P;},getAncestorBy:function(P,Q){while(P=P.parentNode){if(D(P,Q)){return P;}}return null;},getAncestorByClassName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return B.Dom.hasClass(S,P);};return B.Dom.getAncestorBy(Q,R);},getAncestorByTagName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return S.tagName&&S.tagName.toUpperCase()==P.toUpperCase();};return B.Dom.getAncestorBy(Q,R);},getPreviousSiblingBy:function(P,Q){while(P){P=P.previousSibling;if(D(P,Q)){return P;}}return null;},getPreviousSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getPreviousSiblingBy(P);},getNextSiblingBy:function(P,Q){while(P){P=P.nextSibling;if(D(P,Q)){return P;}}return null;},getNextSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getNextSiblingBy(P);},getFirstChildBy:function(P,R){var Q=(D(P.firstChild,R))?P.firstChild:null;return Q||B.Dom.getNextSiblingBy(P.firstChild,R);},getFirstChild:function(P,Q){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getFirstChildBy(P);},getLastChildBy:function(P,R){if(!P){return null;}var Q=(D(P.lastChild,R))?P.lastChild:null;return Q||B.Dom.getPreviousSiblingBy(P.lastChild,R);},getLastChild:function(P){P=B.Dom.get(P);return B.Dom.getLastChildBy(P);},getChildrenBy:function(Q,S){var R=B.Dom.getFirstChildBy(Q,S);var P=R?[R]:[];B.Dom.getNextSiblingBy(R,function(T){if(!S||S(T)){P[P.length]=T;}return false;});return P;},getChildren:function(P){P=B.Dom.get(P);if(!P){}return B.Dom.getChildrenBy(P);},getDocumentScrollLeft:function(P){P=P||M;return Math.max(P.documentElement.scrollLeft,P.body.scrollLeft);},getDocumentScrollTop:function(P){P=P||M;return Math.max(P.documentElement.scrollTop,P.body.scrollTop);},insertBefore:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}return P.parentNode.insertBefore(Q,P);},insertAfter:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}if(P.nextSibling){return P.parentNode.insertBefore(Q,P.nextSibling);}else{return P.parentNode.appendChild(Q);}},getClientRegion:function(){var R=B.Dom.getDocumentScrollTop(),Q=B.Dom.getDocumentScrollLeft(),S=B.Dom.getViewportWidth()+Q,P=B.Dom.getViewportHeight()+R;return new B.Region(R,S,P,Q);}};var H=function(){if(M.documentElement.getBoundingClientRect){return function(Q){var R=Q.getBoundingClientRect();var P=Q.ownerDocument;return[R.left+B.Dom.getDocumentScrollLeft(P),R.top+B.Dom.getDocumentScrollTop(P)];};}else{return function(R){var S=[R.offsetLeft,R.offsetTop];var Q=R.offsetParent;var P=(L&&B.Dom.getStyle(R,"position")=="absolute"&&R.offsetParent==R.ownerDocument.body);if(Q!=R){while(Q){S[0]+=Q.offsetLeft;S[1]+=Q.offsetTop;if(!P&&L&&B.Dom.getStyle(Q,"position")=="absolute"){P=true;}Q=Q.offsetParent;}}if(P){S[0]-=R.ownerDocument.body.offsetLeft;S[1]-=R.ownerDocument.body.offsetTop;}Q=R.parentNode;while(Q.tagName&&!E.ROOT_TAG.test(Q.tagName)){if(Q.scrollTop||Q.scrollLeft){if(!E.OP_SCROLL.test(B.Dom.getStyle(Q,"display"))){if(!C||B.Dom.getStyle(Q,"overflow")!=="visible"){S[0]-=Q.scrollLeft;S[1]-=Q.scrollTop;}}}Q=Q.parentNode;}return S;};}}();})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.5.2",build:"1076"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true;}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true;}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0];}try{G=M.fn.call(L,B,M.obj);}catch(F){this.lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.type,I,M.obj);}catch(H){this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.silent){}break;}}}return(G!==false);},unsubscribeAll:function(){for(var A=this.subscribers.length-1;A>-1;A--){this._delete(A);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach();};this._interval=setInterval(L,this.POLL_INTERVAL);}},onAvailable:function(P,M,Q,O,N){var K=(YAHOO.lang.isString(P))?[P]:P;for(var L=0;L<K.length;L=L+1){F.push({id:K[L],fn:M,obj:Q,override:O,checkReady:N});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(M,K,N,L){this.onAvailable(M,K,N,L,true);},onDOMReady:function(K,M,L){if(this.DOMReady){setTimeout(function(){var N=window;if(L){if(L===true){N=M;}else{N=L;}}K.call(N,"DOMReady",[],M);},0);}else{this.DOMReadyEvent.subscribe(K,M,L);}},addListener:function(M,K,V,Q,L){if(!V||!V.call){return false;}if(this._isValidCollection(M)){var W=true;for(var R=0,T=M.length;R<T;++R){W=this.on(M[R],K,V,Q,L)&&W;}return W;}else{if(YAHOO.lang.isString(M)){var P=this.getEl(M);if(P){M=P;}else{this.onAvailable(M,function(){YAHOO.util.Event.on(M,K,V,Q,L);});return true;}}}if(!M){return false;}if("unload"==K&&Q!==this){J[J.length]=[M,K,V,Q,L];return true;}var Y=M;if(L){if(L===true){Y=Q;}else{Y=L;}}var N=function(Z){return V.call(Y,YAHOO.util.Event.getEvent(Z,M),Q);};var X=[M,K,V,N,Y,Q,L];var S=I.length;I[S]=X;if(this.useLegacyEvent(M,K)){var O=this.getLegacyIndex(M,K);if(O==-1||M!=G[O][0]){O=G.length;B[M.id+K]=O;G[O]=[M,K,M["on"+K]];E[O]=[];M["on"+K]=function(Z){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(Z),O);};}E[O].push(X);}else{try{this._simpleAdd(M,K,N,false);}catch(U){this.lastError=U;this.removeListener(M,K,V);return false;}}return true;},fireLegacyEvent:function(O,M){var Q=true,K,S,R,T,P;S=E[M].slice();for(var L=0,N=S.length;L<N;++L){R=S[L];if(R&&R[this.WFN]){T=R[this.ADJ_SCOPE];P=R[this.WFN].call(T,O);Q=(Q&&P);}}K=G[M];if(K&&K[2]){K[2](O);}return Q;},getLegacyIndex:function(L,M){var K=this.generateId(L)+M;if(typeof B[K]=="undefined"){return -1;}else{return B[K];}},useLegacyEvent:function(L,M){if(this.webkit&&("click"==M||"dblclick"==M)){var K=parseInt(this.webkit,10);if(!isNaN(K)&&K<418){return true;}}return false;},removeListener:function(L,K,T){var O,R,V;if(typeof L=="string"){L=this.getEl(L);}else{if(this._isValidCollection(L)){var U=true;for(O=L.length-1;O>-1;O--){U=(this.removeListener(L[O],K,T)&&U);}return U;}}if(!T||!T.call){return this.purgeElement(L,false,K);}if("unload"==K){for(O=J.length-1;O>-1;O--){V=J[O];if(V&&V[0]==L&&V[1]==K&&V[2]==T){J.splice(O,1);return true;}}return false;}var P=null;var Q=arguments[3];if("undefined"===typeof Q){Q=this._getCacheIndex(L,K,T);}if(Q>=0){P=I[Q];}if(!L||!P){return false;}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=E[N];if(M){for(O=0,R=M.length;O<R;++O){V=M[O];if(V&&V[this.EL]==L&&V[this.TYPE]==K&&V[this.FN]==T){M.splice(O,1);break;}}}}else{try{this._simpleRemove(L,K,P[this.WFN],false);}catch(S){this.lastError=S;return false;}}delete I[Q][this.WFN];delete I[Q][this.FN];I.splice(Q,1);return true;},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K);},resolveTextNode:function(L){try{if(L&&3==L.nodeType){return L.parentNode;}}catch(K){}return L;},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft();}}return K;},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop();}}return L; | ||
10 | +},getXY:function(K){return[this.getPageX(K),this.getPageY(K)];},getRelatedTarget:function(L){var K=L.relatedTarget;if(!K){if(L.type=="mouseout"){K=L.toElement;}else{if(L.type=="mouseover"){K=L.fromElement;}}}return this.resolveTextNode(K);},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L;}catch(K){this.lastError=K;return L;}}return M.time;},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K);},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation();}else{K.cancelBubble=true;}},preventDefault:function(K){if(K.preventDefault){K.preventDefault();}else{K.returnValue=false;}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break;}N=N.caller;}}return L;},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(YAHOO.env.ua.webkit&&(K in D)){K=D[K];}return K;},_getCacheIndex:function(O,P,N){for(var M=0,L=I.length;M<L;M=M+1){var K=I[M];if(K&&K[this.FN]==N&&K[this.EL]==O&&K[this.TYPE]==P){return M;}}return -1;},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+A;++A;K.id=L;}return L;},_isValidCollection:function(L){try{return(L&&typeof L!=="string"&&L.length&&!L.tagName&&!L.alert&&typeof L[0]!=="undefined");}catch(K){return false;}},elCache:{},getEl:function(K){return(typeof K==="string")?document.getElementById(K):K;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(L){if(!H){H=true;var K=YAHOO.util.Event;K._ready();K._tryPreloadAttach();}},_ready:function(L){var K=YAHOO.util.Event;if(!K.DOMReady){K.DOMReady=true;K.DOMReadyEvent.fire();K._simpleRemove(document,"DOMContentLoaded",K._ready);}},_tryPreloadAttach:function(){if(F.length===0){C=0;clearInterval(this._interval);this._interval=null;return ;}if(this.locked){return ;}if(this.isIE){if(!this.DOMReady){this.startInterval();return ;}}this.locked=true;var Q=!H;if(!Q){Q=(C>0&&F.length>0);}var P=[];var R=function(T,U){var S=T;if(U.override){if(U.override===true){S=U.obj;}else{S=U.override;}}U.fn.call(S,U.obj);};var L,K,O,N,M=[];for(L=0,K=F.length;L<K;L=L+1){O=F[L];if(O){N=this.getEl(O.id);if(N){if(O.checkReady){if(H||N.nextSibling||!Q){M.push(O);F[L]=null;}}else{R(N,O);F[L]=null;}}else{P.push(O);}}}for(L=0,K=M.length;L<K;L=L+1){O=M[L];R(this.getEl(O.id),O);}C--;if(Q){for(L=F.length-1;L>-1;L--){O=F[L];if(!O||!O.id){F.splice(L,1);}}this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=Q.length-1;N>-1;N--){var L=Q[N];this.removeListener(M,L.type,L.fn);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N<K;++N){this.purgeElement(M.childNodes[N],P,R);}}},getListeners:function(M,K){var P=[],L;if(!K){L=[I,J];}else{if(K==="unload"){L=[J];}else{L=[I];}}var R=(YAHOO.lang.isString(M))?this.getEl(M):M;for(var O=0;O<L.length;O=O+1){var T=L[O];if(T){for(var Q=0,S=T.length;Q<S;++Q){var N=T[Q];if(N&&N[this.EL]===R&&(!K||K===N[this.TYPE])){P.push({type:N[this.TYPE],fn:N[this.FN],obj:N[this.OBJ],adjust:N[this.OVERRIDE],scope:N[this.ADJ_SCOPE],index:Q});}}}}return(P.length)?P:null;},_unload:function(Q){var K=YAHOO.util.Event,N,M,L,P,O,R=J.slice();for(N=0,P=J.length;N<P;++N){L=R[N];if(L){var S=window;if(L[K.ADJ_SCOPE]){if(L[K.ADJ_SCOPE]===true){S=L[K.UNLOAD_OBJ];}else{S=L[K.ADJ_SCOPE];}}L[K.FN].call(S,K.getEvent(Q,L[K.EL]),L[K.UNLOAD_OBJ]);R[N]=null;L=null;S=null;}}J=null;if(I){for(M=I.length-1;M>-1;M--){L=I[M];if(L){K.removeListener(L[K.EL],L[K.TYPE],L[K.FN],M);}}L=null;}G=null;K._simpleRemove(window,"unload",K._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){return function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener; | ||
11 | +/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */ | ||
12 | +if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events; | ||
13 | +if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(J,I){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(J.shiftKey==F.shift&&J.altKey==F.alt&&J.ctrlKey==F.ctrl){var G;if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){G=F.keys[H];if(G==J.charCode){D.fire(J.charCode,J);break;}else{if(G==J.keyCode){D.fire(J.keyCode,J);break;}}}}else{G=F.keys;if(G==J.charCode){D.fire(J.charCode,J);}else{if(G==J.keyCode){D.fire(J.keyCode,J);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.5.2",build:"1076"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.5.2", build: "1076"}); | ||
14 | +<?php if(extension_loaded('zlib')){ob_end_flush();}?> | ||
0 | \ No newline at end of file | 15 | \ No newline at end of file |
@@ -0,0 +1,9 @@ | @@ -0,0 +1,9 @@ | ||
1 | +<?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?> | ||
2 | +/* | ||
3 | +Copyright (c) 2008, Yahoo! Inc. All rights reserved. | ||
4 | +Code licensed under the BSD License: | ||
5 | +http://developer.yahoo.net/yui/license.txt | ||
6 | +version: 2.5.2 | ||
7 | +*/ | ||
8 | +if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var A=YAHOO.lang,C=["toString","valueOf"],B={isArray:function(D){if(D){return A.isNumber(D.length)&&A.isFunction(D.splice);}return false;},isBoolean:function(D){return typeof D==="boolean";},isFunction:function(D){return typeof D==="function";},isNull:function(D){return D===null;},isNumber:function(D){return typeof D==="number"&&isFinite(D);},isObject:function(D){return(D&&(typeof D==="object"||A.isFunction(D)))||false;},isString:function(D){return typeof D==="string";},isUndefined:function(D){return typeof D==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(F,E){for(var D=0;D<C.length;D=D+1){var H=C[D],G=E[H];if(A.isFunction(G)&&G!=Object.prototype[H]){F[H]=G;}}}:function(){},extend:function(H,I,G){if(!I||!H){throw new Error("extend failed, please check that "+"all dependencies are included.");}var E=function(){};E.prototype=I.prototype;H.prototype=new E();H.prototype.constructor=H;H.superclass=I.prototype;if(I.prototype.constructor==Object.prototype.constructor){I.prototype.constructor=I;}if(G){for(var D in G){if(A.hasOwnProperty(G,D)){H.prototype[D]=G[D];}}A._IEEnumFix(H.prototype,G);}},augmentObject:function(H,G){if(!G||!H){throw new Error("Absorb failed, verify dependencies.");}var D=arguments,F,I,E=D[2];if(E&&E!==true){for(F=2;F<D.length;F=F+1){H[D[F]]=G[D[F]];}}else{for(I in G){if(E||!(I in H)){H[I]=G[I];}}A._IEEnumFix(H,G);}},augmentProto:function(G,F){if(!F||!G){throw new Error("Augment failed, verify dependencies.");}var D=[G.prototype,F.prototype];for(var E=2;E<arguments.length;E=E+1){D.push(arguments[E]);}A.augmentObject.apply(this,D);},dump:function(D,I){var F,H,K=[],L="{...}",E="f(){...}",J=", ",G=" => ";if(!A.isObject(D)){return D+"";}else{if(D instanceof Date||("nodeType" in D&&"tagName" in D)){return D;}else{if(A.isFunction(D)){return E;}}}I=(A.isNumber(I))?I:3;if(A.isArray(D)){K.push("[");for(F=0,H=D.length;F<H;F=F+1){if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}if(K.length>1){K.pop();}K.push("]");}else{K.push("{");for(F in D){if(A.hasOwnProperty(D,F)){K.push(F+G);if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}}if(K.length>1){K.pop();}K.push("}");}return K.join("");},substitute:function(S,E,L){var I,H,G,O,P,R,N=[],F,J="dump",M=" ",D="{",Q="}";for(;;){I=S.lastIndexOf(D);if(I<0){break;}H=S.indexOf(Q,I);if(I+1>=H){break;}F=S.substring(I+1,H);O=F;R=null;G=O.indexOf(M);if(G>-1){R=O.substring(G+1);O=O.substring(0,G);}P=E[O];if(L){P=L(O,P,R);}if(A.isObject(P)){if(A.isArray(P)){P=A.dump(P,parseInt(R,10));}else{R=R||"";var K=R.indexOf(J);if(K>-1){R=R.substring(4);}if(P.toString===Object.prototype.toString||K>-1){P=A.dump(P,parseInt(R,10));}else{P=P.toString();}}}else{if(!A.isString(P)&&!A.isNumber(P)){P="~-"+N.length+"-~";N[N.length]=F;}}S=S.substring(0,I)+P+S.substring(H+1);}for(I=N.length-1;I>=0;I=I-1){S=S.replace(new RegExp("~-"+I+"-~"),"{"+N[I]+"}","g");}return S;},trim:function(D){try{return D.replace(/^\s+|\s+$/g,"");}catch(E){return D;}},merge:function(){var G={},E=arguments;for(var F=0,D=E.length;F<D;F=F+1){A.augmentObject(G,E[F],true);}return G;},later:function(K,E,L,G,H){K=K||0;E=E||{};var F=L,J=G,I,D;if(A.isString(L)){F=E[L];}if(!F){throw new TypeError("method undefined");}if(!A.isArray(J)){J=[G];}I=function(){F.apply(E,J);};D=(H)?setInterval(I,K):setTimeout(I,K);return{interval:H,cancel:function(){if(this.interval){clearInterval(D);}else{clearTimeout(D);}}};},isValue:function(D){return(A.isObject(D)||A.isString(D)||A.isNumber(D)||A.isBoolean(D));}};A.hasOwnProperty=(Object.prototype.hasOwnProperty)?function(D,E){return D&&D.hasOwnProperty(E);}:function(D,E){return !A.isUndefined(D[E])&&D.constructor.prototype[E]!==D[E];};B.augmentObject(A,B,true);YAHOO.util.Lang=A;A.augment=A.augmentProto;YAHOO.augment=A.augmentProto;YAHOO.extend=A.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.5.2",build:"1076"}); | ||
9 | +<?php if(extension_loaded('zlib')){ob_end_flush();}?> | ||
0 | \ No newline at end of file | 10 | \ No newline at end of file |