You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2018/09/26 19:11:15 UTC

[1/2] allura git commit: Make forums admin inline editing layout better and "cancel" the right things (not submit buttons, correct checkbox value)

Repository: allura
Updated Branches:
  refs/heads/master 7f849d9fb -> b37c80570


Make forums admin inline editing layout better and "cancel" the right things (not submit buttons, correct checkbox value)


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/691103ca
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/691103ca
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/691103ca

Branch: refs/heads/master
Commit: 691103caad6eb07818eeb0fec993d9454f754480
Parents: 0f77ad5
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Sep 25 17:02:34 2018 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Tue Sep 25 17:02:34 2018 -0400

----------------------------------------------------------------------
 Allura/allura/nf/allura/css/site_style.css |  7 ++++++-
 Allura/allura/public/nf/js/allura-base.js  | 20 +++++++++++++-------
 2 files changed, 19 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/691103ca/Allura/allura/nf/allura/css/site_style.css
----------------------------------------------------------------------
diff --git a/Allura/allura/nf/allura/css/site_style.css b/Allura/allura/nf/allura/css/site_style.css
index ffaeb7c..0fb43fe 100644
--- a/Allura/allura/nf/allura/css/site_style.css
+++ b/Allura/allura/nf/allura/css/site_style.css
@@ -2854,7 +2854,7 @@ h1.title .viewer:hover {
 }
 
 .editable .editor .save_controls {
-  width: 115px;
+  width: 150px;
 }
 
 .editable .editor.multiline .save_holder {
@@ -2866,6 +2866,11 @@ h1.title .viewer:hover {
   z-index: 10;
 }
 
+.editable .editor.multiline textarea{
+    width: 95%;
+    min-width: 300px;
+}
+
 .editable .editor .save_holder .cancel_btn {
   float: left;
   margin: 5px 1em 0;

http://git-wip-us.apache.org/repos/asf/allura/blob/691103ca/Allura/allura/public/nf/js/allura-base.js
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/js/allura-base.js b/Allura/allura/public/nf/js/allura-base.js
index 040f679..e03f065 100644
--- a/Allura/allura/public/nf/js/allura-base.js
+++ b/Allura/allura/public/nf/js/allura-base.js
@@ -47,7 +47,11 @@
         .find('input, select, textarea').each(function(i){
             var $this = $(this);
             var editor = $this.closest('.editor');
-            $this.attr('original_val', this.value);
+            if ($this.attr('type') === 'checkbox') {
+                $this.attr('original_val', this.checked);
+            } else {
+                $this.attr('original_val', this.value);
+            }
             if(!$('a.cancel_btn', editor).length){
                 var save_btns = $('<div class="save_holder"><input type="submit" value="Save"/><a href="#" class="cancel_btn">Cancel</a></div>');
                 if(editor.hasClass('multiline')){
@@ -69,12 +73,14 @@
         })
         .end()
         .find('.cancel_btn').click(function(e){
-            $(this).closest('.editable')
-                        .addClass('viewing')
-                        .removeClass('editing')
-                        .find('input, select, textarea').each(function(){
-                            $(this).val($(this).attr('original_val'));
-                        });
+            var $editable = $(this).closest('.editable');
+            $editable.addClass('viewing').removeClass('editing');
+            $editable.find('input:text, select, textarea').each(function(){
+                $(this).val($(this).attr('original_val'));
+            });
+            $editable.find('input[type=checkbox]').each(function(){
+                this.checked = ($(this).attr('original_val') === 'true');
+            });
             return false;
         });
 })(jQuery);


[2/2] allura git commit: Merge commit '691103caad6eb07818eeb0fec993d9454f754480'

Posted by ke...@apache.org.
Merge commit '691103caad6eb07818eeb0fec993d9454f754480'


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/b37c8057
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/b37c8057
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/b37c8057

Branch: refs/heads/master
Commit: b37c805707d9c74c2bc9eef9e799404333f19609
Parents: 7f849d9 691103c
Author: Kenton Taylor <kt...@slashdotmedia.com>
Authored: Wed Sep 26 19:09:14 2018 +0000
Committer: Kenton Taylor <kt...@slashdotmedia.com>
Committed: Wed Sep 26 19:09:14 2018 +0000

----------------------------------------------------------------------
 Allura/allura/nf/allura/css/site_style.css |  7 ++++++-
 Allura/allura/public/nf/js/allura-base.js  | 20 +++++++++++++-------
 2 files changed, 19 insertions(+), 8 deletions(-)
----------------------------------------------------------------------