Skip to content
Snippets Groups Projects
Commit 22735d9b authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge remote branch 'upstream/develop-next' into develop-next

parents 96c1d5a9 7159d09e
No related branches found
No related tags found
No related merge requests found
......@@ -682,7 +682,7 @@ class TicketsAjaxAPI extends AjaxController {
'title' => sprintf('Change user for ticket #%s', $ticket->getNumber())
);
return self::_userlookup($user, $info);
return self::_userlookup($user, null, $info);
}
function _userlookup($user, $form, $info) {
......
......@@ -89,14 +89,14 @@ $(function() {
$('a#unselect-user').click( function(e) {
e.preventDefault();
$('div#selected-user-info').hide();
$('div#new-user-form').fadeIn();
$('div#new-user-form').fadeIn({start: function(){ $('#user-search').focus(); }});
return false;
});
$(document).on('click', 'form.user input.cancel', function (e) {
e.preventDefault();
$('div#new-user-form').hide();
$('div#selected-user-info').fadeIn();
$('div#selected-user-info').fadeIn({start: function(){ $('#user-search').focus(); }});
return false;
});
});
......
......@@ -20,7 +20,7 @@ require(CLIENTINC_DIR.'header.inc.php');
<div id="landing_page">
<?php
if($cfg && ($page = $cfg->getLandingPage()))
echo $page->getBody();
echo $page->getBodyWithImages();
else
echo '<h1>Welcome to the Support Center</h1>';
?>
......
......@@ -116,8 +116,7 @@ RedactorPlugins.draft = {
self.opts.autosave = self.opts.original_autosave;
}
});
},
}
};
/* Redactor richtext init */
......
......@@ -293,7 +293,7 @@ $(document).ready(function(){
showButtonPanel: true,
buttonImage: './images/cal.png',
showOn:'both',
dateFormat: $.translate_format(c.date_format||'m/d/Y'),
dateFormat: $.translate_format(c.date_format||'m/d/Y')
});
$(document).on('submit', 'form', function() {
$('.dp', $(this)).each(function(i, e) {
......@@ -419,11 +419,14 @@ $(document).ready(function(){
});
});
$.dialog = function (url, code, cb) {
$.dialog = function (url, code, cb, options) {
options = options||{};
$('.dialog#popup .body').load(url, function () {
$('#overlay').show();
$('.dialog#popup').show();
$('.dialog#popup').show({
duration: 0,
complete: function() { if (options.onshow) options.onshow(); }
});
$(document).off('.dialog');
$(document).on('submit.dialog', '.dialog#popup form', function(e) {
e.preventDefault();
......@@ -451,12 +454,15 @@ $(document).ready(function(){
return false;
});
});
if (options.onload) { options.onload(); }
};
$.userLookup = function (url, cb) {
$.dialog(url, 201, function (resp) {
var user = $.parseJSON(resp);
if(cb) cb(user);
}, {
onshow: function() { $('#user-search').focus(); }
});
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment