From 637f0eba4f7f3c9a0cbffc0629634116b17fdeab Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 10 Mar 2015 13:20:10 +0100 Subject: collapse jot tools to submenu on small and extra small screens --- view/tpl/jot-header.tpl | 33 ++++++++++++++++++++++++++++++--- view/tpl/jot.tpl | 40 +++++++++++++++++++++++++++++++++++----- 2 files changed, 65 insertions(+), 8 deletions(-) (limited to 'view') diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index 8daf2ddb7..c7bb7506e 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -127,6 +127,20 @@ function enableOnUser(){ } } ); + var uploader_sub = new window.AjaxUpload( + 'wall-image-upload-sub', + { action: '{{$baseurl}}/wall_upload/{{$nickname}}', + name: 'userfile', + title: upload_title, + onSubmit: function(file,ext) { $('#profile-rotator').spin('tiny'); }, + onComplete: function(file,response) { + addeditortext(response); + $('#jot-media').val($('#jot-media').val() + response); + $('#profile-rotator').spin(false); + } + } + ); + var file_uploader = new window.AjaxUpload( 'wall-file-upload', { action: '{{$baseurl}}/wall_attach/{{$nickname}}', @@ -137,7 +151,20 @@ function enableOnUser(){ addeditortext(response); $('#jot-media').val($('#jot-media').val() + response); $('#profile-rotator').spin(false); - } + } + } + ); + var file_uploader_sub = new window.AjaxUpload( + 'wall-file-upload-sub', + { action: '{{$baseurl}}/wall_attach/{{$nickname}}', + name: 'userfile', + title: attach_title, + onSubmit: function(file,ext) { $('#profile-rotator').spin('tiny'); }, + onComplete: function(file,response) { + addeditortext(response); + $('#jot-media').val($('#jot-media').val() + response); + $('#profile-rotator').spin(false); + } } ); @@ -312,11 +339,11 @@ function enableOnUser(){ function toggleVoting() { if($('#jot-consensus').val() > 0) { $('#jot-consensus').val(0); - $('#profile-voting').removeClass('icon-check').addClass('icon-check-empty'); + $('#profile-voting, #profile-voting-sub').removeClass('icon-check').addClass('icon-check-empty'); } else { $('#jot-consensus').val(1); - $('#profile-voting').removeClass('icon-check-empty').addClass('icon-check'); + $('#profile-voting, #profile-voting-sub').removeClass('icon-check-empty').addClass('icon-check'); } } diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index 4d9207c3b..229ef0277 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -38,7 +38,7 @@
-
+
@@ -56,7 +56,7 @@
{{if $visitor}} -
+ -
+