Created
June 3, 2015 10:14
-
-
Save neokoenig/1614b229cdbbba5799d4 to your computer and use it in GitHub Desktop.
Gridmanager Specific Non Editable Columns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="mycanvas" class="clearfix"> | |
<div class="row"><div class="column col-md-6 col-sm-6 col-xs-6"><!--gm-editable-region--><p>New Content</p><!--/gm-editable-region--></div><div class="column col-md-6 col-sm-6 col-xs-6 noteditable"><!--gm-editable-region--><p>Not Editable</p><!--/gm-editable-region--></div></div> | |
<div class="row"><div class="column col-md-6 col-sm-6 col-xs-6 noteditable"><!--gm-editable-region--><p>Not Editable</p><!--/gm-editable-region--></div><div class="column col-md-6 col-sm-6 col-xs-6 "><!--gm-editable-region--><p>New Content</p><!--/gm-editable-region--></div></div> | |
</div> | |
<!--================== JS ================--> | |
<script> | |
$(document).ready(function(){ | |
var gm=$("#mycanvas").gridmanager({ | |
filterCallback: noteditable | |
}).data('gridmanager'); | |
function noteditable(){ | |
var cols=$(".noteditable"); | |
$.each(cols, function(i, val){ | |
$(val).removeClass("gm-editing").find(".gm-tools").remove(); | |
$(val).children().removeClass("gm-editable-region"); | |
$(val).children().attr("contenteditable", "false"); | |
}); | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment