Index: branches/unlabeled/unlabeled-1.65.4/core/kernel/processors/main_processor.php =================================================================== diff -u -r7051 -r7089 --- branches/unlabeled/unlabeled-1.65.4/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 7051) +++ branches/unlabeled/unlabeled-1.65.4/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 7089) @@ -262,6 +262,11 @@ return $ret; } + function RemoveVar($params) + { + $this->Application->RemoveVar( $this->SelectParam($params,'name,var,param') ); + } + // bad style to store something from template to session !!! (by Alex) // Used here only to test how session works, nothing more function Store($params) @@ -785,7 +790,7 @@ $perm_helper =& $this->Application->recallObject('PermissionsHelper'); /* @var $perm_helper kPermissionsHelper */ - + $perm_status = $perm_helper->TagPermissionCheck($params, 'm_RequireLogin'); if (!$perm_status) { list($redirect_template, $redirect_params) = $perm_helper->getPermissionTemplate($params); Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/tree.js =================================================================== diff -u -r6899 -r7089 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/tree.js (.../tree.js) (revision 6899) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/tree.js (.../tree.js) (revision 7089) @@ -1,3 +1,6 @@ +var last_hightlighted = null; +var last_highlighted_key = null; + function TreeItem(title, url, icon, onclick) { this.Title = title; @@ -9,9 +12,9 @@ this.Onclick = onclick; } -TreeItem.prototype.Render = function(before) +TreeItem.prototype.Render = function(before, force) { - if (!this.Rendered) { + if (!this.Rendered || force) { if (!isset(before)) {before = null} tr = document.createElement('tr'); @@ -32,6 +35,12 @@ } } +TreeItem.prototype.remove = function() +{ + var p = this.Tr.parentNode; + p.removeChild(this.Tr); +} + TreeItem.prototype.appendLevel = function(td) { for (var i=0; i < this.Level; i++) @@ -73,7 +82,7 @@ { var $node_text = document.createElement('span'); $node_text.innerHTML = this.Title; - + link = document.createElement('a'); link.nodeValue = this.Title; link.href = this.Url; @@ -107,21 +116,38 @@ // only in case of "true" is returned, used in catalog getFrame(link.target).location.href = this.href; } - + if (!this.treeItem.Expanded && typeof(this.treeItem.folderClick) == 'function') { if (this.treeItem.folderClick()); } - return false; + this.treeItem.highLight(); + return false; } } td.appendChild(link); + + if (this.LateLoadURL) { + var span = document.createElement('span'); + span.innerHTML = ' Reload'; + span.treeItem = this; + span.onclick = function(ev) { + this.treeItem.reload(); + } + td.appendChild(span); + } } TreeItem.prototype.display = function() { this.Tr.style.display = is.ie ? 'block' : 'table-row'; this.Displayed = true; + + var do_sub = TreeManager.isExpanded(this.Key); + if (this.Children && do_sub && !this.Expanding) { + this.expand(); + } + } TreeItem.prototype.hide = function() @@ -130,6 +156,14 @@ this.Displayed = false; } +TreeItem.prototype.highLight = function() +{ + if (last_hightlighted) last_hightlighted.Tr.className = ''; + this.Tr.className = "highlighted"; + last_hightlighted = this; + last_highlighted_key = this.Key; +} + TreeItem.prototype.expand = function() { this.display() } TreeItem.prototype.collapse = function() { this.hide() } @@ -174,6 +208,23 @@ { return this; } + +TreeItem.prototype.locateItemByURL = function(url) +{ + if (this.Url == url) return this; + return false; +} + +TreeItem.prototype.locateItemByKey = function(key) +{ + if (this.Key == key) return this; + return false; +} + +TreeItem.prototype.reload = function() +{ +} + /* FOLDER */ function TreeFolder(parent_id, title, url, icon, late_load_url, onclick) @@ -183,13 +234,18 @@ this.ParentElement = document.getElementById(parent_id); render = true; } + else { + + } + this.Title = title; this.Url = url; this.Rendered = false; this.Displayed = false; this.Expanded = false; this.Level = 0; + this.Id = 0; this.Tr = null; this.Icon = icon; this.LateLoadURL = isset(late_load_url) ? late_load_url : false; @@ -219,6 +275,36 @@ return last_item; } +TreeFolder.prototype.locateItemByURL = function(url) +{ + last_item = false; + if (this.Url == url) { + return this; + } + + for (var i=0; iStack->Push($data); } if (!isset($data['queried'])) { $this->QueryTitle($data); $this->QueryChildren($data); + $data['children_count'] = count($data['children']); $this->QueryPermissions($data); $data['queried'] = 1; @@ -288,11 +295,17 @@ } else { $this->UpdateCachedPath($data); - $this->Stack->Pop(); //remove ourself from stack if we have finished all the childs (or there are none) + $prev_data = $this->Stack->Pop(); //remove ourself from stack if we have finished all the childs (or there are none) // we are getting here if we finished with current level, so check if it's first level - then bail out. $this->doneCats++; // moved by Kostja from above, seems to fix the prob - return $this->Stack->Count() > 0; + $has_more = $this->Stack->Count() > 0; + if ($has_more) { + $next_data = $this->Stack->Get(); + $next_data['children_count'] += $data['children_count']; + $this->Stack->Update($next_data); + } + return $has_more; } } @@ -302,6 +315,7 @@ 'ParentPath' => '|'.implode('|', $data['parent_path']).'|', 'NamedParentPath' => implode('/', $data['named_path'] ), 'CachedCategoryTemplate' => $data['category_template'], + 'CachedDescendantCatsQty' => $data['children_count'], ); $i = 1; Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js =================================================================== diff -u -r7088 -r7089 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 7088) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 7089) @@ -770,7 +770,7 @@ o +='' for (var col=this.LeftCells; col
'+this.Header[row][col]+'
' + o += '
'+this.Header[row][col]+'
' } o += '' o += '' Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/calendar/calendar-setup.js =================================================================== diff -u -r7088 -r7089 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/calendar/calendar-setup.js (.../calendar-setup.js) (revision 7088) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/calendar/calendar-setup.js (.../calendar-setup.js) (revision 7089) @@ -19,7 +19,7 @@ * than modifying calendar.js itself). */ -// $Id: calendar-setup.js,v 1.1.2.1 2007-01-10 12:41:49 kostja Exp $ +// $Id: calendar-setup.js,v 1.1.2.2 2007-01-10 19:07:23 kostja Exp $ /** * This function "patches" an input field (or other element) to use a calendar @@ -62,6 +62,8 @@ Calendar.setup = function (params) { function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; + + param_default("inputField", null); param_default("displayArea", null); param_default("button", null); Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/calendar/calendar-en.js =================================================================== diff -u -r7088 -r7089 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/calendar/calendar-en.js (.../calendar-en.js) (revision 7088) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/calendar/calendar-en.js (.../calendar-en.js) (revision 7089) @@ -117,7 +117,7 @@ Calendar._TT["CLOSE"] = "Close"; Calendar._TT["TODAY"] = "Today"; -Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value"; +Calendar._TT["TIME_PART"] = "(Shift-)Click or drag
to change value"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";