summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js')
-rw-r--r--core/js/config.php30
-rw-r--r--core/js/js.js17
-rw-r--r--core/js/multiselect.js5
-rw-r--r--core/js/setup.js7
-rw-r--r--core/js/share.js18
5 files changed, 62 insertions, 15 deletions
diff --git a/core/js/config.php b/core/js/config.php
index 9069175ed6f..0aaa4482287 100644
--- a/core/js/config.php
+++ b/core/js/config.php
@@ -29,8 +29,33 @@ $array = array(
"oc_current_user" => "\"".OC_User::getUser(). "\"",
"oc_requesttoken" => "\"".OC_Util::callRegister(). "\"",
"datepickerFormatDate" => json_encode($l->l('jsdate', 'jsdate')),
- "dayNames" => json_encode(array((string)$l->t('Sunday'), (string)$l->t('Monday'), (string)$l->t('Tuesday'), (string)$l->t('Wednesday'), (string)$l->t('Thursday'), (string)$l->t('Friday'), (string)$l->t('Saturday'))),
- "monthNames" => json_encode(array((string)$l->t('January'), (string)$l->t('February'), (string)$l->t('March'), (string)$l->t('April'), (string)$l->t('May'), (string)$l->t('June'), (string)$l->t('July'), (string)$l->t('August'), (string)$l->t('September'), (string)$l->t('October'), (string)$l->t('November'), (string)$l->t('December'))),
+ "dayNames" => json_encode(
+ array(
+ (string)$l->t('Sunday'),
+ (string)$l->t('Monday'),
+ (string)$l->t('Tuesday'),
+ (string)$l->t('Wednesday'),
+ (string)$l->t('Thursday'),
+ (string)$l->t('Friday'),
+ (string)$l->t('Saturday')
+ )
+ ),
+ "monthNames" => json_encode(
+ array(
+ (string)$l->t('January'),
+ (string)$l->t('February'),
+ (string)$l->t('March'),
+ (string)$l->t('April'),
+ (string)$l->t('May'),
+ (string)$l->t('June'),
+ (string)$l->t('July'),
+ (string)$l->t('August'),
+ (string)$l->t('September'),
+ (string)$l->t('October'),
+ (string)$l->t('November'),
+ (string)$l->t('December')
+ )
+ ),
"firstDay" => json_encode($l->l('firstday', 'firstday')) ,
);
@@ -38,4 +63,3 @@ $array = array(
foreach ($array as $setting => $value) {
echo("var ". $setting ."=".$value.";\n");
}
-?> \ No newline at end of file
diff --git a/core/js/js.js b/core/js/js.js
index 6d5d65403fb..46dd273b068 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -584,6 +584,7 @@ function fillWindow(selector) {
}
$(document).ready(function(){
+ sessionHeartBeat();
if(!SVGSupport()){ //replace all svg images with png images for browser that dont support svg
replaceSVG();
@@ -669,7 +670,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);
});
@@ -815,3 +816,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);
+ });
+} \ No newline at end of file
diff --git a/core/js/multiselect.js b/core/js/multiselect.js
index 623c6e0f7e1..bc4223feb64 100644
--- a/core/js/multiselect.js
+++ b/core/js/multiselect.js
@@ -266,8 +266,9 @@
}
list.append(list.find('li.creator'));
var pos=button.position();
- if($(document).height() > (button.offset().top+button.outerHeight() + list.children().length * button.height())
- || $(document).height()/2 > pos.top
+ if(($(document).height() > (button.offset().top+button.outerHeight() + list.children().length * button.height())
+ && $(document).height() - button.offset().top > (button.offset().top+button.outerHeight() + list.children().length * button.height()))
+ || $(document).height()/2 > button.offset().top
) {
list.css({
top:pos.top+button.outerHeight()-5,
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 {