Changeset 2547 for trunk/phpgwapi


Ignore:
Timestamp:
04/15/10 11:19:50 (14 years ago)
Author:
amuller
Message:

Ticket #1036 - Corrigindo js e otimizando a criação do jspack

Location:
trunk/phpgwapi
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/class.common.inc.php

    r2473 r2547  
    12321232                        $GLOBALS['phpgw']->js->validate_file('wz_dragdrop','wz_dragdrop'); 
    12331233 
    1234                         echo "<script type='text/javascript'>var URL_SERVER = '".$GLOBALS['phpgw_info']['server']['webserver_url']."';</script>"; 
     1234                        echo "\n<script type='text/javascript'>var URL_SERVER = '".$GLOBALS['phpgw_info']['server']['webserver_url']."';</script>\n"; 
    12351235                        echo $GLOBALS['phpgw']->js->get_script_links(); 
    12361236 
  • trunk/phpgwapi/inc/class.javascript.inc.php

    r2545 r2547  
    134134                                                                        if ($GLOBALS['phpgw_info']['server']['jspacker'] == "True") 
    135135                                                                        { 
    136                                                                                 require_once('class.JavaScriptPacker.php'); 
    137                                                                                 $script = file_get_contents(PHPGW_INCLUDE_ROOT .SEP .$app .SEP .'js' .SEP . $pkg .SEP. $file . '.js'); 
    138                                                                                 $packer = new JavaScriptPacker($script, 'Normal', true, false); 
    139                                                                                 $packed = $packer->pack(); 
    140                                                                                 $links .= "<script>".$packed."</script>\n"; 
    141                                                                         } 
     136                                                                                $filePath=PHPGW_INCLUDE_ROOT.SEP.$app.SEP.'js'.SEP.$pkg.SEP.$file.'.js'; 
     137                                                                                if (!file_exists($filePath."pack.js")) 
     138                                                                                { 
     139                                                                                        $fp = fopen($filePath."pack.js", 'w'); 
     140                                                                                        $script = file_get_contents($filePath); 
     141                                                                                        require_once('class.JavaScriptPacker.php'); 
     142                                                                                        $packer = new JavaScriptPacker($script, 'Normal', true, false); 
     143                                                                                        $packed = $packer->pack(); 
     144                                                                                        fwrite($fp, $packed); 
     145                                                                                        fclose($fp); 
     146                                                                                } 
     147                                                                                $links .= '<script type="text/javascript" src="' 
     148                                                                                        .$GLOBALS['phpgw_info']['server']['webserver_url'] 
     149                                                                                        ."/$app/js/$pkg/$file" . ".jspack.js\"></script>\n"; 
     150                                                                        }        
    142151                                                                        else 
    143152                                                                        { 
  • trunk/phpgwapi/js/dJSWin

    • Property svn:ignore set to
      *.jspack.js
  • trunk/phpgwapi/js/dJSWin/dJSWin.js

    r144 r2547  
    3737        { 
    3838                is_ie = false; 
    39                 is_ie5 = false 
     39                is_ie5 = false; 
    4040                is_moz1_6 = false; 
    4141                is_mozilla = false; 
     
    338338                /* Turn the attribute visible false */ 
    339339                this.visible = false; 
    340         } 
     340        }; 
    341341 
    342342        dJSWin.prototype.open = function() 
     
    368368                /* Turn the attribute visible true */ 
    369369                this.visible = true; 
    370         } 
     370        }; 
    371371 
    372372        dJSWin.prototype.show = function() 
    373373        { 
    374374                this.open(); 
    375         } 
     375        }; 
    376376 
    377377        dJSWin.prototype.hide = function() 
    378378        { 
    379379                this.close(); 
    380         } 
     380        }; 
    381381 
    382382        dJSWin.prototype.moveTo = function(x,y) 
    383383        { 
    384384                dd.elements[this.title.id].moveTo(x,y); 
    385         } 
     385        }; 
    386386 
    387387        dJSWin.prototype.x = function() 
    388388        { 
    389389                return dd.elements[this.title.id].x; 
    390         } 
     390        }; 
    391391 
    392392        dJSWin.prototype.y = function() 
    393393        { 
    394394                return dd.elements[this.title.id].y; 
    395         } 
     395        }; 
    396396 
    397397        dJSWin.prototype.draw = function() 
     
    464464                 
    465465                dd.elements[this.title.id].hide(); 
    466         } 
     466        }; 
    467467 
    468468        function _dJSWinElement(id) 
     
    480480                        throw("Browser Not Supported!"); 
    481481                } 
    482         } 
     482        }; 
    483483 
    484484        if (!dd.elements) 
  • trunk/phpgwapi/js/dTabs

    • Property svn:ignore set to
      *.jspack.js
  • trunk/phpgwapi/js/dftree

    • Property svn:ignore set to
      *.jspack.js
  • trunk/phpgwapi/js/dftree/dftree.js

    r1375 r2547  
    8080        //cons = COokie of Node Status 
    8181        //setCookie("cons"+this.id,this._io); 
    82 } 
     82}; 
    8383 
    8484dNode.prototype.open = function () { 
     
    9999                this._refresh(); 
    100100        } 
    101 } 
     101}; 
    102102 
    103103 
     
    112112                this._refresh(); 
    113113        } 
    114 } 
     114}; 
    115115 
    116116//alter node label and other properties 
     
    124124                } 
    125125        } 
    126 } 
     126}; 
    127127 
    128128//css and dhtml refresh part 
     
    156156//alter onLoad, etc 
    157157 
    158 } 
     158}; 
    159159 
    160160//gets the proper plus for this moment 
     
    183183                } 
    184184        } 
    185 } 
     185}; 
    186186 
    187187//changes node to selected style class. Perform further actions. 
     
    218218        } 
    219219 
    220 } 
     220}; 
    221221 
    222222//changes node background color. 
     
    231231                captionSpan.style.paddingBottom = '0px'; 
    232232        } 
    233 } 
     233}; 
    234234//changes node background color. 
    235235dNode.prototype._onMouseOut = function() 
     
    243243                captionSpan.style.paddingBottom = '1px'; 
    244244        } 
    245 } 
     245}; 
    246246 
    247247//changes node to unselected style class. Perform further actions. 
     
    258258                captionSpan.className = this.captionClass; 
    259259        } 
    260 } 
     260}; 
    261261 
    262262 
     
    359359                parentChildrenDiv.appendChild(divN); 
    360360        } 
    361 } 
     361}; 
    362362 
    363363// TREE  
     
    407407                } 
    408408        } 
    409 } 
     409}; 
    410410 
    411411dFTree.prototype.draw = function(dest_element) { 
     
    426426        } 
    427427 
    428 } 
     428}; 
    429429 
    430430//Transforms tree in HTML code 
     
    443443                this._drawBranch(this.root.children); 
    444444        }*/ 
    445 } 
     445}; 
    446446 
    447447//Recursive function, draws children 
     
    453453                this._drawBranch(childrenArray[a]._children); 
    454454        } 
    455 } 
     455}; 
    456456 
    457457//add into a position 
     
    515515        } 
    516516 
    517 } 
     517}; 
    518518 
    519519//arrayProps: same properties of Node 
    520520dFTree.prototype.alter = function(arrayProps) { 
    521521        this.getNodeById(arrayProps['id']).alter(arrayProps); 
    522 } 
     522}; 
    523523 
    524524dFTree.prototype.getNodeById = function(nodeid) { 
    525525        return this._aNodes[this._searchNode(nodeid)]; 
    526 } 
     526}; 
    527527 
    528528dFTree.prototype.openTo = function(nodeid) 
     
    535535                this.openTo(node._parent.id); 
    536536        } 
    537 } 
     537}; 
    538538 
    539539//Searches for a node in the node array, returning the position of the array 4it 
     
    548548        } 
    549549        return false; 
    550 } 
     550}; 
    551551// By jakjr, retorna um array com os ids de todas as pastas (nodes) 
    552552dFTree.prototype.getNodesList = function(imapDelimiter) { 
     
    572572        } 
    573573        return nodes; 
    574 } 
     574}; 
    575575 
    576576//Auxiliar functions 
     
    591591    } 
    592592    return false; 
    593 } 
     593}; 
    594594 
    595595// [Cookie] Clears a cookie 
     
    637637        } 
    638638        return "<img "+attributes+" src=\""+src+"\">"; 
    639 } 
     639}; 
  • trunk/phpgwapi/js/expressoAjax

    • Property svn:ignore set to
      *.jspack.js
  • trunk/phpgwapi/js/jscalendar

    • Property svn:ignore set to
      *.jspack.js
  • trunk/phpgwapi/js/jscalendar/lang

    • Property svn:ignore set to
      *.jspack.js
  • trunk/phpgwapi/js/tools

    • Property svn:ignore set to
      *.jspack.js
  • trunk/phpgwapi/js/venus

    • Property svn:ignore set to
      *.jspack.js
  • trunk/phpgwapi/js/wz_dragdrop

    • Property svn:ignore set to
      *.jspack.js
Note: See TracChangeset for help on using the changeset viewer.