Commit dfd6bb60 authored by Aaron Harder's avatar Aaron Harder

Merge branch 'feature/3.0/pending' of gitlab.entropy.cc:blacklight/bl-edit into feature/3.0/pending

* 'feature/3.0/pending' of gitlab.entropy.cc:blacklight/bl-edit:
  fixing [object Object] empty value
  limiting delete to one click
  jquery protect against xss
parents 62b7b60c ac34ddca
......@@ -300,6 +300,7 @@ document.addEventListener('DOMContentLoaded', function() {
if(typeof jQuery==='undefined') {
window.BL.librariesToLoad.push('//code.jquery.com/jquery-1.12.0.min.js');
window.BL.librariesToLoad.push('{{publicMount}}fshr/shared/js/jquery-xss-protect.js');
window.BL.librariesToLoad.push('//code.jquery.com/ui/1.12.1/jquery-ui.min.js');
}else if(!jQuery.ui){
window.BL.librariesToLoad.push('//code.jquery.com/ui/1.12.1/jquery-ui.min.js');
......
......@@ -25,6 +25,7 @@
</body>
<script src="{{@root.blConfig.publicMount}}blacklight/edit/js/vendor/jquery/jquery-2.1.1.min.js"></script>
<script src="{{@root.blConfig.publicMount}}fshr/shared/js/jquery-xss-protect.js"></script>
<script src="{{@root.blConfig.publicMount}}blacklight/edit/js/vendor/highlight/highlight.min.js"></script>
<script src="{{@root.blConfig.publicMount}}blacklight/edit/js/doc-markdown-client.js"></script>
......
......@@ -3,7 +3,7 @@
\{{#*inline "multifield-entry-{{config.name}}"}}
<li class="collection-item">
<a class="btn-floating ghosty enabled right delete-composite" style="top:5px;left:-10px;"><i class="material-icons red darken-2 delete-button">delete</i></a>
<i style="position:relative;top:7px;cursor:ns-resize;" class="drag-handle material-icons grey-text">reorder</i><input value="\{{ . }}" name="{{config.name}}" style="background-color:#eee; padding-left:10px; width:90%; width:calc(100% - 120px); margin-left: 20px;margin-bottom: 0;" placeholder="Type content here">
<i style="position:relative;top:7px;cursor:ns-resize;" class="drag-handle material-icons grey-text">reorder</i><input \{{#if emptyMultifieldValue}} value="" \{{else}} value="\{{ . }}" \{{/if}} name="{{config.name}}" style="background-color:#eee; padding-left:10px; width:90%; width:calc(100% - 120px); margin-left: 20px;margin-bottom: 0;" placeholder="Type content here">
</li>
\{{/inline}}
......@@ -24,7 +24,7 @@
\{{/with}}
\{{/if}}
\{{else}}
\{{> multifield-entry-{{config.name}} }}
\{{> multifield-entry-{{config.name}} emptyMultifieldValue="true"}}
\{{/if}}
</ul>
......
......@@ -84,6 +84,7 @@
<!-- Scripts-->
<script src="{{publicMount}}blacklight/edit/js/vendor/jquery/jquery-2.1.1.min.js"></script>
<script src="{{publicMount}}fshr/shared/js/jquery-xss-protect.js"></script>
<script src="{{publicMount}}blacklight/edit/js/vendor/jquery/jquery.throttle.js"></script>
<script src="{{publicMount}}blacklight/edit/js/vendor/materialize.js"></script>
......
......@@ -28,7 +28,7 @@ module.exports=function($, window){
var $modalContent=$dialog.find(".modal-content");
var slingPath=view.path();
$deleteButton.off().click(function(){
$deleteButton.off().one('click', function(){
var uri;
uri= window.BL.config.slingProxyPrefix + view.path();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment