Skip to content

Commit

Permalink
imageInput =》 imageUpload #3487
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Feb 6, 2018
1 parent 72057e3 commit 6d4a7d6
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions resources/views/admin/album/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,7 @@
</label>

<div class="col-lg-4">
<div class="input-group">
<input type="text" class="form-control" id="image" name="image">
<span class="input-group-btn">
<button id="select-thumb" class="btn btn-white" type="button">
<i class="fa fa-picture-o"></i>
选择图片
</button>
</span>
</div>
<input type="text" class="form-control" id="image" name="image">
</div>

<label class="col-lg-6 help-text" for="image">
Expand Down Expand Up @@ -124,7 +116,7 @@

<?= $block->js() ?>
<script>
require(['linkTo', 'form', 'ueditor', 'jquery-deparam'], function (linkTo, form) {
require(['linkTo', 'form', 'ueditor', 'jquery-deparam', 'plugins/admin/js/image-upload'], function (linkTo, form) {
var photoJson = <?= json_encode(wei()->category()->notDeleted()->withParent('photo')->getTreeToArray()) ?>;
form.toOptions($('#class'), photoJson, 'id', 'name');

Expand Down Expand Up @@ -156,7 +148,7 @@
});

// 点击选择图片
$('#image').imageInput();
$('#image').imageUpload();
});
</script>
<?php $block->end() ?>
Expand Down

0 comments on commit 6d4a7d6

Please sign in to comment.