diff --git a/include/class.topic.php b/include/class.topic.php index 955382cd13370454c92ceca2da3ec41764b7c7fe..2db12f15149955b4a485e3724e383084d24354a8 100644 --- a/include/class.topic.php +++ b/include/class.topic.php @@ -344,7 +344,7 @@ class Topic extends VerySimpleModel { $list = self::objects()->filter(array( 'topic'=>$name, 'topic_pid'=>$pid, - ))->values_flat('topic_id')->one(); + ))->values_flat('topic_id')->first(); if ($list) return $list[0]; @@ -363,7 +363,7 @@ class Topic extends VerySimpleModel { elseif (strlen($vars['topic'])<5) $errors['topic']=__('Topic is too short. Five characters minimum'); elseif (($tid=self::getIdByName($vars['topic'], $vars['topic_pid'])) - && $tid!=$this->getId()) + && (!isset($this->topic_id) || $tid!=$this->getId())) $errors['topic']=__('Topic already exists'); if (!is_numeric($vars['dept_id'])) diff --git a/include/class.user.php b/include/class.user.php index 382c66f8024e855ae67ab43f9f1a7ea337b9637d..5c927b3f15d534e6f37472287ba0d899b9864829 100644 --- a/include/class.user.php +++ b/include/class.user.php @@ -995,8 +995,8 @@ class UserAccount extends UserAccountModel { // TODO: Make sure the username is unique - if (!$vars['timezone_id']) - $errors['timezone_id'] = __('Time zone selection is required'); + if (!$vars['timezone']) + $errors['timezone'] = __('Time zone selection is required'); // Changing password? if ($vars['passwd1'] || $vars['passwd2']) { @@ -1015,8 +1015,7 @@ class UserAccount extends UserAccountModel { if ($errors) return false; - $this->set('timezone_id', $vars['timezone_id']); - $this->set('dst', isset($vars['dst']) ? 1 : 0); + $this->set('timezone', $vars['timezone']); $this->set('username', $vars['username']); if ($vars['passwd1']) { @@ -1079,8 +1078,7 @@ class UserAccount extends UserAccountModel { if (!$account) return false; - $account->set('dst', isset($vars['dst'])?1:0); - $account->set('timezone_id', $vars['timezone_id']); + $account->set('timezone', $vars['timezone']); $account->set('backend', $vars['backend']); if ($vars['username'] && strcasecmp($vars['username'], $user->getEmail())) diff --git a/include/staff/profile.inc.php b/include/staff/profile.inc.php index 30b884e52997cfaffb48ccf25c5b9f790ef36865..b46c33559b8387600b1169e26ebd6e3e0990bb58 100644 --- a/include/staff/profile.inc.php +++ b/include/staff/profile.inc.php @@ -273,13 +273,13 @@ $info['id']=$staff->getId(); <input type="button" name="cancel" value="<?php echo __('Cancel Changes');?>" onclick='window.location.href="index.php"'> </p> </form> -<link rel="stylesheet" href="<?php echo ROOT_PATH; ?>/css/jquery.multiselect.css"/> -<link rel="stylesheet" href="<?php echo ROOT_PATH; ?>/css/jquery.multiselect.filter.css"/> -<script type="text/javascript" src="<?php echo ROOT_PATH; ?>/js/jquery.multiselect.filter.min.js"></script> +<link rel="stylesheet" href="<?php echo ROOT_PATH; ?>css/jquery.multiselect.css"/> +<link rel="stylesheet" href="<?php echo ROOT_PATH; ?>css/jquery.multiselect.filter.css"/> +<script type="text/javascript" src="<?php echo ROOT_PATH; ?>js/jquery.multiselect.filter.min.js"></script> <script type="text/javascript"> (function() { var I = setInterval(function() { - if (!$.fn.multiselect) + if (!$.fn.multiselect || !$.ech.multiselectfilter) return; clearInterval(I); $('#timezone-dropdown').multiselect({ diff --git a/include/staff/settings-system.inc.php b/include/staff/settings-system.inc.php index 0df985cdf366c535fbc6ff36af481dafe6b16b81..de02c0ad24f3271fb123d1fa046c03e998120f8e 100644 --- a/include/staff/settings-system.inc.php +++ b/include/staff/settings-system.inc.php @@ -283,20 +283,27 @@ $gmtime = Misc::gmtime(); <input class="button" type="reset" name="reset" value="<?php echo __('Reset Changes');?>"> </p> </form> -<link rel="stylesheet" href="<?php echo ROOT_PATH; ?>/css/jquery.multiselect.css"/> -<link rel="stylesheet" href="<?php echo ROOT_PATH; ?>/css/jquery.multiselect.filter.css"/> -<script type="text/javascript" src="<?php echo ROOT_PATH; ?>/js/jquery.multiselect.filter.min.js"></script> +<link rel="stylesheet" href="<?php echo ROOT_PATH; ?>css/jquery.multiselect.css"/> +<link rel="stylesheet" href="<?php echo ROOT_PATH; ?>css/jquery.multiselect.filter.css"/> +<script type="text/javascript" src="<?php echo ROOT_PATH; ?>js/jquery.multiselect.filter.min.js"></script> <script type="text/javascript"> +(function() { +var I = setInterval(function() { + if (!$.fn.multiselect || !$.ech.multiselectfilter) + return; + clearInterval(I); + $('#timezone-dropdown').multiselect({ + multiple: false, + header: <?php echo JsonDataEncoder::encode(__('Time Zones')); ?>, + noneSelectedText: <?php echo JsonDataEncoder::encode(__('Select Default Time Zone')); ?>, + selectedList: 1, + minWidth: 400 + }).multiselectfilter({ + placeholder: <?php echo JsonDataEncoder::encode(__('Search')); ?> + }); +}, 25); +})(); $('#secondary_langs').sortable({ cursor: 'move' }); -$('#timezone-dropdown').multiselect({ - multiple: false, - header: <?php echo JsonDataEncoder::encode(__('Time Zones')); ?>, - noneSelectedText: <?php echo JsonDataEncoder::encode(__('Select Default Time Zone')); ?>, - selectedList: 1, - minWidth: 400 -}).multiselectfilter({ - placeholder: <?php echo JsonDataEncoder::encode(__('Search')); ?> -}); </script> diff --git a/js/redactor-osticket.js b/js/redactor-osticket.js index 6e50a61e399c697ab7fe16e7dabf1dddf7ab4ff5..cf575f287870c377ac9fb0b1f3bd1cde3a5b85d7 100644 --- a/js/redactor-osticket.js +++ b/js/redactor-osticket.js @@ -271,7 +271,7 @@ $(function() { options['lang'] = c.short_lang; if (c.has_rtl) options['plugins'].push('textdirection'); - if ($('html.rtl').length) + if (el.find('rtl').length) options['direction'] = 'rtl'; el.redactor(options); }); diff --git a/scp/css/translatable.css b/scp/css/translatable.css index b7ffdaaea8e0ecf15b5e176e2cee6c9421bb4cf9..d949d2d4fafac616e4fd4764847044e7116b90cf 100644 --- a/scp/css/translatable.css +++ b/scp/css/translatable.css @@ -77,8 +77,8 @@ ul.translations li input { padding: 2px 4px; border-radius: 3px; border: 1px solid #bbb; + font-family: sans-serif; font-size: 12px; - font-weight: 300; margin-top: 4px; } .language-commit { @@ -134,6 +134,7 @@ input.translatable { padding: 0 !important; margin: 0 !important; background: none; + font-family: sans-serif; } textarea.translatable, input.translatable:focus { @@ -142,7 +143,7 @@ input.translatable:focus { button.translatable { margin: 0; - padding: 4px 5px; + padding: 3px 5px 4px; background-color: #444; background:linear-gradient(0deg, #444 0, #888 100%); color: white; diff --git a/scp/js/jquery.translatable.js b/scp/js/jquery.translatable.js index 4c05ab099d51dfd41a9dab438e1a38e209340ee1..08a28ae3c7e030fdf20c79a6882a6dfd55974019 100644 --- a/scp/js/jquery.translatable.js +++ b/scp/js/jquery.translatable.js @@ -44,7 +44,7 @@ this.$container = $('<div class="translatable"></div>') .prependTo(this.$element.parent()) .append(this.$element); - this.$container.wrap('<div style="display:inline-block;position:relative;width:inherit"></div>'); + this.$container.wrap('<div style="display:inline-block;position:relative;width:auto"></div>'); this.$button = $(this.options.button).insertAfter(this.$container); this.$menu.append($('<span class="close"><i class="icon-remove"></i></span>') .on('click', $.proxy(this.hide, this)));