You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(58) |
Sep
(44) |
Oct
(7) |
Nov
(4) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(15) |
Aug
(55) |
Sep
(48) |
Oct
(56) |
Nov
(14) |
Dec
|
From: <al...@us...> - 2008-08-28 20:45:07
|
Revision: 656 http://sciret.svn.sourceforge.net/sciret/?rev=656&view=rev Author: alpeb Date: 2008-08-28 20:45:04 +0000 (Thu, 28 Aug 2008) Log Message: ----------- put border on normal textareas, except on the YUI RTE one Modified Paths: -------------- trunk/others.css trunk/templates/EditArticle.tpl Modified: trunk/others.css =================================================================== --- trunk/others.css 2008-08-27 23:23:05 UTC (rev 655) +++ trunk/others.css 2008-08-28 20:45:04 UTC (rev 656) @@ -1,5 +1,5 @@ textarea { - border: 0; + border: 1; margin: 0; padding: 0; } Modified: trunk/templates/EditArticle.tpl =================================================================== --- trunk/templates/EditArticle.tpl 2008-08-27 23:23:05 UTC (rev 655) +++ trunk/templates/EditArticle.tpl 2008-08-28 20:45:04 UTC (rev 656) @@ -94,7 +94,7 @@ <tr> <td colspan="2"> - <textarea name="text_content" id="text_content" style="width: 100%; height:350px; margin:0;">{textareaContent}</textarea> + <textarea name="text_content" id="text_content" style="width: 100%; height:350px; margin:0; border:0">{textareaContent}</textarea> <script> // can't make editor bigger, or else problem under IE SCIRET.editor.init('100%','350px', 'text_content'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-27 23:23:08
|
Revision: 655 http://sciret.svn.sourceforge.net/sciret/?rev=655&view=rev Author: alpeb Date: 2008-08-27 23:23:05 +0000 (Wed, 27 Aug 2008) Log Message: ----------- added svn:ignore property Property Changed: ---------------- trunk/uploads/editor/Image/ Property changes on: trunk/uploads/editor/Image ___________________________________________________________________ Added: svn:ignore + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-27 21:51:24
|
Revision: 654 http://sciret.svn.sourceforge.net/sciret/?rev=654&view=rev Author: alpeb Date: 2008-08-27 21:51:22 +0000 (Wed, 27 Aug 2008) Log Message: ----------- added svn:ignore properties Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Added: svn:ignore + config.ini.php log.txt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-27 19:41:23
|
Revision: 653 http://sciret.svn.sourceforge.net/sciret/?rev=653&view=rev Author: alpeb Date: 2008-08-27 19:41:20 +0000 (Wed, 27 Aug 2008) Log Message: ----------- Ability to set in the config the cookie holding the session id. This way you can easily share the session with another app, or decide to keep things separated Modified Paths: -------------- trunk/config.ini.php.template trunk/index.php Modified: trunk/config.ini.php.template =================================================================== --- trunk/config.ini.php.template 2008-08-27 17:12:22 UTC (rev 652) +++ trunk/config.ini.php.template 2008-08-27 19:41:20 UTC (rev 653) @@ -3,6 +3,7 @@ return array ( 'environment' => array ( + 'session_name' => 'SCIRET', 'production' => false, 'loglevel' => 0, ), Modified: trunk/index.php =================================================================== --- trunk/index.php 2008-08-27 17:12:22 UTC (rev 652) +++ trunk/index.php 2008-08-27 19:41:20 UTC (rev 653) @@ -89,6 +89,9 @@ $_GET['view'] = 'NotInstalled'; } +// ZF still doesn't have facilities for this +session_name($config->environment->session_name); + Zend_Session::start(); $auth = Zend_Auth::getInstance(); if ($auth->hasIdentity()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-27 17:12:25
|
Revision: 652 http://sciret.svn.sourceforge.net/sciret/?rev=652&view=rev Author: alpeb Date: 2008-08-27 17:12:22 +0000 (Wed, 27 Aug 2008) Log Message: ----------- moved the Submit Question and Manage Questions buttons to the top Modified Paths: -------------- trunk/templates/footer.tpl trunk/templates/header.tpl trunk/views/MainView.php trunk/views/View.php Modified: trunk/templates/footer.tpl =================================================================== --- trunk/templates/footer.tpl 2008-08-27 16:33:21 UTC (rev 651) +++ trunk/templates/footer.tpl 2008-08-27 17:12:22 UTC (rev 652) @@ -114,10 +114,6 @@ </li> <!-- END unansweredQuestionsItem_block --> </ul> - <span class="button_green"><a href="{addQuestionHref}">[l]Submit Question[/l]</a></span><br /> - <!-- BEGIN manageQuestionsLink_block --> - <span class="button_green"><a href="{manageQuestionsHref}">[l]Manage Questions[/l]</a></span> - <!-- END manageQuestionsLink_block --> </div> <div class="panel_bottom"></div> <!-- END unansweredQuestions_block --> Modified: trunk/templates/header.tpl =================================================================== --- trunk/templates/header.tpl 2008-08-27 16:33:21 UTC (rev 651) +++ trunk/templates/header.tpl 2008-08-27 17:12:22 UTC (rev 652) @@ -27,6 +27,12 @@ <span class="button_green"><a href="index.php?action=Logout">[l]Logout[/l]</a></span> <!-- END logoutLink_block --> </p> + <p> + <span class="button_light"><a href="{addQuestionHref}">[l]Submit Question[/l]</a></span> + <!-- BEGIN manageQuestionsLink_block --> + <span class="button_light"><a href="{manageQuestionsHref}">[l]Manage Questions[/l]</a></span> + <!-- END manageQuestionsLink_block --> + </p> </div> </div><!--end head--> Modified: trunk/views/MainView.php =================================================================== --- trunk/views/MainView.php 2008-08-27 16:33:21 UTC (rev 651) +++ trunk/views/MainView.php 2008-08-27 17:12:22 UTC (rev 652) @@ -56,14 +56,6 @@ $this->tpl->set_block('unansweredQuestionsItem_block', 'answerLink_block', 'answerLink'); - $this->tpl->set_block('unansweredQuestions_block', 'manageQuestionsLink_block', 'manageQuestionsLink'); - if (!$this->user->isAnonymous()) { - $this->tpl->set_var('manageQuestionsHref', Library::getLink(array('view' => 'ManageQuestions'))); - $this->tpl->parse('manageQuestionsLink', 'manageQuestionsLink_block'); - } else { - $this->tpl->set_var('manageQuestionsLink', ''); - } - if (!isset($_GET['sort'])) { $_GET['sort'] = 'created_desc'; } @@ -73,7 +65,6 @@ 'viewAllLink' => Library::getLink(array('view' => 'MainView', 'set' => 'all')), 'viewArticlesLink' => Library::getLink(array('view' => 'MainView', 'set' => 'articles')), 'viewBookmarksLink' => Library::getLink(array('view' => 'MainView', 'set' => 'bookmarks')), - 'addQuestionHref' => Library::getLink(array('view' => 'AddQuestion')), 'sortByDateLink' => Library::getLink(array('view' => 'MainView', 'sort' => 'created_'.($order == 'created' && $direction == 'desc'? 'asc' : 'desc'))), 'sortByViewsLink' => Library::getLink(array('view' => 'MainView', 'sort' => 'views_'.($order == 'views' && $direction == 'desc'? 'asc' : 'desc'))), )); Modified: trunk/views/View.php =================================================================== --- trunk/views/View.php 2008-08-27 16:33:21 UTC (rev 651) +++ trunk/views/View.php 2008-08-27 17:12:22 UTC (rev 652) @@ -72,13 +72,20 @@ $this->tpl->set_block('header', 'loginLink_block', 'loginLink'); $this->tpl->set_block('header', 'welcome_block', 'welcome'); + $this->tpl->set_block('header', 'manageQuestionsLink_block', 'manageQuestionsLink'); + if ($this->user->isAnonymous()) { $this->tpl->set_var('welcome', ''); $this->tpl->parse('loginLink', 'loginLink_block'); + + $this->tpl->set_var('manageQuestionsLink', ''); } else { $this->tpl->set_var('loginLink', ''); $this->tpl->set_var('userFullName', $this->user->getFullName()); $this->tpl->parse('welcome', 'welcome_block'); + + $this->tpl->set_var('manageQuestionsHref', Library::getLink(array('view' => 'ManageQuestions'))); + $this->tpl->parse('manageQuestionsLink', 'manageQuestionsLink_block'); } $this->tpl->set_block('header', 'logoutLink_block', 'logoutLink'); @@ -91,6 +98,7 @@ $this->tpl->set_var(array( 'homeHref' => Library::getLink(), 'preferencesHref' => Library::getLink(array('view' => 'EditPreferences')), + 'addQuestionHref' => Library::getLink(array('view' => 'AddQuestion')), )); $this->tpl->set_block('header', 'addArticleLink_block', 'addArticleLink'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-27 16:33:23
|
Revision: 651 http://sciret.svn.sourceforge.net/sciret/?rev=651&view=rev Author: alpeb Date: 2008-08-27 16:33:21 +0000 (Wed, 27 Aug 2008) Log Message: ----------- re-added some stuff that got deleted in the template implementation Modified Paths: -------------- trunk/templates/ViewArticle.tpl Modified: trunk/templates/ViewArticle.tpl =================================================================== --- trunk/templates/ViewArticle.tpl 2008-08-27 16:32:41 UTC (rev 650) +++ trunk/templates/ViewArticle.tpl 2008-08-27 16:33:21 UTC (rev 651) @@ -8,6 +8,9 @@ * @packager Keyboard Monkeys */ --> +<script type="text/javascript"> + var artId = {art_id}; +</script> <div class="title_view"> <div class="title_content"> <span> @@ -53,6 +56,7 @@ <img id='publishArticleLoading' src='images/progress.gif' style='visibility:hidden' /> <!-- END publish_btn_block --> </p> + <span id="publishArticleStatusMessage" style="font-weight:bold; color:red"></span> </div><!--end title_view--> <div id="tabs"> <div class="view_mode"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-27 16:32:43
|
Revision: 650 http://sciret.svn.sourceforge.net/sciret/?rev=650&view=rev Author: alpeb Date: 2008-08-27 16:32:41 +0000 (Wed, 27 Aug 2008) Log Message: ----------- moved js call to ajax callback Modified Paths: -------------- trunk/templates/RelatedArticles.tpl Modified: trunk/templates/RelatedArticles.tpl =================================================================== --- trunk/templates/RelatedArticles.tpl 2008-08-27 16:32:25 UTC (rev 649) +++ trunk/templates/RelatedArticles.tpl 2008-08-27 16:32:41 UTC (rev 650) @@ -15,9 +15,6 @@ <div style="text-align:center"> <div id="relatedArtsMessage" style="display:inline;">{commentsMessage}</div> </div> - <script type="text/javascript"> - fade('relatedArtsMessage'); - </script> </td> </tr> <tr class="th"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-27 16:32:28
|
Revision: 649 http://sciret.svn.sourceforge.net/sciret/?rev=649&view=rev Author: alpeb Date: 2008-08-27 16:32:25 +0000 (Wed, 27 Aug 2008) Log Message: ----------- dropped prototype lib, and replaced all ajax calls with YUI's Modified Paths: -------------- trunk/javascript/general.js trunk/templates/head.tpl Modified: trunk/javascript/general.js =================================================================== --- trunk/javascript/general.js 2008-08-27 16:31:18 UTC (rev 648) +++ trunk/javascript/general.js 2008-08-27 16:32:25 UTC (rev 649) @@ -14,13 +14,13 @@ * @see http://yuiblog.com/blog/2007/06/12/module-pattern/ */ +/** + * Aliases definitions (functions, namespaces) + */ YAHOO.namespace("sciret"); SCIRET = YAHOO.sciret; -// ********************************************************* -// ** jQuery initialization, to ** -// ** avoid conflicts with prototype ** -// ********************************************************* +// to avoid conflicts with YAHOO.tools' $ function var $j = jQuery.noConflict(); // ********************************************************* @@ -136,39 +136,51 @@ } } - new Ajax.Updater( 'commentsDiv', - 'index.php?action=AddCommentAndRating&artId='+artId+'&loadingId='+loadingId, - { method : 'post', - parameters : 'commentUserName='+userName+'&comment_box='+comment+'&Rate='+rate, - evalScripts : true, - onLoading : function() {showLoading(loadingId);}, - onComplete : function() {successAjax(loadingId)}}); + showLoading(loadingId); + var transaction = YAHOO.util.Connect.asyncRequest('POST', + 'index.php?action=AddCommentAndRating&artId='+artId+'&loadingId='+loadingId, + { + success: commentOperationCompleted, + failure: function() {alert('operation failed')} + }, + 'commentUserName='+userName+'&comment_box='+comment+'&Rate='+rate); } +function commentOperationCompleted(responseObj) { + $('commentsDiv').innerHTML = responseObj.responseText; +} + function publishComment(commentId, loadingId) { - new Ajax.Updater( 'commentsDiv', - 'index.php?action=PublishComment&artId='+artId+'&commentId='+commentId+'&loadingId='+loadingId, - { method : 'post', - evalScripts : true, - onLoading : function() {showLoading(loadingId);}, - onComplete : function() {successAjax(loadingId)}}); + showLoading(loadingId); + var transaction = YAHOO.util.Connect.asyncRequest('POST', + 'index.php?action=PublishComment&artId='+artId+'&commentId='+commentId+'&loadingId='+loadingId, + { + success: commentOperationCompleted, + failure: function() {alert('operation failed')} + }, + null); } function deleteComment(commentId, loadingId) { - new Ajax.Updater( 'commentsDiv', - 'index.php?action=DeleteComment&artId='+artId+'&commentId='+commentId+'&loadingId='+loadingId, - { method : 'post', - evalScripts : true, - onLoading : function() {showLoading(loadingId);}, - onComplete : function() {successAjax(loadingId)}}); + showLoading(loadingId); + var transaction = YAHOO.util.Connect.asyncRequest('POST', + 'index.php?action=DeleteComment&artId='+artId+'&commentId='+commentId+'&loadingId='+loadingId, + { + success: commentOperationCompleted, + failure: function() {alert('operation failed')} + }, + null); } function publishArticle(loadingId, referrer, articleId) { articleId = articleId || artId; - new Ajax.Request( 'index.php?action=PublishArticle&artId='+articleId, - { method : 'post', - onLoading : function() {showLoading(loadingId);}, - onComplete : function(response) {publishArticleCompleted(response, loadingId, articleId)}}); + var transaction = YAHOO.util.Connect.asyncRequest('POST', + 'index.php?action=PublishArticle&artId='+articleId, + { + success: function(response) {publishArticleCompleted(response, loadingId, articleId)}, + failure: function() {alert('operation failed')} + }, + null); } function publishArticleCompleted(responseObj, loadingId, articleId) { @@ -194,26 +206,33 @@ return; } - new Ajax.Updater( 'relatedArticlesDiv', - 'index.php?action=AddRelatedArticles&parentId='+parentId+'&parentType=' + parentType + '&loadingId='+loadingId, - { method : 'post', - parameters : 'related_articles='+relatedArticles, - evalScripts : true, - onLoading : function() {showLoading(loadingId)}, - onComplete : function() {successAjax(loadingId)} - }); + showLoading(loadingId); + var transaction = YAHOO.util.Connect.asyncRequest('POST', + 'index.php?action=AddRelatedArticles&parentId='+parentId+'&parentType=' + parentType + '&loadingId='+loadingId, + { + success: function (response) {submitRelatedArticlesCompleted(response, loadingId)}, + failure: function() {alert('operation failed')} + }, + 'related_articles='+relatedArticles); } +function submitRelatedArticlesCompleted(responseObj, loadingId) { + successAjax(loadingId); + $('relatedArticlesDiv').innerHTML = responseObj.responseText; + fade('relatedArtsMessage'); +} + function markAsFinal(loadingId, articleId) { articleId = articleId || artId; - new Ajax.Request( - 'index.php?action=MarkArticleFinal&artId=' + articleId, - { - method : 'post', - onLoading : function() {showLoading(loadingId)}, - onComplete : function(response) {markAsFinalCompleted(response, loadingId, articleId)} - } - ); + + showLoading(loadingId); + var transaction = YAHOO.util.Connect.asyncRequest('POST', + 'index.php?action=MarkArticleFinal&artId=' + articleId, + { + success: function(response) {markAsFinalCompleted(response, loadingId, articleId)}, + failure: function() {alert('operation failed')} + }, + null); } function markAsFinalCompleted(responseObj, loadingId, articleId) { @@ -342,17 +361,14 @@ $('favoriteStarImg').style.display = 'none'; $('unFavoriteStarImg').style.display = 'none'; - new Ajax.Request( - 'index.php?action=' + action, - { - method : 'post', - parameters : 'artId=' + artId + '&favorite=' + favorite + '&query=' + query + '&catId=' + catId, - onLoading : function() { - $('favoriteProgressImg').style.display = 'inline'; - }, - onComplete : completedFavoriteArticle - } - ); + $('favoriteProgressImg').style.display = 'inline'; + var transaction = YAHOO.util.Connect.asyncRequest('POST', + 'index.php?action=' + action, + { + success: completedFavoriteArticle, + failure: function() {alert('operation failed')} + }, + 'artId=' + artId + '&favorite=' + favorite + '&query=' + query + '&catId=' + catId); } function completedFavoriteArticle(responseObj) { @@ -427,14 +443,13 @@ $('todoCheck_' + todoId).style.display = 'none'; $('todoProgressImg_' + todoId).style.display = 'inline'; - new Ajax.Request( - 'index.php?action=CompleteTodo', - { - method : 'post', - parameters : 'todoId=' + todoId, - onComplete : function (response) {successAjax('todoProgressImg_' + todoId), completeTickTodo(response, todoId)} - } - ); + var transaction = YAHOO.util.Connect.asyncRequest('POST', + 'index.php?action=CompleteTodo', + { + success: function (response) {successAjax('todoProgressImg_' + todoId), completeTickTodo(response, todoId)}, + failure: function() {alert('operation failed')} + }, + 'todoId=' + todoId); } function completeTickTodo(responseObj, todoId) { Modified: trunk/templates/head.tpl =================================================================== --- trunk/templates/head.tpl 2008-08-27 16:31:18 UTC (rev 648) +++ trunk/templates/head.tpl 2008-08-27 16:32:25 UTC (rev 649) @@ -16,6 +16,7 @@ <![endif]-> <!-- basic YUI libraries --> <script type="text/javascript" src="javascript/yui/build/yahoo-dom-event/yahoo-dom-event.js"></script> + <script type="text/javascript" src="javascript/tools-min.js"></script> <script type="text/javascript" src="javascript/yui/build/container/container_core-min.js"></script> <script type="text/javascript" src="javascript/yui/build/element/element-beta-min.js"></script> <script type="text/javascript" src="javascript/yui/build/dragdrop/dragdrop-min.js"></script> @@ -24,14 +25,12 @@ <script type="text/javascript" src="javascript/yui/build/connection/connection-min.js"></script> <script type="text/javascript" src="javascript/yui/build/logger/logger-min.js"></script> <!-- required by effects.js --> - <script type="text/javascript" src="javascript/tools-min.js"></script> <script type="text/javascript" src="javascript/effects-min.js"></script> <script src="javascript/jquery.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript" src="javascript/general.js"></script> <script type="text/javascript" src="javascript/simModal.js"></script> <script type="text/javascript" src="javascript/overlib.js"></script> - <script type="text/javascript" src="javascript/scriptaculous/lib/prototype.js"></script> <style type="text/css">@import url(javascript/jscalendar/calendar-blue.css);</style> <script type="text/javascript" src="javascript/jscalendar/calendar.js"></script> <script type="text/javascript" src="javascript/jscalendar/lang/calendar-en.js"></script> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-27 16:31:20
|
Revision: 648 http://sciret.svn.sourceforge.net/sciret/?rev=648&view=rev Author: alpeb Date: 2008-08-27 16:31:18 +0000 (Wed, 27 Aug 2008) Log Message: ----------- fixed some db calls Modified Paths: -------------- trunk/models/Article.php trunk/models/Todo.php Modified: trunk/models/Article.php =================================================================== --- trunk/models/Article.php 2008-08-27 15:06:00 UTC (rev 647) +++ trunk/models/Article.php 2008-08-27 16:31:18 UTC (rev 648) @@ -463,7 +463,7 @@ $query = 'SELECT art_id, related_art_id FROM articles_related WHERE art_id=?'; $result = DB::getInstance()->query($query, $this->id); $this->relatedArticles = array(); - while ($row = $result->fetch()) { + foreach ($result->fetchAll(Zend_Db::FETCH_ASSOC) as $row) { $this->relatedArticles[] = new Article($row['related_art_id']); } } Modified: trunk/models/Todo.php =================================================================== --- trunk/models/Todo.php 2008-08-27 15:06:00 UTC (rev 647) +++ trunk/models/Todo.php 2008-08-27 16:31:18 UTC (rev 648) @@ -47,7 +47,7 @@ $query = 'SELECT todo_id, related_art_id FROM todos_related WHERE todo_id=?'; $result = DB::getInstance()->query($query, $this->id); $this->relatedArticles = array(); - while ($row = $result->fetch()) { + foreach ($result->fetchAll(Zend_Db::FETCH_ASSOC) as $row) { $this->relatedArticles[] = new Article($row['related_art_id']); } } @@ -92,13 +92,13 @@ foreach ($this->relatedArticles as $article) { $query = 'INSERT INTO todos_related (todo_id, related_art_id) VALUES (?, ?)'; - DB::getInstance()->query($query, $this->id, $article->getId()); + DB::getInstance()->query($query, array($this->id, $article->getId())); } } function deleteRelatedArticle($artId) { $query = 'DELETE FROM todos_related WHERE todo_id=? AND related_art_id=?'; - DB::getInstance()->query($query, $this->id, $artId); + DB::getInstance()->query($query, array($this->id, $artId)); } function save() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-27 15:06:04
|
Revision: 647 http://sciret.svn.sourceforge.net/sciret/?rev=647&view=rev Author: alpeb Date: 2008-08-27 15:06:00 +0000 (Wed, 27 Aug 2008) Log Message: ----------- Removed the scriptaculous lib, because it was conflicting with the YUI RTE. Replaced with some Effects adapted to YUI Modified Paths: -------------- trunk/javascript/general.js trunk/templates/footer.tpl trunk/templates/head.tpl Added Paths: ----------- trunk/javascript/effects-min.js trunk/javascript/effects.js trunk/javascript/tools-min.js Removed Paths: ------------- trunk/javascript/scriptaculous/ Added: trunk/javascript/effects-min.js =================================================================== --- trunk/javascript/effects-min.js (rev 0) +++ trunk/javascript/effects-min.js 2008-08-27 15:06:00 UTC (rev 647) @@ -0,0 +1,123 @@ +/* +* Copyright (c) 2007, Dav Glass <dav...@ya...>. +* Code licensed under the BSD License: +* http://blog.davglass.com/license.txt +* All rights reserved. +*/ +YAHOO.widget.Effects=function(){return{version:'0.8'}}();YAHOO.widget.Effects.Hide=function(inElm){this.element=YAHOO.util.Dom.get(inElm);YAHOO.util.Dom.setStyle(this.element,'display','none');YAHOO.util.Dom.setStyle(this.element,'visibility','hidden');} +YAHOO.widget.Effects.Hide.prototype.toString=function(){return'Effect Hide ['+this.element.id+']';} +YAHOO.widget.Effects.Show=function(inElm){this.element=YAHOO.util.Dom.get(inElm);YAHOO.util.Dom.setStyle(this.element,'display','block');YAHOO.util.Dom.setStyle(this.element,'visibility','visible');} +YAHOO.widget.Effects.Show.prototype.toString=function(){return'Effect Show ['+this.element.id+']';} +YAHOO.widget.Effects.Fade=function(inElm,opts){this.element=YAHOO.util.Dom.get(inElm);var attributes={opacity:{from:1,to:0}};this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeOut);var secs=((opts&&opts.seconds)?opts.seconds:1);var delay=((opts&&opts.delay)?opts.delay:false);this.effect=new YAHOO.util.Anim(this.element,attributes,secs,ease);this.effect.onComplete.subscribe(function(){YAHOO.widget.Effects.Hide(this.element);this.onEffectComplete.fire();},this,true);if(!delay){this.effect.animate();}} +YAHOO.widget.Effects.Fade.prototype.animate=function(){this.effect.animate();} +YAHOO.widget.Effects.Fade.prototype.toString=function(){return'Effect Fade ['+this.element.id+']';} +YAHOO.widget.Effects.Appear=function(inElm,opts){this.element=YAHOO.util.Dom.get(inElm);YAHOO.util.Dom.setStyle(this.element,'opacity','0');YAHOO.widget.Effects.Show(this.element);var attributes={opacity:{from:0,to:1}};this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeOut);var secs=((opts&&opts.seconds)?opts.seconds:3);var delay=((opts&&opts.delay)?opts.delay:false);this.effect=new YAHOO.util.Anim(this.element,attributes,secs,ease);this.effect.onComplete.subscribe(function(){this.onEffectComplete.fire();},this,true);if(!delay){this.effect.animate();}} +YAHOO.widget.Effects.Appear.prototype.animate=function(){this.effect.animate();} +YAHOO.widget.Effects.Appear.prototype.toString=function(){return'Effect Appear ['+this.element.id+']';} +YAHOO.widget.Effects.BlindUp=function(inElm,opts){var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeOut);var secs=((opts&&opts.seconds)?opts.seconds:1);var delay=((opts&&opts.delay)?opts.delay:false);var ghost=((opts&&opts.ghost)?opts.ghost:false);this.element=YAHOO.util.Dom.get(inElm);this._height=$T.getHeight(this.element);this._top=parseInt(YAHOO.util.Dom.getStyle(this.element,'top'));this._opts=opts;YAHOO.util.Dom.setStyle(this.element,'overflow','hidden');var attributes={height:{to:0}};if(ghost){attributes.opacity={to:0,from:1}} +this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);if(opts&&opts.bind&&(opts.bind=='bottom')){var attributes={height:{from:0,to:parseInt(this._height)},top:{from:(this._top+parseInt(this._height)),to:this._top}};if(ghost){attributes.opacity={to:1,from:0}}} +this.effect=new YAHOO.util.Anim(this.element,attributes,secs,ease);this.effect.onComplete.subscribe(function(){if(this._opts&&this._opts.bind&&(this._opts.bind=='bottom')){YAHOO.util.Dom.setStyle(this.element,'top',this._top+'px');}else{YAHOO.widget.Effects.Hide(this.element);YAHOO.util.Dom.setStyle(this.element,'height',this._height);} +YAHOO.util.Dom.setStyle(this.element,'opacity',1);this.onEffectComplete.fire();},this,true);if(!delay){this.animate();}} +YAHOO.widget.Effects.BlindUp.prototype.prepStyle=function(){if(this._opts&&this._opts.bind&&(this._opts.bind=='bottom')){YAHOO.util.Dom.setStyle(this.element,'height','0px');YAHOO.util.Dom.setStyle(this.element,'top',this._height);} +YAHOO.widget.Effects.Show(this.element);} +YAHOO.widget.Effects.BlindUp.prototype.animate=function(){this.prepStyle();this.effect.animate();} +YAHOO.widget.Effects.BlindUp.prototype.toString=function(){return'Effect BlindUp ['+this.element.id+']';} +YAHOO.widget.Effects.BlindDown=function(inElm,opts){var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeOut);var secs=((opts&&opts.seconds)?opts.seconds:1);var delay=((opts&&opts.delay)?opts.delay:false);var ghost=((opts&&opts.ghost)?opts.ghost:false);this.element=YAHOO.util.Dom.get(inElm);this._opts=opts;this._height=parseInt($T.getHeight(this.element));this._top=parseInt(YAHOO.util.Dom.getStyle(this.element,'top'));YAHOO.util.Dom.setStyle(this.element,'overflow','hidden');var attributes={height:{from:0,to:this._height}};if(ghost){attributes.opacity={to:1,from:0}} +this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);if(opts&&opts.bind&&(opts.bind=='bottom')){var attributes={height:{to:0,from:parseInt(this._height)},top:{to:(this._top+parseInt(this._height)),from:this._top}};if(ghost){attributes.opacity={to:0,from:1}}} +this.effect=new YAHOO.util.Anim(this.element,attributes,secs,ease);if(opts&&opts.bind&&(opts.bind=='bottom')){this.effect.onComplete.subscribe(function(){YAHOO.widget.Effects.Hide(this.element);YAHOO.util.Dom.setStyle(this.element,'top',this._top+'px');YAHOO.util.Dom.setStyle(this.element,'height',this._height+'px');YAHOO.util.Dom.setStyle(this.element,'opacity',1);this.onEffectComplete.fire();},this,true);}else{this.effect.onComplete.subscribe(function(){YAHOO.util.Dom.setStyle(this.element,'opacity',1);this.onEffectComplete.fire();},this,true);} +if(!delay){this.animate();}} +YAHOO.widget.Effects.BlindDown.prototype.prepStyle=function(){if(this._opts&&this._opts.bind&&(this._opts.bind=='bottom')){}else{YAHOO.util.Dom.setStyle(this.element,'height','0px');} +YAHOO.widget.Effects.Show(this.element);} +YAHOO.widget.Effects.BlindDown.prototype.animate=function(){this.prepStyle();this.effect.animate();} +YAHOO.widget.Effects.BlindDown.prototype.toString=function(){return'Effect BlindDown ['+this.element.id+']';} +YAHOO.widget.Effects.BlindRight=function(inElm,opts){var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeOut);var secs=((opts&&opts.seconds)?opts.seconds:1);var delay=((opts&&opts.delay)?opts.delay:false);var ghost=((opts&&opts.ghost)?opts.ghost:false);this.element=YAHOO.util.Dom.get(inElm);this._width=parseInt(YAHOO.util.Dom.getStyle(this.element,'width'));this._left=parseInt(YAHOO.util.Dom.getStyle(this.element,'left'));this._opts=opts;YAHOO.util.Dom.setStyle(this.element,'overflow','hidden');this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);var attributes={width:{from:0,to:this._width}};if(ghost){attributes.opacity={to:1,from:0}} +if(opts&&opts.bind&&(opts.bind=='right')){var attributes={width:{to:0},left:{to:this._left+parseInt(this._width),from:this._left}};if(ghost){attributes.opacity={to:0,from:1}}} +this.effect=new YAHOO.util.Anim(this.element,attributes,secs,ease);if(opts&&opts.bind&&(opts.bind=='right')){this.effect.onComplete.subscribe(function(){YAHOO.widget.Effects.Hide(this.element);YAHOO.util.Dom.setStyle(this.element,'width',this._width+'px');YAHOO.util.Dom.setStyle(this.element,'left',this._left+'px');this._width=null;YAHOO.util.Dom.setStyle(this.element,'opacity',1);this.onEffectComplete.fire();},this,true);}else{this.effect.onComplete.subscribe(function(){YAHOO.util.Dom.setStyle(this.element,'opacity',1);this.onEffectComplete.fire();},this,true);} +if(!delay){this.animate();}} +YAHOO.widget.Effects.BlindRight.prototype.prepStyle=function(){if(this._opts&&this._opts.bind&&(this._opts.bind=='right')){}else{YAHOO.util.Dom.setStyle(this.element,'width','0');}} +YAHOO.widget.Effects.BlindRight.prototype.animate=function(){this.prepStyle();this.effect.animate();} +YAHOO.widget.Effects.BlindRight.prototype.toString=function(){return'Effect BlindRight ['+this.element.id+']';} +YAHOO.widget.Effects.BlindLeft=function(inElm,opts){var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeOut);var secs=((opts&&opts.seconds)?opts.seconds:1);var delay=((opts&&opts.delay)?opts.delay:false);var ghost=((opts&&opts.ghost)?opts.ghost:false);this.ghost=ghost;this.element=YAHOO.util.Dom.get(inElm);this._width=YAHOO.util.Dom.getStyle(this.element,'width');this._left=parseInt(YAHOO.util.Dom.getStyle(this.element,'left'));this._opts=opts;YAHOO.util.Dom.setStyle(this.element,'overflow','hidden');var attributes={width:{to:0}};if(ghost){attributes.opacity={to:0,from:1}} +this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);if(opts&&opts.bind&&(opts.bind=='right')){var attributes={width:{from:0,to:parseInt(this._width)},left:{from:this._left+parseInt(this._width),to:this._left}};if(ghost){attributes.opacity={to:1,from:0}}} +this.effect=new YAHOO.util.Anim(this.element,attributes,secs,ease);if(opts&&opts.bind&&(opts.bind=='right')){this.effect.onComplete.subscribe(function(){this.onEffectComplete.fire();},this,true);}else{this.effect.onComplete.subscribe(function(){YAHOO.widget.Effects.Hide(this.element);YAHOO.util.Dom.setStyle(this.element,'width',this._width);YAHOO.util.Dom.setStyle(this.element,'left',this._left+'px');YAHOO.util.Dom.setStyle(this.element,'opacity',1);this._width=null;this.onEffectComplete.fire();},this,true);} +if(!delay){this.animate();}} +YAHOO.widget.Effects.BlindLeft.prototype.prepStyle=function(){if(this._opts&&this._opts.bind&&(this._opts.bind=='right')){YAHOO.widget.Effects.Hide(this.element);YAHOO.util.Dom.setStyle(this.element,'width','0px');YAHOO.util.Dom.setStyle(this.element,'left',parseInt(this._width));if(this.ghost){YAHOO.util.Dom.setStyle(this.element,'opacity',0);} +YAHOO.widget.Effects.Show(this.element);}} +YAHOO.widget.Effects.BlindLeft.prototype.animate=function(){this.prepStyle();this.effect.animate();} +YAHOO.widget.Effects.BlindLeft.prototype.toString=function(){return'Effect BlindLeft ['+this.element.id+']';} +YAHOO.widget.Effects.Fold=function(inElm,opts){var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeOut);var secs=((opts&&opts.seconds)?opts.seconds:1);var delay=((opts&&opts.delay)?opts.delay:false);this.ghost=((opts&&opts.ghost)?opts.ghost:false);this.element=YAHOO.util.Dom.get(inElm);this._to=5;if(!delay){YAHOO.widget.Effects.Show(this.element);} +YAHOO.util.Dom.setStyle(this.element,'overflow','hidden');this.done=false;this._height=parseInt($T.getHeight(this.element));this._width=YAHOO.util.Dom.getStyle(this.element,'width');this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);if(opts&&opts.to){this._to=opts.to;} +var attributes={height:{to:this._to}};this.effect=new YAHOO.util.Anim(this.element,attributes,secs,ease);this.effect.onComplete.subscribe(function(){if(this.done){YAHOO.widget.Effects.Hide(this.element);YAHOO.util.Dom.setStyle(this.element,'height',this._height+'px');YAHOO.util.Dom.setStyle(this.element,'width',this._width);this.onEffectComplete.fire();}else{this.done=true;this.effect.attributes={width:{to:0},height:{from:this._to,to:this._to}} +if(this.ghost){this.effect.attributes.opacity={to:0,from:1}} +this.animate();}},this,true);if(!delay){this.animate();}} +YAHOO.widget.Effects.Fold.prototype.animate=function(){this.effect.animate();} +YAHOO.widget.Effects.Fold.prototype.toString=function(){return'Effect Fold ['+this.element.id+']';} +YAHOO.widget.Effects.UnFold=function(inElm,opts){var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeOut);var secs=((opts&&opts.seconds)?opts.seconds:1);var delay=((opts&&opts.delay)?opts.delay:false);this.ghost=((opts&&opts.ghost)?opts.ghost:false);this.element=YAHOO.util.Dom.get(inElm);this._height=$T.getHeight(this.element);this._width=YAHOO.util.Dom.getStyle(this.element,'width');this._to=5;YAHOO.util.Dom.setStyle(this.element,'overflow','hidden');this.done=false;this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);if(opts&&opts.to){this._to=opts.to;} +attributes={height:{from:0,to:this._to},width:{from:0,to:parseInt(this._width)}};if(this.ghost){attributes.opacity={to:.15,from:0}} +this.effect=new YAHOO.util.Anim(this.element,attributes,secs,ease);this.effect.onComplete.subscribe(function(){if(this.done){this.onEffectComplete.fire();this.done=false;}else{this.done=true;this.effect.attributes={width:{from:parseInt(this._width),to:parseInt(this._width)},height:{from:this._to,to:parseInt(this._height)}} +if(this.ghost){this.effect.attributes.opacity={to:1,from:.15}} +this.effect.animate();}},this,true);if(!delay){this.animate();}} +YAHOO.widget.Effects.UnFold.prototype.prepStyle=function(){YAHOO.widget.Effects.Hide(this.element);YAHOO.util.Dom.setStyle(this.element,'height','0px');YAHOO.util.Dom.setStyle(this.element,'width','0px');this.effect.attributes=attributes;} +YAHOO.widget.Effects.UnFold.prototype.animate=function(){this.prepStyle();YAHOO.widget.Effects.Show(this.element);this.effect.animate();} +YAHOO.widget.Effects.UnFold.prototype.toString=function(){return'Effect UnFold ['+this.element.id+']';} +YAHOO.widget.Effects.ShakeLR=function(inElm,opts){this.element=YAHOO.util.Dom.get(inElm);this._offSet=10;this._maxCount=5;this._counter=0;this._elmPos=YAHOO.util.Dom.getXY(this.element);var attributes={left:{to:(-this._offSet)}};this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);if(opts&&opts.offset){this._offSet=opts.offset;} +if(opts&&opts.maxcount){this._maxCount=opts.maxcount;} +var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeOut);var secs=((opts&&opts.seconds)?opts.seconds:.25);var delay=((opts&&opts.delay)?opts.delay:false);this.effect=new YAHOO.util.Anim(this.element,attributes,secs,ease);this.effect.onComplete.subscribe(function(){if(this.done){this.onEffectComplete.fire();}else{if(this._counter<this._maxCount){this._counter++;if(this._left){this._left=null;this.effect.attributes={left:{to:(-this._offSet)}}}else{this._left=true;this.effect.attributes={left:{to:this._offSet}}} +this.effect.animate();}else{this.done=true;this._left=null;this._counter=null;this.effect.attributes={left:{to:0}} +this.effect.animate();}}},this,true);if(!delay){this.effect.animate();}} +YAHOO.widget.Effects.ShakeLR.prototype.animate=function(){this.effect.animate();} +YAHOO.widget.Effects.ShakeLR.prototype.toString=function(){return'Effect ShakeLR ['+this.element.id+']';} +YAHOO.widget.Effects.ShakeTB=function(inElm,opts){this.element=YAHOO.util.Dom.get(inElm);this._offSet=10;this._maxCount=5;this._counter=0;this._elmPos=YAHOO.util.Dom.getXY(this.element);var attributes={top:{to:(-this._offSet)}};if(opts&&opts.offset){this._offSet=opts.offset;} +if(opts&&opts.maxcount){this._maxCount=opts.maxcount;} +this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeOut);var secs=((opts&&opts.seconds)?opts.seconds:.25);var delay=((opts&&opts.delay)?opts.delay:false);this.effect=new YAHOO.util.Anim(this.element,attributes,secs,ease);this.effect.onComplete.subscribe(function(){if(this.done){this.onEffectComplete.fire();}else{if(this._counter<this._maxCount){this._counter++;if(this._left){this._left=null;this.effect.attributes={top:{to:(-this._offSet)}}}else{this._left=true;this.effect.attributes={top:{to:this._offSet}}} +this.effect.animate();}else{this.done=true;this._left=null;this._counter=null;this.effect.attributes={top:{to:0}} +this.effect.animate();}}},this,true);if(!delay){this.effect.animate();}} +YAHOO.widget.Effects.ShakeTB.prototype.animate=function(){this.effect.animate();} +YAHOO.widget.Effects.ShakeTB.prototype.toString=function(){return'Effect ShakeTB ['+this.element.id+']';} +YAHOO.widget.Effects.Drop=function(inElm,opts){this.element=YAHOO.util.Dom.get(inElm);this._height=parseInt($T.getHeight(this.element));this._top=parseInt($D.getStyle(this.element,'top'));var attributes={top:{from:this._top,to:(this._top+this._height)},opacity:{from:1,to:0}};this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeIn);var secs=((opts&&opts.seconds)?opts.seconds:1);var delay=((opts&&opts.delay)?opts.delay:false);this.effect=new YAHOO.util.Anim(this.element,attributes,secs,ease);this.effect.onComplete.subscribe(function(){YAHOO.widget.Effects.Hide(this.element);YAHOO.util.Dom.setStyle(this.element,'top',this._top+'px');YAHOO.util.Dom.setStyle(this.element,'opacity',1);this.onEffectComplete.fire();},this,true);if(!delay){this.animate();}} +YAHOO.widget.Effects.Drop.prototype.animate=function(){this.effect.animate();} +YAHOO.widget.Effects.Drop.prototype.toString=function(){return'Effect Drop ['+this.element.id+']';} +YAHOO.widget.Effects.Pulse=function(inElm,opts){this.element=YAHOO.util.Dom.get(inElm);this._counter=0;this._maxCount=9;var attributes={opacity:{from:1,to:0}};if(opts&&opts.maxcount){this._maxCount=opts.maxcount;} +this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeIn);var secs=((opts&&opts.seconds)?opts.seconds:.25);var delay=((opts&&opts.delay)?opts.delay:false);this.effect=new YAHOO.util.Anim(this.element,attributes,secs,ease);this.effect.onComplete.subscribe(function(){if(this.done){this.onEffectComplete.fire();}else{if(this._counter<this._maxCount){this._counter++;if(this._on){this._on=null;this.effect.attributes={opacity:{to:0}}}else{this._on=true;this.effect.attributes={opacity:{to:1}}} +this.effect.animate();}else{this.done=true;this._on=null;this._counter=null;this.effect.attributes={opacity:{to:1}} +this.effect.animate();}}},this,true);if(!delay){this.effect.animate();}} +YAHOO.widget.Effects.Pulse.prototype.animate=function(){this.effect.animate();} +YAHOO.widget.Effects.Pulse.prototype.toString=function(){return'Effect Pulse ['+this.element.id+']';} +YAHOO.widget.Effects.Shrink=function(inElm,opts){this.start_elm=YAHOO.util.Dom.get(inElm);this.element=this.start_elm.cloneNode(true);this.start_elm.parentNode.replaceChild(this.element,this.start_elm);YAHOO.widget.Effects.Hide(this.start_elm);YAHOO.util.Dom.setStyle(this.element,'overflow','hidden');this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeOut);var secs=((opts&&opts.seconds)?opts.seconds:1);var delay=((opts&&opts.delay)?opts.delay:false);var attributes={width:{to:0},height:{to:0},fontSize:{from:100,to:0,unit:'%'},opacity:{from:1,to:0}};this.effect=new YAHOO.util.Anim(this.element,attributes,secs,ease);this.effect.onComplete.subscribe(function(){this.element.parentNode.replaceChild(this.start_elm,this.element);this.onEffectComplete.fire();},this,true);if(!delay){this.effect.animate();}} +YAHOO.widget.Effects.Shrink.prototype.animate=function(){this.effect.animate();} +YAHOO.widget.Effects.Shrink.prototype.toString=function(){return'Effect Shrink ['+this.element.id+']';} +YAHOO.widget.Effects.Grow=function(inElm,opts){this.element=YAHOO.util.Dom.get(inElm);var h=parseInt($T.getHeight(this.element));var w=parseInt(YAHOO.util.Dom.getStyle(this.element,'width'));YAHOO.util.Dom.setStyle(this.element,'overflow','hidden');this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeOut);var secs=((opts&&opts.seconds)?opts.seconds:1);var delay=((opts&&opts.delay)?opts.delay:false);var attributes={width:{to:w,from:0},height:{to:h,from:0},fontSize:{from:0,to:100,unit:'%'},opacity:{from:0,to:1}};this.effect=new YAHOO.util.Anim(this.element,attributes,secs,ease);this.effect.onComplete.subscribe(function(){this.onEffectComplete.fire();},this,true);if(!delay){this.animate();}} +YAHOO.widget.Effects.Grow.prototype.animate=function(){this.effect.animate();} +YAHOO.widget.Effects.Grow.prototype.toString=function(){return'Effect Grow ['+this.element.id+']';} +YAHOO.widget.Effects.TV=function(inElm,opts){var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeIn);var secs=((opts&&opts.seconds)?opts.seconds:1);var delay=((opts&&opts.delay)?opts.delay:false);this.element=YAHOO.util.Dom.get(inElm);this.done=false;this._height=parseInt($T.getHeight(this.element));this._width=parseInt(YAHOO.util.Dom.getStyle(this.element,'width'));YAHOO.util.Dom.setStyle(this.element,'overflow','hidden');var attributes={top:{from:0,to:(this._height/2)},height:{to:5}};this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);this.effect=new YAHOO.util.Anim(this.element,attributes,secs,ease);this.effect.onComplete.subscribe(function(){if(this.done){this.onEffectComplete.fire();YAHOO.widget.Effects.Hide(this.element);YAHOO.util.Dom.setStyle(this.element,'height',this._height+'px');YAHOO.util.Dom.setStyle(this.element,'width',this._width+'px');YAHOO.util.Dom.setStyle(this.element,'top','');YAHOO.util.Dom.setStyle(this.element,'left','');YAHOO.util.Dom.setStyle(this.element,'opacity','1');}else{this.done=true;this.effect.attributes={top:{from:(this._height/2),to:(this._height/2)},left:{from:0,to:(this._width/2)},height:{from:5,to:5},width:{to:5},opacity:{from:1,to:0}};this.effect.animate();}},this,true);if(!delay){this.animate();}} +YAHOO.widget.Effects.TV.prototype.animate=function(){this.effect.animate();} +YAHOO.widget.Effects.TV.prototype.toString=function(){return'Effect TV ['+this.element.id+']';} +YAHOO.widget.Effects.Shadow=function(inElm,opts){var delay=((opts&&opts.delay)?opts.delay:false);var topOffset=((opts&&opts.top)?opts.top:8);var leftOffset=((opts&&opts.left)?opts.left:8);var shadowColor=((opts&&opts.color)?opts.color:'#ccc');var shadowOpacity=((opts&&opts.opacity)?opts.opacity:.75);this.element=YAHOO.util.Dom.get(inElm);if(YAHOO.util.Dom.get(this.element.id+'_shadow')){this.shadow=YAHOO.util.Dom.get(this.element.id+'_shadow');}else{this.shadow=document.createElement('div');this.shadow.id=this.element.id+'_shadow';this.element.parentNode.appendChild(this.shadow);} +var h=parseInt($T.getHeight(this.element));var w=parseInt(YAHOO.util.Dom.getStyle(this.element,'width'));var z=this.element.style.zIndex;if(!z){z=1;this.element.style.zIndex=z;} +YAHOO.util.Dom.setStyle(this.element,'overflow','hidden');YAHOO.util.Dom.setStyle(this.shadow,'height',h+'px');YAHOO.util.Dom.setStyle(this.shadow,'width',w+'px');YAHOO.util.Dom.setStyle(this.shadow,'background-color',shadowColor);YAHOO.util.Dom.setStyle(this.shadow,'opacity',0);YAHOO.util.Dom.setStyle(this.shadow,'position','absolute');this.shadow.style.zIndex=(z-1);var xy=YAHOO.util.Dom.getXY(this.element);this.onEffectComplete=new YAHOO.util.CustomEvent('oneffectcomplete',this);var attributes={opacity:{from:0,to:shadowOpacity},top:{from:xy[1],to:(xy[1]+topOffset)},left:{from:xy[0],to:(xy[0]+leftOffset)}};this.effect=new YAHOO.util.Anim(this.shadow,attributes);this.effect.onComplete.subscribe(function(){this.onEffectComplete.fire();},this,true);if(!delay){this.animate();}} +YAHOO.widget.Effects.Shadow.prototype.animate=function(){this.effect.animate();} +YAHOO.widget.Effects.Shadow.prototype.toString=function(){return'Effect Shadow ['+this.element.id+']';} +YAHOO.widget.Effects.Puff=function(inElm,opts){var start_elm=YAHOO.util.Dom.get(inElm);this.element=start_this.element.cloneNode(true);start_this.element.parentNode.replaceChild(this.element,start_elm);YAHOO.widget.Effects.Hide(start_elm);var xy=YAHOO.util.Dom.getXY(this.element);var h=parseInt($T.getHeight(this.element));var w=parseInt(YAHOO.util.Dom.getStyle(this.element,'width'));var nh=((h/2)+h);var nw=((w/2)+w);var nto=((nh-h)/2);var nlo=((nw-w)/2);var nt=xy[1]-nto;var nl=xy[0]-nlo;YAHOO.util.Dom.setStyle(this.element,'position','absolute');var attributes={top:{to:nt},left:{to:nl},width:{to:nw},height:{to:nh},opacity:{from:1,to:0}};var ease=((opts&&opts.ease)?opts.ease:YAHOO.util.Easing.easeOut);var secs=((opts&&opts.seconds)?opts.seconds:1);var puff=new YAHOO.util.Anim(this.element,attributes,secs,ease);puff.onComplete.subscribe(function(){this.element=this.getEl();this.element.parentNode.replaceChild(start_elm,elm);});puff.animate();return puff;} +if(!YAHOO.Tools){$T={getHeight:function(el){return YAHOO.util.Dom.getStyle(el,'height');}}} +YAHOO.widget.Effects.Batch=function(effects,opts){} +YAHOO.widget.Effects.ContainerEffect=function(){} +YAHOO.widget.Effects.ContainerEffect.BlindUpDownBinded=function(overlay,dur){var bupdownbinded=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindUp',opts:{bind:'bottom'}},duration:dur},{attributes:{effect:'BlindDown',opts:{bind:'bottom'}},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bupdownbinded.init();return bupdownbinded;} +YAHOO.widget.Effects.ContainerEffect.BlindUpDown=function(overlay,dur){var bupdown=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindDown'},duration:dur},{attributes:{effect:'BlindUp'},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bupdown.init();return bupdown;} +YAHOO.widget.Effects.ContainerEffect.BlindLeftRightBinded=function(overlay,dur){var bleftrightbinded=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindLeft',opts:{bind:'right'}},duration:dur},{attributes:{effect:'BlindRight',opts:{bind:'right'}},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bleftrightbinded.init();return bleftrightbinded;} +YAHOO.widget.Effects.ContainerEffect.BlindLeftRight=function(overlay,dur){var bleftright=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindRight'},duration:dur},{attributes:{effect:'BlindLeft'},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bleftright.init();return bleftright;} +YAHOO.widget.Effects.ContainerEffect.BlindRightFold=function(overlay,dur){var brightfold=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindRight'},duration:dur},{attributes:{effect:'Fold'},duration:dur},overlay.element,YAHOO.widget.Effects.Container);brightfold.init();return brightfold;} +YAHOO.widget.Effects.ContainerEffect.BlindLeftFold=function(overlay,dur){var bleftfold=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindLeft',opts:{bind:'right'}},duration:dur},{attributes:{effect:'Fold'},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bleftfold.init();return bleftfold;} +YAHOO.widget.Effects.ContainerEffect.UnFoldFold=function(overlay,dur){var bunfold=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'UnFold'},duration:dur},{attributes:{effect:'Fold'},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bunfold.init();return bunfold;} +YAHOO.widget.Effects.ContainerEffect.BlindDownDrop=function(overlay,dur){var bdowndrop=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindDown'},duration:dur},{attributes:{effect:'Drop'},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bdowndrop.init();return bdowndrop;} +YAHOO.widget.Effects.ContainerEffect.BlindUpDrop=function(overlay,dur){var bupdrop=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindUp',opts:{bind:'bottom'}},duration:dur},{attributes:{effect:'Drop'},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bupdrop.init();return bupdrop;} +YAHOO.widget.Effects.ContainerEffect.BlindUpDownBindedGhost=function(overlay,dur){var bupdownbinded=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindUp',opts:{ghost:true,bind:'bottom'}},duration:dur},{attributes:{effect:'BlindDown',opts:{ghost:true,bind:'bottom'}},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bupdownbinded.init();return bupdownbinded;} +YAHOO.widget.Effects.ContainerEffect.BlindUpDownGhost=function(overlay,dur){var bupdown=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindDown',opts:{ghost:true}},duration:dur},{attributes:{effect:'BlindUp',opts:{ghost:true}},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bupdown.init();return bupdown;} +YAHOO.widget.Effects.ContainerEffect.BlindLeftRightBindedGhost=function(overlay,dur){var bleftrightbinded=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindLeft',opts:{bind:'right',ghost:true}},duration:dur},{attributes:{effect:'BlindRight',opts:{bind:'right',ghost:true}},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bleftrightbinded.init();return bleftrightbinded;} +YAHOO.widget.Effects.ContainerEffect.BlindLeftRightGhost=function(overlay,dur){var bleftright=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindRight',opts:{ghost:true}},duration:dur},{attributes:{effect:'BlindLeft',opts:{ghost:true}},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bleftright.init();return bleftright;} +YAHOO.widget.Effects.ContainerEffect.BlindRightFoldGhost=function(overlay,dur){var brightfold=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindRight',opts:{ghost:true}},duration:dur},{attributes:{effect:'Fold',opts:{ghost:true}},duration:dur},overlay.element,YAHOO.widget.Effects.Container);brightfold.init();return brightfold;} +YAHOO.widget.Effects.ContainerEffect.BlindLeftFoldGhost=function(overlay,dur){var bleftfold=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindLeft',opts:{bind:'right',ghost:true}},duration:dur},{attributes:{effect:'Fold',opts:{ghost:true}},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bleftfold.init();return bleftfold;} +YAHOO.widget.Effects.ContainerEffect.UnFoldFoldGhost=function(overlay,dur){var bleftfold=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'UnFold',opts:{ghost:true}},duration:dur},{attributes:{effect:'Fold',opts:{ghost:true}},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bleftfold.init();return bleftfold;} +YAHOO.widget.Effects.ContainerEffect.BlindDownDropGhost=function(overlay,dur){var bdowndrop=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindDown',opts:{ghost:true}},duration:dur},{attributes:{effect:'Drop'},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bdowndrop.init();return bdowndrop;} +YAHOO.widget.Effects.ContainerEffect.BlindUpDropGhost=function(overlay,dur){var bupdrop=new YAHOO.widget.ContainerEffect(overlay,{attributes:{effect:'BlindUp',opts:{bind:'bottom',ghost:true}},duration:dur},{attributes:{effect:'Drop'},duration:dur},overlay.element,YAHOO.widget.Effects.Container);bupdrop.init();return bupdrop;} +YAHOO.widget.Effects.Container=function(el,attrs,dur){var opts={delay:true};if(attrs.opts){for(var i in attrs.opts){opts[i]=attrs.opts[i];}} +var func=eval('YAHOO.widget.Effects.'+attrs.effect);var eff=new func(el,opts);eff.onStart=eff.effect.onStart;eff.onTween=eff.effect.onTween;eff.onComplete=eff.onEffectComplete;return eff;} Added: trunk/javascript/effects.js =================================================================== --- trunk/javascript/effects.js (rev 0) +++ trunk/javascript/effects.js 2008-08-27 15:06:00 UTC (rev 647) @@ -0,0 +1,1804 @@ +/* +* Copyright (c) 2007, Dav Glass <dav...@ya...>. +* Code licensed under the BSD License: +* http://blog.davglass.com/license.txt +* All rights reserved. +*/ +/** +* @fileoverview Provides the YUI with several built-in effect combinations. +* @author Dav Glass <dav...@ya...> +* @version 0.8 +* @class Provides the YUI with several built-in effect combinations. +* @requires YAHOO.util.Dom +* @requires YAHOO.util.Anim +* @requires YAHOO.Tools +* @class Provides the YUI with several built-in effect combinations.<br> +* All effects now support a Custom Event called onEffectComplete.<br> +* They all now support a new option called delay. If delay is set to true the effect will not immediately execute.<br> +* You can then call eff.animate(); to animate it later. This way you can delay the execution & bind an onEffectComplete subscriber<br> +* Then animate the effect. +* @constructor +*/ +YAHOO.widget.Effects = function() { + return { + version: '0.8' + } +}(); + +/** +* This effect makes the object dissappear with display none. +* @param {String/HTMLElement} inElm HTML element to apply the effect to +* @constructor +*/ +YAHOO.widget.Effects.Hide = function(inElm) { + this.element = YAHOO.util.Dom.get(inElm); + + YAHOO.util.Dom.setStyle(this.element, 'display', 'none'); + YAHOO.util.Dom.setStyle(this.element, 'visibility', 'hidden'); +} +/** +* String function for reporting to YUI Logger +*/ +YAHOO.widget.Effects.Hide.prototype.toString = function() { + return 'Effect Hide [' + this.element.id + ']'; +} +/** +* This effect makes the object Appear with display block. +* @param {String/HTMLElement} inElm HTML element to apply the effect to +* @constructor +*/ +YAHOO.widget.Effects.Show = function(inElm) { + this.element = YAHOO.util.Dom.get(inElm); + + YAHOO.util.Dom.setStyle(this.element, 'display', 'block'); + YAHOO.util.Dom.setStyle(this.element, 'visibility', 'visible'); +} +/** +* String function for reporting to YUI Logger +*/ +YAHOO.widget.Effects.Show.prototype.toString = function() { + return 'Effect Show [' + this.element.id + ']'; +} +/** +* @constructor +* This effect makes the object fade & disappear. +* @param {String/HTMLElement} inElm HTML element to apply the effect to +* @param {Object} options Pass in an object of options for this effect, you can choose the Easing and the Duration +* <code> <br>var options = (<br> +* ease: YAHOO.util.Easing.easeOut,<br> +* seconds: 1<br> +* delay: true (Delays execution)<br> +* )</code> +* @return Effect Object (Acess anmiation object via this.effect) +* @type Object +*/ +YAHOO.widget.Effects.Fade = function(inElm, opts) { + this.element = YAHOO.util.Dom.get(inElm); + + var attributes = { + opacity: { from: 1, to: 0 } + }; + /** + * Custom Event fired after the effect completes + * @type Object + */ + this.onEffectComplete = new YAHOO.util.CustomEvent('oneffectcomplete', this); + + var ease = ((opts && opts.ease) ? opts.ease : YAHOO.util.Easing.easeOut); + var secs = ((opts && opts.seconds) ? opts.seconds : 1); + var delay = ((opts && opts.delay) ? opts.delay : false); + + /** + * YUI Animation Object + * @type Object + */ + this.effect = new YAHOO.util.Anim(this.element, attributes, secs, ease); + this.effect.onComplete.subscribe(function() { + YAHOO.widget.Effects.Hide(this.element); + this.onEffectComplete.fire(); + }, this, true); + if (!delay) { + this.effect.animate(); + } +} +/** +* Fires off the embedded Animation. +*/ +YAHOO.widget.Effects.Fade.prototype.animate = function() { + this.effect.animate(); +} +/** +* String function for reporting to YUI Logger +*/ +YAHOO.widget.Effects.Fade.prototype.toString = function() { + return 'Effect Fade [' + this.element.id + ']'; +} +/** +* @constructor +* This effect makes the object fade & appear. +* @param {String/HTMLElement} inElm HTML element to apply the effect to +* @param {Object} options Pass in an object of options for this effect, you can choose the Easing and the Duration +* <code> <br>var options = (<br> +* ease: YAHOO.util.Easing.easeOut,<br> +* seconds: 3<br> +* delay: true (Delays execution)<br> +* )</code> +* @return Effect Object (Acess anmiation object via this.effect) +* @type Object +*/ +YAHOO.widget.Effects.Appear = function(inElm, opts) { + this.element = YAHOO.util.Dom.get(inElm); + + YAHOO.util.Dom.setStyle(this.element, 'opacity', '0'); + YAHOO.widget.Effects.Show(this.element); + var attributes = { + opacity: { from: 0, to: 1 } + }; + /** + * Custom Event fired after the effect completes + * @type Object + */ + this.onEffectComplete = new YAHOO.util.CustomEvent('oneffectcomplete', this); + + var ease = ((opts && opts.ease) ? opts.ease : YAHOO.util.Easing.easeOut); + var secs = ((opts && opts.seconds) ? opts.seconds : 3); + var delay = ((opts && opts.delay) ? opts.delay : false); + + /** + * YUI Animation Object + * @type Object + */ + this.effect = new YAHOO.util.Anim(this.element, attributes, secs, ease); + this.effect.onComplete.subscribe(function() { + this.onEffectComplete.fire(); + }, this, true); + if (!delay) { + this.effect.animate(); + } +} +/** +* Fires off the embedded Animation. +*/ +YAHOO.widget.Effects.Appear.prototype.animate = function() { + this.effect.animate(); +} +/** +* String function for reporting to YUI Logger +*/ +YAHOO.widget.Effects.Appear.prototype.toString = function() { + return 'Effect Appear [' + this.element.id + ']'; +} +/** +* @constructor +* This effect makes the object act like a window blind and retract. +* @param {String/HTMLElement} inElm HTML element to apply the effect to +* @param {Object} options Pass in an object of options for this effect, you can choose the Easing and the Duration +* <code> <br>var options = (<br> +* ease: YAHOO.util.Easing.easeOut,<br> +* seconds: 1<br> +* delay: true (Delays execution)<br> +* bind: (string) bottom<br> +* ghost: (boolean)<br> +* )</code><br> +* Setting the bind option will make the element "blind up/rise" from the bottom. +* @return Effect Object (Acess anmiation object via this.effect) +* @type Object +*/ +YAHOO.widget.Effects.BlindUp = function(inElm, opts) { + var ease = ((opts && opts.ease) ? opts.ease : YAHOO.util.Easing.easeOut); + var secs = ((opts && opts.seconds) ? opts.seconds : 1); + var delay = ((opts && opts.delay) ? opts.delay : false); + var ghost = ((opts && opts.ghost) ? opts.ghost : false); + + this.element = YAHOO.util.Dom.get(inElm); + this._height = $T.getHeight(this.element); + this._top = parseInt($D.getStyle(this.element, 'top')); + + this._opts = opts; + + YAHOO.util.Dom.setStyle(this.element, 'overflow', 'hidden'); + var attributes = { + height: { to: 0 } + }; + if (ghost) { + attributes.opacity = { + to : 0, + from: 1 + } + } + + /** + * Custom Event fired after the effect completes + * @type Object + */ + this.onEffectComplete = new YAHOO.util.CustomEvent('oneffectcomplete', this); + + + if (opts && opts.bind && (opts.bind == 'bottom')) { + var attributes = { + height: { from: 0, to: parseInt(this._height)}, + top: { from: (this._top + parseInt(this._height)), to: this._top } + }; + if (ghost) { + attributes.opacity = { + to : 1, + from: 0 + } + } + } + + /** + * YUI Animation Object + * @type Object + */ + this.effect = new YAHOO.util.Anim(this.element, attributes, secs, ease); + this.effect.onComplete.subscribe(function() { + if (this._opts && this._opts.bind && (this._opts.bind == 'bottom')) { + YAHOO.util.Dom.setStyle(this.element, 'top', this._top + 'px'); + } else { + YAHOO.widget.Effects.Hide(this.element); + YAHOO.util.Dom.setStyle(this.element, 'height', this._height); + } + YAHOO.util.Dom.setStyle(this.element, 'opacity', 1); + this.onEffectComplete.fire(); + }, this, true); + if (!delay) { + this.animate(); + } +} +/** +* Preps the style of the element before running the Animation. +*/ +YAHOO.widget.Effects.BlindUp.prototype.prepStyle = function() { + if (this._opts && this._opts.bind && (this._opts.bind == 'bottom')) { + YAHOO.util.Dom.setStyle(this.element, 'height', '0px'); + YAHOO.util.Dom.setStyle(this.element, 'top', this._height); + } + YAHOO.widget.Effects.Show(this.element); +} +/** +* Fires off the embedded Animation. +*/ +YAHOO.widget.Effects.BlindUp.prototype.animate = function() { + this.prepStyle(); + this.effect.animate(); +} +/** +* String function for reporting to YUI Logger +*/ +YAHOO.widget.Effects.BlindUp.prototype.toString = function() { + return 'Effect BlindUp [' + this.element.id + ']'; +} +/** +* @constructor +* This effect makes the object act like a window blind opening. +* @param {String/HTMLElement} inElm HTML element to apply the effect to +* @param {Object} options Pass in an object of options for this effect, you can choose the Easing and the Duration +* <code> <br>var options = (<br> +* ease: YAHOO.util.Easing.easeOut,<br> +* seconds: 1<br> +* delay: true (Delays execution)<br> +* bind: (string) bottom<br> +* ghost: (boolean)<br> +* )</code><br> +* Setting the bind option will make the element "blind down" from top to bottom. +* @return Effect Object (Acess anmiation object via this.effect) +* @type Object +*/ +YAHOO.widget.Effects.BlindDown = function(inElm, opts) { + var ease = ((opts && opts.ease) ? opts.ease : YAHOO.util.Easing.easeOut); + var secs = ((opts && opts.seconds) ? opts.seconds : 1); + var delay = ((opts && opts.delay) ? opts.delay : false); + var ghost = ((opts && opts.ghost) ? opts.ghost : false); + + this.element = YAHOO.util.Dom.get(inElm); + + this._opts = opts; + this._height = parseInt($T.getHeight(this.element)); + this._top = parseInt(YAHOO.util.Dom.getStyle(this.element, 'top')); + + YAHOO.util.Dom.setStyle(this.element, 'overflow', 'hidden'); + var attributes = { + height: { from: 0, to: this._height } + }; + if (ghost) { + attributes.opacity = { + to : 1, + from: 0 + } + } + /** + * Custom Event fired after the effect completes + * @type Object + */ + this.onEffectComplete = new YAHOO.util.CustomEvent('oneffectcomplete', this); + + + if (opts && opts.bind && (opts.bind == 'bottom')) { + var attributes = { + height: { to: 0, from: parseInt(this._height)}, + top: { to: (this._top + parseInt(this._height)), from: this._top } + }; + if (ghost) { + attributes.opacity = { + to : 0, + from: 1 + } + } + } + + /** + * YUI Animation Object + * @type Object + */ + this.effect = new YAHOO.util.Anim(this.element, attributes, secs, ease); + if (opts && opts.bind && (opts.bind == 'bottom')) { + this.effect.onComplete.subscribe(function() { + YAHOO.widget.Effects.Hide(this.element); + YAHOO.util.Dom.setStyle(this.element, 'top', this._top + 'px'); + YAHOO.util.Dom.setStyle(this.element, 'height', this._height + 'px'); + YAHOO.util.Dom.setStyle(this.element, 'opacity', 1); + this.onEffectComplete.fire(); + }, this, true); + } else { + this.effect.onComplete.subscribe(function() { + YAHOO.util.Dom.setStyle(this.element, 'opacity', 1); + this.onEffectComplete.fire(); + }, this, true); + } + if (!delay) { + this.animate(); + } +} +/** +* Preps the style of the element before running the Animation. +*/ +YAHOO.widget.Effects.BlindDown.prototype.prepStyle = function() { + if (this._opts && this._opts.bind && (this._opts.bind == 'bottom')) { + } else { + YAHOO.util.Dom.setStyle(this.element, 'height', '0px'); + } + YAHOO.widget.Effects.Show(this.element); +} +/** +* Fires off the embedded Animation. +*/ +YAHOO.widget.Effects.BlindDown.prototype.animate = function() { + this.prepStyle(); + this.effect.animate(); +} +/** +* String function for reporting to YUI Logger +*/ +YAHOO.widget.Effects.BlindDown.prototype.toString = function() { + return 'Effect BlindDown [' + this.element.id + ']'; +} +/** +* @constructor +* This effect makes the object slide open from the right. +* @param {String/HTMLElement} inElm HTML element to apply the effect to +* @param {Object} options Pass in an object of options for this effect, you can choose the Easing and the Duration +* <code> <br>var options = (<br> +* ease: YAHOO.util.Easing.easeOut,<br> +* seconds: 1<br> +* delay: true (Delays execution)<br> +* bind: (string) right<br> +* ghost: (boolean)<br> +* )</code><br> +* Setting the bind option will make the element "blind right" from right to left (it will be attached to the right side). +* @return Effect Object (Acess anmiation object via this.effect) +* @type Object +*/ +YAHOO.widget.Effects.BlindRight = function(inElm, opts) { + var ease = ((opts && opts.ease) ? opts.ease : YAHOO.util.Easing.easeOut); + var secs = ((opts && opts.seconds) ? opts.seconds : 1); + var delay = ((opts && opts.delay) ? opts.delay : false); + var ghost = ((opts && opts.ghost) ? opts.ghost : false); + this.element = YAHOO.util.Dom.get(inElm); + + this._width = parseInt(YAHOO.util.Dom.getStyle(this.element, 'width')); + this._left = parseInt(YAHOO.util.Dom.getStyle(this.element, 'left')); + this._opts = opts; + + YAHOO.util.Dom.setStyle(this.element, 'overflow', 'hidden'); + /** + * Custom Event fired after the effect completes + * @type Object + */ + this.onEffectComplete = new YAHOO.util.CustomEvent('oneffectcomplete', this); + + var attributes = { + width: { from: 0, to: this._width } + }; + if (ghost) { + attributes.opacity = { + to : 1, + from: 0 + } + } + + if (opts && opts.bind && (opts.bind == 'right')) { + var attributes = { + width: { to: 0 }, + /*left: { from: parseInt, to: this._width }*/ + left: { to: this._left + parseInt(this._width), from: this._left } + }; + if (ghost) { + attributes.opacity = { + to : 0, + from: 1 + } + } + } + /** + * YUI Animation Object + * @type Object + */ + this.effect = new YAHOO.util.Anim(this.element, attributes, secs, ease); + if (opts && opts.bind && (opts.bind == 'right')) { + this.effect.onComplete.subscribe(function() { + YAHOO.widget.Effects.Hide(this.element); + YAHOO.util.Dom.setStyle(this.element, 'width', this._width + 'px'); + YAHOO.util.Dom.setStyle(this.element, 'left', this._left + 'px'); + this._width = null; + YAHOO.util.Dom.setStyle(this.element, 'opacity', 1); + this.onEffectComplete.fire(); + }, this, true); + } else { + this.effect.onComplete.subscribe(function() { + YAHOO.util.Dom.setStyle(this.element, 'opacity', 1); + this.onEffectComplete.fire(); + }, this, true); + } + if (!delay) { + this.animate(); + } +} +/** +* Preps the style of the element before running the Animation. +*/ +YAHOO.widget.Effects.BlindRight.prototype.prepStyle = function() { + if (this._opts && this._opts.bind && (this._opts.bind == 'right')) { + } else { + YAHOO.util.Dom.setStyle(this.element, 'width', '0'); + } +} +/** +* Fires off the embedded Animation. +*/ +YAHOO.widget.Effects.BlindRight.prototype.animate = function() { + this.prepStyle(); + this.effect.animate(); +} +/** +* String function for reporting to YUI Logger +*/ +YAHOO.widget.Effects.BlindRight.prototype.toString = function() { + return 'Effect BlindRight [' + this.element.id + ']'; +} +/** +* @constructor +* This effect makes the object slide closed from the left. +* @param {String/HTMLElement} inElm HTML element to apply the effect to +* @param {Object} options Pass in an object of options for this effect, you can choose the Easing and the Duration +* <code> <br>var options = (<br> +* ease: YAHOO.util.Easing.easeOut,<br> +* seconds: 1<br> +* delay: true (Delays execution)<br> +* bind: (string) right<br> +* ghost: (boolean)<br> +* )</code><br> +* Setting the bind option will make the element "blind left" from left to right (it will be attached to the right side). +* @return Effect Object (Acess anmiation object via this.effect) +* @type Object +*/ +YAHOO.widget.Effects.BlindLeft = function(inElm, opts) { + var ease = ((opts && opts.ease) ? opts.ease : YAHOO.util.Easing.easeOut); + var secs = ((opts && opts.seconds) ? opts.seconds : 1); + var delay = ((opts && opts.delay) ? opts.delay : false); + var ghost = ((opts && opts.ghost) ? opts.ghost : false); + this.ghost = ghost; + + this.element = YAHOO.util.Dom.get(inElm); + this._width = YAHOO.util.Dom.getStyle(this.element, 'width'); + this._left = parseInt(YAHOO.util.Dom.getStyle(this.element, 'left')); + + + this._opts = opts; + YAHOO.util.Dom.setStyle(this.element, 'overflow', 'hidden'); + var attributes = { + width: { to: 0 } + }; + if (ghost) { + attributes.opacity = { + to : 0, + from: 1 + } + } + + /** + * Custom Event fired after the effect completes + * @type Object + */ + this.onEffectComplete = new YAHOO.util.CustomEvent('oneffectcomplete', this); + + + if (opts && opts.bind && (opts.bind == 'right')) { + var attributes = { + width: { from: 0, to: parseInt(this._width) }, + left: { from: this._left + parseInt(this._width), to: this._left } + }; + if (ghost) { + attributes.opacity = { + to : 1, + from: 0 + } + } + } + + /** + * YUI Animation Object + * @type Object + */ + this.effect = new YAHOO.util.Anim(this.element, attributes, secs, ease); + if (opts && opts.bind && (opts.bind == 'right')) { + this.effect.onComplete.subscribe(function() { + this.onEffectComplete.fire(); + }, this, true); + } else { + this.effect.onComplete.subscribe(function() { + YAHOO.widget.Effects.Hide(this.element); + YAHOO.util.Dom.setStyle(this.element, 'width', this._width); + YAHOO.util.Dom.setStyle(this.element, 'left', this._left + 'px'); + YAHOO.util.Dom.setStyle(this.element, 'opacity', 1); + this._width = null; + this.onEffectComplete.fire(); + }, this, true); + } + if (!delay) { + this.animate(); + } +} +/** +* Preps the style of the element before running the Animation. +*/ +YAHOO.widget.Effects.BlindLeft.prototype.prepStyle = function() { + if (this._opts && this._opts.bind && (this._opts.bind == 'right')) { + YAHOO.widget.Effects.Hide(this.element); + YAHOO.util.Dom.setStyle(this.element, 'width', '0px'); + YAHOO.util.Dom.setStyle(this.element, 'left', parseInt(this._width)); + if (this.ghost) { + YAHOO.util.Dom.setStyle(this.element, 'opacity', 0); + } + YAHOO.widget.Effects.Show(this.element); + } +} +/** +* Fires off the embedded Animation. +*/ +YAHOO.widget.Effects.BlindLeft.prototype.animate = function() { + this.prepStyle(); + this.effect.animate(); +} +/** +* String function for reporting to YUI Logger +*/ +YAHOO.widget.Effects.BlindLeft.prototype.toString = function() { + return 'Effect BlindLeft [' + this.element.id + ']'; +} +/** +* @constructor +* This effect makes the object appear to fold up. +* @param {String/HTMLElement} inElm HTML element to apply the effect to +* @param {Object} options Pass in an object of options for this effect, you can choose the Easing and the Duration +* <code> <br>var options = (<br> +* ease: YAHOO.util.Easing.easeOut,<br> +* seconds: 1,<br> +* to: 5,<br> +* delay: true (Delays execution),<br> +* ghost: (boolean)<br> +* )</code> +* @return Effect Object (Acess anmiation object via this.effect) +* @type Object +*/ +YAHOO.widget.Effects.Fold = function(inElm, opts) { + var ease = ((opts && opts.ease) ? opts.ease : YAHOO.util.Easing.easeOut); + var secs = ((opts && opts.seconds) ? opts.seconds : 1); + var delay = ((opts && opts.delay) ? opts.delay : false); + this.ghost = ((opts && opts.ghost) ? opts.ghost : false); + + this.element = YAHOO.util.Dom.get(inElm); + + this._to = 5; + if (!delay) { + YAHOO.widget.Effects.Show(this.element); + } + YAHOO.util.Dom.setStyle(this.element, 'overflow', 'hidden'); + + this.done = false; + + this._height = parseInt($T.getHeight(this.element)); + + this._width = YAHOO.util.Dom.getStyle(this.element, 'width'); + + /** + * Custom Event fired after the effect completes + * @type Object + */ + this.onEffectComplete = new YAHOO.util.CustomEvent('oneffectcomplete', this); + + if (opts && opts.to) { + this._to = opts.to; + } + + var attributes = { + height: { to: this._to } + }; + + /** + * YUI Animation Object + * @type Object + */ + this.effect = new YAHOO.util.Anim(this.element, attributes, secs, ease); + this.effect.onComplete.subscribe(function() { + if (this.done) { + YAHOO.widget.Effects.Hide(this.element); + YAHOO.util.Dom.setStyle(this.element, 'height', this._height + 'px'); + YAHOO.util.Dom.setStyle(this.element, 'width', this._width); + this.onEffectComplete.fire(); + } else { + this.done = true; + this.effect.attributes = { width: { to: 0 }, height: { from: this._to, to: this._to } } + if (this.ghost) { + this.effect.attributes.opacity = { + to : 0, from: 1 + } + } + this.animate(); + } + }, this, true); + if (!delay) { + this.animate(); + } +} +/** +* Fires off the embedded Animation. +*/ +YAHOO.widget.Effects.Fold.prototype.animate = function() { + this.effect.animate(); +} +/** +* String function for reporting to YUI Logger +*/ +YAHOO.widget.Effects.Fold.prototype.toString = function() { + return 'Effect Fold [' + this.element.id + ']'; +} +/** +* @constructor +* This effect makes the object appear to fold out (opposite of Fold). +* @param {String/HTMLElement} inElm HTML element to apply the effect to +* @param {Object} options Pass in an object of options for this effect, you can choose the Easing and the Duration +* <code> <br>var options = (<br> +* ease: YAHOO.util.Easing.easeOut,<br> +* seconds: 1,<br> +* to: 5,<br> +* delay: true (Delays execution),<br> +* ghost: (boolean)<br> +* )</code> +* @return Effect Object (Acess anmiation object via this.effect) +* @type Object +*/ +YAHOO.widget.Effects.UnFold = function(inElm, opts) { + var ease = ((opts && opts.ease) ? opts.ease : YAHOO.util.Easing.easeOut); + var secs = ((opts && opts.seconds) ? opts.seconds : 1); + var delay = ((opts && opts.delay) ? opts.delay : false); + this.ghost = ((opts && opts.ghost) ? opts.ghost : false); + + this.element = YAHOO.util.Dom.get(inElm); + this._height = $T.getHeight(this.element); + this._width = YAHOO.util.Dom.getStyle(this.element, 'width'); + + this._to = 5; + YAHOO.util.Dom.setStyle(this.element, 'overflow', 'hidden'); + + + this.done = false; + + /** + * Custom Event fired after the effect completes + * @type Object + */ + this.onEffectComplete = new YAHOO.util.CustomEvent('oneffectcomplete', this); + + if (opts && opts.to) { + this._to = opts.to; + } + + attributes = { + height: { from: 0, to: this._to }, + width: { from: 0, to: parseInt(this._width) } + }; + if (this.ghost) { + attributes.opacity = { + to : .15, from: 0 + } + } + + /** + * YUI Animation Object + * @type Object + */ + this.effect = new YAHOO.util.Anim(this.element, attributes, secs, ease); + this.effect.onComplete.subscribe(function() { + if (this.done) { + this.onEffectComplete.fire(); + this.done = false; + } else { + this.done = true; + this.effect.attributes = { width: { from: parseInt(this._width), to: parseInt(this._width) }, height: { from: this._to, to: parseInt(this._height) } } + if (this.ghost) { + this.effect.attributes.opacity = { + to : 1, from: .15 + } + } + this.effect.animate(); + } + }, this, true); + if (!delay) { + this.animate(); + } +} +/** +* Preps the style of the element before running the Animation. +*/ +YAHOO.widget.Effects.UnFold.prototype.prepStyle = function() { + YAHOO.widget.Effects.Hide(this.element); + YAHOO.util.Dom.setStyle(this.element, 'height', '0px'); + YAHOO.util.Dom.setStyle(this.element, 'width', '0px'); + this.effect.attributes = attributes; +} +/** +* Fires off the embedded Animation. +*/ +YAHOO.widget.Effects.UnFold.prototype.animate = function() { + this.prepStyle(); + YAHOO.widget.Effects.Show(this.element); + this.effect.animate(); +} +/** +* String function for reporting to YUI Logger +*/ +YAHOO.widget.Effects.UnFold.prototype.toString = function() { + return 'Effect UnFold [' + this.element.id + ']'; +} + + +/** +* @constructor +* This effect makes the object shake from Right to Left. +* @param {String/HTMLElement} inElm HTML element to apply the effect to +* @param {Object} options Pass in an object of options for this effect, you can choose the Easing and the Duration +* <code> <br>var options = (<br> +* ease: YAHOO.util.Easing.easeOut,<br> +* seconds: .25,<br> +* delay: true (Delays execution)<br> +* offset: 10,<br> +* maxcount: 5<br> +* )</code> +* @return Effect Object (Acess anmiation object via this.effect) +* @type Object +*/ +YAHOO.widget.Effects.ShakeLR = function(inElm, opts) { + this.element = YAHOO.util.Dom.get(inElm); + + this._offSet = 10; + this._maxCount = 5; + this._counter = 0; + this._elmPos = YAHOO.util.Dom.getXY(this.element); + var attributes = { + left: { to: ( - this._offSet) } + }; + + /** + * Custom Event fired after the effect completes + * @type Object + */ + this.onEffectComplete = new YAHOO.util.CustomEvent('oneffectcomplete', this); + + if (opts && opts.offset) { + this._offSet = opts.offset; + } + if (opts && opts.maxcount) { + this._maxCount = opts.maxcount; + } + + var ease = ((opts && opts.ease) ? opts.ease : YAHOO.util.Easing.easeOut); + var secs = ((opts && opts.seconds) ? opts.seconds : .25); + var delay = ((opts && opts.delay) ? opts.delay : false); + + /** + * YUI Animation Object + * @type Object + */ + this.effect = new YAHOO.util.Anim(this.element, attributes, secs, ease); + this.effect.onComplete.subscribe(function() { + if (this.done) { + this.onEffectComplete.fire(); + } else { + if (this._counter < this._maxCount) { + this._counter++; + if (this._left) { + this._left = null; + this.effect.attributes = { left: { to: ( - this._offSet) } } + } else { + this._left = true; + this.effect.attributes = { left: { to: this._offSet } } + } + this.effect.animate(); + } else { + this.done = true; + this._left = null; + this._counter = null; + this.effect.attributes = { left: { to: 0 } } + this.effect.animate(); + } + } + }, this, true); + if (!delay) { + this.effect.animate(); + } +} +/** +* Fires off the embedded Animation. +*/ +YAHOO.widget.Effects.ShakeLR.prototype.animate = function() { + this.effect.animate(); +} +/** +* String function for reporting to YUI Logger +*/ +YAHOO.widget.Effects.ShakeLR.prototype.toString = function() { + return 'Effect ShakeLR [' + this.element.id + ']'; +} +/** +* @constructor +* This effect makes the object shake from Top to Bottom. +* @param {String/HTMLElement} inElm HTML element to apply the effect to +* @param {Object} options Pass in an object of options for this effect, you can choose the Easing and the Duration +* <code> <br>var options = (<br> +* ease: YAHOO.util.Ea... [truncated message content] |
From: <al...@us...> - 2008-08-27 15:03:53
|
Revision: 646 http://sciret.svn.sourceforge.net/sciret/?rev=646&view=rev Author: alpeb Date: 2008-08-27 15:03:45 +0000 (Wed, 27 Aug 2008) Log Message: ----------- moved connect-min YUI lib into the header template Modified Paths: -------------- trunk/templates/EditArticle.tpl Modified: trunk/templates/EditArticle.tpl =================================================================== --- trunk/templates/EditArticle.tpl 2008-08-27 15:03:05 UTC (rev 645) +++ trunk/templates/EditArticle.tpl 2008-08-27 15:03:45 UTC (rev 646) @@ -14,8 +14,6 @@ <script type="text/javascript" src="javascript/yui/build/resize/resize-beta-min.js"></script> <!-- Needed for Menus, Buttons and Overlays used in the Toolbar --> <script type="text/javascript" src="javascript/yui/build/menu/menu-min.js"></script> -<!-- Needed for the image uploader --> -<script type="text/javascript" src="javascript/yui/build/connection/connection-min.js"></script> <!-- Source file for Rich Text Editor--> <script src="javascript/yui/build/editor/editor-beta-min.js"></script> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-27 15:03:08
|
Revision: 645 http://sciret.svn.sourceforge.net/sciret/?rev=645&view=rev Author: alpeb Date: 2008-08-27 15:03:05 +0000 (Wed, 27 Aug 2008) Log Message: ----------- fixed DB call Modified Paths: -------------- trunk/models/Article.php Modified: trunk/models/Article.php =================================================================== --- trunk/models/Article.php 2008-08-26 19:37:56 UTC (rev 644) +++ trunk/models/Article.php 2008-08-27 15:03:05 UTC (rev 645) @@ -496,7 +496,7 @@ foreach ($this->relatedArticles as $article) { $query = 'INSERT INTO articles_related (art_id, related_art_id) VALUES (?, ?)'; - DB::getInstance()->query($query, $this->id, $article->getId()); + DB::getInstance()->query($query, array($this->id, $article->getId())); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-26 19:37:58
|
Revision: 644 http://sciret.svn.sourceforge.net/sciret/?rev=644&view=rev Author: alpeb Date: 2008-08-26 19:37:56 +0000 (Tue, 26 Aug 2008) Log Message: ----------- sometimes CREATE TABLE won't work through Zend_Db, so I'm issuing a direct call Modified Paths: -------------- trunk/actions/Install.php Modified: trunk/actions/Install.php =================================================================== --- trunk/actions/Install.php 2008-08-26 18:40:30 UTC (rev 643) +++ trunk/actions/Install.php 2008-08-26 19:37:56 UTC (rev 644) @@ -60,7 +60,7 @@ // it looks like the following call attempts to create the DB $this->db = Zend_Db::factory($this->config->database); $this->db->getConnection(); - $stmt = $this->db->query("CREATE DATABASE `".$_POST['database']."`"); + $stmt = $this->db->getConnection()->query("CREATE DATABASE `".$_POST['database']."`"); } catch (Zend_Db_Adapter_Exception $e) { $errors[] = $this->user->lang('Couldn\'t create database. Please create it manually and try again.'); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-26 18:40:32
|
Revision: 643 http://sciret.svn.sourceforge.net/sciret/?rev=643&view=rev Author: alpeb Date: 2008-08-26 18:40:30 +0000 (Tue, 26 Aug 2008) Log Message: ----------- PDO is giving me too much headeaches when not using the latest php versions, so I'll be using mysqli instead Modified Paths: -------------- trunk/config.ini.php.template trunk/index.php trunk/models/ArticleGateway.php trunk/models/ArticleIterator.php Modified: trunk/config.ini.php.template =================================================================== --- trunk/config.ini.php.template 2008-08-26 18:40:02 UTC (rev 642) +++ trunk/config.ini.php.template 2008-08-26 18:40:30 UTC (rev 643) @@ -13,7 +13,7 @@ ), 'database' => array ( - 'adapter' => 'pdo_mysql', + 'adapter' => 'mysqli', 'params' => array ( 'host' => 'localhost', Modified: trunk/index.php =================================================================== --- trunk/index.php 2008-08-26 18:40:02 UTC (rev 642) +++ trunk/index.php 2008-08-26 18:40:30 UTC (rev 643) @@ -69,7 +69,6 @@ /************************** * DATABASE /**************************/ -$config->database->params->driver_options = array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true); $db = Zend_Db::factory($config->database); if ($config->environment->loglevel == Zend_Log::DEBUG) { $profiler = new DBProfiler(); Modified: trunk/models/ArticleGateway.php =================================================================== --- trunk/models/ArticleGateway.php 2008-08-26 18:40:02 UTC (rev 642) +++ trunk/models/ArticleGateway.php 2008-08-26 18:40:30 UTC (rev 643) @@ -106,6 +106,7 @@ } $result = DB::getInstance()->query($query); + $resultSet = $result->fetchAll(Zend_Db::FETCH_ASSOC); if ($numRecords != -1) { $query2 = 'SELECT FOUND_ROWS()'; @@ -116,7 +117,7 @@ $totalNumItems = $result->rowCount(); } - return new ArticleIterator($result, $totalNumItems); + return new ArticleIterator($resultSet, $totalNumItems); } function getSearchResults( $searchQuery, @@ -161,6 +162,7 @@ } $result = DB::getInstance()->query($query, array($searchQuery, $searchQuery)); } + $resultSet = $result->fetchAll(Zend_Db::FETCH_ASSOC); if ($numRecords != -1) { $query2 = 'SELECT FOUND_ROWS()'; @@ -171,7 +173,7 @@ $totalNumItems = $result->rowCount(); } - return new ArticleIterator($result, $totalNumItems); + return new ArticleIterator($resultSet, $totalNumItems); } function getAdvancedSearchResults( $allWords, Modified: trunk/models/ArticleIterator.php =================================================================== --- trunk/models/ArticleIterator.php 2008-08-26 18:40:02 UTC (rev 642) +++ trunk/models/ArticleIterator.php 2008-08-26 18:40:30 UTC (rev 643) @@ -12,17 +12,24 @@ class ArticleIterator { var $resultSet; var $totalNumItems; + private $_cursor = 0; function ArticleIterator($resultSet, $totalNumItems) { - $this->resultSet = $resultSet; - $this->totalNumItems = $totalNumItems; + if (is_a($resultSet, 'Zend_Db_Statement_Interface')) { + $this->resultSet = $resultSet->fetchAll(Zend_Db::FETCH_ASSOC); + } else { + $this->resultSet = $resultSet; + } + $this->totalNumItems = $totalNumItems; } function fetch() { - if (!$row = $this->resultSet->fetch()) { + if (!isset($this->resultSet[$this->_cursor])) { return false; } + $row = $this->resultSet[$this->_cursor]; + $article = new Article; $article->setId($row['art_id']); $article->setIsBookmark($row['is_bookmark']); @@ -50,6 +57,8 @@ $article->setNumFiles($row['num_files']); } + $this->_cursor++; + return $article; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-26 18:40:05
|
Revision: 642 http://sciret.svn.sourceforge.net/sciret/?rev=642&view=rev Author: alpeb Date: 2008-08-26 18:40:02 +0000 (Tue, 26 Aug 2008) Log Message: ----------- added missing var Modified Paths: -------------- trunk/views/SearchResults.php Modified: trunk/views/SearchResults.php =================================================================== --- trunk/views/SearchResults.php 2008-08-26 01:05:02 UTC (rev 641) +++ trunk/views/SearchResults.php 2008-08-26 18:40:02 UTC (rev 642) @@ -104,6 +104,7 @@ } else { $this->tpl->set_var('numResults', ''); $this->tpl->set_var('articles', ''); + $this->tpl->set_var('query', $_GET['query']); $this->tpl->parse('nothingFound', 'nothingFound_block'); } if (isset($_GET['advancedSearch'])) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-26 01:05:23
|
Revision: 641 http://sciret.svn.sourceforge.net/sciret/?rev=641&view=rev Author: alpeb Date: 2008-08-26 01:05:02 +0000 (Tue, 26 Aug 2008) Log Message: ----------- implemented new template. Added jquery lib. Modified Paths: -------------- trunk/actions/SaveArticle.php trunk/classes/Controller.php trunk/javascript/general.js trunk/others.css trunk/style.css trunk/templates/EditArticle.tpl trunk/templates/MainView.tpl trunk/templates/TodosDropdown.tpl trunk/templates/ViewArticle.tpl trunk/templates/footer.tpl trunk/templates/head.tpl trunk/templates/header.tpl trunk/templates/pagination.tpl trunk/views/AddQuestion.php trunk/views/MainView.php trunk/views/ManageArticles.php trunk/views/SearchResults.php trunk/views/View.php trunk/views/ViewArticle.php trunk/views/ViewBookmark.php Added Paths: ----------- trunk/images/bg_author.gif trunk/images/bg_author_span.gif trunk/images/bg_content.jpg trunk/images/bg_content_top.jpg trunk/images/bg_foot.jpg trunk/images/bg_head_keyboard.jpg trunk/images/bg_menu.gif trunk/images/bg_panel.gif trunk/images/bg_panel.png trunk/images/bg_panel_title.gif trunk/images/bg_table_head.jpg trunk/images/bg_title_article.gif trunk/images/bg_title_article_span.gif trunk/images/bg_view_mode.jpg trunk/images/button_a.gif trunk/images/button_panel_a.gif trunk/images/button_panel_span.gif trunk/images/button_register_a.gif trunk/images/button_register_a.png trunk/images/button_register_span.gif trunk/images/button_register_span.png trunk/images/button_span.gif trunk/images/icon_favorite_16.png trunk/images/icon_mail_16.png trunk/images/icon_pdf_16.png trunk/images/icon_print_16.png trunk/images/logo.jpg trunk/javascript/jquery.js trunk/style_ie6.css trunk/style_ie7.css Removed Paths: ------------- trunk/templates/BasicSearch.tpl Modified: trunk/actions/SaveArticle.php =================================================================== --- trunk/actions/SaveArticle.php 2008-08-26 00:54:07 UTC (rev 640) +++ trunk/actions/SaveArticle.php 2008-08-26 01:05:02 UTC (rev 641) @@ -35,7 +35,7 @@ $art = new Article($articleId); $art->setCategoryId($_POST['cat_id']); $art->setTitle($_POST['title']); - $art->setContent($_POST['content']); + $art->setContent($_POST['text_content']); if (!isset($_POST['usage_id'])) { $art->setInternal($this->configuration->getConfigValue('internalByDefault')? 1 : 0); Modified: trunk/classes/Controller.php =================================================================== --- trunk/classes/Controller.php 2008-08-26 00:54:07 UTC (rev 640) +++ trunk/classes/Controller.php 2008-08-26 01:05:02 UTC (rev 641) @@ -71,8 +71,7 @@ $obj->setHTMLHeader($this->views[$view][SHOW_HEADER]); $obj->dispatch(); if ($this->views[$view][SHOW_HEADER]) { - $obj->tpl->set_file('footer', 'footer.tpl'); - $obj->tpl->pparse('out', 'footer'); + $obj->showFooter(); } } Property changes on: trunk/images/bg_author.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/bg_author_span.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/bg_content.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/bg_content_top.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/bg_foot.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/bg_head_keyboard.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/bg_menu.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/bg_panel.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/bg_panel.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/bg_panel_title.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/bg_table_head.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/bg_title_article.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/bg_title_article_span.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/bg_view_mode.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/button_a.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/button_panel_a.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/button_panel_span.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/button_register_a.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/button_register_a.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/button_register_span.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/button_register_span.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/button_span.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/icon_favorite_16.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/icon_mail_16.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/icon_pdf_16.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/icon_print_16.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/images/logo.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/javascript/general.js =================================================================== --- trunk/javascript/general.js 2008-08-26 00:54:07 UTC (rev 640) +++ trunk/javascript/general.js 2008-08-26 01:05:02 UTC (rev 641) @@ -10,6 +10,7 @@ /** * Classes enforce private and public members through the Module Pattern * (the vars outside are private, and what goes inside the return is public) + * We use classes inside the "SCIRET" namespace * @see http://yuiblog.com/blog/2007/06/12/module-pattern/ */ @@ -17,6 +18,12 @@ SCIRET = YAHOO.sciret; // ********************************************************* +// ** jQuery initialization, to ** +// ** avoid conflicts with prototype ** +// ********************************************************* +var $j = jQuery.noConflict(); + +// ********************************************************* // ** BROWSER DETECTION ** // ********************************************************* isIE = false; @@ -273,7 +280,7 @@ } // ********************************************************* -// ** FavoriteS FUNCTIONS ** +// ** Favorites FUNCTIONS ** // ********************************************************* function dropdownFavorites() { if (isFavoritesDropdownShown) { @@ -295,8 +302,8 @@ 'index.php?view=GetFavoritesDropdown', { method : 'post', - onLoading : function() {showLoading('generalLoading')}, - onComplete : function (response) {successAjax('generalLoading'), showDropDownFavorites(response)} + onLoading : function() {showLoading('favoritesLoading');}, + onComplete : function (response) {successAjax('favoritesLoading'), showDropDownFavorites(response)} } ); } @@ -391,8 +398,8 @@ 'index.php?view=GetTodosDropdown', { method : 'post', - onLoading : function() {showLoading('generalLoading')}, - onComplete : function (response) {successAjax('generalLoading'), showDropDownTodos(response)} + onLoading : function() {showLoading('todosLoading')}, + onComplete : function (response) {successAjax('todosLoading'), showDropDownTodos(response)} } ); } @@ -703,8 +710,55 @@ } }(); +// ********************************************************* +// ** MENU HIGHLIGHTING ** +// ********************************************************* +$j(document).ready(function() { + $j("#menu a").fadeTo('fast',1.0); + $j("#menu a").hover(function () { + $j(this).fadeTo(200,0.7); + },function(){ + $j("#menu a").fadeTo(200,1.0); + }); + + /* panel_right */ + $j('#search > .panel_title > a').click(function() { + $j('#search > .inside_panel').toggle(400); + return false; + }); + + $j('#login > .panel_title > a').click(function() { + $j('#login > .inside_panel').toggle(400); + return false; + }); + + $j('#todo > .panel_title > a').click(function() { + $j('#todo > .inside_panel').toggle(400); + return false; + }); +}); + // ********************************************************* +// ** TABS HANDLING ** +// ********************************************************* +$j(document).ready(function() { + $j(function () { + var tabContainers = $j('#tabs > div.tab'); + + $j('.view_mode a').click(function () { + tabContainers.hide(); + tabContainers.filter(this.hash).show(); + $j('.view_mode a').removeClass('active_tab'); + $j(this).addClass('active_tab'); + return false; + }).filter(':first').click(); + }); + +}); + + +// ********************************************************* // ** OTHER FUNCTIONS ** // ********************************************************* function saveDraft(form) { Added: trunk/javascript/jquery.js =================================================================== --- trunk/javascript/jquery.js (rev 0) +++ trunk/javascript/jquery.js 2008-08-26 01:05:02 UTC (rev 641) @@ -0,0 +1,32 @@ +/* + * jQuery 1.2.6 - New Wave Javascript + * + * Copyright (c) 2008 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $ + * $Rev: 5685 $ + */ +(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else +return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else +return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else +selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else +return(this[0].value||"").replace(/\r/g,"");}return undefined;}if(value.constructor==Number)value+='';return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else +this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else +return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else +jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){var src=target[name],copy=options[name];if(target===copy)continue;if(deep&©&&typeof copy=="object"&&!copy.nodeType)target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)target[name]=copy;}return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else +script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!==undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)if(callback.apply(object[name],args)===false)break;}else +for(;i<length;)if(callback.apply(object[i++],args)===false)break;}else{if(length==undefined){for(name in object)if(callback.call(object[name],name,object[name])===false)break;}else +for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else +jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem+='';if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else +ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&¬xml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else +while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]===elem)return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])if(elem.nodeType!=8)first[pos++]=elem;}else +while(elem=second[i++])first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv!=!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)ret[ret.length]=value;}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else +for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else +jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else +xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else +jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else +for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else +s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else +e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].ele... [truncated message content] |
From: <al...@us...> - 2008-08-26 00:54:12
|
Revision: 640 http://sciret.svn.sourceforge.net/sciret/?rev=640&view=rev Author: alpeb Date: 2008-08-26 00:54:07 +0000 (Tue, 26 Aug 2008) Log Message: ----------- fixed old db calls Modified Paths: -------------- trunk/models/ArticleGateway.php trunk/models/FavoriteGateway.php trunk/models/UserGateway.php Modified: trunk/models/ArticleGateway.php =================================================================== --- trunk/models/ArticleGateway.php 2008-08-26 00:49:40 UTC (rev 639) +++ trunk/models/ArticleGateway.php 2008-08-26 00:54:07 UTC (rev 640) @@ -87,7 +87,7 @@ break; case 'withFullName': $query = 'SELECT SQL_CALC_FOUND_ROWS art.art_id, is_bookmark, q_id, title, url, expires, question, SUBSTRING(content, 1, '.EXCERPT_LENGTH.') AS excerpt, cat_id, published, draft, art.user_id, views, created, modified, modified_user_id, votes_1, votes_2, votes_3, votes_4, votes_5, firstname, lastname ' - .'FROM articles art LEFT JOIN users u ON art.user_id = u.user_id ' + .'FROM articles art LEFT JOIN users u ON art.user_id = u.id' . $where . " ORDER BY $order $direction"; if ($numRecords != -1) { $query .= ' LIMIT ' . (int)$offset . ', ' . (int)$numRecords; @@ -136,7 +136,7 @@ $whereArr[] = 'art.art_id=?'; $where = implode(' AND ', $whereArr); $query = 'SELECT art.art_id, is_bookmark, q_id, title, url, expires, question, SUBSTRING(content, 1, '.EXCERPT_LENGTH.') AS excerpt, cat_id, published, draft, art.user_id, views, created, modified, modified_user_id, votes_1, votes_2, votes_3, votes_4, votes_5, COUNT(f.file_id) AS num_files, firstname, lastname ' - .'FROM articles art LEFT JOIN files f on art.art_id = f.art_id LEFT JOIN users u ON art.user_id = u.user_id ' + .'FROM articles art LEFT JOIN files f on art.art_id = f.art_id LEFT JOIN users u ON art.user_id = u.id ' ."WHERE $where " .'GROUP BY art.art_id'; $result = DB::getInstance()->query($query, $searchQuery); @@ -153,13 +153,13 @@ $where = implode(' AND ', $whereArr); $query = 'SELECT SQL_CALC_FOUND_ROWS MATCH(title, content, url) AGAINST(?) AS score, art.art_id, is_bookmark, q_id, title, url, expires, question, SUBSTRING(content, 1, '.EXCERPT_LENGTH.') AS excerpt, cat_id, published, draft, art.user_id, views, created, modified, modified_user_id, votes_1, votes_2, votes_3, votes_4, votes_5, COUNT(f.file_id) AS num_files, firstname, lastname ' - .'FROM articles art LEFT JOIN files f on art.art_id = f.art_id LEFT JOIN users u ON art.user_id = u.user_id ' + .'FROM articles art LEFT JOIN files f on art.art_id = f.art_id LEFT JOIN users u ON art.user_id = u.id ' ."WHERE $where " .'GROUP BY art.art_id'; if ($numRecords != -1) { $query .= ' LIMIT ' . (int)$offset . ', ' . (int)$numRecords; } - $result = DB::getInstance()->query($query, $searchQuery, $searchQuery); + $result = DB::getInstance()->query($query, array($searchQuery, $searchQuery)); } if ($numRecords != -1) { Modified: trunk/models/FavoriteGateway.php =================================================================== --- trunk/models/FavoriteGateway.php 2008-08-26 00:49:40 UTC (rev 639) +++ trunk/models/FavoriteGateway.php 2008-08-26 00:54:07 UTC (rev 640) @@ -43,31 +43,31 @@ function deleteArticleFavorite($artId, $userId) { $query = 'DELETE FROM favorites WHERE art_id = ? AND user_id = ?'; - $result = DB::getInstance()->query($query, $artId, $userId); + $result = DB::getInstance()->query($query, array($artId, $userId)); } function deleteSearchResultFavorite($queryStr, $userId) { $query = 'DELETE FROM favorites WHERE search_str = ? AND user_id = ?'; - $result = DB::getInstance()->query($query, $queryStr, $userId); + $result = DB::getInstance()->query($query, array($queryStr, $userId)); } function deleteLocationFavorite($catId, $userId) { $query = 'DELETE FROM favorites WHERE cat_id = ? AND user_id = ?'; - $result = DB::getInstance()->query($query, $catId, $userId); + $result = DB::getInstance()->query($query, array($catId, $userId)); } function isSearchResultFavorite($queryStr, $userId) { $query = 'SELECT favorite_id FROM favorites WHERE search_str = ? AND user_id = ?'; - $result = DB::getInstance()->query($query, $queryStr, $userId); + $result = DB::getInstance()->query($query, array($queryStr, $userId)); - return ($result->getNumRows() > 0); + return ($result->rowCount() > 0); } function isLocationFavorite($catId, $userId) { $query = 'SELECT favorite_id FROM favorites WHERE cat_id = ? AND user_id = ?'; - $result = DB::getInstance()->query($query, $catId, $userId); + $result = DB::getInstance()->query($query, array($catId, $userId)); - return ($result->getNumRows() > 0); + return ($result->rowCount() > 0); } } Modified: trunk/models/UserGateway.php =================================================================== --- trunk/models/UserGateway.php 2008-08-26 00:49:40 UTC (rev 639) +++ trunk/models/UserGateway.php 2008-08-26 00:54:07 UTC (rev 640) @@ -41,7 +41,7 @@ function getUsersList() { $query = 'SELECT id, firstname, lastname, username, email, admin FROM users'; - $result = $this->db->query($query); + $result = DB::getInstance()->query($query); $users = array(); while ($row = $result->fetch()) { $user = new User; @@ -59,10 +59,10 @@ function deleteUser($userId) { $query = 'DELETE FROM users WHERE id=?'; - $this->db->query($query, $userId); + DB::getInstance()->query($query, $userId); $query = 'UPDATE articles SET user_id = 1 WHERE user_id=?'; - $this->db->query($query, $userId); + DB::getInstance()->query($query, $userId); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-26 00:49:44
|
Revision: 639 http://sciret.svn.sourceforge.net/sciret/?rev=639&view=rev Author: alpeb Date: 2008-08-26 00:49:40 +0000 (Tue, 26 Aug 2008) Log Message: ----------- moving config.ini.php to config.ini.php.template to avoid svn showing our local config.ini.php as modified Added Paths: ----------- trunk/config.ini.php.template Removed Paths: ------------- trunk/config.ini.php Deleted: trunk/config.ini.php =================================================================== --- trunk/config.ini.php 2008-08-25 23:46:39 UTC (rev 638) +++ trunk/config.ini.php 2008-08-26 00:49:40 UTC (rev 639) @@ -1,27 +0,0 @@ -<?php - - return array ( - 'environment' => - array ( - 'production' => false, - 'loglevel' => 0, - ), - 'general' => - array ( - 'slowdown_secs' => 0, - 'language_default' => 'English', - ), - 'database' => - array ( - 'adapter' => 'pdo_mysql', - 'params' => - array ( - 'host' => 'localhost', - 'dbname' => 'sciret_trunk', - 'username' => 'root', - 'password' => '', - ), - ), -); - -?> Copied: trunk/config.ini.php.template (from rev 638, trunk/config.ini.php) =================================================================== --- trunk/config.ini.php.template (rev 0) +++ trunk/config.ini.php.template 2008-08-26 00:49:40 UTC (rev 639) @@ -0,0 +1,27 @@ +<?php + + return array ( + 'environment' => + array ( + 'production' => false, + 'loglevel' => 0, + ), + 'general' => + array ( + 'slowdown_secs' => 0, + 'language_default' => 'English', + ), + 'database' => + array ( + 'adapter' => 'pdo_mysql', + 'params' => + array ( + 'host' => 'localhost', + 'dbname' => 'sciret_trunk', + 'username' => 'root', + 'password' => '', + ), + ), +); + +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-08-25 23:46:51
|
Revision: 638 http://sciret.svn.sourceforge.net/sciret/?rev=638&view=rev Author: alpeb Date: 2008-08-25 23:46:39 +0000 (Mon, 25 Aug 2008) Log Message: ----------- upgraded scriptaculous to version 1.8.1 Modified Paths: -------------- trunk/javascript/scriptaculous/CHANGELOG trunk/javascript/scriptaculous/MIT-LICENSE trunk/javascript/scriptaculous/README trunk/javascript/scriptaculous/lib/prototype.js trunk/javascript/scriptaculous/src/builder.js trunk/javascript/scriptaculous/src/controls.js trunk/javascript/scriptaculous/src/dragdrop.js trunk/javascript/scriptaculous/src/effects.js trunk/javascript/scriptaculous/src/scriptaculous.js trunk/javascript/scriptaculous/src/slider.js trunk/javascript/scriptaculous/src/unittest.js Added Paths: ----------- trunk/javascript/scriptaculous/src/sound.js Modified: trunk/javascript/scriptaculous/CHANGELOG =================================================================== --- trunk/javascript/scriptaculous/CHANGELOG 2008-08-25 14:29:37 UTC (rev 637) +++ trunk/javascript/scriptaculous/CHANGELOG 2008-08-25 23:46:39 UTC (rev 638) @@ -1,3 +1,178 @@ +*V1.8.1* (January 3, 2008) + +* Fix Element#getStyles in IE. Closes #10563. [Tobie Langel] + +* Update to Prototype 1.6.0.1 as of 8551. + +* Fix a regression with autocompleters not responding correctly to cursor keys on both Safari and IE. Closes #10107. [thx Zman771] + +*V1.8.0* (November 6, 2007) + +* Update to Prototype 1.6.0 final + +* Ajax.InPlaceEditor now can deal with callbacks that return an object. Closes #10064. [tdd] + +* Fix a potential problem with the loader and Firefox 2.0 on the Mac. Closes #9951. [awaters] + +* Add duration and distance options to Effect.Shake. Closes #8637. [amiel, rmm5t] + +* Update code to use new Hash implemention in Prototype 1.6. Update InPlaceEditor to use new Class.create syntax. [tdd] + +*V1.8.0 preview 0* (October 12, 2007) + +* Update to new Class.create syntax in Prototype 1.6; update to latest Prototype 1.6 trunk. + +* Fix bottom CSS property reassignment and initialization in queues for Effect#SlideUp. Closes #7412, #7761. + +* Fix an issue with String#parseStyle that could sometimes cause errors on Safari 2. + +* Refactoring to use Prototype 1.6. Remove dependency of Effect.tagifyText from builder. Use Prototype code style rules more consistently. + +* Remove the deprecated Effect2 namespace. + +* Update to Prototype 1.6.0_rc0. + +* Some effect code refactoring to take advantage of new Prototype 1.6 features. + +* Effect.ScrollTo is now no longer a core effect (returns a Effect.Tween instance now). + +* Add Effect.Tween, a new core effect. This effect tweens between two values and sets a property or calls a method on an object (including DOM elements); or allows for a callback method, which will be automatically bound to the object. + Examples: + var whatever = { blech: 0 }; + new Effect.Tween(whatever, 5, 0, 'blech'); // sets property on the object + new Effect.Tween('foo', 10, 20, 'innerHTML'); // sets property on the 'foo' DOM element + new Effect.Tween('foo', 10, 20, 'update'); // method call on 'foo' DOM element + new Effect.Tween('foo', 50, 0, { duration: 2.0 }, function(p){ + this.setStyle({border:p.toFixed(3)+'px solid red'}); + }); + new Effect.Tween(null, 0, 100, function(p){ scrollTo(0,p) }); // scrolls the window + +* Revert the workaround for the Firefox issue that makes autocompleter input field values be remembered correctly when the back button is hit to return to a page that contains autocompleted values, as this can cause "Are you sure you want to navigate away?" popups. Closes #8411. [okada] + +* Improve the way deactivating the active droppable is handled. Closes #9072. [Karsten Sperling] + +* Next version will be 1.8.0. Update to Prototype 1.6.0_pre1. + +* Make draggable initialization faster. Closes #8697. [ssinghi] + +* Make BDD-style testing compatible with IE6 and IE7. Closes #8972. [steveluscher] + +* Add BDD methods to booleans. Closes #9147. [steveluscher] + +* Add support for full CSS inheritance in Effect.Morph. Closes #9054. [Tobie] + IMPORTANT: Note that this could potentially change the outcome of classname-based morphs, so be sure to check your morph effects if you use this feature. + For this feature, the new method Element#getStyles is introduced, which returns an objects which properties correspond to the CSS properties found in Element.CSS_PROPERTIES. Note that this method doesn't work seemlessly across browsers for certain non-measurable CSS properties, such as float. + +* Add the externalControlOnly option to the in-place editors to allow for external controls to exclusively trigger the in-place editing. Closes #9024. [tdd] + +* Complete rewrite of Ajax.InPlaceEditor and Ajax.InPlaceCollectionEditor. [tdd] + THIS UPDATE MIGHT AFFECT BACKWARDS COMPATIBILITY. + Be sure to properly test, especially if you're using multi-line editing and/or monkeypatching. + Read more about all the added goodness in this article: + http://mir.aculo.us/2007/7/17/in-place-editing-the-summer-2007-rewrite + +* Update to Prototype 1.5.2_rc0 r7076: + - Works around bugs in Safari 1 and Safari 2 Regexp engines that could cause crashes + - Fixes a rendering issue with opacity-based effects and floating elements on Safari + +* Mild refactoring of sound.js to take advantage of new Prototype features. + +* Add highlight element method as a shortcut to Effect.Highlight. + Example: + $('message').highlight({startcolor:'#ff0000'}).update('KTHXBYE'); + +* Improve performance of String.prototype.parseStyle by caching the dummy element used. + +* Add combined effects as element methods. + Examples: + $('message').appear().update('Oh noes!'); + $('login').shake({ duration: 2 }); + +* Add Effect.Transitions.spring, which simulates a spring which oscillates while coming to rest. This transition is specifically targeted towards use with Effect.Move, for example as a reverteffect when using Draggables, as it will have return values >1 and cause temporary "overshooting" of the effect. Closes #8474. [edg2s] + +* Fix effects initialization if no options are given. Fixes #7809. [thx Kroc Camen] + +* Fix incorrect placement on drop for absolute ghosting elements. Update to Prototype 1.5.2_rc0 r6955 (required for #8581). Closes #8581. [tdd] + +* Make sure the autocompletion happens on the token where the cursor is, not the last token when using tokenized autocompleting text fields. Closes #8588. [tdd] + +* Fix that non-Mozilla browsers would display messages with the autocompleter back-button fix introduced in 1.7.1 beta 2. Fixes #7752, #8411. [josh, stetz] + +*V1.7.1 beta 3* (May 19, 2007) + +* Update to Prototype 1.5.1 final + +* New elements and handles options for Sortable.create which take arrays of elements or element ids. These overrule the normal handle and elements finding options on initialization of the sortable, and can yield huge performance increases in situations where these elements or ids are known at call time. [Thomas Fuchs] + +* Major performance improvement of Sortable.create when using the handle option. [Tobie Langel] + +* Fix Builder.node double quote escaping in attributes, fixes #8125. [Aa!] + +*V1.7.1 beta 2* (April 28, 2007) + +* Update to Prototype 1.5.1_rc4 + - Various optimizations and fixes + - http://dev.rubyonrails.org/browser/spinoffs/prototype/trunk/CHANGELOG?rev=6604 + +* Fix autocompleter indicator not appearing when calling activate() directly. Don't show indicator for local autocompleting. Fixes #7770. [pyro8019] + +* Don't clear out autocompleting fields in Mozilla-based browsers when navigating back to a page with the Back button, fixes #7752. [seanc] + +*V1.7.1 beta 1* (March 12, 2007) + +* Update to Prototype 1.5.1 r6386 + - Fixes SlideUp/SlideDown on IE + - Fixes an opacity problem with IE + - Performance optimizations + - See http://dev.rubyonrails.org/browser/spinoffs/prototype/trunk/CHANGELOG?rev=6381 for more information + +* Make builder unit tests work on IE + +* Fix id assignment for sounds on Firefox/Windows, fixes #7709 [Robert Wallis] + +* Add Sound.enable() and Sound.disable() to globally turn off Sound.play() + +* Added Sound.play(url,options) in new sound.js file. scriptaculous.js automatically includes this file. + Based on code by Jules Gravinese, used with permission. + + The sound player uses native sound support on IE, and falls back to using <embed> on other browsers, + which means it uses QuickTime for most cases. The recommended format to use is MP3. + + Examples: + Sound.play('blah.mp3'); + // --> plays sound immediately in 'global' track + Sound.play('blah.mp3',{replace:true}); + // --> stop playing all sounds in 'global' track, and play new sound + Sound.play('blah.mp3',{track:'mytrack'}); + // --> places the sound in the 'mytrack' track + Sound.play('blah.mp3',{track:'mytrack',replace:true}); + // --> stop playing all sounds in 'mytrack' track, and play new sound + + The sound effect used in the functional test is "Sword being drawn" by James Greever, released as freeware. + +* Various effects engine optimizations [Tobie Langel, Thomas Fuchs] + +* Make Ajax.InPlaceEditor more customizable: [thx godlie] + - Add an okLink option to Ajax.InPlaceEditor so you can have a link instead of a button. Uses the 'editor_ok_link' CSS class for styling, fixes #6455 + - Add an cancelButton option to Ajax.InPlaceEditor, uses the 'editor_cancel_button' CSS class + - Add textBefore-, textBetween- and textAfterControls (which default to empty strings) + - For consistency, cancel link now also gets 'editor_cancel_link' CSS class + +* Add an onDropped callback to Draggables, that fires at the end of a drag when the Draggable was dropped on a Droppable + +* Add revert: 'failure' option to Draggables to only revert if not dropped on a valid drop target, fixes #6909 [davidw] + +* Update to new Prototype Browser detection + +* Fix a memory leak with Effect.Morph in Firefox, fixes #7558 [Malard] + +* Add ability to nest single nodes in Builder.node in addition to arrays of nodes. + Examples: + var element = Builder.node('div', Builder.node('span','blah')); + + Builder.dump(); + var element = DIV(SPAN('blah')); + *V1.7.0* (January 19, 2007) * Cleanups for Effect.Morph Modified: trunk/javascript/scriptaculous/MIT-LICENSE =================================================================== --- trunk/javascript/scriptaculous/MIT-LICENSE 2008-08-25 14:29:37 UTC (rev 637) +++ trunk/javascript/scriptaculous/MIT-LICENSE 2008-08-25 23:46:39 UTC (rev 638) @@ -1,4 +1,4 @@ -Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Modified: trunk/javascript/scriptaculous/README =================================================================== --- trunk/javascript/scriptaculous/README 2008-08-25 14:29:37 UTC (rev 637) +++ trunk/javascript/scriptaculous/README 2008-08-25 23:46:39 UTC (rev 638) @@ -17,15 +17,14 @@ == Installation/Usage script.aculo.us includes the Prototype JavaScript Framework -V1.5.0. You can use later versions, as they become available -(see http://prototype.conio.net). +V1.6.0. You can use later versions, as they become available +(see http://prototypejs.org/). Put prototype.js, and the six files scriptaculous.js, builder.js, effects.js, dragdrop.js, controls.js and slider.js in a directory of your website, e.g. /javascripts. -(The unittest.js file is optional and is only needed if you -want to do unit testing on your own javascripts). +(The sound.js and unittest.js files are optional) Now, you can include the scripts by adding the following tags to the HEAD section of your HTML pages: Modified: trunk/javascript/scriptaculous/lib/prototype.js =================================================================== --- trunk/javascript/scriptaculous/lib/prototype.js 2008-08-25 14:29:37 UTC (rev 637) +++ trunk/javascript/scriptaculous/lib/prototype.js 2008-08-25 23:46:39 UTC (rev 638) @@ -1,43 +1,114 @@ -/* Prototype JavaScript framework, version 1.5.0 +/* Prototype JavaScript framework, version 1.6.0.1 * (c) 2005-2007 Sam Stephenson * * Prototype is freely distributable under the terms of an MIT-style license. - * For details, see the Prototype web site: http://prototype.conio.net/ + * For details, see the Prototype web site: http://www.prototypejs.org/ * -/*--------------------------------------------------------------------------*/ + *--------------------------------------------------------------------------*/ var Prototype = { - Version: '1.5.0', + Version: '1.6.0.1', + + Browser: { + IE: !!(window.attachEvent && !window.opera), + Opera: !!window.opera, + WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, + Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1, + MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/) + }, + BrowserFeatures: { - XPath: !!document.evaluate + XPath: !!document.evaluate, + ElementExtensions: !!window.HTMLElement, + SpecificElementExtensions: + document.createElement('div').__proto__ && + document.createElement('div').__proto__ !== + document.createElement('form').__proto__ }, - ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)', - emptyFunction: function() {}, + ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>', + JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/, + + emptyFunction: function() { }, K: function(x) { return x } -} +}; +if (Prototype.Browser.MobileSafari) + Prototype.BrowserFeatures.SpecificElementExtensions = false; + + +/* Based on Alex Arnell's inheritance implementation. */ var Class = { create: function() { - return function() { + var parent = null, properties = $A(arguments); + if (Object.isFunction(properties[0])) + parent = properties.shift(); + + function klass() { this.initialize.apply(this, arguments); } + + Object.extend(klass, Class.Methods); + klass.superclass = parent; + klass.subclasses = []; + + if (parent) { + var subclass = function() { }; + subclass.prototype = parent.prototype; + klass.prototype = new subclass; + parent.subclasses.push(klass); + } + + for (var i = 0; i < properties.length; i++) + klass.addMethods(properties[i]); + + if (!klass.prototype.initialize) + klass.prototype.initialize = Prototype.emptyFunction; + + klass.prototype.constructor = klass; + + return klass; } -} +}; -var Abstract = new Object(); +Class.Methods = { + addMethods: function(source) { + var ancestor = this.superclass && this.superclass.prototype; + var properties = Object.keys(source); + if (!Object.keys({ toString: true }).length) + properties.push("toString", "valueOf"); + + for (var i = 0, length = properties.length; i < length; i++) { + var property = properties[i], value = source[property]; + if (ancestor && Object.isFunction(value) && + value.argumentNames().first() == "$super") { + var method = value, value = Object.extend((function(m) { + return function() { return ancestor[m].apply(this, arguments) }; + })(property).wrap(method), { + valueOf: function() { return method }, + toString: function() { return method.toString() } + }); + } + this.prototype[property] = value; + } + + return this; + } +}; + +var Abstract = { }; + Object.extend = function(destination, source) { - for (var property in source) { + for (var property in source) destination[property] = source[property]; - } return destination; -} +}; Object.extend(Object, { inspect: function(object) { try { - if (object === undefined) return 'undefined'; + if (Object.isUndefined(object)) return 'undefined'; if (object === null) return 'null'; return object.inspect ? object.inspect() : object.toString(); } catch (e) { @@ -46,6 +117,37 @@ } }, + toJSON: function(object) { + var type = typeof object; + switch (type) { + case 'undefined': + case 'function': + case 'unknown': return; + case 'boolean': return object.toString(); + } + + if (object === null) return 'null'; + if (object.toJSON) return object.toJSON(); + if (Object.isElement(object)) return; + + var results = []; + for (var property in object) { + var value = Object.toJSON(object[property]); + if (!Object.isUndefined(value)) + results.push(property.toJSON() + ': ' + value); + } + + return '{' + results.join(', ') + '}'; + }, + + toQueryString: function(object) { + return $H(object).toQueryString(); + }, + + toHTML: function(object) { + return object && object.toHTML ? object.toHTML() : String.interpret(object); + }, + keys: function(object) { var keys = []; for (var property in object) @@ -61,41 +163,101 @@ }, clone: function(object) { - return Object.extend({}, object); + return Object.extend({ }, object); + }, + + isElement: function(object) { + return object && object.nodeType == 1; + }, + + isArray: function(object) { + return object && object.constructor === Array; + }, + + isHash: function(object) { + return object instanceof Hash; + }, + + isFunction: function(object) { + return typeof object == "function"; + }, + + isString: function(object) { + return typeof object == "string"; + }, + + isNumber: function(object) { + return typeof object == "number"; + }, + + isUndefined: function(object) { + return typeof object == "undefined"; } }); -Function.prototype.bind = function() { - var __method = this, args = $A(arguments), object = args.shift(); - return function() { - return __method.apply(object, args.concat($A(arguments))); - } -} +Object.extend(Function.prototype, { + argumentNames: function() { + var names = this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip"); + return names.length == 1 && !names[0] ? [] : names; + }, -Function.prototype.bindAsEventListener = function(object) { - var __method = this, args = $A(arguments), object = args.shift(); - return function(event) { - return __method.apply(object, [( event || window.event)].concat(args).concat($A(arguments))); - } -} + bind: function() { + if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this; + var __method = this, args = $A(arguments), object = args.shift(); + return function() { + return __method.apply(object, args.concat($A(arguments))); + } + }, -Object.extend(Number.prototype, { - toColorPart: function() { - var digits = this.toString(16); - if (this < 16) return '0' + digits; - return digits; + bindAsEventListener: function() { + var __method = this, args = $A(arguments), object = args.shift(); + return function(event) { + return __method.apply(object, [event || window.event].concat(args)); + } }, - succ: function() { - return this + 1; + curry: function() { + if (!arguments.length) return this; + var __method = this, args = $A(arguments); + return function() { + return __method.apply(this, args.concat($A(arguments))); + } }, - times: function(iterator) { - $R(0, this, true).each(iterator); - return this; + delay: function() { + var __method = this, args = $A(arguments), timeout = args.shift() * 1000; + return window.setTimeout(function() { + return __method.apply(__method, args); + }, timeout); + }, + + wrap: function(wrapper) { + var __method = this; + return function() { + return wrapper.apply(this, [__method.bind(this)].concat($A(arguments))); + } + }, + + methodize: function() { + if (this._methodized) return this._methodized; + var __method = this; + return this._methodized = function() { + return __method.apply(null, [this].concat($A(arguments))); + }; } }); +Function.prototype.defer = Function.prototype.delay.curry(0.01); + +Date.prototype.toJSON = function() { + return '"' + this.getUTCFullYear() + '-' + + (this.getUTCMonth() + 1).toPaddedString(2) + '-' + + this.getUTCDate().toPaddedString(2) + 'T' + + this.getUTCHours().toPaddedString(2) + ':' + + this.getUTCMinutes().toPaddedString(2) + ':' + + this.getUTCSeconds().toPaddedString(2) + 'Z"'; +}; + var Try = { these: function() { var returnValue; @@ -105,17 +267,22 @@ try { returnValue = lambda(); break; - } catch (e) {} + } catch (e) { } } return returnValue; } -} +}; +RegExp.prototype.match = RegExp.prototype.test; + +RegExp.escape = function(str) { + return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); +}; + /*--------------------------------------------------------------------------*/ -var PeriodicalExecuter = Class.create(); -PeriodicalExecuter.prototype = { +var PeriodicalExecuter = Class.create({ initialize: function(callback, frequency) { this.callback = callback; this.frequency = frequency; @@ -128,6 +295,10 @@ this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); }, + execute: function() { + this.callback(this); + }, + stop: function() { if (!this.timer) return; clearInterval(this.timer); @@ -138,16 +309,26 @@ if (!this.currentlyExecuting) { try { this.currentlyExecuting = true; - this.callback(this); + this.execute(); } finally { this.currentlyExecuting = false; } } } -} -String.interpret = function(value){ - return value == null ? '' : String(value); -} +}); +Object.extend(String, { + interpret: function(value) { + return value == null ? '' : String(value); + }, + specialChar: { + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '\\': '\\\\' + } +}); Object.extend(String.prototype, { gsub: function(pattern, replacement) { @@ -168,7 +349,7 @@ sub: function(pattern, replacement, count) { replacement = this.gsub.prepareReplacement(replacement); - count = count === undefined ? 1 : count; + count = Object.isUndefined(count) ? 1 : count; return this.gsub(pattern, function(match) { if (--count < 0) return match[0]; @@ -178,14 +359,14 @@ scan: function(pattern, iterator) { this.gsub(pattern, iterator); - return this; + return String(this); }, truncate: function(length, truncation) { length = length || 30; - truncation = truncation === undefined ? '...' : truncation; + truncation = Object.isUndefined(truncation) ? '...' : truncation; return this.length > length ? - this.slice(0, length - truncation.length) + truncation : this; + this.slice(0, length - truncation.length) + truncation : String(this); }, strip: function() { @@ -213,35 +394,34 @@ }, escapeHTML: function() { - var div = document.createElement('div'); - var text = document.createTextNode(this); - div.appendChild(text); - return div.innerHTML; + var self = arguments.callee; + self.text.data = this; + return self.div.innerHTML; }, unescapeHTML: function() { - var div = document.createElement('div'); + var div = new Element('div'); div.innerHTML = this.stripTags(); return div.childNodes[0] ? (div.childNodes.length > 1 ? - $A(div.childNodes).inject('',function(memo,node){ return memo+node.nodeValue }) : + $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) : div.childNodes[0].nodeValue) : ''; }, toQueryParams: function(separator) { var match = this.strip().match(/([^?#]*)(#.*)?$/); - if (!match) return {}; + if (!match) return { }; - return match[1].split(separator || '&').inject({}, function(hash, pair) { + return match[1].split(separator || '&').inject({ }, function(hash, pair) { if ((pair = pair.split('='))[0]) { - var name = decodeURIComponent(pair[0]); - var value = pair[1] ? decodeURIComponent(pair[1]) : undefined; + var key = decodeURIComponent(pair.shift()); + var value = pair.length > 1 ? pair.join('=') : pair[0]; + if (value != undefined) value = decodeURIComponent(value); - if (hash[name] !== undefined) { - if (hash[name].constructor != Array) - hash[name] = [hash[name]]; - if (value) hash[name].push(value); + if (key in hash) { + if (!Object.isArray(hash[key])) hash[key] = [hash[key]]; + hash[key].push(value); } - else hash[name] = value; + else hash[key] = value; } return hash; }); @@ -256,6 +436,10 @@ String.fromCharCode(this.charCodeAt(this.length - 1) + 1); }, + times: function(count) { + return count < 1 ? '' : new Array(count + 1).join(this); + }, + camelize: function() { var parts = this.split('-'), len = parts.length; if (len == 1) return parts[0]; @@ -270,7 +454,7 @@ return camelized; }, - capitalize: function(){ + capitalize: function() { return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); }, @@ -283,52 +467,131 @@ }, inspect: function(useDoubleQuotes) { - var escapedString = this.replace(/\\/g, '\\\\'); - if (useDoubleQuotes) - return '"' + escapedString.replace(/"/g, '\\"') + '"'; - else - return "'" + escapedString.replace(/'/g, '\\\'') + "'"; + var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) { + var character = String.specialChar[match[0]]; + return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16); + }); + if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"'; + return "'" + escapedString.replace(/'/g, '\\\'') + "'"; + }, + + toJSON: function() { + return this.inspect(true); + }, + + unfilterJSON: function(filter) { + return this.sub(filter || Prototype.JSONFilter, '#{1}'); + }, + + isJSON: function() { + var str = this; + if (str.blank()) return false; + str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); + return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); + }, + + evalJSON: function(sanitize) { + var json = this.unfilterJSON(); + try { + if (!sanitize || json.isJSON()) return eval('(' + json + ')'); + } catch (e) { } + throw new SyntaxError('Badly formed JSON string: ' + this.inspect()); + }, + + include: function(pattern) { + return this.indexOf(pattern) > -1; + }, + + startsWith: function(pattern) { + return this.indexOf(pattern) === 0; + }, + + endsWith: function(pattern) { + var d = this.length - pattern.length; + return d >= 0 && this.lastIndexOf(pattern) === d; + }, + + empty: function() { + return this == ''; + }, + + blank: function() { + return /^\s*$/.test(this); + }, + + interpolate: function(object, pattern) { + return new Template(this, pattern).evaluate(object); } }); +if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, { + escapeHTML: function() { + return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); + }, + unescapeHTML: function() { + return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); + } +}); + String.prototype.gsub.prepareReplacement = function(replacement) { - if (typeof replacement == 'function') return replacement; + if (Object.isFunction(replacement)) return replacement; var template = new Template(replacement); return function(match) { return template.evaluate(match) }; -} +}; String.prototype.parseQuery = String.prototype.toQueryParams; -var Template = Class.create(); -Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; -Template.prototype = { +Object.extend(String.prototype.escapeHTML, { + div: document.createElement('div'), + text: document.createTextNode('') +}); + +with (String.prototype.escapeHTML) div.appendChild(text); + +var Template = Class.create({ initialize: function(template, pattern) { this.template = template.toString(); - this.pattern = pattern || Template.Pattern; + this.pattern = pattern || Template.Pattern; }, evaluate: function(object) { + if (Object.isFunction(object.toTemplateReplacements)) + object = object.toTemplateReplacements(); + return this.template.gsub(this.pattern, function(match) { - var before = match[1]; + if (object == null) return ''; + + var before = match[1] || ''; if (before == '\\') return match[2]; - return before + String.interpret(object[match[3]]); - }); + + var ctx = object, expr = match[3]; + var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/; + match = pattern.exec(expr); + if (match == null) return before; + + while (match != null) { + var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1]; + ctx = ctx[comp]; + if (null == ctx || '' == match[3]) break; + expr = expr.substring('[' == match[3] ? match[1].length : match[0].length); + match = pattern.exec(expr); + } + + return before + String.interpret(ctx); + }.bind(this)); } -} +}); +Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; -var $break = new Object(); -var $continue = new Object(); +var $break = { }; var Enumerable = { - each: function(iterator) { + each: function(iterator, context) { var index = 0; + iterator = iterator.bind(context); try { this._each(function(value) { - try { - iterator(value, index++); - } catch (e) { - if (e != $continue) throw e; - } + iterator(value, index++); }); } catch (e) { if (e != $break) throw e; @@ -336,40 +599,45 @@ return this; }, - eachSlice: function(number, iterator) { + eachSlice: function(number, iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var index = -number, slices = [], array = this.toArray(); while ((index += number) < array.length) slices.push(array.slice(index, index+number)); - return slices.map(iterator); + return slices.collect(iterator, context); }, - all: function(iterator) { + all: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var result = true; this.each(function(value, index) { - result = result && !!(iterator || Prototype.K)(value, index); + result = result && !!iterator(value, index); if (!result) throw $break; }); return result; }, - any: function(iterator) { + any: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var result = false; this.each(function(value, index) { - if (result = !!(iterator || Prototype.K)(value, index)) + if (result = !!iterator(value, index)) throw $break; }); return result; }, - collect: function(iterator) { + collect: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var results = []; this.each(function(value, index) { - results.push((iterator || Prototype.K)(value, index)); + results.push(iterator(value, index)); }); return results; }, - detect: function(iterator) { + detect: function(iterator, context) { + iterator = iterator.bind(context); var result; this.each(function(value, index) { if (iterator(value, index)) { @@ -380,7 +648,8 @@ return result; }, - findAll: function(iterator) { + findAll: function(iterator, context) { + iterator = iterator.bind(context); var results = []; this.each(function(value, index) { if (iterator(value, index)) @@ -389,17 +658,24 @@ return results; }, - grep: function(pattern, iterator) { + grep: function(filter, iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var results = []; + + if (Object.isString(filter)) + filter = new RegExp(filter); + this.each(function(value, index) { - var stringValue = value.toString(); - if (stringValue.match(pattern)) - results.push((iterator || Prototype.K)(value, index)); - }) + if (filter.match(value)) + results.push(iterator(value, index)); + }); return results; }, include: function(object) { + if (Object.isFunction(this.indexOf)) + if (this.indexOf(object) != -1) return true; + var found = false; this.each(function(value) { if (value == object) { @@ -411,14 +687,15 @@ }, inGroupsOf: function(number, fillWith) { - fillWith = fillWith === undefined ? null : fillWith; + fillWith = Object.isUndefined(fillWith) ? null : fillWith; return this.eachSlice(number, function(slice) { while(slice.length < number) slice.push(fillWith); return slice; }); }, - inject: function(memo, iterator) { + inject: function(memo, iterator, context) { + iterator = iterator.bind(context); this.each(function(value, index) { memo = iterator(memo, value, index); }); @@ -432,30 +709,33 @@ }); }, - max: function(iterator) { + max: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var result; this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (result == undefined || value >= result) + value = iterator(value, index); + if (result == null || value >= result) result = value; }); return result; }, - min: function(iterator) { + min: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var result; this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (result == undefined || value < result) + value = iterator(value, index); + if (result == null || value < result) result = value; }); return result; }, - partition: function(iterator) { + partition: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var trues = [], falses = []; this.each(function(value, index) { - ((iterator || Prototype.K)(value, index) ? + (iterator(value, index) ? trues : falses).push(value); }); return [trues, falses]; @@ -463,13 +743,14 @@ pluck: function(property) { var results = []; - this.each(function(value, index) { + this.each(function(value) { results.push(value[property]); }); return results; }, - reject: function(iterator) { + reject: function(iterator, context) { + iterator = iterator.bind(context); var results = []; this.each(function(value, index) { if (!iterator(value, index)) @@ -478,7 +759,8 @@ return results; }, - sortBy: function(iterator) { + sortBy: function(iterator, context) { + iterator = iterator.bind(context); return this.map(function(value, index) { return {value: value, criteria: iterator(value, index)}; }).sort(function(left, right) { @@ -493,7 +775,7 @@ zip: function() { var iterator = Prototype.K, args = $A(arguments); - if (typeof args.last() == 'function') + if (Object.isFunction(args.last())) iterator = args.pop(); var collections = [this].concat(args).map($A); @@ -509,31 +791,42 @@ inspect: function() { return '#<Enumerable:' + this.toArray().inspect() + '>'; } -} +}; Object.extend(Enumerable, { map: Enumerable.collect, find: Enumerable.detect, select: Enumerable.findAll, + filter: Enumerable.findAll, member: Enumerable.include, - entries: Enumerable.toArray + entries: Enumerable.toArray, + every: Enumerable.all, + some: Enumerable.any }); -var $A = Array.from = function(iterable) { +function $A(iterable) { if (!iterable) return []; - if (iterable.toArray) { - return iterable.toArray(); - } else { - var results = []; - for (var i = 0, length = iterable.length; i < length; i++) - results.push(iterable[i]); + if (iterable.toArray) return iterable.toArray(); + var length = iterable.length || 0, results = new Array(length); + while (length--) results[length] = iterable[length]; + return results; +} + +if (Prototype.Browser.WebKit) { + function $A(iterable) { + if (!iterable) return []; + if (!(Object.isFunction(iterable) && iterable == '[object NodeList]') && + iterable.toArray) return iterable.toArray(); + var length = iterable.length || 0, results = new Array(length); + while (length--) results[length] = iterable[length]; return results; } } +Array.from = $A; + Object.extend(Array.prototype, Enumerable); -if (!Array.prototype._reverse) - Array.prototype._reverse = Array.prototype.reverse; +if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse; Object.extend(Array.prototype, { _each: function(iterator) { @@ -562,7 +855,7 @@ flatten: function() { return this.inject([], function(array, value) { - return array.concat(value && value.constructor == Array ? + return array.concat(Object.isArray(value) ? value.flatten() : [value]); }); }, @@ -574,12 +867,6 @@ }); }, - indexOf: function(object) { - for (var i = 0, length = this.length; i < length; i++) - if (this[i] == object) return i; - return -1; - }, - reverse: function(inline) { return (inline !== false ? this : this.toArray())._reverse(); }, @@ -588,12 +875,20 @@ return this.length > 1 ? this : this[0]; }, - uniq: function() { - return this.inject([], function(array, value) { - return array.include(value) ? array : array.concat([value]); + uniq: function(sorted) { + return this.inject([], function(array, value, index) { + if (0 == index || (sorted ? array.last() != value : !array.include(value))) + array.push(value); + return array; }); }, + intersect: function(array) { + return this.uniq().findAll(function(item) { + return array.detect(function(value) { return item === value }); + }); + }, + clone: function() { return [].concat(this); }, @@ -604,125 +899,187 @@ inspect: function() { return '[' + this.map(Object.inspect).join(', ') + ']'; + }, + + toJSON: function() { + var results = []; + this.each(function(object) { + var value = Object.toJSON(object); + if (!Object.isUndefined(value)) results.push(value); + }); + return '[' + results.join(', ') + ']'; } }); +// use native browser JS 1.6 implementation if available +if (Object.isFunction(Array.prototype.forEach)) + Array.prototype._each = Array.prototype.forEach; + +if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) { + i || (i = 0); + var length = this.length; + if (i < 0) i = length + i; + for (; i < length; i++) + if (this[i] === item) return i; + return -1; +}; + +if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) { + i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1; + var n = this.slice(0, i).reverse().indexOf(item); + return (n < 0) ? n : i - n - 1; +}; + Array.prototype.toArray = Array.prototype.clone; -function $w(string){ +function $w(string) { + if (!Object.isString(string)) return []; string = string.strip(); return string ? string.split(/\s+/) : []; } -if(window.opera){ - Array.prototype.concat = function(){ +if (Prototype.Browser.Opera){ + Array.prototype.concat = function() { var array = []; - for(var i = 0, length = this.length; i < length; i++) array.push(this[i]); - for(var i = 0, length = arguments.length; i < length; i++) { - if(arguments[i].constructor == Array) { - for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++) + for (var i = 0, length = this.length; i < length; i++) array.push(this[i]); + for (var i = 0, length = arguments.length; i < length; i++) { + if (Object.isArray(arguments[i])) { + for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++) array.push(arguments[i][j]); } else { array.push(arguments[i]); } } return array; - } + }; } -var Hash = function(obj) { - Object.extend(this, obj || {}); -}; +Object.extend(Number.prototype, { + toColorPart: function() { + return this.toPaddedString(2, 16); + }, -Object.extend(Hash, { - toQueryString: function(obj) { - var parts = []; + succ: function() { + return this + 1; + }, - this.prototype._each.call(obj, function(pair) { - if (!pair.key) return; + times: function(iterator) { + $R(0, this, true).each(iterator); + return this; + }, - if (pair.value && pair.value.constructor == Array) { - var values = pair.value.compact(); - if (values.length < 2) pair.value = values.reduce(); - else { - key = encodeURIComponent(pair.key); - values.each(function(value) { - value = value != undefined ? encodeURIComponent(value) : ''; - parts.push(key + '=' + encodeURIComponent(value)); - }); - return; - } - } - if (pair.value == undefined) pair[1] = ''; - parts.push(pair.map(encodeURIComponent).join('=')); - }); + toPaddedString: function(length, radix) { + var string = this.toString(radix || 10); + return '0'.times(length - string.length) + string; + }, - return parts.join('&'); + toJSON: function() { + return isFinite(this) ? this.toString() : 'null'; } }); -Object.extend(Hash.prototype, Enumerable); -Object.extend(Hash.prototype, { - _each: function(iterator) { - for (var key in this) { - var value = this[key]; - if (value && value == Hash.prototype[key]) continue; +$w('abs round ceil floor').each(function(method){ + Number.prototype[method] = Math[method].methodize(); +}); +function $H(object) { + return new Hash(object); +}; - var pair = [key, value]; - pair.key = key; - pair.value = value; - iterator(pair); - } - }, +var Hash = Class.create(Enumerable, (function() { - keys: function() { - return this.pluck('key'); - }, + function toQueryPair(key, value) { + if (Object.isUndefined(value)) return key; + return key + '=' + encodeURIComponent(String.interpret(value)); + } - values: function() { - return this.pluck('value'); - }, + return { + initialize: function(object) { + this._object = Object.isHash(object) ? object.toObject() : Object.clone(object); + }, - merge: function(hash) { - return $H(hash).inject(this, function(mergedHash, pair) { - mergedHash[pair.key] = pair.value; - return mergedHash; - }); - }, + _each: function(iterator) { + for (var key in this._object) { + var value = this._object[key], pair = [key, value]; + pair.key = key; + pair.value = value; + iterator(pair); + } + }, - remove: function() { - var result; - for(var i = 0, length = arguments.length; i < length; i++) { - var value = this[arguments[i]]; - if (value !== undefined){ - if (result === undefined) result = value; - else { - if (result.constructor != Array) result = [result]; - result.push(value) + set: function(key, value) { + return this._object[key] = value; + }, + + get: function(key) { + return this._object[key]; + }, + + unset: function(key) { + var value = this._object[key]; + delete this._object[key]; + return value; + }, + + toObject: function() { + return Object.clone(this._object); + }, + + keys: function() { + return this.pluck('key'); + }, + + values: function() { + return this.pluck('value'); + }, + + index: function(value) { + var match = this.detect(function(pair) { + return pair.value === value; + }); + return match && match.key; + }, + + merge: function(object) { + return this.clone().update(object); + }, + + update: function(object) { + return new Hash(object).inject(this, function(result, pair) { + result.set(pair.key, pair.value); + return result; + }); + }, + + toQueryString: function() { + return this.map(function(pair) { + var key = encodeURIComponent(pair.key), values = pair.value; + + if (values && typeof values == 'object') { + if (Object.isArray(values)) + return values.map(toQueryPair.curry(key)).join('&'); } - } - delete this[arguments[i]]; - } - return result; - }, + return toQueryPair(key, values); + }).join('&'); + }, - toQueryString: function() { - return Hash.toQueryString(this); - }, + inspect: function() { + return '#<Hash:{' + this.map(function(pair) { + return pair.map(Object.inspect).join(': '); + }).join(', ') + '}>'; + }, - inspect: function() { - return '#<Hash:{' + this.map(function(pair) { - return pair.map(Object.inspect).join(': '); - }).join(', ') + '}>'; + toJSON: function() { + return Object.toJSON(this.toObject()); + }, + + clone: function() { + return new Hash(this); + } } -}); +})()); -function $H(object) { - if (object && object.constructor == Hash) return object; - return new Hash(object); -}; -ObjectRange = Class.create(); -Object.extend(ObjectRange.prototype, Enumerable); -Object.extend(ObjectRange.prototype, { +Hash.prototype.toTemplateReplacements = Hash.prototype.toObject; +Hash.from = $H; +var ObjectRange = Class.create(Enumerable, { initialize: function(start, end, exclusive) { this.start = start; this.end = end; @@ -748,7 +1105,7 @@ var $R = function(start, end, exclusive) { return new ObjectRange(start, end, exclusive); -} +}; var Ajax = { getTransport: function() { @@ -760,7 +1117,7 @@ }, activeRequestCount: 0 -} +}; Ajax.Responders = { responders: [], @@ -780,10 +1137,10 @@ dispatch: function(callback, request, transport, json) { this.each(function(responder) { - if (typeof responder[callback] == 'function') { + if (Object.isFunction(responder[callback])) { try { responder[callback].apply(responder, [request, transport, json]); - } catch (e) {} + } catch (e) { } } }); } @@ -792,49 +1149,45 @@ Object.extend(Ajax.Responders, Enumerable); Ajax.Responders.register({ - onCreate: function() { - Ajax.activeRequestCount++; - }, - onComplete: function() { - Ajax.activeRequestCount--; - } + onCreate: function() { Ajax.activeRequestCount++ }, + onComplete: function() { Ajax.activeRequestCount-- } }); -Ajax.Base = function() {}; -Ajax.Base.prototype = { - setOptions: function(options) { +Ajax.Base = Class.create({ + initialize: function(options) { this.options = { method: 'post', asynchronous: true, contentType: 'application/x-www-form-urlencoded', encoding: 'UTF-8', - parameters: '' - } - Object.extend(this.options, options || {}); + parameters: '', + evalJSON: true, + evalJS: true + }; + Object.extend(this.options, options || { }); this.options.method = this.options.method.toLowerCase(); - if (typeof this.options.parameters == 'string') + + if (Object.isString(this.options.parameters)) this.options.parameters = this.options.parameters.toQueryParams(); + else if (Object.isHash(this.options.parameters)) + this.options.parameters = this.options.parameters.toObject(); } -} +}); -Ajax.Request = Class.create(); -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -Ajax.Request.prototype = Object.extend(new Ajax.Base(), { +Ajax.Request = Class.create(Ajax.Base, { _complete: false, - initialize: function(url, options) { + initialize: function($super, url, options) { + $super(options); this.transport = Ajax.getTransport(); - this.setOptions(options); this.request(url); }, request: function(url) { this.url = url; this.method = this.options.method; - var params = this.options.parameters; + var params = Object.clone(this.options.parameters); if (!['get', 'post'].include(this.method)) { // simulate other verbs over post @@ -842,29 +1195,32 @@ this.method = 'post'; } - params = Hash.toQueryString(params); - if (params && /Konqueror|Safari|KHTML/.test(navigator.userAgent)) params += '&_=' + this.parameters = params; - // when GET, append parameters to URL - if (this.method == 'get' && params) - this.url += (this.url.indexOf('?') > -1 ? '&' : '?') + params; + if (params = Object.toQueryString(params)) { + // when GET, append parameters to URL + if (this.method == 'get') + this.url += (this.url.include('?') ? '&' : '?') + params; + else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) + params += '&_='; + } try { - Ajax.Responders.dispatch('onCreate', this, this.transport); + var response = new Ajax.Response(this); + if (this.options.onCreate) this.options.onCreate(response); + Ajax.Responders.dispatch('onCreate', this, response); this.transport.open(this.method.toUpperCase(), this.url, this.options.asynchronous); - if (this.options.asynchronous) - setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10); + if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1); this.transport.onreadystatechange = this.onStateChange.bind(this); this.setRequestHeaders(); - var body = this.method == 'post' ? (this.options.postBody || params) : null; + this.body = this.method == 'post' ? (this.options.postBody || params) : null; + this.transport.send(this.body); - this.transport.send(body); - /* Force Firefox to handle ready state 4 for synchronous requests */ if (!this.options.asynchronous && this.transport.overrideMimeType) this.onStateChange(); @@ -905,7 +1261,7 @@ if (typeof this.options.requestHeaders == 'object') { var extras = this.options.requestHeaders; - if (typeof extras.push == 'function') + if (Object.isFunction(extras.push)) for (var i = 0, length = extras.length; i < length; i += 2) headers[extras[i]] = extras[i+1]; else @@ -917,32 +1273,39 @@ }, success: function() { - return !this.transport.status - || (this.transport.status >= 200 && this.transport.status < 300); + var status = this.getStatus(); + return !status || (status >= 200 && status < 300); }, + getStatus: function() { + try { + return this.transport.status || 0; + } catch (e) { return 0 } + }, + respondToReadyState: function(readyState) { - var state = Ajax.Request.Events[readyState]; - var transport = this.transport, json = this.evalJSON(); + var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this); if (state == 'Complete') { try { this._complete = true; - (this.options['on' + this.transport.status] + (this.options['on' + response.status] || this.options['on' + (this.success() ? 'Success' : 'Failure')] - || Prototype.emptyFunction)(transport, json); + || Prototype.emptyFunction)(response, response.headerJSON); } catch (e) { this.dispatchException(e); } - if ((this.getHeader('Content-type') || 'text/javascript').strip(). - match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)) - this.evalResponse(); + var contentType = response.getHeader('Content-type'); + if (this.options.evalJS == 'force' + || (this.options.evalJS && contentType + && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))) + this.evalResponse(); } try { - (this.options['on' + state] || Prototype.emptyFunction)(transport, json); - Ajax.Responders.dispatch('on' + state, this, transport, json); + (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON); + Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON); } catch (e) { this.dispatchException(e); } @@ -955,20 +1318,13 @@ getHeader: function(name) { try { - return this.transport.getResponseHeader(name); + return this.transport.getResponseHeader(name) || null; } catch (e) { return null } }, - evalJSON: function() { - try { - var json = this.getHeader('X-JSON'); - return json ? eval('(' + json + ')') : null; - } catch (e) { return null } - }, - evalResponse: function() { try { - return eval(this.transport.responseText); + return eval((this.transport.responseText || '').unfilterJSON()); } catch (e) { this.dispatchException(e); } @@ -980,57 +1336,126 @@ } }); -Ajax.Updater = Class.create(); +Ajax.Request.Events = + ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; -Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { - initialize: function(container, url, options) { +Ajax.Response = Class.create({ + initialize: function(request){ + this.request = request; + var transport = this.transport = request.transport, + readyState = this.readyState = transport.readyState; + + if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) { + this.status = this.getStatus(); + this.statusText = this.getStatusText(); + this.responseText = String.interpret(transport.responseText); + this.headerJSON = this._getHeaderJSON(); + } + + if(readyState == 4) { + var xml = transport.responseXML; + this.responseXML = Object.isUndefined(xml) ? null : xml; + this.responseJSON = this._getResponseJSON(); + } + }, + + status: 0, + statusText: '', + + getStatus: Ajax.Request.prototype.getStatus, + + getStatusText: function() { + try { + return this.transport.statusText || ''; + } catch (e) { return '' } + }, + + getHeader: Ajax.Request.prototype.getHeader, + + getAllHeaders: function() { + try { + return this.getAllResponseHeaders(); + } catch (e) { return null } + }, + + getResponseHeader: function(name) { + return this.transport.getResponseHeader(name); + }, + + getAllResponseHeaders: function() { + return this.transport.getAllResponseHeaders(); + }, + + _getHeaderJSON: function() { + var json = this.getHeader('X-JSON'); + if (!json) return null; + json = decodeURIComponent(escape(json)); + try { + return json.evalJSON(this.request.options.sanitizeJSON); + } catch (e) { + this.request.dispatchException(e); + } + }, + + _getResponseJSON: function() { + var options = this.request.options; + if (!options.evalJSON || (options.evalJSON != 'force' && + !(this.getHeader('Content-type') || '').include('application/json')) || + this.responseText.blank()) + return null; + try { + return this.responseText.evalJSON(options.sanitizeJSON); + } catch (e) { + this.request.dispatchException(e); + } + } +}); + +Ajax.Updater = Class.create(Ajax.Request, { + initialize: function($super, container, url, options) { this.container = { success: (container.success || container), failure: (container.failure || (container.success ? null : container)) - } + }; - this.transport = Ajax.getTransport(); - this.setOptions(options); - - var onComplete = this.options.onComplete || Prototype.emptyFunction; - this.options.onComplete = (function(transport, param) { - this.updateContent(); - onComplete(transport, param); + options = Object.clone(options); + var onComplete = options.onComplete; + options.onComplete = (function(response, json) { + this.updateContent(response.responseText); + if (Object.isFunction(onComplete)) onComplete(response, json); }).bind(this); - this.request(url); + $super(url, options); }, - updateContent: function() { - var receiver = this.container[this.success() ? 'success' : 'failure']; - var response = this.transport.responseText; + updateContent: function(responseText) { + var receiver = this.container[this.success() ? 'success' : 'failure'], + options = this.options; - if (!this.options.evalScripts) response = response.stripScripts(); + if (!options.evalScripts) responseText = responseText.stripScripts(); if (receiver = $(receiver)) { - if (this.options.insertion) - new this.options.insertion(receiver, response); - else - receiver.update(response); + if (options.insertion) { + if (Object.isString(options.insertion)) { + var insertion = { }; insertion[options.insertion] = responseText; + receiver.insert(insertion); + } + else options.insertion(receiver, responseText); + } + else receiver.update(responseText); } - - if (this.success()) { - if (this.onComplete) - setTimeout(this.onComplete.bind(this), 10); - } } }); -Ajax.PeriodicalUpdater = Class.create(); -Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { - initialize: function(container, url, options) { - this.setOptions(options); +Ajax.PeriodicalUpdater = Class.create(Ajax.Base, { + initialize: function($super, container, url, options) { + $super(options); this.onComplete = this.options.onComplete; this.frequency = (this.options.frequency || 2); this.decay = (this.options.decay || 1); - this.updater = {}; + this.updater = { }; this.container = container; this.url = url; @@ -1048,15 +1473,14 @@ (this.onComplete || Prototype.emptyFunction).apply(this, arguments); }, - updateComplete: function(request) { + updateComplete: function(response) { if (this.options.decay) { - this.decay = (request.responseText == this.lastText ? + this.decay = (response.responseText == this.lastText ? this.decay * this.options.decay : 1); - this.lastText = request.responseText; + this.lastText = response.responseText; } - this.timer = setTimeout(this.onTimerEvent.bind(this), - this.decay * this.frequency * 1000); + this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency); }, onTimerEvent: function() { @@ -1069,7 +1493,7 @@ elements.push($(arguments[i])); return elements; } - if (typeof element == 'string') + if (Object.isString(element)) element = document.getElementById(element); return Element.extend(element); } @@ -1080,64 +1504,52 @@ var query = document.evaluate(expression, $(parentElement) || document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); for (var i = 0, length = query.snapshotLength; i < length; i++) - results.push(query.snapshotItem(i)); + results.push(Element.extend(query.snapshotItem(i))); return results; }; } -document.getElementsByClassName = function(className, parentElement) { - if (Prototype.BrowserFeatures.XPath) { - var q = ".//*[contains(concat(' ', @class, ' '), ' " + className + " ')]"; - return document._getElementsByXPath(q, parentElement); - } else { - var children = ($(parentElement) || document.body).getElementsByTagName('*'); - var elements = [], child; - for (var i = 0, length = children.length; i < length; i++) { - child = children[i]; - if (Element.hasClassName(child, className)) - elements.push(Element.extend(child)); - } - return elements; - } -}; - /*--------... [truncated message content] |
From: <al...@us...> - 2008-08-25 14:29:41
|
Revision: 637 http://sciret.svn.sourceforge.net/sciret/?rev=637&view=rev Author: alpeb Date: 2008-08-25 14:29:37 +0000 (Mon, 25 Aug 2008) Log Message: ----------- typo Modified Paths: -------------- trunk/index.php Modified: trunk/index.php =================================================================== --- trunk/index.php 2008-08-25 07:08:35 UTC (rev 636) +++ trunk/index.php 2008-08-25 14:29:37 UTC (rev 637) @@ -44,7 +44,7 @@ $logger->addWriter(new Zend_Log_Writer_Stream(APP_DIR . '/log.txt')); } else { // this releaves the obligation of having a log.txt file writable by the web server when we won't log anything - $logger->addWriter(new Zend_Log_rriter_Null()); + $logger->addWriter(new Zend_Log_Writer_Null()); } $logger->addFilter(new Zend_Log_Filter_Priority((int)$config->environment->loglevel)); Zend_Registry::set('logger', $logger); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <re...@us...> - 2008-08-25 07:08:37
|
Revision: 636 http://sciret.svn.sourceforge.net/sciret/?rev=636&view=rev Author: reinerj Date: 2008-08-25 07:08:35 +0000 (Mon, 25 Aug 2008) Log Message: ----------- some other headers where the copyright is changed to the monkeys Modified Paths: -------------- trunk/languages/create-translation.sh Modified: trunk/languages/create-translation.sh =================================================================== --- trunk/languages/create-translation.sh 2008-08-25 07:03:51 UTC (rev 635) +++ trunk/languages/create-translation.sh 2008-08-25 07:08:35 UTC (rev 636) @@ -20,9 +20,9 @@ # # COPYRIGHT: # -# Copyright (C) 2005-2007 TheGang http://www.the-gang.net +# Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com # License http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License -# Author Reiner Jung <rj...@th...> +# Author Reiner Jung <re...@kb...> # # TODO # @@ -34,19 +34,19 @@ # # debug 5 # open upload.sourceforge.net -# user anonymous rj...@th... +# user anonymous re...@kb... # cd incoming # mput sciret-* # exit cat <<EOF --------------------------------------------------------------------------------- -# Welcome to the Sciret FCKeditor builder # +# Welcome to the Sciret Language uploader # # # # Author: Reiner Jung # -# Company: TheGang # -# Contact: www.the-gang.net # -# Copyright (C) 2005-2007 # +# Company: Keyboard Monkeys # +# Contact: www.kb-m.com # +# Copyright (C) 2005-2008 # # License: General Public License # --------------------------------------------------------------------------------- EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <re...@us...> - 2008-08-25 07:03:58
|
Revision: 635 http://sciret.svn.sourceforge.net/sciret/?rev=635&view=rev Author: reinerj Date: 2008-08-25 07:03:51 +0000 (Mon, 25 Aug 2008) Log Message: ----------- some other headers where the copyright is changed to the monkeys Modified Paths: -------------- trunk/javascript/general.js trunk/models/Article.php trunk/views/AddQuestion.php trunk/views/AdvancedSearch.php trunk/views/EditArticle.php trunk/views/EditBookmark.php trunk/views/EditCategories.php trunk/views/EditCategory.php trunk/views/EditPreferences.php trunk/views/EditTodo.php trunk/views/EditUser.php trunk/views/GetFavoritesDropdown.php trunk/views/GetTodosDropdown.php trunk/views/InstallEnterCredentials.php trunk/views/InstallOk.php trunk/views/Login.php trunk/views/MailArticle.php trunk/views/MainView.php trunk/views/ManageArticles.php trunk/views/ManageQuestions.php trunk/views/ManageUsers.php trunk/views/NotInstalled.php trunk/views/PrinterView.php trunk/views/SearchResults.php trunk/views/Upgrade.php trunk/views/UpgradeOk.php trunk/views/View.php trunk/views/ViewArticle.php trunk/views/ViewBookmark.php trunk/views/ViewComments.php trunk/views/ViewRelatedArticles.php Modified: trunk/javascript/general.js =================================================================== --- trunk/javascript/general.js 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/javascript/general.js 2008-08-25 07:03:51 UTC (rev 635) @@ -1,10 +1,10 @@ /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0.4 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ /** Modified: trunk/models/Article.php =================================================================== --- trunk/models/Article.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/models/Article.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0.4 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys Ltd */ class Article { Modified: trunk/views/AddQuestion.php =================================================================== --- trunk/views/AddQuestion.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/AddQuestion.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/AdvancedSearch.php =================================================================== --- trunk/views/AdvancedSearch.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/AdvancedSearch.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/EditArticle.php =================================================================== --- trunk/views/EditArticle.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/EditArticle.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza -* @since Sciret 1.0.4 +* @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/EditBookmark.php =================================================================== --- trunk/views/EditBookmark.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/EditBookmark.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza -* @since Sciret 1.0.4 +* @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/EditCategories.php =================================================================== --- trunk/views/EditCategories.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/EditCategories.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require_once 'views/View.php'; Modified: trunk/views/EditCategory.php =================================================================== --- trunk/views/EditCategory.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/EditCategory.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require_once 'views/View.php'; Modified: trunk/views/EditPreferences.php =================================================================== --- trunk/views/EditPreferences.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/EditPreferences.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/EditTodo.php =================================================================== --- trunk/views/EditTodo.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/EditTodo.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza -* @since Sciret 1.1 +* @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/EditUser.php =================================================================== --- trunk/views/EditUser.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/EditUser.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/GetFavoritesDropdown.php =================================================================== --- trunk/views/GetFavoritesDropdown.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/GetFavoritesDropdown.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/GetTodosDropdown.php =================================================================== --- trunk/views/GetTodosDropdown.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/GetTodosDropdown.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza -* @since Sciret 1.1 +* @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/InstallEnterCredentials.php =================================================================== --- trunk/views/InstallEnterCredentials.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/InstallEnterCredentials.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/InstallOk.php =================================================================== --- trunk/views/InstallOk.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/InstallOk.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/Login.php =================================================================== --- trunk/views/Login.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/Login.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/MailArticle.php =================================================================== --- trunk/views/MailArticle.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/MailArticle.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/MainView.php =================================================================== --- trunk/views/MainView.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/MainView.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/ManageArticles.php =================================================================== --- trunk/views/ManageArticles.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/ManageArticles.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza -* @since Sciret 1.0.4 +* @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ Modified: trunk/views/ManageQuestions.php =================================================================== --- trunk/views/ManageQuestions.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/ManageQuestions.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/ManageUsers.php =================================================================== --- trunk/views/ManageUsers.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/ManageUsers.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,13 +1,13 @@ <?php -/* - * @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net - * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License - * @author Alejandro Pedraza - * @since Sciret 1.0 - * @package Sciret - * @packager TheGang - */ +/* +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com +* @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License +* @author Alejandro Pedraza +* @since Sciret 1.0 +* @package Sciret +* @packager Keyboard Monkeys +*/ require 'views/View.php'; require 'models/UserGateway.php'; Modified: trunk/views/NotInstalled.php =================================================================== --- trunk/views/NotInstalled.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/NotInstalled.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/PrinterView.php =================================================================== --- trunk/views/PrinterView.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/PrinterView.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/SearchResults.php =================================================================== --- trunk/views/SearchResults.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/SearchResults.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/Upgrade.php =================================================================== --- trunk/views/Upgrade.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/Upgrade.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/UpgradeOk.php =================================================================== --- trunk/views/UpgradeOk.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/UpgradeOk.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/View.php =================================================================== --- trunk/views/View.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/View.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'classes/kb_template.php'; Modified: trunk/views/ViewArticle.php =================================================================== --- trunk/views/ViewArticle.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/ViewArticle.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza -* @since Sciret 1.0.4 +* @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/ViewBookmark.php =================================================================== --- trunk/views/ViewBookmark.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/ViewBookmark.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza -* @since Sciret 1.0.4 +* @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'views/View.php'; Modified: trunk/views/ViewComments.php =================================================================== --- trunk/views/ViewComments.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/ViewComments.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require_once 'views/View.php'; Modified: trunk/views/ViewRelatedArticles.php =================================================================== --- trunk/views/ViewRelatedArticles.php 2008-08-25 06:53:44 UTC (rev 634) +++ trunk/views/ViewRelatedArticles.php 2008-08-25 07:03:51 UTC (rev 635) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys Ltd http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require_once 'views/View.php'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <re...@us...> - 2008-08-25 06:53:47
|
Revision: 634 http://sciret.svn.sourceforge.net/sciret/?rev=634&view=rev Author: reinerj Date: 2008-08-25 06:53:44 +0000 (Mon, 25 Aug 2008) Log Message: ----------- some other headers where the copyright is changed to the monkeys Modified Paths: -------------- trunk/actions/Upgrade.php trunk/actions/UploadFile.php trunk/actions/UploadImage.php Modified: trunk/actions/Upgrade.php =================================================================== --- trunk/actions/Upgrade.php 2008-08-24 23:19:33 UTC (rev 633) +++ trunk/actions/Upgrade.php 2008-08-25 06:53:44 UTC (rev 634) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'actions/Action.php'; Modified: trunk/actions/UploadFile.php =================================================================== --- trunk/actions/UploadFile.php 2008-08-24 23:19:33 UTC (rev 633) +++ trunk/actions/UploadFile.php 2008-08-25 06:53:44 UTC (rev 634) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2008 Keyboard Monkeys http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ require 'actions/Action.php'; Modified: trunk/actions/UploadImage.php =================================================================== --- trunk/actions/UploadImage.php 2008-08-24 23:19:33 UTC (rev 633) +++ trunk/actions/UploadImage.php 2008-08-25 06:53:44 UTC (rev 634) @@ -1,12 +1,12 @@ <?php /* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net +* @copyright Copyright (C) 2005-2007 Keyboard Monkeys http://www.kb-m.com * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License * @author Alejandro Pedraza * @since Sciret 1.0 * @package Sciret -* @packager TheGang +* @packager Keyboard Monkeys */ class UploadImage extends Action This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <re...@us...> - 2008-08-24 23:19:37
|
Revision: 633 http://sciret.svn.sourceforge.net/sciret/?rev=633&view=rev Author: reinerj Date: 2008-08-24 23:19:33 +0000 (Sun, 24 Aug 2008) Log Message: ----------- move other files to the monkeys Modified Paths: -------------- trunk/BUGS Modified: trunk/BUGS =================================================================== --- trunk/BUGS 2008-08-24 23:16:45 UTC (rev 632) +++ trunk/BUGS 2008-08-24 23:19:33 UTC (rev 633) @@ -1,5 +1,5 @@ Sciret -Copyright (c) 2005-2007 TheGang +Copyright (c) 2005-2008 Keyboard Monkeys Ltd ** Reporting bugs ** @@ -16,4 +16,4 @@ * Screenshot : For interface related issues, an image says more than thousands of words. * The Sciret Version. You can found this information in the Sciret root directory in the file VERISON -If contact us for a security issue, please send a e-mail to rj...@th... +If contact us for a security issue, please send a e-mail to re...@kb... This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <re...@us...> - 2008-08-24 23:16:50
|
Revision: 632 http://sciret.svn.sourceforge.net/sciret/?rev=632&view=rev Author: reinerj Date: 2008-08-24 23:16:45 +0000 (Sun, 24 Aug 2008) Log Message: ----------- update also the docs to the monkeys Modified Paths: -------------- trunk/docs/build-sciret-doc.sh trunk/docs/sciret-install-EN-html4.html trunk/docs/sciret-install-EN-html4.txt trunk/docs/sciret-install-EN-images.html trunk/docs/sciret-install-EN-images.txt trunk/docs/sciret-install-EN.html trunk/docs/sciret-install-EN.txt trunk/docs/sciret-install-OpenBSD-EN-html4.html trunk/docs/sciret-install-OpenBSD-EN-images.html trunk/docs/sciret-install-OpenBSD-EN.html Added Paths: ----------- trunk/docs/sciret-install-OpenBSD-EN-images.txt Modified: trunk/docs/build-sciret-doc.sh =================================================================== --- trunk/docs/build-sciret-doc.sh 2008-08-24 20:06:14 UTC (rev 631) +++ trunk/docs/build-sciret-doc.sh 2008-08-24 23:16:45 UTC (rev 632) @@ -20,9 +20,9 @@ # # COPYRIGHT: # -# Copyright (C) 2005-2007 TheGang http://www.the-gang.net +# Copyright (C) 2005-2008 Keyboard Monkeys http://www.kb-m.com/ # License http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License -# Author Reiner Jung <rj...@th...> +# Author Reiner Jung <re...@kb...> # # TODO # Modified: trunk/docs/sciret-install-EN-html4.html =================================================================== --- trunk/docs/sciret-install-EN-html4.html 2008-08-24 20:06:14 UTC (rev 631) +++ trunk/docs/sciret-install-EN-html4.html 2008-08-24 23:16:45 UTC (rev 632) @@ -9,12 +9,12 @@ <h1>Howto install the Sciret Knowledge Base</h1> <p> <strong>v1.1.4, July 2007</strong><br /> -Reiner Jung <rj...@th...> +Reiner Jung <re...@kb...> </p> <hr /> <h2>1. Introduction</h2> <p>Sciret is an advanced knowledge based system written in PHP. The software self is platform independent and should run on every platform where PHP is supported. In the further development, Sciret will be extended to a full enterprise knowledge and information storage system.</p> -<p>Sciret was developed as a internal project from <a href="http://www.the-gang.net">TheGang</a>, a Open Source consulting and strategy company. After many month of internal usage, the decision was taken to release the code as an Open Source Project on <a href="http://www.sf.net">Sourceforge</a>. We hope that Sciret will also fulfill the requirements of other users and companies.</p> +<p>Sciret was developed as a internal project from <a href="http://www.kb-m.com">Keyboard ,onkeys</a>, a Open Source consulting and strategy company. After many month of internal usage, the decision was taken to release the code as an Open Source Project on <a href="http://www.sf.net">Sourceforge</a>. We hope that Sciret will also fulfill the requirements of other users and companies.</p> <p><b>Important:</b> Some of the information of this document are not related to your Sciret version. Please read also the release announcements for your version!</p> <hr /> <h2>2. Requirements</h2> @@ -497,7 +497,7 @@ <p></p> <p></p> <hr /><p><small> -Last updated 28-Jul-2007 10:11:34 CEST +Last updated 25-Aug-2008 01:16:12 CEST </small></p> </body> </html> Modified: trunk/docs/sciret-install-EN-html4.txt =================================================================== --- trunk/docs/sciret-install-EN-html4.txt 2008-08-24 20:06:14 UTC (rev 631) +++ trunk/docs/sciret-install-EN-html4.txt 2008-08-24 23:16:45 UTC (rev 632) @@ -1,14 +1,14 @@ Howto install the Sciret Knowledge Base ======================================= v1.1.4, July 2007 -Reiner Jung <rj...@th...> +Reiner Jung <re...@kb...> :Author Initials: JR Introduction ------------ Sciret is an advanced knowledge based system written in PHP. The software self is platform independent and should run on every platform where PHP is supported. In the further development, Sciret will be extended to a full enterprise knowledge and information storage system. -Sciret was developed as a internal project from http://www.the-gang.net[TheGang], a Open Source consulting and strategy company. After many month of internal usage, the decision was taken to release the code as an Open Source Project on http://www.sf.net[Sourceforge]. We hope that Sciret will also fulfill the requirements of other users and companies. +Sciret was developed as a internal project from http://www.kb-m.com[Keyboard ,onkeys], a Open Source consulting and strategy company. After many month of internal usage, the decision was taken to release the code as an Open Source Project on http://www.sf.net[Sourceforge]. We hope that Sciret will also fulfill the requirements of other users and companies. IMPORTANT: Some of the information of this document are not related to your Sciret version. Please read also the release announcements for your version! Modified: trunk/docs/sciret-install-EN-images.html =================================================================== --- trunk/docs/sciret-install-EN-images.html 2008-08-24 20:06:14 UTC (rev 631) +++ trunk/docs/sciret-install-EN-images.html 2008-08-24 23:16:45 UTC (rev 632) @@ -304,12 +304,12 @@ <div id="header"> <h1>Howto install the Sciret Knowledge Base</h1> <span id="author">v1.1.4, July 2007</span><br /> -Reiner Jung <rj...@th...> +Reiner Jung <re...@kb...> </div> <h2>1. Introduction</h2> <div class="sectionbody"> <p>Sciret is an advanced knowledge based system written in PHP. The software self is platform independent and should run on every platform where PHP is supported. In the further development, Sciret will be extended to a full enterprise knowledge and information storage system.</p> -<p>Sciret was developed as a internal project from <a href="http://www.the-gang.net">TheGang</a>, a Open Source consulting and strategy company. After many month of internal usage, the decision was taken to release the code as an Open Source Project on <a href="http://www.sf.net">Sourceforge</a>. We hope that Sciret will also fulfill the requirements of other users and companies.</p> +<p>Sciret was developed as a internal project from <a href="http://www.kb-m.com">Keyboard ,onkeys</a>, a Open Source consulting and strategy company. After many month of internal usage, the decision was taken to release the code as an Open Source Project on <a href="http://www.sf.net">Sourceforge</a>. We hope that Sciret will also fulfill the requirements of other users and companies.</p> <div class="admonitionblock"> <table><tr> <td class="icon"> @@ -1099,7 +1099,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 28-Jul-2007 10:11:36 CEST +Last updated 25-Aug-2008 01:16:13 CEST </div> </div> </body> Modified: trunk/docs/sciret-install-EN-images.txt =================================================================== --- trunk/docs/sciret-install-EN-images.txt 2008-08-24 20:06:14 UTC (rev 631) +++ trunk/docs/sciret-install-EN-images.txt 2008-08-24 23:16:45 UTC (rev 632) @@ -1,14 +1,14 @@ Howto install the Sciret Knowledge Base ======================================= v1.1.4, July 2007 -Reiner Jung <rj...@th...> +Reiner Jung <re...@kb...> :Author Initials: JR Introduction ------------ Sciret is an advanced knowledge based system written in PHP. The software self is platform independent and should run on every platform where PHP is supported. In the further development, Sciret will be extended to a full enterprise knowledge and information storage system. -Sciret was developed as a internal project from http://www.the-gang.net[TheGang], a Open Source consulting and strategy company. After many month of internal usage, the decision was taken to release the code as an Open Source Project on http://www.sf.net[Sourceforge]. We hope that Sciret will also fulfill the requirements of other users and companies. +Sciret was developed as a internal project from http://www.kb-m.com[Keyboard ,onkeys], a Open Source consulting and strategy company. After many month of internal usage, the decision was taken to release the code as an Open Source Project on http://www.sf.net[Sourceforge]. We hope that Sciret will also fulfill the requirements of other users and companies. IMPORTANT: Some of the information of this document are not related to your Sciret version. Please read also the release announcements for your version! Modified: trunk/docs/sciret-install-EN.html =================================================================== --- trunk/docs/sciret-install-EN.html 2008-08-24 20:06:14 UTC (rev 631) +++ trunk/docs/sciret-install-EN.html 2008-08-24 23:16:45 UTC (rev 632) @@ -304,12 +304,12 @@ <div id="header"> <h1>Howto install the Sciret Knowledge Base</h1> <span id="author">v1.1.4, July 2007</span><br /> -Reiner Jung <rj...@th...> +Reiner Jung <re...@kb...> </div> <h2>1. Introduction</h2> <div class="sectionbody"> <p>Sciret is an advanced knowledge based system written in PHP. The software self is platform independent and should run on every platform where PHP is supported. In the further development, Sciret will be extended to a full enterprise knowledge and information storage system.</p> -<p>Sciret was developed as a internal project from <a href="http://www.the-gang.net">TheGang</a>, a Open Source consulting and strategy company. After many month of internal usage, the decision was taken to release the code as an Open Source Project on <a href="http://www.sf.net">Sourceforge</a>. We hope that Sciret will also fulfill the requirements of other users and companies.</p> +<p>Sciret was developed as a internal project from <a href="http://www.kb-m.com">Keyboard ,onkeys</a>, a Open Source consulting and strategy company. After many month of internal usage, the decision was taken to release the code as an Open Source Project on <a href="http://www.sf.net">Sourceforge</a>. We hope that Sciret will also fulfill the requirements of other users and companies.</p> <div class="admonitionblock"> <table><tr> <td class="icon"> @@ -1099,7 +1099,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 28-Jul-2007 10:11:32 CEST +Last updated 25-Aug-2008 01:16:10 CEST </div> </div> </body> Modified: trunk/docs/sciret-install-EN.txt =================================================================== --- trunk/docs/sciret-install-EN.txt 2008-08-24 20:06:14 UTC (rev 631) +++ trunk/docs/sciret-install-EN.txt 2008-08-24 23:16:45 UTC (rev 632) @@ -1,14 +1,14 @@ Howto install the Sciret Knowledge Base ======================================= v1.1.4, July 2007 -Reiner Jung <rj...@th...> +Reiner Jung <re...@kb...> :Author Initials: JR Introduction ------------ Sciret is an advanced knowledge based system written in PHP. The software self is platform independent and should run on every platform where PHP is supported. In the further development, Sciret will be extended to a full enterprise knowledge and information storage system. -Sciret was developed as a internal project from http://www.the-gang.net[TheGang], a Open Source consulting and strategy company. After many month of internal usage, the decision was taken to release the code as an Open Source Project on http://www.sf.net[Sourceforge]. We hope that Sciret will also fulfill the requirements of other users and companies. +Sciret was developed as a internal project from http://www.kb-m.com[Keyboard ,onkeys], a Open Source consulting and strategy company. After many month of internal usage, the decision was taken to release the code as an Open Source Project on http://www.sf.net[Sourceforge]. We hope that Sciret will also fulfill the requirements of other users and companies. IMPORTANT: Some of the information of this document are not related to your Sciret version. Please read also the release announcements for your version! Modified: trunk/docs/sciret-install-OpenBSD-EN-html4.html =================================================================== --- trunk/docs/sciret-install-OpenBSD-EN-html4.html 2008-08-24 20:06:14 UTC (rev 631) +++ trunk/docs/sciret-install-OpenBSD-EN-html4.html 2008-08-24 23:16:45 UTC (rev 632) @@ -547,7 +547,7 @@ <p></p> <p></p> <hr /><p><small> -Last updated 28-Jul-2007 10:11:39 CEST +Last updated 25-Aug-2008 01:16:17 CEST </small></p> </body> </html> Modified: trunk/docs/sciret-install-OpenBSD-EN-images.html =================================================================== --- trunk/docs/sciret-install-OpenBSD-EN-images.html 2008-08-24 20:06:14 UTC (rev 631) +++ trunk/docs/sciret-install-OpenBSD-EN-images.html 2008-08-24 23:16:45 UTC (rev 632) @@ -1208,7 +1208,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 28-Jul-2007 10:11:41 CEST +Last updated 25-Aug-2008 01:16:18 CEST </div> </div> </body> Added: trunk/docs/sciret-install-OpenBSD-EN-images.txt =================================================================== --- trunk/docs/sciret-install-OpenBSD-EN-images.txt (rev 0) +++ trunk/docs/sciret-install-OpenBSD-EN-images.txt 2008-08-24 23:16:45 UTC (rev 632) @@ -0,0 +1,673 @@ +Howto install Sciret on OpenBSD +=============================== +v1.1.3, Mai 2007 +Reiner Jung <rj...@th...> +:Author Initials: JR + +Introduction +------------ + +*Sciret* + +Sciret is an advanced knowledge based system written in PHP. The software self is platform independent and should run on every platform where PHP is supported. In the further development, Sciret will be extended to a full enterprise knowledge and information storage system. + +Sciret was developed as a internal project from http://www.the-gang.net[TheGang], a Open Source consulting and strategy company. After many month of internal usage, the decision was taken to release the code as an Open Source Project on http://www.sf.net[Sourceforge]. We hope that Sciret will also fulfill the requirements of other users and companies. + +*OpenBSD* + +http://www.openbsd.org[OpenBSD] is a Unix-like computer operating system descended from Berkeley Software Distribution (BSD), a Unix derivative developed at the University of California, Berkeley. It was forked from NetBSD by project leader Theo de Raadt in late 1995. The project is widely known for the developers insistence on open source code and quality documentation; uncompromising position on software licensing; and focus on security and code correctness. The project is coordinated from de Raadt's home in Calgary, Alberta, Canada. Its logo and mascot is Puffy, a blowfish. + +OpenBSD includes a number of security features absent or optional in other operating systems and has a tradition of developers auditing the source code for software bugs and security problems. The project maintains strict policies on licensing and prefers the open source BSD licence and its variants in the past this has led to a comprehensive licence audit and moves to remove or replace code under licences found less acceptable. + +OpenBSD is developed by volunteers. The project funds development and releases by selling http://openbsd.org/items.html[CDs] and http://openbsd.org/tshirts.html[T-shirts], as well as http://openbsd.org/donations.html[donations] from organizations and individuals. These finances ensure that OpenBSD will continue to exist, and will remain http://openbsd.org/policy.html[free] for everyone to use and reuse as they see fit. + +IMPORTANT: Some of the information of this document are not related to your Sciret version. Please read also the release announcements for your version! + +Requirements +------------ + +To install Sciret, you need a couple of things enabled or installed + +*Operation system*:: http://www.OpenBSD.org[OpenBSD] + +*Web Server*:: http://httpd.apache.org[OpenBSD Apache Web Server] included in the core OS from OpenBSD + +*PHP*:: http://www.php.net/[PHP] version 5.x + +*MySQL*:: http://mysql.com/[MySQL database] + +Install the Operation System, the required packages and the configuration of the system +--------------------------------------------------------------------------------------- + +We will not explain here how to install OpenBSD as OpenBSD is mostly self-explained. Information howto install OpenBSD you can found on the OpenBSD project web site. A typical installation from OpenBSD is done in less then 10 minutes when you follow the excellent http://www.openbsd.org/faq/faq4.html[instructions]. + +After the base system in installed, you need to configure several parts to run Sciret. + +[TIP] +.Prepare to install OpenBSD packages +===================================================================================== +You can install the additional packages over HTTP or FTP. Please add as root user +the follow information to the file *.profile* + + # vi /root/.profile + + # export PKG_PATH="ftp://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/" + +You must logout and login from the Shell to activate the environment variables +===================================================================================== + +Now you can begin to install the additional packages, which are not part of your core +OpenBSD system. The PHP packages from OpenBSD are patched with +http://www.hardened-php.net/suhosin.127.html[Suhosin] for better security. + +[IMPORTANT] +.Install the required packages +===================================================================================== + +Install the MySQL server with + + # pkg_add -v -i mysql-server + +Install the PHP package + + # pkg_add -v -i php5-core + +Copy the php.ini file + + # cp /usr/local/share/examples/php5/php.ini-recommended /var/www/conf/php.ini + +Edit the php.ini file + + # vi /var/www/conf/php.ini + +And change the value from + + short_open_tag = off + +to + + short_open_tag = on + +And activate the PHP package + + # /usr/local/sbin/phpxs -s + +And install and activate the follow packages also + + # pkg_add -v -i php5-mysql + + # /usr/local/sbin/phpxs -a mysql + + # pkg_add -v -i php5-mcrypt + + # /usr/local/sbin/phpxs -a mcrypt + + # pkg_add -v -i php5-mhash + + # /usr/local/sbin/phpxs -a mhash + + # pkg_add -v -i php5-imap + + # /usr/local/sbin/phpxs -a imap/ +===================================================================================== + +After the packages are installed, you need to prepare the OpenBSD Apache to support PHP +and you need to create the /tmp directory for Sciret. The /tmp directory is required as +the OpenBSD Apache runs in a Chroot environment. + +[IMPORTANT] +.Configure OpenBSD Apache web server +===================================================================================== +To enable parsing of PHP scripts, add the following to /var/www/conf/httpd.conf: + + AddType application/x-httpd-php .php + +and add index.php to your DirectoryIndex that it looks like + + DirectoryIndex index.html index.php + +Now you need to create the /tmp directory for Apache with the follow commands + + # mkdir /var/www/tmp + # chown www /var/www/tmp + +The base configuration from the Apache server is finished. Now you need to activate +the webserver that he start on system start. Please change in the file */etc/rc.conf* +the value from + + http_flags=NO + +to + + http_flags="" +===================================================================================== + +PHP and the Apache web server are up and running and the first part of your installation +was successful finished. You can test now that there was no error in the configuration +until now. + +[TIP] +.Test the PHP and Apache functionality +===================================================================================== +Create the following file + + # vi /var/www/htdocs/info.php + +and add to this file the follow line + + <? + phpinfo(); + ?> + +Now start your apache web server from the command line with the command + + # apachectl start + +and point your browser to the follow addess + + http://your-server-ip-address/info.php + +When you see the PHP information, your web server and the PHP installation are working +and you can go to the next step. Please *delete* the info.php file before you continue. + + # rm /var/www/htdocs/info.php +===================================================================================== + +Now you need to prepare your MySQL server that he start at system start and you need to +install the default database for your MySQL server. + +[IMPORTANT] +.Configuration of your MySQL server +===================================================================================== +To enable MySQL to start at boot enter the following line in /etc/rc.conf.local: + + mysql=YES + + +Then enter the following lines into your /etc/rc.local *after* the line + + # Add your local startup actions here + +and *before* the line + + echo ´.´ + + + if [ X"${mysql}" == X"YES" -a -x /usr/local/bin/mysqld_safe ]; then + echo -n " mysqld"; /usr/local/bin/mysqld_safe --user=_mysql --log --open-files-limit=256 & + for i in 1 2 3 4 5 6; do + if [ -S /var/run/mysql/mysql.sock ]; then + break + else + sleep 1 + echo -n "." + fi + done + # + # Apache chroot Settings + mkdir -p /var/www/var/run/mysql + sleep 2 + ln -f /var/run/mysql/mysql.sock /var/www/var/run/mysql/mysql.sock + fi + +You must add this line exactly as they are written here. Otherwise your chrooted Apache will not be +able to connect to the MySQL Database server! +===================================================================================== + +The basic installation from your OpenBSD system and the required servers are configured and you can +start now to install Sciret. Sciret will be available in the OpenBSD ports tree, so you can install +Sciret without pain. Before you can install Sciret, you need to prepare your database first. Please +follow the instructions below. + +Database +-------- + +Sciret requires a database. At the moment Sciret support only MySQL as database. +There are several ways to create a database and several tools + +[TIP] +.MySQL Administration +================================================================================ +phpMyAdmin: Web based administration tool for MySQL is as a package available in +the OpenBSD ports tree. You can install the package like the other packages with +the command + + pkg_add -v -i phpMyAdmin. + +For more information about phpMyAdmin you can visit the project page. + +http://www.phpmyadmin.net[http://www.phpmyadmin.net/] + +MySQL Administrator is a other tool, provided by MySQL AB and this tool is also +available as package from the ports tree (mysql-administrator). + +http://www.mysql.com/products/tools/administrator[http://www.mysql.com/products/tools/administrator/] +================================================================================ + +Disabling and configuring Services +---------------------------------- + +OpenBSD does come with a few unnecessary services enabled by default, which you don't need when you run Sciret. Turn these services off. This is completely optional and you must do so according to your own needs. + +[TIP] +.Disable unnecessary service +================================================================================ +Edit the following file + + # vi /etc/inetd.conf + +and comment out the following line: + + #ident stream tcp nowait _identd /usr/libexec/identd identd -el + #ident stream tcp6 nowait _identd /usr/libexec/identd identd -el + #daytime stream tcp nowait root internal + #daytime stream tcp6 nowait root internal + #time stream tcp nowait root internal + #time stream tcp6 nowait root internal +================================================================================ + + +Install Sciret from scratch +--------------------------- +When you install Sciret the first time, you should follow the instructions in this manual. + +Create your database and a user which can connect to the DB +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This example shows how to create a database under OpenBSD from the command line. +With the graphical tools the steps are the same as described here. + +WARNING: Many people run their applications under the MySQL Root account. *Never* use the database Root account as a user for your application. Create instead a dedicated user only for the application. + +.Create the database +.................................................................................... + # mysqladmin –u your-mysqladmin-user –p create sciret-db-name + Enter password: +.................................................................................... + +.Create the Sciret DB user and give him DB access rights +..................................................................................... + # mysql –u your-mysqladmin-user –p + Enter password: + + mysql> grant all on sciret.* to sciret-db-user@localhost identified by “password”; +..................................................................................... + +Install Sciret sources on your web server +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +You can http://sourceforge.net/project/showfiles.php?group_id=181327[download the Sciret sources] from the Project page or you can install the package as OpenBSD user from the OpenBSD ports tree direct from the command line. When you want have a preview to upcoming versions of Sciret, You can download the test releases or checkout directly from SVN. + +[TIP] +.The preferred installation from Sciret on OpenBSD +================================================================================================ +You should use to install Sciret the packages available from OpenBSD. To install Sciret run the +follow command. + + # pkd_add -v -i sciret +================================================================================================ + +When you have downloaded the Sources from http://www.sf.net[SourceForge], you must unpack the sources in your web server root. + +.Install the sources +.................................................................... + # cd /var/www/htdocs + + # tar xzvf sciret-rcx-x.x.x.tar.gz +.................................................................... + +After the sources from Sciret are installed on your server. You must change the permissions that your web server can read the files. For the *upload* directory you must give also write permissions to the web server user. + +[TIP] +.Under which user your Apache is running? +================================================================================================ +The OpenBSD apache runs under the user *www*. +================================================================================================ + +.Change the access rights to your web server user +.................................................................... + # cd /var/www/htdocs + + # chown -R root:www sciret + + # find sciret -type d -exec chmod 550 {} \; + + # find sciret -type f -exec chmod 440 {} \; + + # find sciret/uploads -type d -exec chmod 770 {} \; + + # chmod 660 sciret/config.php +.................................................................... + +Now you must set the *$Config['UserFilesPath']* variable to the path (relative to the web server root dir) where +you want to store image uploads. + +.Edit the follow files: +.................................................................... + # vi fckeditor/editor/filemanager/browser/default/connectors/php/config.php + + // Path to user files relative to the document root. + $Config['UserFilesPath'] = '/sciret/uploads/editor' ; + + # vi fckeditor/editor/filemanager/upload/php/config.php + + // Path to uploaded files relative to the document root. + $Config['UserFilesPath'] = '/sciret/uploads/editor' ; +.................................................................... + +Finish the Sciret installation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +After you configured the web server and all permissions are set, you can go to finish the installation. To finalize the Sciret setup, please point your browser to your web server Sciret URL and follow the instructions. + +[NOTE] +.Finalize the installation +========================================= +Point your browser to the URL or your Sciret installation to finalize the installation + +http://www.servername.xx/index.php + +========================================= + +Remove write access to the config file +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +After successful installation from Sciret, you can remove the write access to the config.php from your web server user. + +.Change the access rights from the config.php back +.................................................................... + # chmod 440 sciret/config.php +.................................................................... + +Login to Sciret the first time +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +When you finished your installation, you can login to Sciret the first time. Please take care to change the default password after your first login! + +[IMPORTANT] +.Default login password +======================================== +username = admin + +password = admin +======================================== + +Secure your Sciret access with a web server certificate +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To protect your privacy, you can use a server certificate when you connect to your Sciret installation. With a certificate you can connect to your web server with an encrypted connection (using https instead of http). Without an https connection, other people can sniff your password or other personal information. + +[TIP] +.Self-signed server certificates. +============================================================ + You can self-sign the certificate which you will create. + +*Use a non-Profit Certificate Authority.* + + +http://www.cacert.org/[CAcert] + + +*Use a commercial Certificate Authority.* + +http://www.rapidssl.com/[RapidSSL] + +http://www.geotrust.com/[GeoTrust] + +http://www.thawte.com[Thawte] +============================================================ + + +Use CAcert as Certificate Authority +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +We will here explain the steps, which you need to register and create your certificate with CAcert. The reason for CAcert is not that it is better then the other authorities, the reason is that it is free of charge. + +[NOTE] +.The CAcert homepage +https://www.cacert.org/[https://www.cacert.org] + +What to do first?? +First you must create an account at CAcert. For the account enrolment you must fill out the https://www.cacert.org/index.php?id=1[form]. When you have done this, you will receive a Email with more instructions. + +Register your domain at CAcert?? +After you have created your account, register your domain at CAcert for which you want sign a certificate. When you have already more then 50 assurance points, then you can register your organization. To register your organization, you must send to su...@ca... some scanned copy(ies) of Certificate of Incorporation etc. + +Creating your certificate signing request?? +On your Sciret server, you must create a server key and a certificate-signing request for your web server. + +Sign the Certificate Signing Request?? +You Certificate Signing Request you can now sign on the CAcert website. Please follow the instruction on the site. + +Install the certificate on your server?? +After your certificate is signed, install the Certificate on your server to protect your Sciret installation. + +[TIP] +.How create the certificates +======================================================== +Create you server certificate + + # /usr/sbin/openssl genrsa 1024 > /etc/ssl/private/server.key + +Create your Certificate Signing Request (CSR) + + # usr/sbin/openssl req -new -key /etc/ssl/private/server.key \ + -out /etc/ssl/private/server.csr +======================================================== + +Now your Sciret installation is basically protected again sniffing your password. There are other possibilities to protect your server and install it in a secure way. This will be targeted in a separate document in the future. + +[NOTE] +.Comercial Certificate Vendors +The certificate creation process is similar for a commercial vendor. + +Patch your Sciret installation +------------------------------ + +IMPORTANT: You can only patch the latest Sciret release. When you are not running the latest Sciret release, you need to upgrade your installation. + +Sometimes your Sciret installation needs to be patched to fix a bug. For small bug fixes you can download only the new file to patch you Sciret installation instead to download a new package. + +[NOTE] +.Apply the patch +============================================================================================================================ +Download the patch from the Sciret SourceForge project page + +https://sourceforge.net/project/showfiles.php?group_id=181327[https://sourceforge.net/project/showfiles.php?group_id=181327] + +Overwrite the existing file with the new file +============================================================================================================================ + + +Upgrade the Sciret language package +----------------------------------- + +The Sciret project deliver a separate language package. With this package you can update you stable Sciret installation with additional translation. The reason for the separate package is that some translations are started or committed after a stable release from Sciret is released. To install the Sciret language package, please follow the instructions + +[TIP] +.Install the language package +======================================================== +Download the package from the SourceForge project page + + http://sourceforge.net/project/showfiles.php?group_id=181327&package_id=231283 + +and unpack the package it the folder + + # cd /var/www/htdocs/sciret/languages + +On OpenBSD with + + # tar xzvf language-update-x.x.x.tar.gz +======================================================== + +Install aditional icon sets on Sciret +------------------------------------- + +The Sciret project deliver several icon sets. With these packages you can installation and other icons set as Sciret ship it by default. To install the Sciret icon set package, please follow the instructions + +[TIP] +.Install a alternative icon set +======================================================== +Download the package from the SourceForge project page + + http://sourceforge.net/project/showfiles.php?group_id=181327&package_id=231283 + +make a backup of your standard icon set + + # cd /var/www/htdocs/sciret/uploads/icons + + # tar czvf a-name-for-your-backup.tar.gz * + + # mv a-name-for-your-backup.tar.gz /root/ + + # rm -rf * + +and unpack the new icon set in the same folder + + # tar xzvf name-of-the-new-icon-set.tar.gz +======================================================== + + +Upgrade Sciret +-------------- + +With the release from Sciret 1.1.0, Sciret offer a full automatic upgrade to the next release. The automatic upgrade work only from the last stable release but not from a SVN version of Sciret. + + +IMPORTANT: Before you start any upgrade from Sciret, please *make a backup* from your Sciret database and your Sciret installation! + +Backup your Sciret installation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +We will describe here a simple backup from Sciret. Please consider that on your platform, the backup procedure can be different. + +[WARNING] +.Stop the web server +============================================================ +Before you start to make any backups, you should first stop +the web server. + + # apachectl stop +============================================================ + +.Backup the database and the Sciret web server root +......................................................................................... + # tar czvf sciret.tar.gz sciret + + # mv sciret.tar.gz /root/ + + # mysqldump –u your-mysqladmin-user -p --opt database > /root/database.sql +......................................................................................... + +After you have backed up your installation, you can upgrade the database. + +Now you can install the new sources from Sciret on your web server + +.Upgrade Sciret +......................................................................................... + # cp sciret/config.php /root/ + + # pkg_add -u -i -v sciret + + # cp /root/config.php sciret/ +......................................................................................... + +[NOTE] +.Start the web server +================================================================ +After your upgrade is done, you must start the web server again. + + # apachectl start +================================================================ + +After you have update you must force a reload of your browser cache. Often a update from Sciret includes changes in the JavaScirpt engine or the CSS files. + +[TIP] +.After the package upgrade +================================================================ +Point your browser to the Sciret site and follow the instruction to perform the automatic database upgrade +================================================================ + +[IMPORTANT] +.Upgrade Sciret from a SVN development version +=============================================================== +Before you upgrade Sciret to the latest release, please read the release notes and the file UPGRADE.TXT. Sometimes the database schema is changed and you need to alter your database first before you can upgrade Sciret. + +If you update the code from the svn repository the automatic upgrade won't work since +you are in a kind of "limbo version". The system will only do clean +installs and upgrade from any stable version to the next stable version. To make your +current installs work you'll have, just for this time, to manually run +the SQL that you need under /setup/upgrade_x.x.x.sql and this: +INSERT INTO configuration (field, value) VALUES('version', 'x.x.x'); +=============================================================== + + +Install the Sciret development version +-------------------------------------- +When you want test Sciret and submit patches to Sciret, you should use the development version from Sciret and not the stable version of Sciret. Sciret development from Subversion is not recommended for production use. You must read the Changelog before you install the development version. + +Checkout Sciret from Subversion +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +You can checkout the Sciret sources direct from Subversion on the Sourceforge project page. Please consider that the development version of Sciret have no support. + +.SVN checkout from Sourceforge +......................................................................................... + # svn co https://sciret.svn.sourceforge.net/svnroot/sciret/trunk sciret +......................................................................................... + +Report Bugs, Submit Patches ... +--------------------------------- +When you found any problems with Sciret or inside this howto, please let us know what is going wrong. All problems and patches should be reported to the http://sourceforge.net/project/stats/?group_id=181327&ugn=sciret[Sciret Sourceforge Project Page]. There are also the mailing lists and the forums, which you can use to communicate with other users or the developers from Sciret. + + +[IMPORTANT] +.Important development addresses +=============================================================== +When you report a bug about Sciret, it is important that you send us also the Version number from Sciret. The Version Number you can found in the Sciret root directory in the file VERSION + +http://sourceforge.net/tracker/?group_id=181327&atid=896759[The Sciret Bug Tracker] + +http://sourceforge.net/tracker/?group_id=181327&atid=896762[The Sciret Feature Request Page] + +http://sourceforge.net/tracker/?group_id=181327&atid=896761[The Sciret Patches Submitting Page] +=============================================================== + +Other Information about Sciret +------------------------------- +When you are interested in more information about Sciret, you can also visit the Sciret homepage. Here are screenshots from Sciret published and you can play around with the Sciret demo. + +[TIP] +.Please visit the Sciret homepage at +http://www.sciret.org[http://www.sciret.org] + +Contributors to Sciret development +---------------------------------- +Some people are contributed to the development with patches or with translations. + +Patch contribution +~~~~~~~~~~~~~~~~~~ +- Nikolai Essel submitted patches to Sciret 0.9/1.1 +- Rune Hammersland submitted patches to Sciret 1.1 + +Testers +~~~~~~~ +- Johnny Hsieh + +Translations +~~~~~~~~~~~~ +- Chinese Traditional Johnny Hsieh +- Dutch translation Roy de Milde +- Hebrew translation from SF user Golanor +- Japanese translation from SF user tm800720 +- Norway translation from from Rune Hammersland +- Swedish translation from Henrik Christensson + +Graphical Layout +~~~~~~~~~~~~~~~~ +- The Sciret Logo and the New Sciret Layout is done by Nunu Pinheiro + +Packager +~~~~~~~~ +- OpenBSD Felix Kronlage + +License of this documentation +----------------------------- + +This work is licensed under a http://creativecommons.org/licenses/by-sa/2.5/[Creative Commons Attribution-Share Alike 2.5 License]. + +// vim: set syntax=asciidoc: + Modified: trunk/docs/sciret-install-OpenBSD-EN.html =================================================================== --- trunk/docs/sciret-install-OpenBSD-EN.html 2008-08-24 20:06:14 UTC (rev 631) +++ trunk/docs/sciret-install-OpenBSD-EN.html 2008-08-24 23:16:45 UTC (rev 632) @@ -1208,7 +1208,7 @@ </div> <div id="footer"> <div id="footer-text"> -Last updated 28-Jul-2007 10:11:37 CEST +Last updated 25-Aug-2008 01:16:15 CEST </div> </div> </body> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |