summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js')
-rw-r--r--core/js/js.js17
-rw-r--r--core/js/router.js4
-rw-r--r--core/js/setup.js7
-rw-r--r--core/js/share.js18
4 files changed, 34 insertions, 12 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 1801062241d..582d1f808d7 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -593,6 +593,7 @@ function fillWindow(selector) {
}
$(document).ready(function(){
+ sessionHeartBeat();
if(!SVGSupport()){ //replace all svg images with png images for browser that dont support svg
replaceSVG();
@@ -678,7 +679,7 @@ $(document).ready(function(){
$('#settings #expanddiv').click(function(event){
event.stopPropagation();
});
- $(window).click(function(){//hide the settings menu when clicking outside it
+ $(document).click(function(){//hide the settings menu when clicking outside it
$('#settings #expanddiv').slideUp(200);
});
@@ -824,3 +825,17 @@ OC.set=function(name, value) {
}
context[tail]=value;
};
+
+
+/**
+ * Calls the server periodically every 15 mins to ensure that session doesnt
+ * time out
+ */
+function sessionHeartBeat(){
+ OC.Router.registerLoadedCallback(function(){
+ var url = OC.Router.generate('heartbeat');
+ setInterval(function(){
+ $.post(url);
+ }, 900000);
+ });
+}
diff --git a/core/js/router.js b/core/js/router.js
index 3562785b342..b94721673a7 100644
--- a/core/js/router.js
+++ b/core/js/router.js
@@ -1,11 +1,11 @@
-OC.router_base_url = OC.webroot + '/index.php/',
+OC.router_base_url = OC.webroot + '/index.php',
OC.Router = {
// register your ajax requests to load after the loading of the routes
// has finished. otherwise you face problems with race conditions
registerLoadedCallback: function(callback){
this.routes_request.done(callback);
},
- routes_request: $.ajax(OC.router_base_url + 'core/routes.json', {
+ routes_request: $.ajax(OC.router_base_url + '/core/routes.json', {
dataType: 'json',
success: function(jsondata) {
if (jsondata.status === 'success') {
diff --git a/core/js/setup.js b/core/js/setup.js
index 2656cac2f45..76812b29979 100644
--- a/core/js/setup.js
+++ b/core/js/setup.js
@@ -5,6 +5,7 @@ $(document).ready(function() {
mysql:!!$('#hasMySQL').val(),
postgresql:!!$('#hasPostgreSQL').val(),
oracle:!!$('#hasOracle').val(),
+ mssql:!!$('#hasMSSQL').val()
};
$('#selectDbType').buttonset();
@@ -41,6 +42,12 @@ $(document).ready(function() {
$('#dbhost').show(250);
$('#dbhostlabel').show(250);
});
+
+ $('#mssql').click(function() {
+ $('#use_other_db').slideDown(250);
+ $('#dbhost').show(250);
+ $('#dbhostlabel').show(250);
+ });
$('input[checked]').trigger('click');
diff --git a/core/js/share.js b/core/js/share.js
index 6d1c3954044..145c31a86c8 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -24,9 +24,9 @@ OC.Share={
var file = $('tr').filterAttr('data-file', OC.basename(item));
if (file.length > 0) {
var action = $(file).find('.fileactions .action').filterAttr('data-action', 'Share');
- action.find('img').attr('src', image);
+ var img = action.find('img').attr('src', image);
action.addClass('permanent');
- action.html(t('core', 'Shared'));
+ action.html(' '+t('core', 'Shared')).prepend(img);
}
var dir = $('#dir').val();
if (dir.length > 1) {
@@ -40,7 +40,7 @@ OC.Share={
if (img.attr('src') != OC.imagePath('core', 'actions/public')) {
img.attr('src', image);
action.addClass('permanent');
- action.html(t('core', 'Shared'));
+ action.html(' '+t('core', 'Shared')).prepend(img);
}
}
last = path;
@@ -84,13 +84,13 @@ OC.Share={
$('a.share[data-item="'+itemSource+'"]').css('background', 'url('+image+') no-repeat center');
} else {
var action = $(file).find('.fileactions .action').filterAttr('data-action', 'Share');
- action.find('img').attr('src', image);
+ var img = action.find('img').attr('src', image);
if (shares) {
action.addClass('permanent');
- action.html(t('core', 'Shared'));
+ action.html(' '+t('core', 'Shared')).prepend(img);
} else {
action.removeClass('permanent');
- action.html(t('core', 'Share'));
+ action.html(' '+t('core', 'Share')).prepend(img);
}
}
if (shares) {
@@ -186,8 +186,8 @@ OC.Share={
html += '</div>';
html += '</div>';
html += '<form id="emailPrivateLink" >';
- html += '<input id="email" style="display:none; width:65%;" value="" placeholder="'+t('core', 'Email link to person')+'" type="text" />';
- html += '<input id="emailButton" style="display:none; float:right;" type="submit" value="'+t('core', 'Send')+'" />';
+ html += '<input id="email" style="display:none; width:62%;" value="" placeholder="'+t('core', 'Email link to person')+'" type="text" />';
+ html += '<input id="emailButton" style="display:none;" type="submit" value="'+t('core', 'Send')+'" />';
html += '</form>';
}
html += '<div id="expiration">';
@@ -213,7 +213,7 @@ OC.Share={
}
});
}
- $('#shareWith').autocomplete({minLength: 2, source: function(search, response) {
+ $('#shareWith').autocomplete({minLength: 1, source: function(search, response) {
// if (cache[search.term]) {
// response(cache[search.term]);
// } else {