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-10-24 00:19:23
|
Revision: 760 http://sciret.svn.sourceforge.net/sciret/?rev=760&view=rev Author: alpeb Date: 2008-10-24 00:19:17 +0000 (Fri, 24 Oct 2008) Log Message: ----------- - added dynamic YUI lib loading function - execute js on the To-Do's dropdown Modified Paths: -------------- trunk/javascript/general.js Modified: trunk/javascript/general.js =================================================================== --- trunk/javascript/general.js 2008-10-24 00:17:54 UTC (rev 759) +++ trunk/javascript/general.js 2008-10-24 00:19:17 UTC (rev 760) @@ -14,15 +14,35 @@ * @see http://yuiblog.com/blog/2007/06/12/module-pattern/ */ -/** - * Aliases definitions (functions, namespaces) - */ YAHOO.namespace("sciret"); SCIRET = YAHOO.sciret; // to avoid conflicts with YAHOO.tools' $ function var $j = jQuery.noConflict(); +/** +* This is only to load YUI libs that don't need to used immediately after +* the page is loaded +*/ +SCIRET.loader= function() { + var loader; + + return { + combine: true, + base: null, + + insert: function(arrComponents, onSuccess) { + loader = new YAHOO.util.YUILoader({ + require: arrComponents, + onSuccess: onSuccess, + base: this.base, + combine: this.combine + }); + loader.insert(); + } + }; +}(); + SCIRET.debugWindow = function() { var popup = false; @@ -552,7 +572,7 @@ } var todosDropdown = YAHOO.util.Dom.get('todosDropdown'); - todosDropdown.innerHTML = responseObj.responseText; + SCIRET.utils.replaceContent(responseObj, 'todosDropdown'); if (SCIRET.utils.isSafari) { todosDropdown.style.paddingBottom = '25px'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-24 00:18:05
|
Revision: 759 http://sciret.svn.sourceforge.net/sciret/?rev=759&view=rev Author: alpeb Date: 2008-10-24 00:17:54 +0000 (Fri, 24 Oct 2008) Log Message: ----------- little typo Modified Paths: -------------- trunk/style.css Modified: trunk/style.css =================================================================== --- trunk/style.css 2008-10-23 19:34:37 UTC (rev 758) +++ trunk/style.css 2008-10-24 00:17:54 UTC (rev 759) @@ -1012,7 +1012,7 @@ /* ##################################################### */ /* TABS */ /* Customization of YUI's Sam skin for tabs: */ -/* yui/tabview/assets/skins/sam/tabbiew-skin.css */ +/* yui/tabview/assets/skins/sam/tabview-skin.css */ /* ##################################################### */ /* .yui-navset defaults to .yui-navset-top */ .yui-skin-sam .yui-navset .yui-nav, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-23 19:34:49
|
Revision: 758 http://sciret.svn.sourceforge.net/sciret/?rev=758&view=rev Author: alpeb Date: 2008-10-23 19:34:37 +0000 (Thu, 23 Oct 2008) Log Message: ----------- not using YUI's buttons in sciret Modified Paths: -------------- trunk/templates/ReportArticle.tpl trunk/templates/RequestCategory.tpl Modified: trunk/templates/ReportArticle.tpl =================================================================== --- trunk/templates/ReportArticle.tpl 2008-10-23 18:14:44 UTC (rev 757) +++ trunk/templates/ReportArticle.tpl 2008-10-23 19:34:37 UTC (rev 758) @@ -13,10 +13,7 @@ {formName} {formEmail} {formComments} - <input type="submit" id="submitReport" value="[l]Send[/l]" /> - <script> - new YAHOO.widget.Button("submitReport"); - </script> + <input type="submit" value="[l]Send[/l]" /> </form> <!-- END reportForm_block --> <!-- BEGIN reportsNotConfigured_block --> Modified: trunk/templates/RequestCategory.tpl =================================================================== --- trunk/templates/RequestCategory.tpl 2008-10-23 18:14:44 UTC (rev 757) +++ trunk/templates/RequestCategory.tpl 2008-10-23 19:34:37 UTC (rev 758) @@ -15,8 +15,5 @@ {formParentCategory} {formNewCategoryName} {formComments} - <input type="submit" id="submitRequest" value="[l]Send[/l]" /> - <script> - new YAHOO.widget.Button("submitRequest"); - </script> + <input type="submit" value="[l]Send[/l]" /> </form> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-23 18:14:49
|
Revision: 757 http://sciret.svn.sourceforge.net/sciret/?rev=757&view=rev Author: alpeb Date: 2008-10-23 18:14:44 +0000 (Thu, 23 Oct 2008) Log Message: ----------- upgraded YUI to 2.6.0, and removed everything but the build dir Modified Paths: -------------- trunk/style.css trunk/templates/EditArticle.tpl trunk/templates/MainView.tpl trunk/templates/head.tpl trunk/views/MainView.php Added Paths: ----------- trunk/javascript/yui/ trunk/javascript/yui/animation/ trunk/javascript/yui/animation/README trunk/javascript/yui/animation/animation-debug.js trunk/javascript/yui/animation/animation-min.js trunk/javascript/yui/animation/animation.js trunk/javascript/yui/assets/ trunk/javascript/yui/assets/skins/ trunk/javascript/yui/assets/skins/sam/ trunk/javascript/yui/assets/skins/sam/asc.gif trunk/javascript/yui/assets/skins/sam/autocomplete.css trunk/javascript/yui/assets/skins/sam/blankimage.png trunk/javascript/yui/assets/skins/sam/button.css trunk/javascript/yui/assets/skins/sam/calendar.css trunk/javascript/yui/assets/skins/sam/carousel.css trunk/javascript/yui/assets/skins/sam/colorpicker.css trunk/javascript/yui/assets/skins/sam/container.css trunk/javascript/yui/assets/skins/sam/datatable.css trunk/javascript/yui/assets/skins/sam/desc.gif trunk/javascript/yui/assets/skins/sam/dt-arrow-dn.png trunk/javascript/yui/assets/skins/sam/dt-arrow-up.png trunk/javascript/yui/assets/skins/sam/editor-knob.gif trunk/javascript/yui/assets/skins/sam/editor-sprite-active.gif trunk/javascript/yui/assets/skins/sam/editor-sprite.gif trunk/javascript/yui/assets/skins/sam/editor.css trunk/javascript/yui/assets/skins/sam/header_background.png trunk/javascript/yui/assets/skins/sam/hue_bg.png trunk/javascript/yui/assets/skins/sam/imagecropper.css trunk/javascript/yui/assets/skins/sam/layout.css trunk/javascript/yui/assets/skins/sam/layout_sprite.png trunk/javascript/yui/assets/skins/sam/loading.gif trunk/javascript/yui/assets/skins/sam/logger.css trunk/javascript/yui/assets/skins/sam/menu-button-arrow-disabled.png trunk/javascript/yui/assets/skins/sam/menu-button-arrow.png trunk/javascript/yui/assets/skins/sam/menu.css trunk/javascript/yui/assets/skins/sam/menubaritem_submenuindicator.png trunk/javascript/yui/assets/skins/sam/menubaritem_submenuindicator_disabled.png trunk/javascript/yui/assets/skins/sam/menuitem_checkbox.png trunk/javascript/yui/assets/skins/sam/menuitem_checkbox_disabled.png trunk/javascript/yui/assets/skins/sam/menuitem_submenuindicator.png trunk/javascript/yui/assets/skins/sam/menuitem_submenuindicator_disabled.png trunk/javascript/yui/assets/skins/sam/paginator.css trunk/javascript/yui/assets/skins/sam/picker_mask.png trunk/javascript/yui/assets/skins/sam/profilerviewer.css trunk/javascript/yui/assets/skins/sam/resize.css trunk/javascript/yui/assets/skins/sam/simpleeditor.css trunk/javascript/yui/assets/skins/sam/skin.css trunk/javascript/yui/assets/skins/sam/slider.css trunk/javascript/yui/assets/skins/sam/split-button-arrow-active.png trunk/javascript/yui/assets/skins/sam/split-button-arrow-disabled.png trunk/javascript/yui/assets/skins/sam/split-button-arrow-focus.png trunk/javascript/yui/assets/skins/sam/split-button-arrow-hover.png trunk/javascript/yui/assets/skins/sam/split-button-arrow.png trunk/javascript/yui/assets/skins/sam/sprite.png trunk/javascript/yui/assets/skins/sam/sprite.psd trunk/javascript/yui/assets/skins/sam/tabview.css trunk/javascript/yui/assets/skins/sam/treeview-loading.gif trunk/javascript/yui/assets/skins/sam/treeview-sprite.gif trunk/javascript/yui/assets/skins/sam/treeview.css trunk/javascript/yui/assets/skins/sam/wait.gif trunk/javascript/yui/assets/skins/sam/yuitest.css trunk/javascript/yui/autocomplete/ trunk/javascript/yui/autocomplete/README trunk/javascript/yui/autocomplete/assets/ trunk/javascript/yui/autocomplete/assets/autocomplete-core.css trunk/javascript/yui/autocomplete/assets/skins/ trunk/javascript/yui/autocomplete/assets/skins/sam/ trunk/javascript/yui/autocomplete/assets/skins/sam/autocomplete-skin.css trunk/javascript/yui/autocomplete/assets/skins/sam/autocomplete.css trunk/javascript/yui/autocomplete/autocomplete-debug.js trunk/javascript/yui/autocomplete/autocomplete-min.js trunk/javascript/yui/autocomplete/autocomplete.js trunk/javascript/yui/base/ trunk/javascript/yui/base/README trunk/javascript/yui/base/base-min.css trunk/javascript/yui/base/base.css trunk/javascript/yui/button/ trunk/javascript/yui/button/README trunk/javascript/yui/button/assets/ trunk/javascript/yui/button/assets/button-core.css trunk/javascript/yui/button/assets/skins/ trunk/javascript/yui/button/assets/skins/sam/ trunk/javascript/yui/button/assets/skins/sam/button-skin.css trunk/javascript/yui/button/assets/skins/sam/button.css trunk/javascript/yui/button/assets/skins/sam/menu-button-arrow-disabled.png trunk/javascript/yui/button/assets/skins/sam/menu-button-arrow.png trunk/javascript/yui/button/assets/skins/sam/split-button-arrow-active.png trunk/javascript/yui/button/assets/skins/sam/split-button-arrow-disabled.png trunk/javascript/yui/button/assets/skins/sam/split-button-arrow-focus.png trunk/javascript/yui/button/assets/skins/sam/split-button-arrow-hover.png trunk/javascript/yui/button/assets/skins/sam/split-button-arrow.png trunk/javascript/yui/button/button-debug.js trunk/javascript/yui/button/button-min.js trunk/javascript/yui/button/button.js trunk/javascript/yui/calendar/ trunk/javascript/yui/calendar/README trunk/javascript/yui/calendar/assets/ trunk/javascript/yui/calendar/assets/calendar-core.css trunk/javascript/yui/calendar/assets/calendar.css trunk/javascript/yui/calendar/assets/calgrad.png trunk/javascript/yui/calendar/assets/callt.gif trunk/javascript/yui/calendar/assets/calrt.gif trunk/javascript/yui/calendar/assets/calx.gif trunk/javascript/yui/calendar/assets/skins/ trunk/javascript/yui/calendar/assets/skins/sam/ trunk/javascript/yui/calendar/assets/skins/sam/calendar-skin.css trunk/javascript/yui/calendar/assets/skins/sam/calendar.css trunk/javascript/yui/calendar/calendar-debug.js trunk/javascript/yui/calendar/calendar-min.js trunk/javascript/yui/calendar/calendar.js trunk/javascript/yui/carousel/ trunk/javascript/yui/carousel/README trunk/javascript/yui/carousel/assets/ trunk/javascript/yui/carousel/assets/ajax-loader.gif trunk/javascript/yui/carousel/assets/carousel-core.css trunk/javascript/yui/carousel/assets/skins/ trunk/javascript/yui/carousel/assets/skins/sam/ trunk/javascript/yui/carousel/assets/skins/sam/carousel-skin.css trunk/javascript/yui/carousel/assets/skins/sam/carousel.css trunk/javascript/yui/carousel/carousel-beta-debug.js trunk/javascript/yui/carousel/carousel-beta-min.js trunk/javascript/yui/carousel/carousel-beta.js trunk/javascript/yui/charts/ trunk/javascript/yui/charts/README trunk/javascript/yui/charts/assets/ trunk/javascript/yui/charts/assets/charts.swf trunk/javascript/yui/charts/charts-experimental-debug.js trunk/javascript/yui/charts/charts-experimental-min.js trunk/javascript/yui/charts/charts-experimental.js trunk/javascript/yui/colorpicker/ trunk/javascript/yui/colorpicker/README trunk/javascript/yui/colorpicker/assets/ trunk/javascript/yui/colorpicker/assets/colorpicker-core.css trunk/javascript/yui/colorpicker/assets/hue_thumb.png trunk/javascript/yui/colorpicker/assets/picker_mask.png trunk/javascript/yui/colorpicker/assets/picker_thumb.png trunk/javascript/yui/colorpicker/assets/skins/ trunk/javascript/yui/colorpicker/assets/skins/sam/ trunk/javascript/yui/colorpicker/assets/skins/sam/colorpicker-skin.css trunk/javascript/yui/colorpicker/assets/skins/sam/colorpicker.css trunk/javascript/yui/colorpicker/assets/skins/sam/hue_bg.png trunk/javascript/yui/colorpicker/assets/skins/sam/picker_mask.png trunk/javascript/yui/colorpicker/colorpicker-debug.js trunk/javascript/yui/colorpicker/colorpicker-min.js trunk/javascript/yui/colorpicker/colorpicker.js trunk/javascript/yui/connection/ trunk/javascript/yui/connection/README trunk/javascript/yui/connection/connection-debug.js trunk/javascript/yui/connection/connection-min.js trunk/javascript/yui/connection/connection.js trunk/javascript/yui/container/ trunk/javascript/yui/container/README trunk/javascript/yui/container/assets/ trunk/javascript/yui/container/assets/alrt16_1.gif trunk/javascript/yui/container/assets/blck16_1.gif trunk/javascript/yui/container/assets/close12_1.gif trunk/javascript/yui/container/assets/container-core.css trunk/javascript/yui/container/assets/container.css trunk/javascript/yui/container/assets/hlp16_1.gif trunk/javascript/yui/container/assets/info16_1.gif trunk/javascript/yui/container/assets/skins/ trunk/javascript/yui/container/assets/skins/sam/ trunk/javascript/yui/container/assets/skins/sam/container-skin.css trunk/javascript/yui/container/assets/skins/sam/container.css trunk/javascript/yui/container/assets/tip16_1.gif trunk/javascript/yui/container/assets/warn16_1.gif trunk/javascript/yui/container/container-debug.js trunk/javascript/yui/container/container-min.js trunk/javascript/yui/container/container.js trunk/javascript/yui/container/container_core-debug.js trunk/javascript/yui/container/container_core-min.js trunk/javascript/yui/container/container_core.js trunk/javascript/yui/cookie/ trunk/javascript/yui/cookie/README trunk/javascript/yui/cookie/cookie-debug.js trunk/javascript/yui/cookie/cookie-min.js trunk/javascript/yui/cookie/cookie.js trunk/javascript/yui/datasource/ trunk/javascript/yui/datasource/README trunk/javascript/yui/datasource/datasource-debug.js trunk/javascript/yui/datasource/datasource-min.js trunk/javascript/yui/datasource/datasource.js trunk/javascript/yui/datatable/ trunk/javascript/yui/datatable/README trunk/javascript/yui/datatable/assets/ trunk/javascript/yui/datatable/assets/datatable-core.css trunk/javascript/yui/datatable/assets/datatable.css trunk/javascript/yui/datatable/assets/skins/ trunk/javascript/yui/datatable/assets/skins/sam/ trunk/javascript/yui/datatable/assets/skins/sam/datatable-skin.css trunk/javascript/yui/datatable/assets/skins/sam/datatable.css trunk/javascript/yui/datatable/assets/skins/sam/dt-arrow-dn.png trunk/javascript/yui/datatable/assets/skins/sam/dt-arrow-up.png trunk/javascript/yui/datatable/datatable-debug.js trunk/javascript/yui/datatable/datatable-min.js trunk/javascript/yui/datatable/datatable.js trunk/javascript/yui/dom/ trunk/javascript/yui/dom/README trunk/javascript/yui/dom/dom-debug.js trunk/javascript/yui/dom/dom-min.js trunk/javascript/yui/dom/dom.js trunk/javascript/yui/dragdrop/ trunk/javascript/yui/dragdrop/README trunk/javascript/yui/dragdrop/dragdrop-debug.js trunk/javascript/yui/dragdrop/dragdrop-min.js trunk/javascript/yui/dragdrop/dragdrop.js trunk/javascript/yui/editor/ trunk/javascript/yui/editor/README trunk/javascript/yui/editor/assets/ trunk/javascript/yui/editor/assets/editor-core.css trunk/javascript/yui/editor/assets/simpleeditor-core.css trunk/javascript/yui/editor/assets/skins/ trunk/javascript/yui/editor/assets/skins/sam/ trunk/javascript/yui/editor/assets/skins/sam/blankimage.png trunk/javascript/yui/editor/assets/skins/sam/editor-knob.gif trunk/javascript/yui/editor/assets/skins/sam/editor-skin.css trunk/javascript/yui/editor/assets/skins/sam/editor-sprite-active.gif trunk/javascript/yui/editor/assets/skins/sam/editor-sprite.gif trunk/javascript/yui/editor/assets/skins/sam/editor.css trunk/javascript/yui/editor/assets/skins/sam/simpleeditor-skin.css trunk/javascript/yui/editor/assets/skins/sam/simpleeditor.css trunk/javascript/yui/editor/editor-debug.js trunk/javascript/yui/editor/editor-min.js trunk/javascript/yui/editor/editor.js trunk/javascript/yui/editor/simpleeditor-debug.js trunk/javascript/yui/editor/simpleeditor-min.js trunk/javascript/yui/editor/simpleeditor.js trunk/javascript/yui/element/ trunk/javascript/yui/element/README trunk/javascript/yui/element/element-beta-debug.js trunk/javascript/yui/element/element-beta-min.js trunk/javascript/yui/element/element-beta.js trunk/javascript/yui/event/ trunk/javascript/yui/event/README trunk/javascript/yui/event/event-debug.js trunk/javascript/yui/event/event-min.js trunk/javascript/yui/event/event.js trunk/javascript/yui/fonts/ trunk/javascript/yui/fonts/README trunk/javascript/yui/fonts/fonts-min.css trunk/javascript/yui/fonts/fonts.css trunk/javascript/yui/get/ trunk/javascript/yui/get/README trunk/javascript/yui/get/get-debug.js trunk/javascript/yui/get/get-min.js trunk/javascript/yui/get/get.js trunk/javascript/yui/grids/ trunk/javascript/yui/grids/README trunk/javascript/yui/grids/grids-min.css trunk/javascript/yui/grids/grids.css trunk/javascript/yui/history/ trunk/javascript/yui/history/README trunk/javascript/yui/history/assets/ trunk/javascript/yui/history/assets/blank.html trunk/javascript/yui/history/history-debug.js trunk/javascript/yui/history/history-min.js trunk/javascript/yui/history/history.js trunk/javascript/yui/imagecropper/ trunk/javascript/yui/imagecropper/README trunk/javascript/yui/imagecropper/assets/ trunk/javascript/yui/imagecropper/assets/imagecropper-core.css trunk/javascript/yui/imagecropper/assets/skins/ trunk/javascript/yui/imagecropper/assets/skins/sam/ trunk/javascript/yui/imagecropper/assets/skins/sam/imagecropper-skin.css trunk/javascript/yui/imagecropper/assets/skins/sam/imagecropper.css trunk/javascript/yui/imagecropper/imagecropper-beta-debug.js trunk/javascript/yui/imagecropper/imagecropper-beta-min.js trunk/javascript/yui/imagecropper/imagecropper-beta.js trunk/javascript/yui/imageloader/ trunk/javascript/yui/imageloader/README trunk/javascript/yui/imageloader/imageloader-debug.js trunk/javascript/yui/imageloader/imageloader-min.js trunk/javascript/yui/imageloader/imageloader.js trunk/javascript/yui/json/ trunk/javascript/yui/json/README trunk/javascript/yui/json/json-debug.js trunk/javascript/yui/json/json-min.js trunk/javascript/yui/json/json.js trunk/javascript/yui/layout/ trunk/javascript/yui/layout/README trunk/javascript/yui/layout/assets/ trunk/javascript/yui/layout/assets/layout-core.css trunk/javascript/yui/layout/assets/skins/ trunk/javascript/yui/layout/assets/skins/sam/ trunk/javascript/yui/layout/assets/skins/sam/layout-skin.css trunk/javascript/yui/layout/assets/skins/sam/layout.css trunk/javascript/yui/layout/assets/skins/sam/layout_sprite.png trunk/javascript/yui/layout/layout-debug.js trunk/javascript/yui/layout/layout-min.js trunk/javascript/yui/layout/layout.js trunk/javascript/yui/logger/ trunk/javascript/yui/logger/README trunk/javascript/yui/logger/assets/ trunk/javascript/yui/logger/assets/logger-core.css trunk/javascript/yui/logger/assets/logger.css trunk/javascript/yui/logger/assets/skins/ trunk/javascript/yui/logger/assets/skins/sam/ trunk/javascript/yui/logger/assets/skins/sam/logger-skin.css trunk/javascript/yui/logger/assets/skins/sam/logger.css trunk/javascript/yui/logger/logger-debug.js trunk/javascript/yui/logger/logger-min.js trunk/javascript/yui/logger/logger.js trunk/javascript/yui/menu/ trunk/javascript/yui/menu/README trunk/javascript/yui/menu/assets/ trunk/javascript/yui/menu/assets/menu-core.css trunk/javascript/yui/menu/assets/menu.css trunk/javascript/yui/menu/assets/menu_down_arrow.png trunk/javascript/yui/menu/assets/menu_down_arrow_disabled.png trunk/javascript/yui/menu/assets/menu_up_arrow.png trunk/javascript/yui/menu/assets/menu_up_arrow_disabled.png trunk/javascript/yui/menu/assets/menubaritem_submenuindicator.png trunk/javascript/yui/menu/assets/menubaritem_submenuindicator_disabled.png trunk/javascript/yui/menu/assets/menubaritem_submenuindicator_selected.png trunk/javascript/yui/menu/assets/menuitem_checkbox.png trunk/javascript/yui/menu/assets/menuitem_checkbox_disabled.png trunk/javascript/yui/menu/assets/menuitem_checkbox_selected.png trunk/javascript/yui/menu/assets/menuitem_submenuindicator.png trunk/javascript/yui/menu/assets/menuitem_submenuindicator_disabled.png trunk/javascript/yui/menu/assets/menuitem_submenuindicator_selected.png trunk/javascript/yui/menu/assets/skins/ trunk/javascript/yui/menu/assets/skins/sam/ trunk/javascript/yui/menu/assets/skins/sam/menu-skin.css trunk/javascript/yui/menu/assets/skins/sam/menu.css trunk/javascript/yui/menu/assets/skins/sam/menubaritem_submenuindicator.png trunk/javascript/yui/menu/assets/skins/sam/menubaritem_submenuindicator_disabled.png trunk/javascript/yui/menu/assets/skins/sam/menuitem_checkbox.png trunk/javascript/yui/menu/assets/skins/sam/menuitem_checkbox_disabled.png trunk/javascript/yui/menu/assets/skins/sam/menuitem_submenuindicator.png trunk/javascript/yui/menu/assets/skins/sam/menuitem_submenuindicator_disabled.png trunk/javascript/yui/menu/menu-debug.js trunk/javascript/yui/menu/menu-min.js trunk/javascript/yui/menu/menu.js trunk/javascript/yui/paginator/ trunk/javascript/yui/paginator/README trunk/javascript/yui/paginator/assets/ trunk/javascript/yui/paginator/assets/paginator-core.css trunk/javascript/yui/paginator/assets/skins/ trunk/javascript/yui/paginator/assets/skins/sam/ trunk/javascript/yui/paginator/assets/skins/sam/paginator-skin.css trunk/javascript/yui/paginator/assets/skins/sam/paginator.css trunk/javascript/yui/paginator/paginator-debug.js trunk/javascript/yui/paginator/paginator-min.js trunk/javascript/yui/paginator/paginator.js trunk/javascript/yui/profiler/ trunk/javascript/yui/profiler/README trunk/javascript/yui/profiler/profiler-debug.js trunk/javascript/yui/profiler/profiler-min.js trunk/javascript/yui/profiler/profiler.js trunk/javascript/yui/profilerviewer/ trunk/javascript/yui/profilerviewer/README trunk/javascript/yui/profilerviewer/assets/ trunk/javascript/yui/profilerviewer/assets/skins/ trunk/javascript/yui/profilerviewer/assets/skins/sam/ trunk/javascript/yui/profilerviewer/assets/skins/sam/asc.gif trunk/javascript/yui/profilerviewer/assets/skins/sam/desc.gif trunk/javascript/yui/profilerviewer/assets/skins/sam/header_background.png trunk/javascript/yui/profilerviewer/assets/skins/sam/profilerviewer.css trunk/javascript/yui/profilerviewer/assets/skins/sam/wait.gif trunk/javascript/yui/profilerviewer/profilerviewer-beta-debug.js trunk/javascript/yui/profilerviewer/profilerviewer-beta-min.js trunk/javascript/yui/profilerviewer/profilerviewer-beta.js trunk/javascript/yui/reset/ trunk/javascript/yui/reset/README trunk/javascript/yui/reset/reset-min.css trunk/javascript/yui/reset/reset.css trunk/javascript/yui/reset-fonts/ trunk/javascript/yui/reset-fonts/README trunk/javascript/yui/reset-fonts/reset-fonts.css trunk/javascript/yui/reset-fonts-grids/ trunk/javascript/yui/reset-fonts-grids/README trunk/javascript/yui/reset-fonts-grids/reset-fonts-grids.css trunk/javascript/yui/resize/ trunk/javascript/yui/resize/README trunk/javascript/yui/resize/assets/ trunk/javascript/yui/resize/assets/resize-core.css trunk/javascript/yui/resize/assets/skins/ trunk/javascript/yui/resize/assets/skins/sam/ trunk/javascript/yui/resize/assets/skins/sam/layout_sprite.png trunk/javascript/yui/resize/assets/skins/sam/resize-skin.css trunk/javascript/yui/resize/assets/skins/sam/resize.css trunk/javascript/yui/resize/resize-debug.js trunk/javascript/yui/resize/resize-min.js trunk/javascript/yui/resize/resize.js trunk/javascript/yui/selector/ trunk/javascript/yui/selector/README trunk/javascript/yui/selector/selector-beta-debug.js trunk/javascript/yui/selector/selector-beta-min.js trunk/javascript/yui/selector/selector-beta.js trunk/javascript/yui/slider/ trunk/javascript/yui/slider/README trunk/javascript/yui/slider/assets/ trunk/javascript/yui/slider/assets/bg-fader.gif trunk/javascript/yui/slider/assets/bg-h.gif trunk/javascript/yui/slider/assets/bg-v-e.gif trunk/javascript/yui/slider/assets/bg-v.gif trunk/javascript/yui/slider/assets/left-thumb.png trunk/javascript/yui/slider/assets/right-thumb.png trunk/javascript/yui/slider/assets/skins/ trunk/javascript/yui/slider/assets/skins/sam/ trunk/javascript/yui/slider/assets/skins/sam/slider-skin.css trunk/javascript/yui/slider/assets/skins/sam/slider.css trunk/javascript/yui/slider/assets/slider-core.css trunk/javascript/yui/slider/assets/thumb-bar.gif trunk/javascript/yui/slider/assets/thumb-e.gif trunk/javascript/yui/slider/assets/thumb-fader.gif trunk/javascript/yui/slider/assets/thumb-n.gif trunk/javascript/yui/slider/assets/thumb-s.gif trunk/javascript/yui/slider/assets/thumb-w.gif trunk/javascript/yui/slider/slider-debug.js trunk/javascript/yui/slider/slider-min.js trunk/javascript/yui/slider/slider.js trunk/javascript/yui/tabview/ trunk/javascript/yui/tabview/README trunk/javascript/yui/tabview/assets/ trunk/javascript/yui/tabview/assets/border_tabs.css trunk/javascript/yui/tabview/assets/loading.gif trunk/javascript/yui/tabview/assets/skin-sam.css trunk/javascript/yui/tabview/assets/skins/ trunk/javascript/yui/tabview/assets/skins/sam/ trunk/javascript/yui/tabview/assets/skins/sam/tabview-skin.css trunk/javascript/yui/tabview/assets/skins/sam/tabview.css trunk/javascript/yui/tabview/assets/tabview-core.css trunk/javascript/yui/tabview/assets/tabview.css trunk/javascript/yui/tabview/tabview-debug.js trunk/javascript/yui/tabview/tabview-min.js trunk/javascript/yui/tabview/tabview.js trunk/javascript/yui/treeview/ trunk/javascript/yui/treeview/README trunk/javascript/yui/treeview/assets/ trunk/javascript/yui/treeview/assets/skins/ trunk/javascript/yui/treeview/assets/skins/sam/ trunk/javascript/yui/treeview/assets/skins/sam/loading.gif trunk/javascript/yui/treeview/assets/skins/sam/treeview-loading.gif trunk/javascript/yui/treeview/assets/skins/sam/treeview-skin.css trunk/javascript/yui/treeview/assets/skins/sam/treeview-sprite.gif trunk/javascript/yui/treeview/assets/skins/sam/treeview.css trunk/javascript/yui/treeview/assets/sprite-menu.gif trunk/javascript/yui/treeview/assets/sprite-orig.gif trunk/javascript/yui/treeview/assets/treeview-core.css trunk/javascript/yui/treeview/assets/treeview-loading.gif trunk/javascript/yui/treeview/assets/treeview-menu.css trunk/javascript/yui/treeview/assets/treeview.css trunk/javascript/yui/treeview/treeview-debug.js trunk/javascript/yui/treeview/treeview-min.js trunk/javascript/yui/treeview/treeview.js trunk/javascript/yui/uploader/ trunk/javascript/yui/uploader/README trunk/javascript/yui/uploader/assets/ trunk/javascript/yui/uploader/assets/uploader.swf trunk/javascript/yui/uploader/uploader-experimental-debug.js trunk/javascript/yui/uploader/uploader-experimental-min.js trunk/javascript/yui/uploader/uploader-experimental.js trunk/javascript/yui/utilities/ trunk/javascript/yui/utilities/README trunk/javascript/yui/utilities/utilities.js trunk/javascript/yui/yahoo/ trunk/javascript/yui/yahoo/README trunk/javascript/yui/yahoo/yahoo-debug.js trunk/javascript/yui/yahoo/yahoo-min.js trunk/javascript/yui/yahoo/yahoo.js trunk/javascript/yui/yahoo-dom-event/ trunk/javascript/yui/yahoo-dom-event/README trunk/javascript/yui/yahoo-dom-event/yahoo-dom-event.js trunk/javascript/yui/yuiloader/ trunk/javascript/yui/yuiloader/README trunk/javascript/yui/yuiloader/yuiloader-debug.js trunk/javascript/yui/yuiloader/yuiloader-min.js trunk/javascript/yui/yuiloader/yuiloader.js trunk/javascript/yui/yuiloader-dom-event/ trunk/javascript/yui/yuiloader-dom-event/README trunk/javascript/yui/yuiloader-dom-event/yuiloader-dom-event.js trunk/javascript/yui/yuitest/ trunk/javascript/yui/yuitest/README trunk/javascript/yui/yuitest/assets/ trunk/javascript/yui/yuitest/assets/skins/ trunk/javascript/yui/yuitest/assets/skins/sam/ trunk/javascript/yui/yuitest/assets/skins/sam/yuitest-skin.css trunk/javascript/yui/yuitest/assets/skins/sam/yuitest.css trunk/javascript/yui/yuitest/assets/testlogger.css trunk/javascript/yui/yuitest/assets/yuitest-core.css trunk/javascript/yui/yuitest/yuitest-debug.js trunk/javascript/yui/yuitest/yuitest-min.js trunk/javascript/yui/yuitest/yuitest.js trunk/javascript/yui/yuitest/yuitest_core-debug.js trunk/javascript/yui/yuitest/yuitest_core-min.js trunk/javascript/yui/yuitest/yuitest_core.js Added: trunk/javascript/yui/animation/README =================================================================== --- trunk/javascript/yui/animation/README (rev 0) +++ trunk/javascript/yui/animation/README 2008-10-23 18:14:44 UTC (rev 757) @@ -0,0 +1,71 @@ +Animation Release Notes + +*** version 2.6.0 *** +* ColorAnim updated to use getAncestorBy + +*** version 2.5.2 *** +* no change + +*** version 2.5.1 *** +* no change + +*** version 2.5.0 *** +* replace toString overrides with static NAME property + +*** version 2.4.0 *** +* calling stop() on an non-animated Anim no longer fires onComplete + +*** version 2.3.1 *** +* no change + +*** version 2.3.0 *** + +* duration of zero now executes 1 frame animation +* added setEl() method to enable reuse +* fixed stop() for multiple animations + +*** version 2.3.0 *** +* duration of zero now executes 1 frame animation +* added setEl() method to enable reuse +* fixed stop() for multiple animations + +*** version 2.2.2 *** +* no change + +*** version 2.2.1 *** +* no change + +*** version 2.2.0 *** +* Fixed AnimMgr.stop() when called without tween + +*** version 0.12.2 *** +* raised AnimMgr.fps to 1000 + +*** version 0.12.1 *** +* minified version no longer strips line breaks + +*** version 0.12.0 *** +* added boolean finish argument to Anim.stop() + +*** version 0.11.3 *** +* no changes + +*** version 0.11.1 *** +* changed "prototype" shorthand to "proto" (workaround firefox < 1.5 scoping +bug) + +*** version 0.11.0 *** +* ColorAnim subclass added +* Motion and Scroll now inherit from ColorAnim +* getDefaultUnit method added +* defaultUnit and defaultUnits deprecated +* getDefault and setDefault methods deprecated + +*** version 0.10.0 *** +* Scroll now handles relative ("by") animation correctly +* Now converts "auto" values of "from" to appropriate initial values + +*** version 0.9.0 *** +* Initial release + + Added: trunk/javascript/yui/animation/animation-debug.js =================================================================== --- trunk/javascript/yui/animation/animation-debug.js (rev 0) +++ trunk/javascript/yui/animation/animation-debug.js 2008-10-23 18:14:44 UTC (rev 757) @@ -0,0 +1,1385 @@ +/* +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.6.0 +*/ +(function() { + +var Y = YAHOO.util; + +/* +Copyright (c) 2006, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +*/ + +/** + * The animation module provides allows effects to be added to HTMLElements. + * @module animation + * @requires yahoo, event, dom + */ + +/** + * + * Base animation class that provides the interface for building animated effects. + * <p>Usage: var myAnim = new YAHOO.util.Anim(el, { width: { from: 10, to: 100 } }, 1, YAHOO.util.Easing.easeOut);</p> + * @class Anim + * @namespace YAHOO.util + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @constructor + * @param {String | HTMLElement} el Reference to the element that will be animated + * @param {Object} attributes The attribute(s) to be animated. + * Each attribute is an object with at minimum a "to" or "by" member defined. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based + * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) + */ + +var Anim = function(el, attributes, duration, method) { + if (!el) { + YAHOO.log('element required to create Anim instance', 'error', 'Anim'); + } + this.init(el, attributes, duration, method); +}; + +Anim.NAME = 'Anim'; + +Anim.prototype = { + /** + * Provides a readable name for the Anim instance. + * @method toString + * @return {String} + */ + toString: function() { + var el = this.getEl() || {}; + var id = el.id || el.tagName; + return (this.constructor.NAME + ': ' + id); + }, + + patterns: { // cached for performance + noNegatives: /width|height|opacity|padding/i, // keep at zero or above + offsetAttribute: /^((width|height)|(top|left))$/, // use offsetValue as default + defaultUnit: /width|height|top$|bottom$|left$|right$/i, // use 'px' by default + offsetUnit: /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i // IE may return these, so convert these to offset + }, + + /** + * Returns the value computed by the animation's "method". + * @method doMethod + * @param {String} attr The name of the attribute. + * @param {Number} start The value this attribute should start from for this animation. + * @param {Number} end The value this attribute should end at for this animation. + * @return {Number} The Value to be applied to the attribute. + */ + doMethod: function(attr, start, end) { + return this.method(this.currentFrame, start, end - start, this.totalFrames); + }, + + /** + * Applies a value to an attribute. + * @method setAttribute + * @param {String} attr The name of the attribute. + * @param {Number} val The value to be applied to the attribute. + * @param {String} unit The unit ('px', '%', etc.) of the value. + */ + setAttribute: function(attr, val, unit) { + if ( this.patterns.noNegatives.test(attr) ) { + val = (val > 0) ? val : 0; + } + + Y.Dom.setStyle(this.getEl(), attr, val + unit); + }, + + /** + * Returns current value of the attribute. + * @method getAttribute + * @param {String} attr The name of the attribute. + * @return {Number} val The current value of the attribute. + */ + getAttribute: function(attr) { + var el = this.getEl(); + var val = Y.Dom.getStyle(el, attr); + + if (val !== 'auto' && !this.patterns.offsetUnit.test(val)) { + return parseFloat(val); + } + + var a = this.patterns.offsetAttribute.exec(attr) || []; + var pos = !!( a[3] ); // top or left + var box = !!( a[2] ); // width or height + + // use offsets for width/height and abs pos top/left + if ( box || (Y.Dom.getStyle(el, 'position') == 'absolute' && pos) ) { + val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)]; + } else { // default to zero for other 'auto' + val = 0; + } + + return val; + }, + + /** + * Returns the unit to use when none is supplied. + * @method getDefaultUnit + * @param {attr} attr The name of the attribute. + * @return {String} The default unit to be used. + */ + getDefaultUnit: function(attr) { + if ( this.patterns.defaultUnit.test(attr) ) { + return 'px'; + } + + return ''; + }, + + /** + * Sets the actual values to be used during the animation. Should only be needed for subclass use. + * @method setRuntimeAttribute + * @param {Object} attr The attribute object + * @private + */ + setRuntimeAttribute: function(attr) { + var start; + var end; + var attributes = this.attributes; + + this.runtimeAttributes[attr] = {}; + + var isset = function(prop) { + return (typeof prop !== 'undefined'); + }; + + if ( !isset(attributes[attr]['to']) && !isset(attributes[attr]['by']) ) { + return false; // note return; nothing to animate to + } + + start = ( isset(attributes[attr]['from']) ) ? attributes[attr]['from'] : this.getAttribute(attr); + + // To beats by, per SMIL 2.1 spec + if ( isset(attributes[attr]['to']) ) { + end = attributes[attr]['to']; + } else if ( isset(attributes[attr]['by']) ) { + if (start.constructor == Array) { + end = []; + for (var i = 0, len = start.length; i < len; ++i) { + end[i] = start[i] + attributes[attr]['by'][i] * 1; // times 1 to cast "by" + } + } else { + end = start + attributes[attr]['by'] * 1; + } + } + + this.runtimeAttributes[attr].start = start; + this.runtimeAttributes[attr].end = end; + + // set units if needed + this.runtimeAttributes[attr].unit = ( isset(attributes[attr].unit) ) ? + attributes[attr]['unit'] : this.getDefaultUnit(attr); + return true; + }, + + /** + * Constructor for Anim instance. + * @method init + * @param {String | HTMLElement} el Reference to the element that will be animated + * @param {Object} attributes The attribute(s) to be animated. + * Each attribute is an object with at minimum a "to" or "by" member defined. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based + * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) + */ + init: function(el, attributes, duration, method) { + /** + * Whether or not the animation is running. + * @property isAnimated + * @private + * @type Boolean + */ + var isAnimated = false; + + /** + * A Date object that is created when the animation begins. + * @property startTime + * @private + * @type Date + */ + var startTime = null; + + /** + * The number of frames this animation was able to execute. + * @property actualFrames + * @private + * @type Int + */ + var actualFrames = 0; + + /** + * The element to be animated. + * @property el + * @private + * @type HTMLElement + */ + el = Y.Dom.get(el); + + /** + * The collection of attributes to be animated. + * Each attribute must have at least a "to" or "by" defined in order to animate. + * If "to" is supplied, the animation will end with the attribute at that value. + * If "by" is supplied, the animation will end at that value plus its starting value. + * If both are supplied, "to" is used, and "by" is ignored. + * Optional additional member include "from" (the value the attribute should start animating from, defaults to current value), and "unit" (the units to apply to the values). + * @property attributes + * @type Object + */ + this.attributes = attributes || {}; + + /** + * The length of the animation. Defaults to "1" (second). + * @property duration + * @type Number + */ + this.duration = !YAHOO.lang.isUndefined(duration) ? duration : 1; + + /** + * The method that will provide values to the attribute(s) during the animation. + * Defaults to "YAHOO.util.Easing.easeNone". + * @property method + * @type Function + */ + this.method = method || Y.Easing.easeNone; + + /** + * Whether or not the duration should be treated as seconds. + * Defaults to true. + * @property useSeconds + * @type Boolean + */ + this.useSeconds = true; // default to seconds + + /** + * The location of the current animation on the timeline. + * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time. + * @property currentFrame + * @type Int + */ + this.currentFrame = 0; + + /** + * The total number of frames to be executed. + * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time. + * @property totalFrames + * @type Int + */ + this.totalFrames = Y.AnimMgr.fps; + + /** + * Changes the animated element + * @method setEl + */ + this.setEl = function(element) { + el = Y.Dom.get(element); + }; + + /** + * Returns a reference to the animated element. + * @method getEl + * @return {HTMLElement} + */ + this.getEl = function() { return el; }; + + /** + * Checks whether the element is currently animated. + * @method isAnimated + * @return {Boolean} current value of isAnimated. + */ + this.isAnimated = function() { + return isAnimated; + }; + + /** + * Returns the animation start time. + * @method getStartTime + * @return {Date} current value of startTime. + */ + this.getStartTime = function() { + return startTime; + }; + + this.runtimeAttributes = {}; + + var logger = {}; + logger.log = function() {YAHOO.log.apply(window, arguments)}; + + logger.log('creating new instance of ' + this); + + /** + * Starts the animation by registering it with the animation manager. + * @method animate + */ + this.animate = function() { + if ( this.isAnimated() ) { + return false; + } + + this.currentFrame = 0; + + this.totalFrames = ( this.useSeconds ) ? Math.ceil(Y.AnimMgr.fps * this.duration) : this.duration; + + if (this.duration === 0 && this.useSeconds) { // jump to last frame if zero second duration + this.totalFrames = 1; + } + Y.AnimMgr.registerElement(this); + return true; + }; + + /** + * Stops the animation. Normally called by AnimMgr when animation completes. + * @method stop + * @param {Boolean} finish (optional) If true, animation will jump to final frame. + */ + this.stop = function(finish) { + if (!this.isAnimated()) { // nothing to stop + return false; + } + + if (finish) { + this.currentFrame = this.totalFrames; + this._onTween.fire(); + } + Y.AnimMgr.stop(this); + }; + + var onStart = function() { + this.onStart.fire(); + + this.runtimeAttributes = {}; + for (var attr in this.attributes) { + this.setRuntimeAttribute(attr); + } + + isAnimated = true; + actualFrames = 0; + startTime = new Date(); + }; + + /** + * Feeds the starting and ending values for each animated attribute to doMethod once per frame, then applies the resulting value to the attribute(s). + * @private + */ + + var onTween = function() { + var data = { + duration: new Date() - this.getStartTime(), + currentFrame: this.currentFrame + }; + + data.toString = function() { + return ( + 'duration: ' + data.duration + + ', currentFrame: ' + data.currentFrame + ); + }; + + this.onTween.fire(data); + + var runtimeAttributes = this.runtimeAttributes; + + for (var attr in runtimeAttributes) { + this.setAttribute(attr, this.doMethod(attr, runtimeAttributes[attr].start, runtimeAttributes[attr].end), runtimeAttributes[attr].unit); + } + + actualFrames += 1; + }; + + var onComplete = function() { + var actual_duration = (new Date() - startTime) / 1000 ; + + var data = { + duration: actual_duration, + frames: actualFrames, + fps: actualFrames / actual_duration + }; + + data.toString = function() { + return ( + 'duration: ' + data.duration + + ', frames: ' + data.frames + + ', fps: ' + data.fps + ); + }; + + isAnimated = false; + actualFrames = 0; + this.onComplete.fire(data); + }; + + /** + * Custom event that fires after onStart, useful in subclassing + * @private + */ + this._onStart = new Y.CustomEvent('_start', this, true); + + /** + * Custom event that fires when animation begins + * Listen via subscribe method (e.g. myAnim.onStart.subscribe(someFunction) + * @event onStart + */ + this.onStart = new Y.CustomEvent('start', this); + + /** + * Custom event that fires between each frame + * Listen via subscribe method (e.g. myAnim.onTween.subscribe(someFunction) + * @event onTween + */ + this.onTween = new Y.CustomEvent('tween', this); + + /** + * Custom event that fires after onTween + * @private + */ + this._onTween = new Y.CustomEvent('_tween', this, true); + + /** + * Custom event that fires when animation ends + * Listen via subscribe method (e.g. myAnim.onComplete.subscribe(someFunction) + * @event onComplete + */ + this.onComplete = new Y.CustomEvent('complete', this); + /** + * Custom event that fires after onComplete + * @private + */ + this._onComplete = new Y.CustomEvent('_complete', this, true); + + this._onStart.subscribe(onStart); + this._onTween.subscribe(onTween); + this._onComplete.subscribe(onComplete); + } +}; + + Y.Anim = Anim; +})(); +/** + * Handles animation queueing and threading. + * Used by Anim and subclasses. + * @class AnimMgr + * @namespace YAHOO.util + */ +YAHOO.util.AnimMgr = new function() { + /** + * Reference to the animation Interval. + * @property thread + * @private + * @type Int + */ + var thread = null; + + /** + * The current queue of registered animation objects. + * @property queue + * @private + * @type Array + */ + var queue = []; + + /** + * The number of active animations. + * @property tweenCount + * @private + * @type Int + */ + var tweenCount = 0; + + /** + * Base frame rate (frames per second). + * Arbitrarily high for better x-browser calibration (slower browsers drop more frames). + * @property fps + * @type Int + * + */ + this.fps = 1000; + + /** + * Interval delay in milliseconds, defaults to fastest possible. + * @property delay + * @type Int + * + */ + this.delay = 1; + + /** + * Adds an animation instance to the animation queue. + * All animation instances must be registered in order to animate. + * @method registerElement + * @param {object} tween The Anim instance to be be registered + */ + this.registerElement = function(tween) { + queue[queue.length] = tween; + tweenCount += 1; + tween._onStart.fire(); + this.start(); + }; + + /** + * removes an animation instance from the animation queue. + * All animation instances must be registered in order to animate. + * @method unRegister + * @param {object} tween The Anim instance to be be registered + * @param {Int} index The index of the Anim instance + * @private + */ + this.unRegister = function(tween, index) { + index = index || getIndex(tween); + if (!tween.isAnimated() || index == -1) { + return false; + } + + tween._onComplete.fire(); + queue.splice(index, 1); + + tweenCount -= 1; + if (tweenCount <= 0) { + this.stop(); + } + + return true; + }; + + /** + * Starts the animation thread. + * Only one thread can run at a time. + * @method start + */ + this.start = function() { + if (thread === null) { + thread = setInterval(this.run, this.delay); + } + }; + + /** + * Stops the animation thread or a specific animation instance. + * @method stop + * @param {object} tween A specific Anim instance to stop (optional) + * If no instance given, Manager stops thread and all animations. + */ + this.stop = function(tween) { + if (!tween) { + clearInterval(thread); + + for (var i = 0, len = queue.length; i < len; ++i) { + this.unRegister(queue[0], 0); + } + + queue = []; + thread = null; + tweenCount = 0; + } + else { + this.unRegister(tween); + } + }; + + /** + * Called per Interval to handle each animation frame. + * @method run + */ + this.run = function() { + for (var i = 0, len = queue.length; i < len; ++i) { + var tween = queue[i]; + if ( !tween || !tween.isAnimated() ) { continue; } + + if (tween.currentFrame < tween.totalFrames || tween.totalFrames === null) + { + tween.currentFrame += 1; + + if (tween.useSeconds) { + correctFrame(tween); + } + tween._onTween.fire(); + } + else { YAHOO.util.AnimMgr.stop(tween, i); } + } + }; + + var getIndex = function(anim) { + for (var i = 0, len = queue.length; i < len; ++i) { + if (queue[i] == anim) { + return i; // note return; + } + } + return -1; + }; + + /** + * On the fly frame correction to keep animation on time. + * @method correctFrame + * @private + * @param {Object} tween The Anim instance being corrected. + */ + var correctFrame = function(tween) { + var frames = tween.totalFrames; + var frame = tween.currentFrame; + var expected = (tween.currentFrame * tween.duration * 1000 / tween.totalFrames); + var elapsed = (new Date() - tween.getStartTime()); + var tweak = 0; + + if (elapsed < tween.duration * 1000) { // check if falling behind + tweak = Math.round((elapsed / expected - 1) * tween.currentFrame); + } else { // went over duration, so jump to end + tweak = frames - (frame + 1); + } + if (tweak > 0 && isFinite(tweak)) { // adjust if needed + if (tween.currentFrame + tweak >= frames) {// dont go past last frame + tweak = frames - (frame + 1); + } + + tween.currentFrame += tweak; + } + }; +}; +/** + * Used to calculate Bezier splines for any number of control points. + * @class Bezier + * @namespace YAHOO.util + * + */ +YAHOO.util.Bezier = new function() { + /** + * Get the current position of the animated element based on t. + * Each point is an array of "x" and "y" values (0 = x, 1 = y) + * At least 2 points are required (start and end). + * First point is start. Last point is end. + * Additional control points are optional. + * @method getPosition + * @param {Array} points An array containing Bezier points + * @param {Number} t A number between 0 and 1 which is the basis for determining current position + * @return {Array} An array containing int x and y member data + */ + this.getPosition = function(points, t) { + var n = points.length; + var tmp = []; + + for (var i = 0; i < n; ++i){ + tmp[i] = [points[i][0], points[i][1]]; // save input + } + + for (var j = 1; j < n; ++j) { + for (i = 0; i < n - j; ++i) { + tmp[i][0] = (1 - t) * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0]; + tmp[i][1] = (1 - t) * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1]; + } + } + + return [ tmp[0][0], tmp[0][1] ]; + + }; +}; +(function() { +/** + * Anim subclass for color transitions. + * <p>Usage: <code>var myAnim = new Y.ColorAnim(el, { backgroundColor: { from: '#FF0000', to: '#FFFFFF' } }, 1, Y.Easing.easeOut);</code> Color values can be specified with either 112233, #112233, + * [255,255,255], or rgb(255,255,255)</p> + * @class ColorAnim + * @namespace YAHOO.util + * @requires YAHOO.util.Anim + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Bezier + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @constructor + * @extends YAHOO.util.Anim + * @param {HTMLElement | String} el Reference to the element that will be animated + * @param {Object} attributes The attribute(s) to be animated. + * Each attribute is an object with at minimum a "to" or "by" member defined. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based + * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) + */ + var ColorAnim = function(el, attributes, duration, method) { + ColorAnim.superclass.constructor.call(this, el, attributes, duration, method); + }; + + ColorAnim.NAME = 'ColorAnim'; + + ColorAnim.DEFAULT_BGCOLOR = '#fff'; + // shorthand + var Y = YAHOO.util; + YAHOO.extend(ColorAnim, Y.Anim); + + var superclass = ColorAnim.superclass; + var proto = ColorAnim.prototype; + + proto.patterns.color = /color$/i; + proto.patterns.rgb = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i; + proto.patterns.hex = /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i; + proto.patterns.hex3 = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i; + proto.patterns.transparent = /^transparent|rgba\(0, 0, 0, 0\)$/; // need rgba for safari + + /** + * Attempts to parse the given string and return a 3-tuple. + * @method parseColor + * @param {String} s The string to parse. + * @return {Array} The 3-tuple of rgb values. + */ + proto.parseColor = function(s) { + if (s.length == 3) { return s; } + + var c = this.patterns.hex.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1], 16), parseInt(c[2], 16), parseInt(c[3], 16) ]; + } + + c = this.patterns.rgb.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1], 10), parseInt(c[2], 10), parseInt(c[3], 10) ]; + } + + c = this.patterns.hex3.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1] + c[1], 16), parseInt(c[2] + c[2], 16), parseInt(c[3] + c[3], 16) ]; + } + + return null; + }; + + proto.getAttribute = function(attr) { + var el = this.getEl(); + if (this.patterns.color.test(attr) ) { + var val = YAHOO.util.Dom.getStyle(el, attr); + + var that = this; + if (this.patterns.transparent.test(val)) { // bgcolor default + var parent = YAHOO.util.Dom.getAncestorBy(el, function(node) { + return !that.patterns.transparent.test(val); + }); + + if (parent) { + val = Y.Dom.getStyle(parent, attr); + } else { + val = ColorAnim.DEFAULT_BGCOLOR; + } + } + } else { + val = superclass.getAttribute.call(this, attr); + } + + return val; + }; + + proto.doMethod = function(attr, start, end) { + var val; + + if ( this.patterns.color.test(attr) ) { + val = []; + for (var i = 0, len = start.length; i < len; ++i) { + val[i] = superclass.doMethod.call(this, attr, start[i], end[i]); + } + + val = 'rgb('+Math.floor(val[0])+','+Math.floor(val[1])+','+Math.floor(val[2])+')'; + } + else { + val = superclass.doMethod.call(this, attr, start, end); + } + + return val; + }; + + proto.setRuntimeAttribute = function(attr) { + superclass.setRuntimeAttribute.call(this, attr); + + if ( this.patterns.color.test(attr) ) { + var attributes = this.attributes; + var start = this.parseColor(this.runtimeAttributes[attr].start); + var end = this.parseColor(this.runtimeAttributes[attr].end); + // fix colors if going "by" + if ( typeof attributes[attr]['to'] === 'undefined' && typeof attributes[attr]['by'] !== 'undefined' ) { + end = this.parseColor(attributes[attr].by); + + for (var i = 0, len = start.length; i < len; ++i) { + end[i] = start[i] + end[i]; + } + } + + this.runtimeAttributes[attr].start = start; + this.runtimeAttributes[attr].end = end; + } + }; + + Y.ColorAnim = ColorAnim; +})(); +/*! +TERMS OF USE - EASING EQUATIONS +Open source under the BSD License. +Copyright 2001 Robert Penner All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** + * Singleton that determines how an animation proceeds from start to end. + * @class Easing + * @namespace YAHOO.util +*/ + +YAHOO.util.Easing = { + + /** + * Uniform speed between points. + * @method easeNone + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeNone: function (t, b, c, d) { + return c*t/d + b; + }, + + /** + * Begins slowly and accelerates towards end. + * @method easeIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeIn: function (t, b, c, d) { + return c*(t/=d)*t + b; + }, + + /** + * Begins quickly and decelerates towards end. + * @method easeOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeOut: function (t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }, + + /** + * Begins slowly and decelerates towards end. + * @method easeBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeBoth: function (t, b, c, d) { + if ((t/=d/2) < 1) { + return c/2*t*t + b; + } + + return -c/2 * ((--t)*(t-2) - 1) + b; + }, + + /** + * Begins slowly and accelerates towards end. + * @method easeInStrong + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeInStrong: function (t, b, c, d) { + return c*(t/=d)*t*t*t + b; + }, + + /** + * Begins quickly and decelerates towards end. + * @method easeOutStrong + * @param {Number} t Time value used to compute current value + * @param {Numb... [truncated message content] |
From: <al...@us...> - 2008-10-23 18:03:40
|
Revision: 756 http://sciret.svn.sourceforge.net/sciret/?rev=756&view=rev Author: alpeb Date: 2008-10-23 18:03:33 +0000 (Thu, 23 Oct 2008) Log Message: ----------- upgraded YUI to 2.6.0, and removed everything but the build dir Removed Paths: ------------- trunk/javascript/yui/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-23 18:02:17
|
Revision: 755 http://sciret.svn.sourceforge.net/sciret/?rev=755&view=rev Author: alpeb Date: 2008-10-23 18:02:08 +0000 (Thu, 23 Oct 2008) Log Message: ----------- use YUI's calendar widget instead of the older one Modified Paths: -------------- trunk/templates/EditBookmark.tpl Modified: trunk/templates/EditBookmark.tpl =================================================================== --- trunk/templates/EditBookmark.tpl 2008-10-23 17:45:25 UTC (rev 754) +++ trunk/templates/EditBookmark.tpl 2008-10-23 18:02:08 UTC (rev 755) @@ -66,11 +66,14 @@ [l]Expiration Date[/l]: </td> <td> - <input type="hidden" id="hiddenDate" name="expDate" value="{expDate}" /> - <span id="dateShow">{expDateContents}</span> - <img src="images/datepopup.gif" id="expDateButton" style="cursor:pointer" /> - <span id="labelSetDate" style="display:{labelSetExpDateDisplay}">([l]Currently none.<br />Click icon to set one.[/l])</span> - <a id="removeDateLink" href="javascript:void(0);" onclick="removeExpirationDate();" style="display:{removeExpDateLinkDisplay}; font-weight:bold; font-size:10px">[l]Remove expiration date[/l]</a> + <div style="position:relative"> + <input type="hidden" id="hiddenDate" name="expDate" value="{expDate}" /> + <span id="dateShow">{expDateContents}</span> + <img src="images/datepopup.gif" id="expDateButton" style="cursor:pointer" /> + <div id="expirationCalContainer" style="display:none; position:absolute; left:10px; z-index:1"></div> + <span id="labelSetDate" style="display:{labelSetExpDateDisplay}">([l]Currently none.<br />Click icon to set one.[/l])</span> + <a id="removeDateLink" href="javascript:void(0);" onclick="removeArticeExpiration();" style="display:{removeExpDateLinkDisplay}; font-weight:bold; font-size:10px">[l]Remove expiration date[/l]</a> + </div> </td> </tr> <tr class="row_on"> @@ -102,13 +105,36 @@ </table> </form> <script type="text/javascript"> - Calendar.setup( - { - inputField : "hiddenDate", - ifFormat : "%Y-%m-%d", - daFormat : "{jsCalDateFormat}", - button : "expDateButton", - onSelect : dateSelected - } - ); + YAHOO.util.Event.onDOMReady(function() { + YAHOO.util.Event.addListener($("expDateButton"), + "click", + showArticleCalendar); + }); + + function showArticleCalendar() { + var cal = new YAHOO.widget.Calendar("expirationCalContainer", { + close: true + }); + cal.selectEvent.subscribe(articleDateSelected, cal, true); + cal.render(); + cal.show(); + } + + function articleDateSelected(type, args, cal) { + var dates = args[0]; + var date = dates[0]; + var year = date[0], month = date[1], day = date[2]; + $("hiddenDate").value = year + "-" + month + "-" + day; + $('dateShow').innerHTML = formatDate("{jsCalDateFormat}", month, day, year); + cal.hide(); + $('labelSetDate').style.display = 'none'; + $('removeDateLink').style.display = ''; + } + + function removeArticleExpiration() { + $('hiddenDate').value = ''; + $('dateShow').innerHTML = ''; + $('labelSetDate').style.display = ''; + $('removeDateLink').style.display = 'none'; + } </script> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-23 17:45:33
|
Revision: 754 http://sciret.svn.sourceforge.net/sciret/?rev=754&view=rev Author: alpeb Date: 2008-10-23 17:45:25 +0000 (Thu, 23 Oct 2008) Log Message: ----------- use YUI's calendar widget instead of the older one Modified Paths: -------------- trunk/templates/EditArticle.tpl Modified: trunk/templates/EditArticle.tpl =================================================================== --- trunk/templates/EditArticle.tpl 2008-10-23 17:44:06 UTC (rev 753) +++ trunk/templates/EditArticle.tpl 2008-10-23 17:45:25 UTC (rev 754) @@ -15,7 +15,7 @@ <!-- Needed for Menus, Buttons and Overlays used in the Toolbar --> <script type="text/javascript" src="javascript/yui/build/menu/menu-min.js"></script> <!-- Source file for Rich Text Editor--> -<script src="javascript/yui/build/editor/editor-beta-min.js"></script> +<script src="javascript/yui/build/editor/editor-min.js"></script> <h1> <!-- BEGIN addArticleTitle_block --> @@ -78,11 +78,14 @@ </span> </td> <td> - <input type="hidden" id="hiddenDate" name="expDate" value="{expDate}" /> - <span id="dateShow">{expDateContents}</span> - <img src="images/datepopup.gif" id="expDateButton" style="cursor:pointer" /> - <span id="labelSetDate" style="display:{labelSetExpDateDisplay}">([l]Currently none.<br />Click icon to set one.[/l])</span> - <a id="removeDateLink" href="javascript:void(0);" onclick="removeDate();" style="display:{removeExpDateLinkDisplay}; font-weight:bold; font-size:10px">[l]Remove expiration date[/l]</a> + <div style="position:relative"> + <input type="hidden" id="hiddenDate" name="expDate" value="{expDate}" /> + <span id="dateShow">{expDateContents}</span> + <img src="images/datepopup.gif" id="expDateButton" style="cursor:pointer" /> + <div id="expirationCalContainer" style="display:none; position:absolute; left:10px; z-index:1"></div> + <span id="labelSetDate" style="display:{labelSetExpDateDisplay}">([l]Currently none.<br />Click icon to set one.[/l])</span> + <a id="removeDateLink" href="javascript:void(0);" onclick="removeArticleExpiration();" style="display:{removeExpDateLinkDisplay}; font-weight:bold; font-size:10px">[l]Remove expiration date[/l]</a> + </div> </td> </tr> @@ -131,16 +134,39 @@ </table> </form> <script type="text/javascript"> - Calendar.setup( - { - inputField : "hiddenDate", - ifFormat : "%Y-%m-%d", - daFormat : "{jsCalDateFormat}", - button : "expDateButton", - onSelect : dateSelected - } - ); + YAHOO.util.Event.onDOMReady(function() { + YAHOO.util.Event.addListener($("expDateButton"), + "click", + showArticleCalendar); + }); + function showArticleCalendar() { + var cal = new YAHOO.widget.Calendar("expirationCalContainer", { + close: true + }); + cal.selectEvent.subscribe(articleDateSelected, cal, true); + cal.render(); + cal.show(); + } + + function articleDateSelected(type, args, cal) { + var dates = args[0]; + var date = dates[0]; + var year = date[0], month = date[1], day = date[2]; + $("hiddenDate").value = year + "-" + month + "-" + day; + $('dateShow').innerHTML = formatDate("{jsCalDateFormat}", month, day, year); + cal.hide(); + $('labelSetDate').style.display = 'none'; + $('removeDateLink').style.display = ''; + } + + function removeArticleExpiration() { + $('hiddenDate').value = ''; + $('dateShow').innerHTML = ''; + $('labelSetDate').style.display = ''; + $('removeDateLink').style.display = 'none'; + } + function validateForm(form) { if (form.title.value == '') { alert('You cannot leave the Title field empty'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-23 17:44:17
|
Revision: 753 http://sciret.svn.sourceforge.net/sciret/?rev=753&view=rev Author: alpeb Date: 2008-10-23 17:44:06 +0000 (Thu, 23 Oct 2008) Log Message: ----------- fixed month problem in javascript dates Modified Paths: -------------- trunk/javascript/general.js Modified: trunk/javascript/general.js =================================================================== --- trunk/javascript/general.js 2008-10-22 22:06:24 UTC (rev 752) +++ trunk/javascript/general.js 2008-10-23 17:44:06 UTC (rev 753) @@ -360,7 +360,8 @@ */ function formatDate(str, m, d, y) { var _MN = new Array - ("January", + ("", + "January", "February", "March", "April", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-23 00:02:00
|
Revision: 752 http://sciret.svn.sourceforge.net/sciret/?rev=752&view=rev Author: alpeb Date: 2008-10-22 22:06:24 +0000 (Wed, 22 Oct 2008) Log Message: ----------- ammended upgrade to work with new framework Modified Paths: -------------- trunk/actions/Upgrade.php trunk/setup/upgrade_1.9.0.sql Modified: trunk/actions/Upgrade.php =================================================================== --- trunk/actions/Upgrade.php 2008-10-22 21:16:33 UTC (rev 751) +++ trunk/actions/Upgrade.php 2008-10-22 22:06:24 UTC (rev 752) @@ -13,15 +13,13 @@ { var $users; - function dispatch() { - $this->users = new Users(); - if (!($user = $this->users->getValidatedUser($_POST['username'], $_POST['password'], $this->configuration)) || !$user->isAdmin()) { + function dispatch() + { + if (!$this->_getValidatedAdminUser($_POST['username'], $_POST['password'])) { $_SESSION['message'] = $this->user->lang('Wrong Username or Password'); Library::redirect(Library::getLink(array('view' => 'Upgrade'))); } - $this->model = new Model(); - require 'setup/versions.php'; if (!$currentVersion = $this->configuration->getConfigValue('version')) { $currentVersion = 0; @@ -43,6 +41,10 @@ continue; } + if (!$includeFiles) { + continue; + } + $fileName = 'setup/upgrade_'.$version.'.sql'; if ($onlyCheckFiles) { @@ -62,6 +64,33 @@ return $version; } + + /** + * Gotta use this instead of the Users class because the users table + * schema changes between versions + */ + private function _getValidatedAdminUser($username, $password) + { + $version = $this->configuration->getConfigValue('version'); + + if (in_array($version, array(0, '1.1.0'))) { + $query = 'SELECT user_id, firstname, lastname, username, email, admin FROM users WHERE username=? AND password=MD5(?) AND admin=1'; + $idField = 'user_id'; + } else if ($version == '1.2.0') { + $query = 'SELECT user_id, firstname, lastname, username, email, password_changed, admin FROM users WHERE username=? AND password=MD5(?) AND admin=1'; + $idField = 'user_id'; + } else { + $query = 'SELECT id, firstname, lastname, username, email, password_changed, admin FROM users WHERE username=? AND password=MD5(?) AND admin=1'; + $idField = 'id'; + } + + $result = DB::getInstance()->query($query, array($username, $password)); + if ($result->fetch()) { + return true; + } + + return false; + } } ?> Modified: trunk/setup/upgrade_1.9.0.sql =================================================================== --- trunk/setup/upgrade_1.9.0.sql 2008-10-22 21:16:33 UTC (rev 751) +++ trunk/setup/upgrade_1.9.0.sql 2008-10-22 22:06:24 UTC (rev 752) @@ -1,4 +1,3 @@ ALTER TABLE `configuration` CHANGE `value` `value` VARCHAR( 50 ) NOT NULL; ALTER TABLE `files` ADD `virus_checked` TINYINT NOT NULL DEFAULT '0'; ALTER TABLE `users` CHANGE `user_id` `id` INT( 11 ) NOT NULL AUTO_INCREMENT; -UPDATE `configuration` SET `value` = '1.9.0' WHERE `field` = 'version'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-22 21:16:37
|
Revision: 751 http://sciret.svn.sourceforge.net/sciret/?rev=751&view=rev Author: alpeb Date: 2008-10-22 21:16:33 +0000 (Wed, 22 Oct 2008) Log Message: ----------- new version 1.9.0 Modified Paths: -------------- trunk/setup/versions.php Added Paths: ----------- trunk/setup/upgrade_1.9.0.sql Added: trunk/setup/upgrade_1.9.0.sql =================================================================== --- trunk/setup/upgrade_1.9.0.sql (rev 0) +++ trunk/setup/upgrade_1.9.0.sql 2008-10-22 21:16:33 UTC (rev 751) @@ -0,0 +1,4 @@ +ALTER TABLE `configuration` CHANGE `value` `value` VARCHAR( 50 ) NOT NULL; +ALTER TABLE `files` ADD `virus_checked` TINYINT NOT NULL DEFAULT '0'; +ALTER TABLE `users` CHANGE `user_id` `id` INT( 11 ) NOT NULL AUTO_INCREMENT; +UPDATE `configuration` SET `value` = '1.9.0' WHERE `field` = 'version'; Modified: trunk/setup/versions.php =================================================================== --- trunk/setup/versions.php 2008-10-22 20:18:20 UTC (rev 750) +++ trunk/setup/versions.php 2008-10-22 21:16:33 UTC (rev 751) @@ -1,5 +1,5 @@ <?php -$versions = array('1.1.0', '1.2.0'); +$versions = array('1.1.0', '1.2.0', '1.9.0'); ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-22 20:18:28
|
Revision: 750 http://sciret.svn.sourceforge.net/sciret/?rev=750&view=rev Author: alpeb Date: 2008-10-22 20:18:20 +0000 (Wed, 22 Oct 2008) Log Message: ----------- Modified Paths: -------------- trunk/config.ini.php trunk/templates/InstallOk.tpl Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - log.txt + log.txt config.ini.php Modified: trunk/config.ini.php =================================================================== --- trunk/config.ini.php 2008-10-22 20:06:36 UTC (rev 749) +++ trunk/config.ini.php 2008-10-22 20:18:20 UTC (rev 750) @@ -18,11 +18,11 @@ 'params' => array ( 'host' => 'localhost', - 'dbname' => 'sciret_trunk', + 'dbname' => 'sciret', 'username' => 'root', 'password' => '', ), ), ); -?> +?> \ No newline at end of file Modified: trunk/templates/InstallOk.tpl =================================================================== --- trunk/templates/InstallOk.tpl 2008-10-22 20:06:36 UTC (rev 749) +++ trunk/templates/InstallOk.tpl 2008-10-22 20:18:20 UTC (rev 750) @@ -8,16 +8,25 @@ * @packager Keyboard Monkeys */ --> +<div id="head_top"></div> -<div style="text-align:center"> - <table cellpadding="5" cellspacing="0" border="1" style="margin:5px auto;"> - <tr> - <td style="text-align:center">[l]Installation was successful![/l]<br /> - [l]The superadministrator user was created, with the username 'admin' and password 'admin'[/l]<br /> - </td> - </tr> - <tr> - <td style="text-align:center"><input type="button" value="[l]Enter the Knowledge Base!![/l]" onclick="location.href='index.php'" /></td> - </tr> - </table> +<div id="head"> + <div id="logo"><img src="images/logo.jpg" /></div> </div> + +<div id="container"> + <div id="content"> + <div style="text-align:center; margin-top:40px"> + [l]Installation was successful![/l]<br /> + [l]The superadministrator user was created, with the username 'admin' and password 'admin'[/l]<br /> + </div> + <div style="text-align:center; margin-top:40px"> + <input type="button" value="[l]Enter the Knowledge Base!![/l]" onclick="location.href='index.php'" /> + </div> + </div> +</div> +<div id="foot"> + <p>Copyright (C) 2005-2008 Keyboard Monkeys Ltd. Community as a service (TM)</p> +</div> +</body> +</html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-22 20:06:56
|
Revision: 749 http://sciret.svn.sourceforge.net/sciret/?rev=749&view=rev Author: alpeb Date: 2008-10-22 20:06:36 +0000 (Wed, 22 Oct 2008) Log Message: ----------- provide the sample config file Added Paths: ----------- trunk/config.ini.php Removed Paths: ------------- trunk/config.ini.php.template Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - config.ini.php log.txt nbproject + log.txt Added: trunk/config.ini.php =================================================================== --- trunk/config.ini.php (rev 0) +++ trunk/config.ini.php 2008-10-22 20:06:36 UTC (rev 749) @@ -0,0 +1,28 @@ +<?php + + return array ( + 'environment' => + array ( + 'session_name' => 'SCIRET', + 'production' => true, + 'loglevel' => 0, + ), + 'general' => + array ( + 'slowdown_secs' => 0, + 'language_default' => 'English', + ), + 'database' => + array ( + 'adapter' => 'mysqli', + 'params' => + array ( + 'host' => 'localhost', + 'dbname' => 'sciret_trunk', + 'username' => 'root', + 'password' => '', + ), + ), +); + +?> Deleted: trunk/config.ini.php.template =================================================================== --- trunk/config.ini.php.template 2008-10-22 20:03:26 UTC (rev 748) +++ trunk/config.ini.php.template 2008-10-22 20:06:36 UTC (rev 749) @@ -1,28 +0,0 @@ -<?php - - return array ( - 'environment' => - array ( - 'session_name' => 'SCIRET', - 'production' => true, - 'loglevel' => 0, - ), - 'general' => - array ( - 'slowdown_secs' => 0, - 'language_default' => 'English', - ), - 'database' => - array ( - 'adapter' => 'mysqli', - '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-10-22 20:03:41
|
Revision: 748 http://sciret.svn.sourceforge.net/sciret/?rev=748&view=rev Author: alpeb Date: 2008-10-22 20:03:26 +0000 (Wed, 22 Oct 2008) Log Message: ----------- stylized installation Modified Paths: -------------- trunk/templates/InstallEnterCredentials.tpl trunk/templates/NotInstalled.tpl Modified: trunk/templates/InstallEnterCredentials.tpl =================================================================== --- trunk/templates/InstallEnterCredentials.tpl 2008-10-22 14:32:45 UTC (rev 747) +++ trunk/templates/InstallEnterCredentials.tpl 2008-10-22 20:03:26 UTC (rev 748) @@ -8,43 +8,55 @@ * @packager Keyboard Monkeys */ --> +<div id="head_top"></div> +<div id="head"> + <div id="logo"><img src="images/logo.jpg" /></div> +</div> -<div style="text-align:center"> - <form method="post" action="index.php?action=Install&step=1"> - <table cellpadding="3" cellspacing="2" border="0" style="margin:5px auto;"> - <tr> - <td colspan="2" style="color:red; font-weight:bold; text-align:center"> - {ERROR_MSG} - </td> - </tr> - <tr class="th"> - <td colspan="2"><b>[l]Enter your credentials[/l]</b></td> - </tr> - <tr class="row_off"> - <td style="text-align:right">[l]Database Hostname[/l]: </td> - <td><input type="text" name="host" /></td> - </tr> - <tr class="row_on"> - <td style="text-align:right">[l]Database Name[/l]: </td> - <td><input type="text" name="database" /></td> - </tr> - <tr class="row_on"> - <td style="text-align:right">[l]Database Username[/l]: </td> - <td><input type="text" name="username" /></td> - </tr> - <tr class="row_on"> - <td style="text-align:right">[l]Database Username Password[/l]: </td> - <td><input type="password" name="password" /></td> - </tr> - <tr class="row_off"> - <td style="text-align:right">[l]Insert demo data?[/l]: </td> - <td><input type="checkbox" name="demodata" checked="true" /></td> - </tr> - <tr> - <td colspan="2" style="text-align:right"> - <input type="submit" value="[l]Continue[/l]" /> - </td> - </tr> - </table> - </form> +<div id="container"> + <div id="content"> + <div style="text-align:center"> + <h1>[l]Enter your credentials[/l]</h1> + + <form method="post" action="index.php?action=Install&step=1"> + <table cellpadding="3" cellspacing="2" border="1" style="width:30em; margin:5px auto;"> + <tr> + <td colspan="2" style="color:red; font-weight:bold; text-align:center"> + {ERROR_MSG} + </td> + </tr> + <tr> + <td class="form_left">[l]Database Hostname[/l]: </td> + <td><input type="text" name="host" /></td> + </tr> + <tr> + <td class="form_left">[l]Database Name[/l]: </td> + <td><input type="text" name="database" /></td> + </tr> + <tr> + <td class="form_left">[l]Database Username[/l]: </td> + <td><input type="text" name="username" /></td> + </tr> + <tr> + <td class="form_left">[l]Database Username Password[/l]: </td> + <td><input type="password" name="password" /></td> + </tr> + <tr> + <td class="form_left">[l]Insert demo data?[/l]: </td> + <td><input type="checkbox" name="demodata" checked="true" /></td> + </tr> + <tr> + <td colspan="2" style="text-align:right"> + <input type="submit" value="[l]Continue[/l]" /> + </td> + </tr> + </table> + </form> + </div> + </div> </div> +<div id="foot"> + <p>Copyright (C) 2005-2008 Keyboard Monkeys Ltd. Community as a service (TM)</p> +</div> +</body> +</html> Modified: trunk/templates/NotInstalled.tpl =================================================================== --- trunk/templates/NotInstalled.tpl 2008-10-22 14:32:45 UTC (rev 747) +++ trunk/templates/NotInstalled.tpl 2008-10-22 20:03:26 UTC (rev 748) @@ -8,19 +8,24 @@ * @packager Keyboard Monkeys */ --> +<div id="head_top"></div> +<div id="head"> + <div id="logo"><img src="images/logo.jpg" /></div> +</div> -<div style="text-align:center"> -<table cellspacing="0" cellpadding="15" border="1" style="margin:auto"> - <tr> - <td style="text-align:center"> +<div id="container"> + <div id="content"> + <div style="text-align:center; margin-top:40px"> [l]Couldn't connect to the database.[/l]<br /> [l]If this is the first time you enter the Knowledge Base please proceed with the installation.[/l] - </td> - </tr> - <tr> - <td style="text-align:center"> + </div> + <div style="text-align:center; margin-top:40px"> <input type="button" value="[l]Install[/l]" onclick="location.href='index.php?action=Install';" /> - </td> - </tr> -</table> + </div> + </div> </div> +<div id="foot"> + <p>Copyright (C) 2005-2008 Keyboard Monkeys Ltd. Community as a service (TM)</p> +</div> +</body> +</html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-22 14:33:00
|
Revision: 747 http://sciret.svn.sourceforge.net/sciret/?rev=747&view=rev Author: alpeb Date: 2008-10-22 14:32:45 +0000 (Wed, 22 Oct 2008) Log Message: ----------- better error message when trying to delete categories that still have subcats Modified Paths: -------------- trunk/actions/DeleteCategory.php Modified: trunk/actions/DeleteCategory.php =================================================================== --- trunk/actions/DeleteCategory.php 2008-10-21 20:55:21 UTC (rev 746) +++ trunk/actions/DeleteCategory.php 2008-10-22 14:32:45 UTC (rev 747) @@ -24,7 +24,8 @@ } if (!$category->delete()) { - die('unauthorized action'); + $_SESSION['message'] = $this->user->lang('This category can\'t be deleted until its sub-categories are deleted'); + Library::redirect(Library::getLink(array('view' => 'MainView', 'catId' => $catId))); } $_SESSION['message'] = $this->user->lang('Category deleted successfully'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-21 20:55:36
|
Revision: 746 http://sciret.svn.sourceforge.net/sciret/?rev=746&view=rev Author: alpeb Date: 2008-10-21 20:55:21 +0000 (Tue, 21 Oct 2008) Log Message: ----------- couple of bugs Modified Paths: -------------- trunk/actions/DeleteCategory.php trunk/models/Category.php Modified: trunk/actions/DeleteCategory.php =================================================================== --- trunk/actions/DeleteCategory.php 2008-10-21 19:47:40 UTC (rev 745) +++ trunk/actions/DeleteCategory.php 2008-10-21 20:55:21 UTC (rev 746) @@ -17,6 +17,7 @@ function dispatch() { $catId = isset($_GET['catId'])? (int)$_GET['catId'] : 0; $category = new Category($catId); + $parentId = $category->getParentId(); if (!$category->getId()) { $_SESSION['message'] = $this->user->lang('Wrong category ID'); Library::redirect(Library::getLink(array('view' => 'EditCategories'))); @@ -27,7 +28,7 @@ } $_SESSION['message'] = $this->user->lang('Category deleted successfully'); - Library::redirect(Library::getLink(array('view' => 'EditCategories'))); + Library::redirect(Library::getLink(array('view' => 'MainView', 'catId' => $parentId))); } } Modified: trunk/models/Category.php =================================================================== --- trunk/models/Category.php 2008-10-21 19:47:40 UTC (rev 745) +++ trunk/models/Category.php 2008-10-21 20:55:21 UTC (rev 746) @@ -46,7 +46,7 @@ function delete() { $query = 'SELECT cat_id FROM categories WHERE parent_id=?'; $result = DB::getInstance()->query($query, $this->id); - if ($result->getNumRows() > 0) { + if ($result->rowCount() > 0) { return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-21 19:47:44
|
Revision: 745 http://sciret.svn.sourceforge.net/sciret/?rev=745&view=rev Author: alpeb Date: 2008-10-21 19:47:40 +0000 (Tue, 21 Oct 2008) Log Message: ----------- moved the Latest Articles and Most Viewed sections to new tabs in the main view Modified Paths: -------------- trunk/templates/MainView.tpl trunk/templates/footer.tpl trunk/views/MainView.php trunk/views/Rss.php trunk/views/View.php Modified: trunk/templates/MainView.tpl =================================================================== --- trunk/templates/MainView.tpl 2008-10-21 16:56:02 UTC (rev 744) +++ trunk/templates/MainView.tpl 2008-10-21 19:47:40 UTC (rev 745) @@ -23,8 +23,14 @@ <a href="#categories"><em>[l]Categories[/l]</em></a> </li> <li> - <a href="#articles"><em>[l]Articles[/l]</em></a> + <a href="#whatsnew"><em>[l]What's New[/l]</em></a> </li> + <li> + <a href="#popular"><em>[l]Popular[/l]</em></a> + </li> + <li> + <a href="#articles"><em>[l]All Articles[/l]</em></a> + </li> </ul> <div class="yui-content"> <div> @@ -93,10 +99,83 @@ <!-- END requestCat_block --> </div> + <div> <div class="title_view"> <div class="title_content" style="position:relative"> <span> + [l]Latest Articles Added to the Knowledge Base[/l] + </span> + <span style="position:absolute; right:0; top:7px"> + <a href="{latest_rssLink}"><img src="images/rss.gif" /></a></span> + </div> + </div><!--end title_view--> + + + <!-- BEGIN latestArtsItem_block --> + <h2> + <i>({art_num}) </i> + <img src="images/{articleImage}" /> + <a href="{latestLink}">{latestTitle}</a> {bookmark_edit} + <!-- BEGIN latest_question_block --> + ({questionStr}) + <!-- END latest_question_block --> + </h2> + <div> + {modifOrCreated} {latestDate} - {img_stars} {attachment} + </div> + <div class="art_category">{latestCategory}</div> + <p>{art_excerpt}</p> + <div class="author"><span>{art_author}</span></div> + <!-- END latestArtsItem_block --> + <!-- BEGIN latest_noArticles_block --> + <div style="text-align:center; margin-top:15px"> + {noArticlesMessage} + </div> + <!-- END latest_noArticles_block --> + </div> + + <div> + <div class="title_view"> + <div class="title_content" style="position:relative"> + <span> + [l]Most Viewed Articles[/l] + </span> + <span style="position:absolute; right:0; top:7px"> + <a href="{popular_rssLink}"><img src="images/rss.gif" /></a></span> + </div> + </div><!--end title_view--> + + + <!-- BEGIN popularArtsItem_block --> + <h2> + <i>({art_num}) </i> + <img src="images/{articleImage}" /> + <a href="{popularLink}">{popularTitle}</a> + <span style='font-size: 80%'>({popularViews} [l]views[/l])</span> + {bookmark_edit} + <!-- BEGIN popular_question_block --> + ({questionStr}) + <!-- END popular_question_block --> + </h2> + <div> + {modifOrCreated} {popularDate} - {img_stars} {attachment} + </div> + <div class="art_category">{popularCategory}</div> + <p>{art_excerpt}</p> + <div class="author"><span>{art_author}</span></div> + <!-- END popularArtsItem_block --> + <!-- BEGIN popular_noArticles_block --> + <div style="text-align:center; margin-top:15px"> + {noArticlesMessage} + </div> + <!-- END popular_noArticles_block --> + </div> + + <div> + <div class="title_view"> + <div class="title_content" style="position:relative"> + <span> {navigationTitle} {showing} <a href="javascript:void(0)" onclick="addFavorite('location')"><img id="favoriteStarImg" src="images/star.png" alt="[l]Add location to favorites[/l]" title="[l]Add location to favorites[/l]" style="display:{favoriteLocationStarImgDisplay}" /><img id="unFavoriteStarImg" src="images/star_crossed.png" alt="[l]Remove location from favorites[/l]" title="[l]Remove location from favorites[/l]" style="display:{unFavoriteLocationStarImgDisplay}" /><img id="favoriteProgressImg" src="images/progress.gif" style="display:none" /></a> Modified: trunk/templates/footer.tpl =================================================================== --- trunk/templates/footer.tpl 2008-10-21 16:56:02 UTC (rev 744) +++ trunk/templates/footer.tpl 2008-10-21 19:47:40 UTC (rev 745) @@ -98,40 +98,6 @@ <div class="panel_bottom"></div> <!-- END todosLink_block --> - <!-- BEGIN latestArts_block --> - <div class="panel_gray"> - <div class="panel_title_gray"><a href="">[l]Latest[/l]</a></div> - <div class="inside_panel_gray"> - <ol> - <!-- BEGIN latestArtsItem_block --> - <li> - <a href="{latestLink}">{latestTitle} </a><span style='font-size: 80%'>({latestDate})</span><br> - <span class="category">{latestCategory}</span> - </li> - <!-- END latestArtsItem_block --> - </ol> - </div> - </div> - <div class="panel_bottom_gray"></div> - <!-- END latestArts_block --> - - <!-- BEGIN mostViewedArts_block --> - <div class="panel_gray"> - <div class="panel_title_gray"><a href="">[l]Most Viewed[/l]</a></div> - <div class="inside_panel_gray"> - <ol> - <!-- BEGIN mostViewedArtsItem_block --> - <li> - <a href="{mostViewedLink}">{mostViewedTitle} </a><span style='font-size: 80%'>({mostViewedViews} [l]views[/l])</span><br> - <span class="category">{mostViewedCategory}</span> - </li> - <!-- END mostViewedArtsItem_block --> - </ol> - </div> - </div> - <div class="panel_bottom_gray"></div> - <!-- END mostViewedArts_block --> - <!-- BEGIN unansweredQuestions_block --> <div class="panel_gray"> <div class="panel_title_gray"><a href="">[l]Unanswered Questions[/l]</a></div> Modified: trunk/views/MainView.php =================================================================== --- trunk/views/MainView.php 2008-10-21 16:56:02 UTC (rev 744) +++ trunk/views/MainView.php 2008-10-21 19:47:40 UTC (rev 745) @@ -29,7 +29,7 @@ if (!isset($_GET['tab']) || $_GET['tab'] == 'categories') { $_GET['tab'] = 0; } else { - $_GET['tab'] = 1; + $_GET['tab'] = 3; } if (!isset($_GET['set'])) { @@ -69,8 +69,12 @@ $this->tpl->set_file('main', 'MainView.tpl'); $this->tpl->set_block('main', 'articles_block', 'articles'); $this->tpl->set_block('main', 'noArticles_block', 'noArticles'); - $this->tpl->set_block('latestArts_block', 'latestArtsItem_block', 'latestArtsItem'); - $this->tpl->set_block('mostViewedArts_block', 'mostViewedArtsItem_block', 'mostViewedArtsItem'); + $this->tpl->set_block('main', 'latest_noArticles_block', 'latest_noArticles'); + $this->tpl->set_block('main', 'popular_noArticles_block', 'popular_noArticles'); + $this->tpl->set_block('main', 'latestArtsItem_block', 'latestArtsItem'); + $this->tpl->set_block('main', 'popularArtsItem_block', 'popularArtsItem'); + $this->tpl->set_block('latestArtsItem_block', 'latest_question_block', 'latest_question'); + $this->tpl->set_block('popularArtsItem_block', 'popular_question_block', 'popular_question'); $this->tpl->set_block('unansweredQuestions_block', 'unansweredQuestionsItem_block', 'unansweredQuestionsItem'); $this->tpl->set_block('main', 'totalNumArts_block', 'totalNumArts'); @@ -140,6 +144,16 @@ 'view' => 'Rss', 'catId' => $catId, 'items' => 10)), + 'latest_rssLink' => Library::getLink(array( + 'view' => 'Rss', + 'catId' => $catId, + 'latest' => 1, + 'items' => 10)), + 'popular_rssLink' => Library::getLink(array( + 'view' => 'Rss', + 'catId' => $catId, + 'popular' => 1, + 'items' => 10)), 'editCategoryLink' => Library::getLink(array( 'view' => 'EditCategory', 'catId' => $catId)), @@ -421,24 +435,43 @@ $firstIteration = true; while ($article = $articles->fetch()) { unset($this->tPath); - if ($article->getCategoryId() > 0) { - $path = $this->_getCategoryPath($article->getCategoryId(), 'MainView', false); - $this->tpl->set_var('mostViewedCategory', $this->user->lang('in %s', $path)); + $this->tpl->set_var(array( + 'popularLink' => Library::getLink(array('view' => ($article->isBookmark()? 'ViewBookmark' : 'ViewArticle'), 'id' => $article->getId())), + 'popularTitle' => $article->getTitle(), + 'popularViews' => $article->getViews(), + 'popularDate' => $this->user->formatDate($article->getCreationDate()), + 'modifOrCreated' => $article->getModifiedByUserId() > 0? $this->user->lang('Last Modified') : $this->user->lang('Created on'), + 'img_stars' => $article->getTotalVotes()? '<img src="images/'.round($article->getAverageRating()).'stars.png" width="50" height="10" />' : '', + 'attachment' => $article->getNumFiles()? '<img src="images/attach.gif" />' : '', + 'art_excerpt' => strip_tags($article->getExcerpt()).($article->isBookmark()? '' : '...'), + 'art_author' => $article->getCreatedBy(), + )); + + if ($article->isBookmark()) { + $this->tpl->set_var('articleImage', 'bookmark.png'); + } elseif ($article->getQuestion()) { + $this->tpl->set_var('articleImage', 'question.png'); + $this->tpl->set_var('questionStr', $article->getQuestion()); + $this->tpl->parse('popular_question', 'popular_question_block'); } else { - $this->tpl->set_var('mostViewedCategory', ''); + $this->tpl->set_var('articleImage', 'article.png'); + $this->tpl->set_var('popular_question', ''); } - $this->tpl->set_var(array( - 'mostViewedLink' => Library::getLink(array('view' => ($article->isBookmark()? 'ViewBookmark' : 'ViewArticle'), 'id' => $article->getId())), - 'mostViewedTitle' => $article->getTitle(), - 'mostViewedViews' => $article->getViews(), - )); - $this->tpl->parse('mostViewedArtsItem', 'mostViewedArtsItem_block', !$firstIteration); + + if ($article->getCategoryId() == 0) { + $this->tpl->set_var('popularCategory', ''); + } else { + $this->tpl->set_var('popularCategory', $this->user->lang('in %s', $this->_getCategoryPath($article->getCategoryId(), 'MainView', true))); + } + + $this->tpl->parse('popularArtsItem', 'popularArtsItem_block', !$firstIteration); $firstIteration = false; } if ($firstIteration) { - $this->tpl->set_var('mostViewedArts', ''); + $this->tpl->set_var('popularArtsItem', ''); + $this->tpl->parse('popular_noArticles', 'popular_noArticles_block'); } else { - $this->tpl->parse('mostViewedArts', 'mostViewedArts_block'); + $this->tpl->set_var('popular_noArticles', ''); } // ** LATEST LIST ** @@ -446,24 +479,42 @@ $firstIteration = true; while ($article = $articles->fetch()) { unset($this->tPath); - if ($article->getCategoryId() > 0) { - $path = $this->_getCategoryPath($article->getCategoryId(), 'MainView', false); - $this->tpl->set_var('latestCategory', $this->user->lang('in %s', $path)); - } else { - $this->tpl->set_var('latestCategory', ''); - } $this->tpl->set_var(array( 'latestLink' => Library::getLink(array('view' => ($article->isBookmark()? 'ViewBookmark' : 'ViewArticle'), 'id' => $article->getId())), 'latestTitle' => $article->getTitle(), 'latestDate' => $this->user->formatDate($article->getCreationDate()), + 'modifOrCreated' => $article->getModifiedByUserId() > 0? $this->user->lang('Last Modified') : $this->user->lang('Created on'), + 'img_stars' => $article->getTotalVotes()? '<img src="images/'.round($article->getAverageRating()).'stars.png" width="50" height="10" />' : '', + 'attachment' => $article->getNumFiles()? '<img src="images/attach.gif" />' : '', + 'art_excerpt' => strip_tags($article->getExcerpt()).($article->isBookmark()? '' : '...'), + 'art_author' => $article->getCreatedBy(), )); + + if ($article->isBookmark()) { + $this->tpl->set_var('articleImage', 'bookmark.png'); + } elseif ($article->getQuestion()) { + $this->tpl->set_var('articleImage', 'question.png'); + $this->tpl->set_var('questionStr', $article->getQuestion()); + $this->tpl->parse('latest_question', 'latest_question_block'); + } else { + $this->tpl->set_var('articleImage', 'article.png'); + $this->tpl->set_var('latest_question', ''); + } + + if ($article->getCategoryId() == 0) { + $this->tpl->set_var('latestCategory', ''); + } else { + $this->tpl->set_var('latestCategory', $this->user->lang('in %s', $this->_getCategoryPath($article->getCategoryId(), 'MainView', true))); + } + $this->tpl->parse('latestArtsItem', 'latestArtsItem_block', !$firstIteration); $firstIteration = false; } if ($firstIteration) { - $this->tpl->set_var('latestArts', ''); + $this->tpl->set_var('latestArtsItem', ''); + $this->tpl->parse('latest_noArticles', 'latest_noArticles_block'); } else { - $this->tpl->parse('latestArts', 'latestArts_block'); + $this->tpl->set_var('latest_noArticles', ''); } // ** UNANSWERED QUESTIONS LIST ** Modified: trunk/views/Rss.php =================================================================== --- trunk/views/Rss.php 2008-10-21 16:56:02 UTC (rev 744) +++ trunk/views/Rss.php 2008-10-21 19:47:40 UTC (rev 745) @@ -47,12 +47,21 @@ 'version' => $config->getConfigValue('version'), )); - $articleGateway = new ArticleGateway; + $articleGateway = new ArticleGateway(); + + if (isset($_GET['popular']) && $_GET['popular'] == 1) { + $specialList = 'mostViewed'; + } elseif (isset($_GET['latest']) && $_GET['latest'] == 1) { + $specialList = 'latest'; + } else { + $specialList = false; + } + $articles = $articleGateway->getArticles( $catId, $this->user->getPreference('navigationType') == 'catAndSubCats', + $specialList, false, false, - false, 0, $_GET['items'], isset($_GET['set'])? $_GET['set'] : 'all', Modified: trunk/views/View.php =================================================================== --- trunk/views/View.php 2008-10-21 16:56:02 UTC (rev 744) +++ trunk/views/View.php 2008-10-21 19:47:40 UTC (rev 745) @@ -44,8 +44,6 @@ $this->tpl->set_file('head', 'head.tpl'); $this->tpl->set_file('footer', 'footer.tpl'); $this->tpl->set_block('head', 'rtl_block', 'rtl'); - $this->tpl->set_block('footer', 'latestArts_block', 'latestArts'); - $this->tpl->set_block('footer', 'mostViewedArts_block', 'mostViewedArts'); $this->tpl->set_block('footer', 'unansweredQuestions_block', 'unansweredQuestions'); // reset sidebar. These vars will be redefined if needed (in MainView) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-21 16:56:06
|
Revision: 744 http://sciret.svn.sourceforge.net/sciret/?rev=744&view=rev Author: alpeb Date: 2008-10-21 16:56:02 +0000 (Tue, 21 Oct 2008) Log Message: ----------- limit the dropdown favorites to 7 items. If more, show link to see full list Modified Paths: -------------- trunk/flowMap.php trunk/models/FavoriteGateway.php trunk/templates/FavoritesDropdown.tpl trunk/views/GetFavoritesDropdown.php Added Paths: ----------- trunk/templates/ViewAllFavorites.tpl trunk/views/ViewAllFavorites.php Modified: trunk/flowMap.php =================================================================== --- trunk/flowMap.php 2008-10-21 16:28:21 UTC (rev 743) +++ trunk/flowMap.php 2008-10-21 16:56:02 UTC (rev 744) @@ -41,6 +41,7 @@ 'ViewBookmarkDetails' => array(User::ROLE_ANONYMOUS, true, true, false, true), 'ViewRelatedArticles' => array(User::ROLE_ANONYMOUS, true, true, false, true), 'GetFavoritesDropdown' => array(User::ROLE_REGISTERED, true, true, false), + 'ViewAllFavorites' => array(User::ROLE_REGISTERED, true, true, true, false), 'GetTodosDropdown' => array(User::ROLE_REGISTERED, true, true, false), 'EditTodo' => array(User::ROLE_REGISTERED, true, false, false), 'Upgrade' => array(User::ROLE_ANONYMOUS, true, true, true, false), Modified: trunk/models/FavoriteGateway.php =================================================================== --- trunk/models/FavoriteGateway.php 2008-10-21 16:28:21 UTC (rev 743) +++ trunk/models/FavoriteGateway.php 2008-10-21 16:56:02 UTC (rev 744) @@ -12,25 +12,42 @@ class FavoriteGateway { var $favorites; - function getFavorites($userId) { - if (!isset($this->favorites)) { - $this->favorites = array(); + public function getNumTotalFavorites() + { + return $this->_numTotalFavorites; + } - $query = 'SELECT favorite_id, user_id, favorite_type, art_id, cat_id, search_str FROM favorites WHERE user_id = ?'; - $result = DB::getInstance()->query($query, $userId); + public function getFavorites($userId, $limit = false) + { + $this->favorites = array(); - while ($row = $result->fetch()) { - $favorite = new Favorite; - $favorite->setId($row['favorite_id']); - $favorite->setUserId($row['user_id']); - $favorite->setType($row['favorite_type']); - $favorite->setArtId($row['art_id']); - $favorite->setCatId($row['cat_id']); - $favorite->setSearchStr($row['search_str']); - $this->favorites[] = $favorite; - } + $query = 'SELECT SQL_CALC_FOUND_ROWS favorite_id, user_id, favorite_type, art_id, cat_id, search_str FROM favorites WHERE user_id = ?'; + if ($limit !== false) { + $query .= ' LIMIT ' . (int)$limit; } + $result = DB::getInstance()->query($query, $userId); + while ($row = $result->fetch()) { + $favorite = new Favorite; + $favorite->setId($row['favorite_id']); + $favorite->setUserId($row['user_id']); + $favorite->setType($row['favorite_type']); + $favorite->setArtId($row['art_id']); + $favorite->setCatId($row['cat_id']); + $favorite->setSearchStr($row['search_str']); + $this->favorites[] = $favorite; + } + + if ($limit !== false) { + $query2 = 'SELECT FOUND_ROWS()'; + $result2 = DB::getInstance()->query($query2); + $rows = $result2->fetch(); + $this->_numTotalFavorites = $rows['FOUND_ROWS()']; + } else { + $this->_numTotalFavorites = $result->rowCount(); + } + + return $this->favorites; } Modified: trunk/templates/FavoritesDropdown.tpl =================================================================== --- trunk/templates/FavoritesDropdown.tpl 2008-10-21 16:28:21 UTC (rev 743) +++ trunk/templates/FavoritesDropdown.tpl 2008-10-21 16:56:02 UTC (rev 744) @@ -22,6 +22,11 @@ <!-- END favoriteItem_block --> </ul> <!-- END favoritesList_block --> + <!-- BEGIN seeAllFavorites_block --> + <div style="text-align:right; margin-bottom:5px"> + <a href="{viewAllFavoritesLink}">[l]View all[/l]</a> + </div> + <!-- END seeAllFavorites_block --> <!-- BEGIN noFavorites_block --> <div class="headerLinks" style="text-align:center">[l]You have no Favorites[/l]</div> <!-- END noFavorites_block --> Added: trunk/templates/ViewAllFavorites.tpl =================================================================== --- trunk/templates/ViewAllFavorites.tpl (rev 0) +++ trunk/templates/ViewAllFavorites.tpl 2008-10-21 16:56:02 UTC (rev 744) @@ -0,0 +1,23 @@ +<!-- +/* +* @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.2 +* @package Sciret +* @packager Keyboard Monkeys +*/ +--> + +<h1>[l]Your Favorites[/l]</h1> + +<ul class="headerLinks"> + <!-- BEGIN favoriteItem_block --> + <li> + <!-- BEGIN favoriteItem_img_block --> + <img src="images/{articleImage}" /> + <!-- END favoriteItem_img_block --> + <a href="{favoriteItemURL}">{favoriteItemLabel}</a> + </li> + <!-- END favoriteItem_block --> +</ul> Modified: trunk/views/GetFavoritesDropdown.php =================================================================== --- trunk/views/GetFavoritesDropdown.php 2008-10-21 16:28:21 UTC (rev 743) +++ trunk/views/GetFavoritesDropdown.php 2008-10-21 16:56:02 UTC (rev 744) @@ -11,16 +11,18 @@ require 'views/View.php'; -define('TITLE_LENGTH', 35); - class GetFavoritesDropdown extends View { + const TITLE_LENGTH = 35; + const NUM_ITEMS = 7; + var $categories; function dispatch() { $this->tpl->set_file('favoritesDropdown', 'FavoritesDropdown.tpl'); $this->tpl->set_block('favoritesDropdown', 'favoritesList_block', 'favoritesList'); + $this->tpl->set_block('favoritesDropdown', 'seeAllFavorites_block', 'seeAllFavorites'); $this->tpl->set_block('favoritesList_block', 'favoriteItem_block', 'favoriteItem'); $this->tpl->set_block('favoriteItem_block', 'favoriteItem_img_block', 'favoriteItem_img'); $this->tpl->set_block('favoritesDropdown', 'noFavorites_block', 'noFavorites'); @@ -28,15 +30,15 @@ $favoriteGateway = new FavoriteGateway; $thereAreFavorites = false; $firstIteration = true; - foreach ($favoriteGateway->getFavorites($this->user->id) as $favorite) { + foreach ($favoriteGateway->getFavorites($this->user->id, self::NUM_ITEMS) as $favorite) { $thereAreFavorites = true; switch($favorite->getType()) { case FAVORITE_TYPE_ARTICLE: require_once 'models/Article.php'; $article = new Article($favorite->getArtId()); - if (strlen($article->getTitle()) > TITLE_LENGTH) { - $title = substr($article->getTitle(), 0, TITLE_LENGTH - 3) . '...'; + if (strlen($article->getTitle()) > self::TITLE_LENGTH) { + $title = substr($article->getTitle(), 0, self::TITLE_LENGTH - 3) . '...'; } else { $title = $article->getTitle(); } @@ -71,6 +73,14 @@ $firstIteration = false; } + if ($favoriteGateway->getNumTotalFavorites() > self::NUM_ITEMS) { + $this->tpl->set_var('viewAllFavoritesLink', Library::getLink(array( + 'view' => 'ViewAllFavorites'))); + $this->tpl->parse('seeAllFavorites', 'seeAllFavorites_block'); + } else { + $this->tpl->set_var('seeAllFavorites', ''); + } + if ($thereAreFavorites) { $this->tpl->parse('favoritesList', 'favoritesList_block'); $this->tpl->set_var('noFavorites', ''); Added: trunk/views/ViewAllFavorites.php =================================================================== --- trunk/views/ViewAllFavorites.php (rev 0) +++ trunk/views/ViewAllFavorites.php 2008-10-21 16:56:02 UTC (rev 744) @@ -0,0 +1,60 @@ +<?php + +/* +* @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'; + +class ViewAllFavorites extends View +{ + public function dispatch() + { + $this->tpl->set_file('viewAllFavorites', 'ViewAllFavorites.tpl'); + $this->tpl->set_block('viewAllFavorites', 'favoriteItem_block', 'favoriteItem'); + $this->tpl->set_block('favoriteItem_block', 'favoriteItem_img_block', 'favoriteItem_img'); + + $favoriteGateway = new FavoriteGateway; + $firstIteration = true; + foreach ($favoriteGateway->getFavorites($this->user->id) as $favorite) { + switch($favorite->getType()) { + case FAVORITE_TYPE_ARTICLE: + $article = new Article($favorite->getArtId()); + $title = $article->getTitle(); + $this->tpl->set_var(array( + 'articleImage' => $article->isBookmark()? 'bookmark.png' : 'article.png', + 'favoriteItemLabel' => $title, + 'favoriteItemURL' => Library::getLink(array('view' => 'ViewArticle', 'id' => $article->getId())), + )); + $this->tpl->parse('favoriteItem_img', 'favoriteItem_img_block'); + break; + case FAVORITE_TYPE_LOCATION: + unset($this->tPath); + $categoryGateway = new CategoryGateway(); + $this->categories = $categoryGateway->getCategories(); // needed in _getCategoryPath() + $this->tpl->set_var(array( + 'favoriteItemLabel' => $this->_getCategoryPath($favorite->getCatId(), 'MainView', false), + 'favoriteItemURL' => Library::getLink(array('view' => 'MainView', 'catId' => $favorite->getCatId())), + 'favoriteItem_img' => '', + )); + break; + case FAVORITE_TYPE_SEARCHRESULT: + $this->tpl->set_var(array( + 'favoriteItemLabel' => $this->user->lang('Search:') . ' ' . $favorite->getSearchStr(), + 'favoriteItemURL' => Library::getLink(array('view' => 'SearchResults', 'query' => urlencode($favorite->getSearchStr()))), + 'favoriteItem_img' => '', + )); + break; + } + $this->tpl->parse('favoriteItem', 'favoriteItem_block', !$firstIteration); + $firstIteration = false; + } + + $this->tpl->pparse('out', 'viewAllFavorites'); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-21 16:28:32
|
Revision: 743 http://sciret.svn.sourceforge.net/sciret/?rev=743&view=rev Author: alpeb Date: 2008-10-21 16:28:21 +0000 (Tue, 21 Oct 2008) Log Message: ----------- replace the 'Request the creation of a category' link with a button Modified Paths: -------------- trunk/templates/MainView.tpl Modified: trunk/templates/MainView.tpl =================================================================== --- trunk/templates/MainView.tpl 2008-10-21 16:25:27 UTC (rev 742) +++ trunk/templates/MainView.tpl 2008-10-21 16:28:21 UTC (rev 743) @@ -85,8 +85,10 @@ <!-- END totalNumArtsCat_block --> {numArts} <!-- BEGIN requestCat_block --> - <div style="margin-top:10px"> - <a href="{requestCatLink}">[l]Request the creation of a category[/l]</a> + <div style="margin-top:10px; text-align:right"> + <span class="button_green"> + <a href="{requestCatLink}">[l]Request the creation of a category[/l]</a> + </span> </div> <!-- END requestCat_block --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-21 16:25:35
|
Revision: 742 http://sciret.svn.sourceforge.net/sciret/?rev=742&view=rev Author: alpeb Date: 2008-10-21 16:25:27 +0000 (Tue, 21 Oct 2008) Log Message: ----------- little template bug Modified Paths: -------------- trunk/views/MainView.php Modified: trunk/views/MainView.php =================================================================== --- trunk/views/MainView.php 2008-10-21 16:24:01 UTC (rev 741) +++ trunk/views/MainView.php 2008-10-21 16:25:27 UTC (rev 742) @@ -246,6 +246,8 @@ if ($showing) { $showing = implode(', ', $showing); $this->tpl->set_var('showing', ' - ' . $this->user->lang('Showing %s', $showing)); + } else { + $this->tpl->set_var('showing', ''); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-21 16:24:04
|
Revision: 741 http://sciret.svn.sourceforge.net/sciret/?rev=741&view=rev Author: alpeb Date: 2008-10-21 16:24:01 +0000 (Tue, 21 Oct 2008) Log Message: ----------- fixed problem when hidding/showing categories for anonymous users Modified Paths: -------------- trunk/actions/HideCategory.php trunk/actions/ShowCategory.php Modified: trunk/actions/HideCategory.php =================================================================== --- trunk/actions/HideCategory.php 2008-10-21 16:22:36 UTC (rev 740) +++ trunk/actions/HideCategory.php 2008-10-21 16:24:01 UTC (rev 741) @@ -22,7 +22,10 @@ } $hideCategories[] = (int)$_GET['catId']; $this->user->setPreference('hiddenCategories', implode(',', $hideCategories)); - $this->user->save(); + + if (!$this->user->isAnonymous()) { + $this->user->save(); + } $_SESSION['message'] = $this->user->lang('Category won\'t be shown in the future'); Library::redirect(Library::getLink(array('view' => 'MainView'))); Modified: trunk/actions/ShowCategory.php =================================================================== --- trunk/actions/ShowCategory.php 2008-10-21 16:22:36 UTC (rev 740) +++ trunk/actions/ShowCategory.php 2008-10-21 16:24:01 UTC (rev 741) @@ -30,8 +30,11 @@ } $this->user->setPreference('hiddenCategories', implode(',', $newHideCategories)); - $this->user->save(); + if (!$this->user->isAnonymous()) { + $this->user->save(); + } + $_SESSION['message'] = $this->user->lang('Category will be shown in the future'); Library::redirect(Library::getLink(array( 'view' => 'MainView', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-21 16:22:47
|
Revision: 740 http://sciret.svn.sourceforge.net/sciret/?rev=740&view=rev Author: alpeb Date: 2008-10-21 16:22:36 +0000 (Tue, 21 Oct 2008) Log Message: ----------- better icon to hide categories Modified Paths: -------------- trunk/images/hide.png Modified: trunk/images/hide.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-20 21:17:04
|
Revision: 739 http://sciret.svn.sourceforge.net/sciret/?rev=739&view=rev Author: alpeb Date: 2008-10-20 21:16:58 +0000 (Mon, 20 Oct 2008) Log Message: ----------- little bug Modified Paths: -------------- trunk/actions/SaveCategory.php Modified: trunk/actions/SaveCategory.php =================================================================== --- trunk/actions/SaveCategory.php 2008-10-20 20:43:21 UTC (rev 738) +++ trunk/actions/SaveCategory.php 2008-10-20 21:16:58 UTC (rev 739) @@ -30,7 +30,7 @@ $category->save(); $_SESSION['message'] = $this->user->lang('Category saved successfully'); - Library::redirect(Library::getLink(array('view' => 'EditCategories'))); + Library::redirect(Library::getLink(array('view' => 'MainView', 'catId' => $catId))); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-20 20:43:35
|
Revision: 738 http://sciret.svn.sourceforge.net/sciret/?rev=738&view=rev Author: alpeb Date: 2008-10-20 20:43:21 +0000 (Mon, 20 Oct 2008) Log Message: ----------- removed the Manage Categories section, and replaced all the functionality with some icons and links in the main view when navigating through the categories Modified Paths: -------------- trunk/actions/HideCategory.php trunk/actions/ShowCategory.php trunk/templates/EditCategory.tpl trunk/templates/MainView.tpl trunk/templates/header.tpl trunk/views/EditCategory.php trunk/views/MainView.php trunk/views/View.php Added Paths: ----------- trunk/images/hide.png trunk/images/show_hidden.png Removed Paths: ------------- trunk/templates/EditCategories.tpl trunk/views/EditCategories.php Modified: trunk/actions/HideCategory.php =================================================================== --- trunk/actions/HideCategory.php 2008-10-20 14:50:58 UTC (rev 737) +++ trunk/actions/HideCategory.php 2008-10-20 20:43:21 UTC (rev 738) @@ -25,7 +25,7 @@ $this->user->save(); $_SESSION['message'] = $this->user->lang('Category won\'t be shown in the future'); - Library::redirect(Library::getLink(array('view' => 'EditCategories'))); + Library::redirect(Library::getLink(array('view' => 'MainView'))); } } Modified: trunk/actions/ShowCategory.php =================================================================== --- trunk/actions/ShowCategory.php 2008-10-20 14:50:58 UTC (rev 737) +++ trunk/actions/ShowCategory.php 2008-10-20 20:43:21 UTC (rev 738) @@ -33,7 +33,9 @@ $this->user->save(); $_SESSION['message'] = $this->user->lang('Category will be shown in the future'); - Library::redirect(Library::getLink(array('view' => 'EditCategories'))); + Library::redirect(Library::getLink(array( + 'view' => 'MainView', + 'catId' => $_GET['catId']))); } } Added: trunk/images/hide.png =================================================================== (Binary files differ) Property changes on: trunk/images/hide.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/images/show_hidden.png =================================================================== (Binary files differ) Property changes on: trunk/images/show_hidden.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Deleted: trunk/templates/EditCategories.tpl =================================================================== --- trunk/templates/EditCategories.tpl 2008-10-20 14:50:58 UTC (rev 737) +++ trunk/templates/EditCategories.tpl 2008-10-20 20:43:21 UTC (rev 738) @@ -1,62 +0,0 @@ -<!-- -/* -* @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.2 -* @package Sciret -* @packager Keyboard Monkeys -*/ ---> - -<script type="text/javascript"> -function deleteCategory(catId, catName) { - if (!confirm('[l]Are you sure you want to delete the category [/l]\''+ catName +'\' ?')) { - return; - } - location.href = '{deleteCatRedirect}&catId='+catId; -} -</script> - -<h1>[l]Manage Categories[/l]</h1> - -<table cellpadding="3" cellspacing="2" border="0" class="table1"> - <tr> - <th class="th_h">[l]Name[/l]</th> - <th>[l]Description[/l]</th> - <th>[l]Icon[/l]</th> - <th></th> - </tr> - <!-- BEGIN categories_block --> - <tr class="{rowClass}"> - <td class="td_h"> - <!-- BEGIN boldCategory_block --> - {indent}<b>{catLabel}</b> - <!-- END boldCategory_block --> - <!-- BEGIN nonBoldCategory_block --> - {indent}{catLabel} - <!-- END nonBoldCategory_block --> - </td> - <td>{catDescription}</td> - <td>{catIcon}</td> - <td> - <!-- BEGIN hideCategory_block --> - <a href="{hideCatLink}">[l]Hide[/l]</a> - <!-- END hideCategory_block --> - <!-- BEGIN showCategory_block --> - <a href="{showCatLink}">[l]Show[/l]</a> - <!-- END showCategory_block --> - <!-- BEGIN categoryAdminOps_block --> - <a href="{addSubCatLink}">[l]Add subcategory[/l]</a> - <a href="{editCatLink}">[l]Edit[/l]</a> - <!-- BEGIN deleteCategory_block --> - <a href="#" onclick="deleteCategory({catId}, '{catLabelSlashed}')">[l]Delete[/l]</a> - <!-- END deleteCategory_block --> - <!-- END categoryAdminOps_block --> - </td> - </tr> - <!-- END categories_block --> -</table> - <div class="toolbar"> - <input type="button" value="[l]Add Category[/l]" onclick="location.href = '{addCatRedirect}'" /> - </div> Modified: trunk/templates/EditCategory.tpl =================================================================== --- trunk/templates/EditCategory.tpl 2008-10-20 14:50:58 UTC (rev 737) +++ trunk/templates/EditCategory.tpl 2008-10-20 20:43:21 UTC (rev 738) @@ -15,6 +15,13 @@ return true; } + +function deleteCategory(catId, catName) { + if (!confirm('[l]Are you sure you want to delete the category [/l]{catLabelSlashed} ?')) { + return; + } + location.href = '{deleteCatRedirect}&catId={catId}'; +} </script> <h1>[l]Edit/Add Category[/l]</h1> @@ -56,6 +63,9 @@ <tr class="row_off"> <td colspan="2"> <input type="submit" value="[l]Save[/l]" /> + <!-- BEGIN deleteButton_block --> + <input type="button" value="[l]Delete[/l]" onclick="deleteCategory()" /> + <!-- END deleteButton_block --> </td> </tr> </table> Modified: trunk/templates/MainView.tpl =================================================================== --- trunk/templates/MainView.tpl 2008-10-20 14:50:58 UTC (rev 737) +++ trunk/templates/MainView.tpl 2008-10-20 20:43:21 UTC (rev 738) @@ -28,9 +28,30 @@ </ul> <div class="yui-content"> <div> - <table id="categoriesTable"> + <table id="categoriesTable" border="0"> <tr> - <td>{path}</td> + <td> + <div style="position:relative"> + {path} + <!-- BEGIN editCategory_block --> + <a href="{editCategoryLink}">[l](edit)[/l]</a> + <!-- END editCategory_block --> + <!-- BEGIN showCatAgain_block --> + <div> + [l]You have hidden this category. <a href="{showCatAgainLink}">Show it again</a>.[/l] + </div> + <!-- END showCatAgain_block --> + <div style="position:absolute; top:0; right:0"> + <!-- BEGIN hideCategory_block --> + <img src="images/hide.png" alt="[l]Hide Category[/l]" title="[l]Hide Category[/l]" style="cursor:pointer" onclick="location.href='{linkHideCat}'" /> + <!-- END hideCategory_block --> + <!-- BEGIN showHiddenCategories_block --> + + <img src="images/show_hidden.png" alt="[l]Show Hidden Categories[/l]" title="[l]Show Hidden Categories[/l]" style="cursor:pointer" onclick="location.href='{linkShowHiddenCats}'" /> + <!-- END showHiddenCategories_block --> + </div> + </div> + </td> </tr> <tr> <td> @@ -39,7 +60,15 @@ </table> </td> </tr> - + <!-- BEGIN addCategoryButton_block --> + <tr> + <td align="right"> + <span class="button_green"> + <a href="{addCategoryLink}">{addCategoryLabel}</a> + </span> + </td> + </tr> + <!-- END addCategoryButton_block --> </table> </td> Modified: trunk/templates/header.tpl =================================================================== --- trunk/templates/header.tpl 2008-10-20 14:50:58 UTC (rev 737) +++ trunk/templates/header.tpl 2008-10-20 20:43:21 UTC (rev 738) @@ -54,9 +54,6 @@ <!-- BEGIN addBookmarkLink_block --> <a href="{addBookmarkHref}">[l]Add Bookmark[/l]</a> <!-- END addBookmarkLink_block --> - <!-- BEGIN editCategoriesLink_block --> - <a href="{editCategoriesHref}">[l]Manage Categories[/l]</a> - <!-- END editCategoriesLink_block --> <!-- BEGIN manageUsersLink_block --> <a href="{manageUsersHref}">[l]Manage Users[/l]</a> <!-- END manageUsersLink_block --> Deleted: trunk/views/EditCategories.php =================================================================== --- trunk/views/EditCategories.php 2008-10-20 14:50:58 UTC (rev 737) +++ trunk/views/EditCategories.php 2008-10-20 20:43:21 UTC (rev 738) @@ -1,114 +0,0 @@ -<?php - -/* -* @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_once 'views/View.php'; -require_once 'models/CategoryGateway.php'; - -class EditCategories extends View { - - var $hiddenCategories; - - function dispatch() { - $this->tpl->set_file('edit_categories', 'EditCategories.tpl'); - $this->tpl->set_block('edit_categories', 'categories_block', 'categories'); - $this->tpl->set_block('categories_block', 'boldCategory_block', 'boldCategory'); - $this->tpl->set_block('categories_block', 'nonBoldCategory_block', 'nonBoldCategory'); - $this->tpl->set_block('categories_block', 'categoryAdminOps_block', 'categoryAdminOps'); - $this->tpl->set_block('categoryAdminOps_block', 'deleteCategory_block', 'deleteCategory'); - $this->tpl->set_block('categories_block', 'hideCategory_block', 'hideCategory'); - $this->tpl->set_block('categories_block', 'showCategory_block', 'showCategory'); - $this->tpl->set_var(array( - 'deleteCatRedirect' => Library::getLink(array('action' => 'DeleteCategory')), - 'addCatRedirect' => Library::getLink(array('view' => 'EditCategory', 'subAction' => 'add')), - )); - - $categoryGateway = new CategoryGateway; - $categories = $categoryGateway->getCategories(); - if (!$this->user->getPreference('hiddenCategories')) { - $this->hiddenCategories = array(); - } else { - $this->hiddenCategories = explode(',', $this->user->getPreference('hiddenCategories')); - } - foreach ($categories[0]->getChildren() as $category) { - $this->_showCategories($category); - } - if (count($categories) == 1) { - $this->tpl->set_var('categories', $this->user->lang('There are no categories')); - } - - $this->tpl->pparse('out', 'edit_categories'); - } - - // @access private - function _showCategories($category, $depth = 0) { - static $firstIteration = true; - static $rowClass = 'row_off'; - - $indent = str_repeat(' ', $depth); - $this->tpl->set_var(array( - 'hideCatLink' => Library::getLink(array('action' => 'HideCategory', 'catId' => $category->getId())), - 'showCatLink' => Library::getLink(array('action' => 'ShowCategory', 'catId' => $category->getId())), - 'addSubCatLink' => Library::getLink(array('view' => 'EditCategory', 'subAction' => 'addSubCategory', 'catId' => $category->getId())), - 'editCatLink' => Library::getLink(array('view' => 'EditCategory', 'catId' => $category->getId())), - 'rowClass' => $rowClass, - 'catId' => $category->getId(), - 'indent' => $indent, - 'catLabel' => $category->getLabel(), - 'catLabelSlashed' => addslashes($category->getLabel()), - 'catDescription' => $category->getDescription(), - 'catIcon' => ($category->getIconFileName() != '')? '<img src="uploads/icons/'.$category->getIconFileName().'" />' : '', - )); - - if (in_array($category->getParentId(), $this->hiddenCategories)) { - $this->tpl->set_var('hideCategory', ''); - $this->tpl->set_var('showCategory', ''); - } elseif (in_array($category->getId(), $this->hiddenCategories)) { - $this->tpl->parse('showCategory', 'showCategory_block'); - $this->tpl->set_var('hideCategory', ''); - } else { - $this->tpl->parse('hideCategory', 'hideCategory_block'); - $this->tpl->set_var('showCategory', ''); - } - - if ($depth == 0) { - $this->tpl->parse('boldCategory', 'boldCategory_block'); - $this->tpl->set_var('nonBoldCategory', ''); - } else { - $this->tpl->parse('nonBoldCategory', 'nonBoldCategory_block'); - $this->tpl->set_var('boldCategory', ''); - } - - if ($category->hasChildren()) { - $this->tpl->set_var('deleteCategory', ''); - } else { - $this->tpl->parse('deleteCategory', 'deleteCategory_block'); - } - - if ($this->user->isAdmin()) { - $this->tpl->parse('categoryAdminOps', 'categoryAdminOps_block'); - } else { - $this->tpl->set_var('categoryAdminOps', ''); - } - - $this->tpl->parse('categories', 'categories_block', !$firstIteration); - $firstIteration = false; - $rowClass = $rowClass == 'row_off'? 'row_on' : 'row_off'; - - if ($category->hasChildren()) { - ++$depth; - foreach ($category->getChildren() as $childCategory) { - $this->_showCategories($childCategory, $depth); - } - } - } -} - -?> Modified: trunk/views/EditCategory.php =================================================================== --- trunk/views/EditCategory.php 2008-10-20 14:50:58 UTC (rev 737) +++ trunk/views/EditCategory.php 2008-10-20 20:43:21 UTC (rev 738) @@ -21,15 +21,24 @@ $this->tpl->set_file('edit_category', 'EditCategory.tpl'); $this->tpl->set_block('edit_category', 'categories_block', 'categories'); $this->tpl->set_block('edit_category', 'icons_block', 'icons'); + $this->tpl->set_block('edit_category', 'deleteButton_block', 'deleteButton'); $category = new Category(isset($_GET['subAction']) && $_GET['subAction'] == 'addSubCategory'? 0 : $catId); $this->tpl->set_var(array( - 'formAction' => Library::getLink(array('action' => 'SaveCategory')), - 'catId' => $category->getId(), - 'catLabel' => $category->getLabel(), - 'description' => $category->getDescription(), + 'formAction' => Library::getLink(array('action' => 'SaveCategory')), + 'catId' => $category->getId(), + 'catLabel' => $category->getLabel(), + 'catLabelSlashed' => addslashes($category->getLabel()), + 'description' => $category->getDescription(), + 'deleteCatRedirect' => Library::getLink(array('action' => 'DeleteCategory')), )); + if ($catId) { + $this->tpl->parse('deleteButton', 'deleteButton_block'); + } else { + $this->tpl->set_var('deleteButton', ''); + } + $categoryGateway = new CategoryGateway; $categories = $categoryGateway->getCategories(); foreach ($categories[0]->getChildren() as $tempCategory) { Modified: trunk/views/MainView.php =================================================================== --- trunk/views/MainView.php 2008-10-20 14:50:58 UTC (rev 737) +++ trunk/views/MainView.php 2008-10-20 20:43:21 UTC (rev 738) @@ -82,6 +82,11 @@ $this->tpl->set_block('main', 'hideDraftsUnpublishedLink_block', 'hideDraftsUnpublishedLink'); $this->tpl->set_block('main', 'viewExpiredLink_block', 'viewExpiredLink'); $this->tpl->set_block('main', 'hideExpiredLink_block', 'hideExpiredLink'); + $this->tpl->set_block('main', 'showCatAgain_block', 'showCatAgain'); + $this->tpl->set_block('main', 'editCategory_block', 'editCategory'); + $this->tpl->set_block('main', 'hideCategory_block', 'hideCategory'); + $this->tpl->set_block('main', 'showHiddenCategories_block', 'showHiddenCategories'); + $this->tpl->set_block('main', 'addCategoryButton_block', 'addCategoryButton'); $this->tpl->set_block('main', 'requestCat_block', 'requestCat'); $this->tpl->set_block('articles_block', 'status_block', 'status'); $this->tpl->set_block('articles_block', 'question_block', 'question'); @@ -135,6 +140,19 @@ 'view' => 'Rss', 'catId' => $catId, 'items' => 10)), + 'editCategoryLink' => Library::getLink(array( + 'view' => 'EditCategory', + 'catId' => $catId)), + 'linkHideCat' => Library::getLink(array( + 'action' => 'HideCategory', + 'catId' => $catId)), + 'linkShowHiddenCats'=> Library::getLink(array( + 'view' => 'MainView', + 'catId' => $catId, + 'hiddencats' => 1)), + 'showCatAgainLink' => Library::getLink(array( + 'action' => 'ShowCategory', + 'catId' => $catId)), )); if ($catId != 0) { @@ -244,22 +262,63 @@ // don't include current cat in the counter $numCats--; + + if ($this->_isHidden($this->categories[$catId])) { + $this->tpl->parse('showCatAgain', 'showCatAgain_block'); + $this->tpl->set_var('hideCategory', ''); + } else { + $this->tpl->set_var('showCatAgain', ''); + $this->tpl->parse('hideCategory', 'hideCategory_block'); + } + } else { $this->tpl->set_var('path', ''); $this->tpl->parse('totalNumArts', 'totalNumArts_block'); $this->tpl->set_var('totalNumArtsCat', ''); + $this->tpl->set_var('hideCategory', ''); + $this->tpl->set_var('showCatAgain', ''); } $this->tpl->set_var(array( - 'categories' => $this->_getCategoriesHTML($this->categories[$catId]->getChildren(), 'MainView'), + 'categories' => $this->_getCategoriesHTML( + $this->categories[$catId]->getChildren(), + 'MainView', + isset($_GET['hiddencats'])), 'numCats' => $numCats, )); + if (!isset($_GET['hiddencats']) + && $this->_categoryHasHidden($catId)) + { + $this->tpl->parse('showHiddenCategories', 'showHiddenCategories_block'); + } else { + $this->tpl->set_var('showHiddenCategories', ''); + } + if (!$this->user->isAdmin()) { $this->tpl->set_var('requestCatLink', Library::getLink(array('view' => 'RequestCategory', 'catId' => $catId))); $this->tpl->parse('requestCat', 'requestCat_block'); + + $this->tpl->set_var('addCategoryButton', ''); + $this->tpl->set_var('editCategory', ''); } else { $this->tpl->set_var('requestCat', ''); + + if ($catId) { + $this->tpl->set_var('addCategoryLink', Library::getLink(array( + 'view' => 'EditCategory', + 'subAction' => 'addSubCategory', + 'catId' => $catId))); + $this->tpl->set_var('addCategoryLabel', $this->user->lang('Add Subcategory')); + $this->tpl->parse('editCategory', 'editCategory_block'); + } else { + $this->tpl->set_var('addCategoryLink', Library::getLink(array( + 'view' => 'EditCategory', + 'subAction' => 'add'))); + $this->tpl->set_var('addCategoryLabel', $this->user->lang('Add Category')); + $this->tpl->set_var('editCategory', ''); + } + $this->tpl->parse('addCategoryButton', 'addCategoryButton_block'); } // ** ARTICLES LIST ** @@ -442,4 +501,34 @@ $this->tpl->pparse('out', 'main'); } + + private function _categoryHasHidden($catId) + { + $hiddenCategories = $this->user->getPreference('hiddenCategories'); + if (!$hiddenCategories) { + return false; + } + + $hiddenCategories = explode(',', $hiddenCategories); + + foreach ($this->categories[$catId]->getChildren() as $category) { + if (in_array($category->getId(), $hiddenCategories)) { + return true; + } + } + + return false; + } + + private function _isHidden(Category $cat) + { + $hiddenCategories = $this->user->getPreference('hiddenCategories'); + if (!$hiddenCategories) { + return false; + } + + $hiddenCategories = explode(',', $hiddenCategories); + + return in_array($cat->getId(), $hiddenCategories); + } } Modified: trunk/views/View.php =================================================================== --- trunk/views/View.php 2008-10-20 14:50:58 UTC (rev 737) +++ trunk/views/View.php 2008-10-20 20:43:21 UTC (rev 738) @@ -133,10 +133,6 @@ $this->tpl->set_var('addBookmarkLink', ''); } - $this->tpl->set_block('header', 'editCategoriesLink_block', 'editCategoriesLink'); - $this->tpl->set_var('editCategoriesHref', Library::getLink(array('view' => 'EditCategories'))); - $this->tpl->parse('editCategoriesLink', 'editCategoriesLink_block'); - $this->tpl->set_block('header', 'manageUsersLink_block', 'manageUsersLink'); if ($this->user->isAdmin()) { $this->tpl->set_var('manageUsersHref', Library::getLink(array('view' => 'ManageUsers'))); @@ -206,10 +202,11 @@ * Returns HTML string of categories menu * */ - function _getCategoriesHTML($categories, $view) { + function _getCategoriesHTML($categories, $view, $showHidden = false) + { $categories_str = ''; $num_main_cat = 0; - if (!$this->user->getPreference('hiddenCategories')) { + if (!$this->user->getPreference('hiddenCategories') || $showHidden) { $hiddenCategories = array(); } else { $hiddenCategories = explode(',', $this->user->getPreference('hiddenCategories')); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-20 14:51:05
|
Revision: 737 http://sciret.svn.sourceforge.net/sciret/?rev=737&view=rev Author: alpeb Date: 2008-10-20 14:50:58 +0000 (Mon, 20 Oct 2008) Log Message: ----------- fixed articles navigation (stay on the articles tab) Modified Paths: -------------- trunk/templates/MainView.tpl trunk/views/MainView.php trunk/views/View.php Modified: trunk/templates/MainView.tpl =================================================================== --- trunk/templates/MainView.tpl 2008-10-20 13:54:06 UTC (rev 736) +++ trunk/templates/MainView.tpl 2008-10-20 14:50:58 UTC (rev 737) @@ -11,12 +11,15 @@ <script type="text/javascript"> YAHOO.util.Event.onDOMReady(function() { - var mainViewTabs = new YAHOO.widget.TabView("mainViewTabs"); + var mainViewTabs = new YAHOO.widget.TabView( + "mainViewTabs", + {activeIndex: {activeTabIndex}} + ); }); </script> <div id="mainViewTabs" > <ul class="yui-nav"> - <li class="selected"> + <li> <a href="#categories"><em>[l]Categories[/l]</em></a> </li> <li> Modified: trunk/views/MainView.php =================================================================== --- trunk/views/MainView.php 2008-10-20 13:54:06 UTC (rev 736) +++ trunk/views/MainView.php 2008-10-20 14:50:58 UTC (rev 737) @@ -26,6 +26,12 @@ $catId = 0; } + if (!isset($_GET['tab']) || $_GET['tab'] == 'categories') { + $_GET['tab'] = 0; + } else { + $_GET['tab'] = 1; + } + if (!isset($_GET['set'])) { switch ($this->user->getPreference('startBrowsing')) { case 'all': @@ -88,16 +94,47 @@ list($order, $direction) = explode('_', $_GET['sort']); $this->tpl->set_var(array( - 'viewAllLink' => Library::getLink(array('view' => 'MainView', 'set' => 'all')), - 'viewArticlesLink' => Library::getLink(array('view' => 'MainView', 'set' => 'articles')), - 'viewBookmarksLink' => Library::getLink(array('view' => 'MainView', 'set' => 'bookmarks')), - 'viewDraftsUnpublishedLink' => Library::getLink(array('view' => 'MainView', 'viewall' => '1')), - 'hideDraftsUnpublishedLink' => Library::getLink(array('view' => 'MainView', 'viewall' => '0')), - 'viewExpiredLink' => Library::getLink(array('view' => 'MainView', 'viewexpired' => '1')), - 'hideExpiredLink' => Library::getLink(array('view' => 'MainView', 'viewexpired' => '0')), - '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'))), - 'rssLink' => Library::getLink(array('view' => 'Rss', 'catId' => $catId, 'items' => 10)), + 'activeTabIndex' => $_GET['tab'], + 'viewAllLink' => Library::getLink(array( + 'view' => 'MainView', + 'set' => 'all', + 'tab' => 'articles')), + 'viewArticlesLink' => Library::getLink(array( + 'view' => 'MainView', + 'set' => 'articles', + 'tab' => 'articles')), + 'viewBookmarksLink' => Library::getLink(array( + 'view' => 'MainView', + 'set' => 'bookmarks', + 'tab' => 'articles')), + 'viewDraftsUnpublishedLink' => Library::getLink(array( + 'view' => 'MainView', + 'viewall' => '1', + 'tab' => 'articles')), + 'hideDraftsUnpublishedLink' => Library::getLink(array( + 'view' => 'MainView', + 'viewall' => '0', + 'tab' => 'articles')), + 'viewExpiredLink' => Library::getLink(array( + 'view' => 'MainView', + 'viewexpired' => '1', + 'tab' => 'articles')), + 'hideExpiredLink' => Library::getLink(array( + 'view' => 'MainView', + 'viewexpired' => '0', + 'tab' => 'articles')), + 'sortByDateLink' => Library::getLink(array( + 'view' => 'MainView', + 'sort' => 'created_'.($order == 'created' && $direction == 'desc'? 'asc' : 'desc'), + 'tab' => 'articles')), + 'sortByViewsLink' => Library::getLink(array( + 'view' => 'MainView', + 'sort' => 'views_'.($order == 'views' && $direction == 'desc'? 'asc' : 'desc'), + 'tab' => 'articles')), + 'rssLink' => Library::getLink(array( + 'view' => 'Rss', + 'catId' => $catId, + 'items' => 10)), )); if ($catId != 0) { Modified: trunk/views/View.php =================================================================== --- trunk/views/View.php 2008-10-20 13:54:06 UTC (rev 736) +++ trunk/views/View.php 2008-10-20 14:50:58 UTC (rev 737) @@ -340,7 +340,8 @@ 'offset' => $offset - $resultsPerPage, 'selectArticles' => $isSelectArticles? 1 : 0, 'onlyUnpublished' => $onlyUnpublished? 1 : 0, - 'catId' => $catId))); + 'catId' => $catId, + 'tab' => 'articles'))); $this->tpl->parse('previousPage', 'previousPage_block'); } else { $this->tpl->set_var('previousPage', ''); @@ -350,7 +351,8 @@ 'offset' => $offset + $resultsPerPage, 'selectArticles' => $isSelectArticles? 1 : 0, 'onlyUnpublished' => $onlyUnpublished? 1 : 0, - 'catId' => $catId))); + 'catId' => $catId, + 'tab' => 'articles'))); $this->tpl->parse('nextPage', 'nextPage_block'); } else { $this->tpl->set_var('nextPage', ''); @@ -366,7 +368,8 @@ 'offset' => $pageOffset, 'selectArticles' => $isSelectArticles? 1 : 0, 'onlyUnpublished' => $onlyUnpublished? 1 : 0, - 'catId' => $catId)) + 'catId' => $catId, + 'tab' => 'articles')) .$query."\" class=\"nonSelectedPage\">$page</a>"; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-10-20 13:54:08
|
Revision: 736 http://sciret.svn.sourceforge.net/sciret/?rev=736&view=rev Author: alpeb Date: 2008-10-20 13:54:06 +0000 (Mon, 20 Oct 2008) Log Message: ----------- killed links to Manage Items and Browser Unpublished sections, 'cause that's now handled through filters in the main view Modified Paths: -------------- trunk/templates/header.tpl trunk/views/View.php Modified: trunk/templates/header.tpl =================================================================== --- trunk/templates/header.tpl 2008-10-20 13:32:58 UTC (rev 735) +++ trunk/templates/header.tpl 2008-10-20 13:54:06 UTC (rev 736) @@ -57,15 +57,9 @@ <!-- BEGIN editCategoriesLink_block --> <a href="{editCategoriesHref}">[l]Manage Categories[/l]</a> <!-- END editCategoriesLink_block --> - <!-- BEGIN manageArticlesLink_block --> - <a href="{manageArticlesHref}">[l]Manage Items[/l]</a> - <!-- END manageArticlesLink_block --> <!-- BEGIN manageUsersLink_block --> <a href="{manageUsersHref}">[l]Manage Users[/l]</a> <!-- END manageUsersLink_block --> - <!-- BEGIN browseUnpublished_block --> - <a href="{browseUnpublishedHref}">[l]Browse unpublished and draft articles/bookmarks[/l]</a> - <!-- END browseUnpublished_block --> </div><!-- end menu --> <div id="content_left"> Modified: trunk/views/View.php =================================================================== --- trunk/views/View.php 2008-10-20 13:32:58 UTC (rev 735) +++ trunk/views/View.php 2008-10-20 13:54:06 UTC (rev 736) @@ -137,14 +137,6 @@ $this->tpl->set_var('editCategoriesHref', Library::getLink(array('view' => 'EditCategories'))); $this->tpl->parse('editCategoriesLink', 'editCategoriesLink_block'); - $this->tpl->set_block('header', 'manageArticlesLink_block', 'manageArticlesLink'); - if (!$this->user->isAnonymous()) { - $this->tpl->set_var('manageArticlesHref', Library::getLink(array('view' => 'ManageArticles'))); - $this->tpl->parse('manageArticlesLink', 'manageArticlesLink_block'); - } else { - $this->tpl->set_var('manageArticlesLink', ''); - } - $this->tpl->set_block('header', 'manageUsersLink_block', 'manageUsersLink'); if ($this->user->isAdmin()) { $this->tpl->set_var('manageUsersHref', Library::getLink(array('view' => 'ManageUsers'))); @@ -168,14 +160,6 @@ $this->tpl->set_var('message', ''); } - $this->tpl->set_block('header', 'browseUnpublished_block', 'browseUnpublished'); - if (!$this->user->isAnonymous() && (!isset($_GET['view']) || $_GET['view'] == 'MainView') && $articleGateway->numUnpublishedArticles() > 0) { - $this->tpl->set_var('browseUnpublishedHref', Library::getLink(array('view' => 'ManageArticles', 'onlyUnpublished' => '1'))); - $this->tpl->parse('browseUnpublished', 'browseUnpublished_block'); - } else { - $this->tpl->set_var('browseUnpublished', ''); - } - $this->tpl->pparse('out', 'header'); } @@ -355,7 +339,7 @@ $this->tpl->set_var('previousLink', Library::getLink(array( 'view' => $view, 'offset' => $offset - $resultsPerPage, 'selectArticles' => $isSelectArticles? 1 : 0, - 'onlyUnpublished' => $onlyUnpublished? 1 : 0, + 'onlyUnpublished' => $onlyUnpublished? 1 : 0, 'catId' => $catId))); $this->tpl->parse('previousPage', 'previousPage_block'); } else { @@ -365,7 +349,7 @@ $this->tpl->set_var('nextLink', Library::getLink(array( 'view' => $view, 'offset' => $offset + $resultsPerPage, 'selectArticles' => $isSelectArticles? 1 : 0, - 'onlyUnpublished' => $onlyUnpublished? 1 : 0, + 'onlyUnpublished' => $onlyUnpublished? 1 : 0, 'catId' => $catId))); $this->tpl->parse('nextPage', 'nextPage_block'); } else { @@ -381,7 +365,7 @@ $pageItems[] = "<a href=\"".Library::getLink(array( 'view' => $view, 'offset' => $pageOffset, 'selectArticles' => $isSelectArticles? 1 : 0, - 'onlyUnpublished' => $onlyUnpublished? 1 : 0, + 'onlyUnpublished' => $onlyUnpublished? 1 : 0, 'catId' => $catId)) .$query."\" class=\"nonSelectedPage\">$page</a>"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |