v1.18.x
psychobunny 10 years ago
parent ef6c30ad99
commit f8b3282295

@ -565,6 +565,14 @@ app.cacheBuster = null;
});
};
app.loadJQueryUI = function(callback) {
if (typeof $().autocomplete === 'function') {
return callback();
}
$.getScript(RELATIVE_PATH + '/vendor/jquery/js/jquery-ui-1.10.4.custom.js', callback);
};
app.showEmailConfirmWarning = function(err) {
if (!config.requireEmailConfirmation || !app.user.uid) {
return;

@ -17,11 +17,13 @@ define('forum/account/edit', ['forum/account/header', 'uploader', 'translator'],
$('#submitBtn').on('click', updateProfile);
app.loadJQueryUI(function() {
$('#inputBirthday').datepicker({
changeMonth: true,
changeYear: true,
yearRange: '1900:+0'
});
});
currentEmail = $('#inputEmail').val();

@ -7,6 +7,7 @@ define('autocomplete', function() {
var module = {};
module.user = function (input) {
app.loadJQueryUI(function() {
return input.autocomplete({
delay: 100,
source: function(request, response) {
@ -33,9 +34,11 @@ define('autocomplete', function() {
});
}
});
});
};
module.group = function(input) {
app.loadJQueryUI(function() {
return input.autocomplete({
delay: 100,
source: function(request, response) {
@ -64,6 +67,7 @@ define('autocomplete', function() {
});
}
});
});
};
return module;

@ -179,17 +179,8 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
chatModal.css('zIndex', 100);
chatModal.appendTo($('body'));
module.center(chatModal);
chatModal.draggable({
start:function() {
module.bringModalToTop(chatModal);
},
stop:function() {
chatModal.find('#chat-message-input').focus();
},
distance: 10,
handle: '.modal-header'
});
app.loadJQueryUI(function() {
chatModal.find('.modal-content').resizable({
minHeight: 250,
minWidth: 400
@ -203,6 +194,18 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
chatModal.find('#chat-content').css('height', module.calculateChatListHeight(chatModal));
});
chatModal.draggable({
start:function() {
module.bringModalToTop(chatModal);
},
stop:function() {
chatModal.find('#chat-message-input').focus();
},
distance: 10,
handle: '.modal-header'
});
});
chatModal.find('#chat-with-name').html(username);
chatModal.find('#chat-close-btn').on('click', function() {

@ -34,6 +34,8 @@ define('composer/tags', function() {
addTags(postData.tags, tagEl);
var input = postContainer.find('.bootstrap-tagsinput input');
app.loadJQueryUI(function() {
input.autocomplete({
delay: 100,
open: function() {
@ -55,6 +57,7 @@ define('composer/tags', function() {
triggerEnter(input);
}
});
});
input.attr('tabIndex', tagEl.attr('tabIndex'));
input.on('blur', function() {

@ -22,7 +22,6 @@ module.exports = function(Meta) {
scripts: {
base: [
'public/vendor/jquery/js/jquery.js',
'public/vendor/jquery/js/jquery-ui-1.10.4.custom.js',
'public/vendor/jquery/sortable/Sortable.js',
'./node_modules/socket.io-client/socket.io.js',
'public/vendor/jquery/timeago/jquery.timeago.min.js',

@ -51,6 +51,7 @@
<script type="text/javascript" src="{relative_path}/vendor/jquery/serializeObject/jquery.ba-serializeobject.min.js?{cache-buster}"></script>
<script type="text/javascript" src="{relative_path}/vendor/jquery/deserialize/jquery.deserialize.min.js?{cache-buster}"></script>
<script type="text/javascript" src="{relative_path}/vendor/mousetrap/mousetrap.js?{cache-buster}"></script>
<script type="text/javascript" src="{relative_path}/vendor/jquery/js/jquery-ui-1.10.4.custom.js?{cache-buster}"></script>
<!-- BEGIN scripts -->
<script type="text/javascript" src="{scripts.src}"></script>

Loading…
Cancel
Save