combo_auto_box 0.0.30 → 0.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -293,7 +293,7 @@ var ComboAutoBox = {
|
|
293
293
|
html = html + ' id="' + generateAnId('combo-auto-box') + '"';
|
294
294
|
}
|
295
295
|
|
296
|
-
if (options.bootstrap) {
|
296
|
+
if ((options.bootstrap) && (options.type == "simple")) {
|
297
297
|
html = html + ' class="form-control" '
|
298
298
|
}
|
299
299
|
|
@@ -309,12 +309,12 @@ var ComboAutoBox = {
|
|
309
309
|
return '<span class="simple" title="' + i18nShowSearchOptions(options.lang) + '"><i></i></span>';
|
310
310
|
}
|
311
311
|
} else if (options.type == 'multiple') {
|
312
|
-
|
312
|
+
return '<span class="multiple">' + options.label + ':</span>';
|
313
313
|
}
|
314
314
|
};
|
315
315
|
|
316
316
|
var adjustExpanderImage = function() {
|
317
|
-
if (options.bootstrap) {
|
317
|
+
if ((options.bootstrap) && (options.type == "simple")) {
|
318
318
|
return true;
|
319
319
|
}
|
320
320
|
|
@@ -416,7 +416,10 @@ var ComboAutoBox = {
|
|
416
416
|
var generateDivTag = function () {
|
417
417
|
var klass = 'container-combo-auto-box'
|
418
418
|
if (options.type == 'multiple') {
|
419
|
-
|
419
|
+
if (options.bootstrap) {
|
420
|
+
klass = klass + '-bootstrap';
|
421
|
+
}
|
422
|
+
klass = klass + ' multiple';
|
420
423
|
} else if (options.type == 'searchable') {
|
421
424
|
klass = klass + ' searchable'
|
422
425
|
} else if ((options.type == 'simple') && (options.bootstrap)) {
|
@@ -446,19 +449,19 @@ var ComboAutoBox = {
|
|
446
449
|
|
447
450
|
$("#" + modalDialogId).siblings('div.ui-dialog-titlebar').remove();
|
448
451
|
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
});
|
453
|
-
} else {
|
454
|
-
$('#' + container + ' > div.container-combo-auto-box > span.' + options.type).click(function() {
|
455
|
-
openModalDialog(modalDialogId)
|
456
|
-
});
|
457
|
-
}
|
452
|
+
$('#' + container + ' > div.container-combo-auto-box > span.' + options.type).click(function() {
|
453
|
+
openModalDialog(modalDialogId)
|
454
|
+
});
|
458
455
|
};
|
459
456
|
|
460
457
|
// dialog modal
|
461
458
|
var generateBootstrapDialogModal = function (modalDialogId) {
|
459
|
+
var targetObject = ('#' + container + ' > div.container-combo-auto-box-bootstrap > span');
|
460
|
+
|
461
|
+
if (options.type == "simple") {
|
462
|
+
targetObject = targetObject + ' > button';
|
463
|
+
}
|
464
|
+
|
462
465
|
modal = '<div class="modal fade" id="' + modalDialogId + '" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">' +
|
463
466
|
'<div class="modal-dialog">' +
|
464
467
|
'<div class="modal-content">' +
|
@@ -477,7 +480,7 @@ var ComboAutoBox = {
|
|
477
480
|
|
478
481
|
getListForModalDialog(modalDialogId);
|
479
482
|
|
480
|
-
$(
|
483
|
+
$(targetObject).click(function() {
|
481
484
|
$('#' + modalDialogId).modal('show');
|
482
485
|
});
|
483
486
|
};
|
@@ -554,9 +557,9 @@ var ComboAutoBox = {
|
|
554
557
|
$('#' + container + ' > div.container-combo-auto-box-bootstrap > input').val(thisLabel);
|
555
558
|
selectData(thisId, thisLabel);
|
556
559
|
} else if (options.type == 'multiple') {
|
557
|
-
$('#' + container + ' > div.container-combo-auto-box > input').val('');
|
558
|
-
addMultipleItem($('#' + container + ' > div.container-combo-auto-box > input').attr('id'), thisId, thisLabel);
|
559
|
-
$('#' + container + ' > div.container-combo-auto-box > input[type="text"]').focus();
|
560
|
+
$('#' + container + ' > div.container-combo-auto-box-bootstrap > input').val('');
|
561
|
+
addMultipleItem($('#' + container + ' > div.container-combo-auto-box-bootstrap > input').attr('id'), thisId, thisLabel);
|
562
|
+
$('#' + container + ' > div.container-combo-auto-box-bootstrap > input[type="text"]').focus();
|
560
563
|
selectData(thisId, thisLabel);
|
561
564
|
}
|
562
565
|
|
@@ -573,7 +576,11 @@ var ComboAutoBox = {
|
|
573
576
|
// starting generate modial dialog
|
574
577
|
var generateModalDialog = function (textField) {
|
575
578
|
if (options.bootstrap) {
|
576
|
-
|
579
|
+
if (options.type == 'simple') {
|
580
|
+
$(generateExpander()).appendTo('#' + container + ' > div.container-combo-auto-box-bootstrap');
|
581
|
+
} else {
|
582
|
+
$(generateExpander()).prependTo('#' + container + ' > div.container-combo-auto-box-bootstrap');
|
583
|
+
}
|
577
584
|
generateBootstrapDialogModal(generateAnId('model-dialog'));
|
578
585
|
} else {
|
579
586
|
$(generateExpander()).prependTo('#' + container + ' > div.container-combo-auto-box');
|
@@ -0,0 +1,21 @@
|
|
1
|
+
span.combo-auto-box-item-id { display:none; }
|
2
|
+
|
3
|
+
div.multiple { border: 1px solid #CDCDCD; display:table; width:100%; padding: 6px 6px; }
|
4
|
+
div.multiple:hover {cursor:text}
|
5
|
+
div.multiple span.multiple { font-family: inherit; float:left; font-size: 18px; color:#9A9A9A; margin: 1px 2px 2px 2px; padding:2px 10px 2px 10px; vertical-align: middle; }
|
6
|
+
div.multiple span.multiple:hover { cursor:pointer; }
|
7
|
+
div.multiple input { border: 0px; float:left; min-height:25px; font-size:15px; margin-top:2px; }
|
8
|
+
div.multiple input:focus { outline:none; }
|
9
|
+
div.multiple div.item { font-family: arial,sans-serif; float:left; font-size: 15px; color:#000000; background-color:#EDEDED; margin: 2px 10px 2px 2px; padding:2px 10px 2px 10px; border-radius: .25em; vertical-align: baseline; display:inline; white-space: nowrap; }
|
10
|
+
div.multiple div.item:hover { cursor:default; }
|
11
|
+
div.multiple div.item span { margin-left:10px; color:#CCCCCC; }
|
12
|
+
div.multiple div.item span:hover { color:#9A9A9A; cursor:pointer;}
|
13
|
+
|
14
|
+
div.searchable { border: 1px solid #CDCDCD; display:table; width:100%; padding: 6px 6px; }
|
15
|
+
div.searchable:hover {cursor:text}
|
16
|
+
div.searchable input { border: 0px; float:left; min-height:25px; font-size:15px; margin-top:2px; }
|
17
|
+
div.searchable input:focus { outline:none; }
|
18
|
+
div.searchable div.item { font-family: inherit; float:left; font-size: 15px; color:#FFFFFF; background-color:#008000; margin: 2px 10px 2px 2px; padding:2px 10px 2px 10px; border-radius: .25em; vertical-align: baseline; display:inline; white-space: nowrap; }
|
19
|
+
div.searchable div.item:hover { cursor:default; }
|
20
|
+
div.searchable div.item span { margin-left:10px; color:#CCCCCC; }
|
21
|
+
div.searchable div.item span:hover { color:#FFFFFF; cursor:pointer;}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: combo_auto_box
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.31
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-10-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -43,6 +43,7 @@ files:
|
|
43
43
|
- vendor/assets/images/dark-grey-disclosure-arrow-down.png
|
44
44
|
- vendor/assets/images/light-grey-disclosure-arrow-down.png
|
45
45
|
- vendor/assets/javascripts/combo-auto-box.js
|
46
|
+
- vendor/assets/stylesheets/combo-auto-box-bootstrap.css
|
46
47
|
- vendor/assets/stylesheets/combo-auto-box.css
|
47
48
|
- spec/combo_auto_box_spec.rb
|
48
49
|
- spec/database.yml
|