PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.1.6.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.1.6.9
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
learnpress / inc / admin / views / quiz / added-items-preview.php

added-items-preview.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.1.6.9, at inc/admin/views/quiz/added-items-preview.php

46 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template added question items preview.
4 *
5 * @since 3.0.0
6 */
7 ?>
8
9 <script type="text/x-template" id="tmpl-lp-quiz-added-items-preview">
10 <div id="lp-quiz-added-items-preview" class="lp-added-items-preview" :class="{show:show}">
11 <ul class="list-added-items">
12 <template v-for="(item, index) in addedItems">
13 <li class="question-item removable" :class="item.type" @click="removeItem(item)">
14 <input type="checkbox" checked>
15 <span class="title">{{item.title}}</span>
16 </li>
17 </template>
18 </ul>
19 </div>
20 </script>
21
22 <script type="text/javascript">
23 jQuery( function($) {
24 var $Vue = window.$Vue || Vue;
25 var $store = window.LP_Quiz_Store;
26
27 $Vue.component('lp-quiz-added-items-preview', {
28 template: '#tmpl-lp-quiz-added-items-preview',
29 props: {
30 show: true
31 },
32 computed: {
33 addedItems: function () {
34 return $store.getters['cqi/addedItems'];
35 }
36 },
37 methods: {
38 removeItem: function (item) {
39 $store.dispatch('cqi/removeItem', item);
40 }
41 }
42 }
43 );
44 });
45 </script>
46