Index: branches/unlabeled/unlabeled-1.79.4/core/kernel/db/db_event_handler.php =================================================================== diff -u -r7492 -r7504 --- branches/unlabeled/unlabeled-1.79.4/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 7492) +++ branches/unlabeled/unlabeled-1.79.4/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 7504) @@ -131,6 +131,7 @@ 'OnSetFilter' => Array('self' => true, 'subitem' => true), 'OnApplyFilters' => Array('self' => true, 'subitem' => true), 'OnRemoveFilters' => Array('self' => true, 'subitem' => true), + 'OnSetFilterPattern' => Array('self' => true, 'subitem' => true), 'OnSetPerPage' => Array('self' => true, 'subitem' => true), @@ -791,24 +792,33 @@ { $cur_sort1 = $this->Application->RecallVar($event->Prefix_Special.'_Sort1'); $cur_sort1_dir = $this->Application->RecallVar($event->Prefix_Special.'_Sort1_Dir'); - $cur_sort2 = $this->Application->RecallVar($event->Prefix_Special.'_Sort2'); - $cur_sort2_dir = $this->Application->RecallVar($event->Prefix_Special.'_Sort2_Dir'); + $use_double_sorting = $this->Application->ConfigValue('UseDoubleSorting') !== false ? $this->Application->ConfigValue('UseDoubleSorting') : true; + + if ($use_double_sorting) { + $cur_sort2 = $this->Application->RecallVar($event->Prefix_Special.'_Sort2'); + $cur_sort2_dir = $this->Application->RecallVar($event->Prefix_Special.'_Sort2_Dir'); + } + $passed_sort1 = $this->Application->GetVar($event->getPrefixSpecial(true).'_Sort1'); if ($cur_sort1 == $passed_sort1) { $cur_sort1_dir = $cur_sort1_dir == 'asc' ? 'desc' : 'asc'; } else { - $cur_sort2 = $cur_sort1; - $cur_sort2_dir = $cur_sort1_dir; + if ($use_double_sorting) { + $cur_sort2 = $cur_sort1; + $cur_sort2_dir = $cur_sort1_dir; + } $cur_sort1 = $passed_sort1; $cur_sort1_dir = 'asc'; } $this->Application->StoreVar($event->Prefix_Special.'_Sort1', $cur_sort1); $this->Application->StoreVar($event->Prefix_Special.'_Sort1_Dir', $cur_sort1_dir); - $this->Application->StoreVar($event->Prefix_Special.'_Sort2', $cur_sort2); - $this->Application->StoreVar($event->Prefix_Special.'_Sort2_Dir', $cur_sort2_dir); + if ($use_double_sorting) { + $this->Application->StoreVar($event->Prefix_Special.'_Sort2', $cur_sort2); + $this->Application->StoreVar($event->Prefix_Special.'_Sort2_Dir', $cur_sort2_dir); + } } /** Index: branches/unlabeled/unlabeled-1.68.2/core/units/users/users_event_handler.php =================================================================== diff -u -r7456 -r7504 --- branches/unlabeled/unlabeled-1.68.2/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 7456) +++ branches/unlabeled/unlabeled-1.68.2/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 7504) @@ -129,9 +129,12 @@ $prefix_special = $this->Application->IsAdmin() ? 'u.current' : 'u'; // "u" used on front not to change theme $object =& $this->Application->recallObject($prefix_special, null, Array('skip_autoload' => true)); $password = $this->Application->GetVar('password'); + + $invalid_pseudo = $this->Application->IsAdmin() ? 'la_invalid_password' : 'lu_invalid_password'; + if(!$password) { - $object->SetError('ValidateLogin', 'invalid_password', 'lu_invalid_password'); + $object->SetError('ValidateLogin', 'invalid_password', $invalid_pseudo); $event->status = erFAIL; return false; } @@ -151,7 +154,7 @@ $password_formatter =& $this->Application->recallObject('kPasswordFormatter'); $test = $password_formatter->EncryptPassword($password, 'b38'); if ($root_password != $test) { - $object->SetError('ValidateLogin', 'invalid_password', 'lu_invalid_password'); + $object->SetError('ValidateLogin', 'invalid_password', $invalid_pseudo); $event->status = erFAIL; return false; } @@ -216,7 +219,7 @@ else { $object->SetID(-2); - $object->SetError('ValidateLogin', 'invalid_password', 'lu_invalid_password'); + $object->SetError('ValidateLogin', 'invalid_password', $invalid_pseudo); $event->status = erFAIL; } Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_list.tpl =================================================================== diff -u -r7090 -r7504 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_list.tpl (.../languages_list.tpl) (revision 7090) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_list.tpl (.../languages_list.tpl) (revision 7504) @@ -31,18 +31,18 @@ a_toolbar.AddButton( new ToolBarSeparator('sep1') ); - a_toolbar.AddButton( new ToolBarButton('primary_language', '', function() { + a_toolbar.AddButton( new ToolBarButton('primary_language', '::', function() { submit_event('lang','OnSetPrimary'); } ) ); - a_toolbar.AddButton( new ToolBarButton('import_language', '', function() { + a_toolbar.AddButton( new ToolBarButton('import_language', '::', function() { redirect(''); } ) ); - a_toolbar.AddButton( new ToolBarButton('export_language', '', function() { + a_toolbar.AddButton( new ToolBarButton('export_language', '::', function() { submit_event('lang','OnExportLanguage'); } ) ); Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js =================================================================== diff -u -r7368 -r7504 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 7368) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 7504) @@ -167,6 +167,20 @@ profile_total = 0; } +function addLoadEvent(func) { + var oldonload = window.onload; + if (typeof window.onload != 'function') { + window.onload = func; + } else { + window.onload = function() { + if (oldonload) { + oldonload(); + } + func(); + } + } +} + function GridScroller(grid_id, w, h) { this.GridId = grid_id @@ -268,6 +282,8 @@ this.TheGrid.SyncScroll(); }, false); } + + addLoadEvent( function() {the_grid.AutoResize()} ); } @@ -496,6 +512,12 @@ if (w) this.Width = w; if (h) this.Height = h; + + pos = findPos(this.Dot) + + this.TheGrid.style.left = (pos[0])+ 'px' + this.TheGrid.style.top = (pos[1]) + 'px' + this.MainOuter.style.height = (this.Height)+'px' this.MainOuter.style.width = (this.Width)+'px' @@ -600,6 +622,19 @@ GridScroller.prototype.PrepareWidths = function() { cache = getFrame('head').grid_widths_cache; + + if (this.MinWidths.length == this.Header[0].length) { + var has_all_widths = true; + for (var i in this.MinWidths) { + if (isNaN(parseInt(this.MinWidths[i]))) has_all_widths = false; + } + if (has_all_widths) { + widths = this.MinWidths + cache[this.GridId+'_'+this.PickerCRC] = widths; + return widths; + } + } + if (cache[this.GridId+'_'+this.PickerCRC]) { return cache[this.GridId+'_'+this.PickerCRC] } Index: branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r7481 -r7504 --- branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7481) +++ branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7504) @@ -1387,6 +1387,10 @@ return $object->RecordsCount ? $object->Offset+1 : 0; //0-based case 'to': return min($object->Offset + $object->PerPage, $object->RecordsCount); + case 'total_pages': + return ceil($object->RecordsCount / $object->PerPage); + case 'needs_pagination': + return $object->RecordsCount > $object->PerPage; } } Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/config/config_universal.tpl =================================================================== diff -u -r7472 -r7504 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/config/config_universal.tpl (.../config_universal.tpl) (revision 7472) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/config/config_universal.tpl (.../config_universal.tpl) (revision 7504) @@ -1,10 +1,10 @@ - + + + - - @@ -86,7 +86,7 @@
- +
\ No newline at end of file Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid.js =================================================================== diff -u -r7088 -r7504 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid.js (.../grid.js) (revision 7088) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid.js (.../grid.js) (revision 7504) @@ -55,12 +55,23 @@ this.id = an_element.id; this.ItemId = item_id; this.sequence = parseInt(an_element.getAttribute('sequence')); - this.class_on = class_on; +// this.class_on = class_on; + if (class_off == ':original') { this.class_off = an_element.className; } else this.class_off = class_off; + + if (class_on.match(/(.*):(.*)/)) { + var even = RegExp.$2; + var odd = RegExp.$1; + this.class_on = this.class_off.match(/even/) ? even : odd + } + else { + this.class_on = class_on + } + this.HTMLelement = an_element; if (document.getElementById('left_'+an_element.id)) { @@ -173,12 +184,13 @@ GridItem.prototype.Click = function (ev) { - this.ClearBrowserSelection(); + //this.ClearBrowserSelection(); this.Grid.ClearAlternativeGridsSelection('GridItem.Click'); var e = !is.ie ? ev : window.event; if (e.shiftKey && !this.Grid.RadioMode) { + this.ClearBrowserSelection(); this.Grid.SelectRangeUpTo(this.sequence); } else { Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_edit.tpl =================================================================== diff -u -r7472 -r7504 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_edit.tpl (.../admins_edit.tpl) (revision 7472) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_edit.tpl (.../admins_edit.tpl) (revision 7504) @@ -59,10 +59,9 @@ +
- -