Proyectos de Subversion LeadersLinked - Backend

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
16825 efrain 1
<!DOCTYPE html>
2
<html>
3
<head>
4
  <meta charset="utf-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
 
7
  <title>Bootstrap Confirmation</title>
8
 
9
  <link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
10
  <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
11
 
12
  <style>
13
    .popover {
14
      max-width: none;
15
    }
16
  </style>
17
</head>
18
 
19
<body>
20
 
21
<div class="container">
22
  <div class="col-md-12 col-lg-10 offset-lg-1">
23
    <div class="page-header">
24
      <a class="float-right" href="https://bootstrap-confirmation.js.org/">
25
        <img src="https://github.githubassets.com/images/modules/logos_page/Octocat.png" height=48px>
26
      </a>
27
      <h1>Bootstrap Confirmation</h1>
28
    </div>
29
 
30
    <div class="card mb-3">
31
      <div class="card-header">Basic</div>
32
      <div class="card-body">
33
        <button class="btn btn-primary" data-toggle="confirmation">Confirmation</button>
34
      </div>
35
    </div>
36
 
37
    <div class="card mb-3">
38
      <div class="card-header">Link</div>
39
      <div class="card-body">
40
        <a class="btn btn-primary" data-toggle="confirmation"
41
           href="https://google.com" target="_blank">Go to Google</a>
42
      </div>
43
    </div>
44
 
45
    <div class="card mb-3">
46
      <div class="card-header">Customize</div>
47
      <div class="card-body">
48
        <button class="btn btn-primary" data-toggle="confirmation"
49
                data-btn-ok-label="Continue" data-btn-ok-class="btn btn-success"
50
                data-btn-ok-icon-class="material-icons" data-btn-ok-icon-content="check"
51
                data-btn-cancel-label="Stoooop!" data-btn-cancel-class="btn btn-danger"
52
                data-btn-cancel-icon-class="material-icons" data-btn-cancel-icon-content="close"
53
                data-title="Is it ok?" data-content="This might be dangerous">
54
          Confirmation
55
        </button>
56
      </div>
57
    </div>
58
 
59
    <div class="card mb-3">
60
      <div class="card-header">Directions</div>
61
      <div class="card-body">
62
        <button class="btn btn-primary" data-toggle="confirmation" data-placement="left">Confirmation on left</button>
63
        <button class="btn btn-primary" data-toggle="confirmation" data-placement="top">Confirmation on top</button>
64
        <button class="btn btn-primary" data-toggle="confirmation" data-placement="bottom">Confirmation on bottom
65
        </button>
66
        <button class="btn btn-primary" data-toggle="confirmation" data-placement="right">Confirmation on right</button>
67
      </div>
68
    </div>
69
 
70
    <div class="card mb-3">
71
      <div class="card-header">Singleton</div>
72
      <div class="card-body">
73
        <button class="btn btn-primary" data-toggle="confirmation-singleton" data-singleton="true">Confirmation 1
74
        </button>
75
        <button class="btn btn-primary" data-toggle="confirmation-singleton" data-singleton="true">Confirmation 2
76
        </button>
77
      </div>
78
    </div>
79
 
80
    <div class="card mb-3">
81
      <div class="card-header">Popout</div>
82
      <div class="card-body">
83
        <button class="btn btn-primary" data-toggle="confirmation-popout" data-popout="true">Confirmation 1</button>
84
        <button class="btn btn-primary" data-toggle="confirmation-popout" data-popout="true">Confirmation 2</button>
85
      </div>
86
    </div>
87
 
88
    <div class="card mb-3">
89
      <div class="card-header">Delegation</div>
90
      <div class="card-body" id="confirmation-delegate">
91
        <button class="btn btn-primary">Confirmation 1</button>
92
        <button class="btn btn-primary">Confirmation 2</button>
93
      </div>
94
    </div>
95
 
96
    <div class="card mb-3">
97
      <div class="card-header">Custom event</div>
98
      <div class="card-body">
99
        <button class="btn btn-primary" data-toggle="custom-confirmation-events"
100
                data-trigger="manual"
101
                data-confirmation-event="myevent">
102
          Confirmation
103
        </button>
104
      </div>
105
    </div>
106
 
107
    <div class="card mb-3">
108
      <div class="card-header">Custom buttons</div>
109
      <div class="card-body">
110
        <button class="btn btn-primary" id="custom-confirmation">Choose your transportation</button>
111
        <button class="btn btn-primary" id="custom-confirmation-links">Share to</button>
112
      </div>
113
    </div>
114
  </div>
115
</div>
116
 
117
<script src="../node_modules/jquery/dist/jquery.js"></script>
118
<script src="../node_modules/popper.js/dist/umd/popper.js"></script>
119
<script src="../node_modules/bootstrap/dist/js/bootstrap.js"></script>
120
<script src="../dist/bootstrap-confirmation.js"></script>
121
<script src="https://use.fontawesome.com/5dfc29e1bc.js"></script>
122
 
123
<script>
124
  console.log('Bootstrap ' + $.fn.popover.Constructor.VERSION);
125
  console.log('Bootstrap Confirmation ' + $.fn.confirmation.Constructor.VERSION);
126
 
127
  $('[data-toggle=confirmation]').confirmation({
128
    rootSelector: '[data-toggle=confirmation]',
129
    container: 'body'
130
  });
131
  $('[data-toggle=confirmation-singleton]').confirmation({
132
    rootSelector: '[data-toggle=confirmation-singleton]',
133
    container: 'body'
134
  });
135
  $('[data-toggle=confirmation-popout]').confirmation({
136
    rootSelector: '[data-toggle=confirmation-popout]',
137
    container: 'body'
138
  });
139
 
140
  $('#confirmation-delegate').confirmation({
141
    selector: 'button'
142
  });
143
 
144
  $('[data-toggle=custom-confirmation-events]')
145
    .confirmation({
146
      rootSelector: '[data-toggle=custom-confirmation-events]',
147
      container: 'body'
148
    })
149
    .on('mouseenter', function() {
150
      $(this).confirmation('show');
151
    })
152
    .on('myevent', function() {
153
      alert('"myevent" triggered');
154
    });
155
 
156
  $('#custom-confirmation').confirmation({
157
    rootSelector: '#custom-confirmation',
158
    container: 'body',
159
    title: '',
160
    onConfirm: function(value) {
161
      alert('You choosed ' + value);
162
    },
163
    buttons: [
164
      {
165
        class: 'btn btn-sm btn-danger',
166
        iconClass: 'material-icons mr-1',
167
        iconContent: 'directions_railway',
168
        label: 'Railway',
169
        value: 'Railway'
170
      },
171
      {
172
        class: 'btn btn-sm btn-primary',
173
        iconClass: 'material-icons mr-1',
174
        iconContent: 'directions_car',
175
        label: 'Car',
176
        value: 'Car'
177
      },
178
      {
179
        class: 'btn btn-sm btn-warning',
180
        iconClass: 'material-icons mr-1',
181
        iconContent: 'directions_boat',
182
        label: 'Boat',
183
        value: 'Boat'
184
      },
185
      {
186
        class: 'btn btn-sm btn-secondary',
187
        iconClass: 'material-icons mr-1',
188
        iconContent: 'cancel',
189
        label: 'Cancel',
190
        cancel: true
191
      }
192
    ]
193
  });
194
 
195
  $('#custom-confirmation-links').confirmation({
196
    rootSelector: '#custom-confirmation-link',
197
    container: 'body',
198
    title: '',
199
    buttons: [
200
      {
201
        label: 'Twitter',
202
        iconClass: 'fa fa-twitter fa-lg mr-1',
203
        attr: {
204
          href: 'https://twitter.com',
205
          target: '_blank'
206
        }
207
      },
208
      {
209
        label: 'Facebook',
210
        iconClass: 'fa fa-facebook fa-lg mr-1',
211
        attr: {
212
          href: 'https://facebook.com',
213
          target: '_blank'
214
        }
215
      },
216
      {
217
        label: 'Pinterest',
218
        iconClass: 'fa fa-pinterest fa-lg mr-1',
219
        attr: {
220
          href: 'https://pinterest.com',
221
          target: '_blank'
222
        }
223
      }
224
    ]
225
  });
226
</script>
227
 
228
</body>
229
</html>