Skip to content

Commit

Permalink
Fix confirm command
Browse files Browse the repository at this point in the history
  • Loading branch information
dvlpp committed Nov 3, 2015
1 parent 2c89247 commit ae785c7
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 21 deletions.
11 changes: 4 additions & 7 deletions resources/assets/js/sharp.commands.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
$(window).load(function () {

// ---
// Show confirm on commands
// ---
$("body.sharp-list a.command[data-confirm]").click(function() {
return confirm($(this).data("confirm"));
});

// ---
// Ajax command call
// ---
$("body.sharp-list a.command").click(function (e) {
e.preventDefault();

if($(this).data("confirm") && !confirm($(this).data("confirm"))) {
return;
}

var url = $(this).attr("href");
var $form = $(".form-command-" + $(this).data("command"));

Expand Down
2 changes: 1 addition & 1 deletion resources/assets/sharp.form.min.js

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions resources/assets/sharp.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -12565,19 +12565,16 @@ function hidePageOverlay() {
$body.css("overflow", "auto");
};$(window).load(function () {

// ---
// Show confirm on commands
// ---
$("body.sharp-list a.command[data-confirm]").click(function() {
return confirm($(this).data("confirm"));
});

// ---
// Ajax command call
// ---
$("body.sharp-list a.command").click(function (e) {
e.preventDefault();

if($(this).data("confirm") && !confirm($(this).data("confirm"))) {
return;
}

var url = $(this).attr("href");
var $form = $(".form-command-" + $(this).data("command"));

Expand Down
4 changes: 2 additions & 2 deletions resources/assets/sharp.ui.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions resources/views/cms/cmslayout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<link href='http://fonts.googleapis.com/css?family=Lato:100,400,700,400italic,700italic' rel='stylesheet' type='text/css'>

<link href="/sharp/sharp.min.css" rel="stylesheet">
<link href="/sharp/sharp.min.css?v={{ $sharpVersion }}" rel="stylesheet">

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
Expand Down Expand Up @@ -105,7 +105,7 @@
</footer>

@section("scripts")
<script src="/sharp/sharp.ui.min.js?v=3"></script>
<script src="/sharp/sharp.ui.min.js?v={{ $sharpVersion }}"></script>
@show

</body>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/cms/entityForm.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,5 @@

@section("scripts")
@parent
<script src="/sharp/sharp.form.min.js"></script>
<script src="/sharp/sharp.form.min.js?v={{ $sharpVersion }}"></script>
@endsection
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0
3.0.8

0 comments on commit ae785c7

Please sign in to comment.