Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

[ABSETUP-538] Adds cleanInput method which URI Encodes < by default #1856

20 changes: 20 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "eslint-config-airbnb-es5",
"parserOptions": {
"ecmaVersion": 5,
"sourceType": "module"
},
"env": {
"browser": true,
"amd": true
},
"rules": {
"indent": ["error", "tab"],
"yoda": 0,
"space-before-function-paren": 0,
"requirejs/no-named-define": 2
},
"plugins": [
"requirejs"
]
}
64 changes: 2 additions & 62 deletions index.html
Original file line number Diff line number Diff line change
@@ -614,69 +614,9 @@ <h2>Loader</h2>
<section id="pillbox">
<h2>Pillbox</h2>
<div class="thin-box">
<div style="width: 300px;">
<div class="pillbox" id="myPillbox1">
<ul class="clearfix pill-group">
<li class="pillbox-input-wrap btn-group">
<a class="pillbox-more">and <span class="pillbox-more-count"></span> more...</a>
<input type="text" class="form-control dropdown-toggle pillbox-add-item" placeholder="add item">
<button type="button" class="dropdown-toggle sr-only">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="suggest dropdown-menu" role="menu" data-toggle="dropdown" data-flip="auto"></ul>
</li>
</ul>
</div>
</div>
<div id="myPillbox1Wrapper" style="width: 300px;"></div>
<br/>
<div style="width: 230px;">
<div class="pillbox" data-readonly="readonly" id="myPillbox2">
<ul class="clearfix pill-group">

<li class="btn btn-default pill" data-value="foo">
<span>Item 1</span>
<span class="glyphicon glyphicon-close">
<span class="sr-only">Remove</span>
</span>
</li>
<li class="btn btn-default pill">
<span>Item 2</span>
<span class="glyphicon glyphicon-close">
<span class="sr-only">Remove</span>
</span>
</li>
<li class="btn btn-default pill" data-value="three-value">
<span>Item 3</span>
<span class="glyphicon glyphicon-close">
<span class="sr-only">Remove</span>
</span>
</li>
<li class="btn btn-default pill">
<span>Item 4</span>
<span class="glyphicon glyphicon-close">
<span class="sr-only">Remove</span>
</span>
</li>
<li class="btn btn-default pill">
<span>Item 5</span>
<span class="glyphicon glyphicon-close">
<span class="sr-only">Remove</span>
</span>
</li>

<li class="pillbox-input-wrap btn-group">
<a class="pillbox-more">and <span class="pillbox-more-count"></span> more...</a>
<input type="text" class="form-control dropdown-toggle pillbox-add-item" placeholder="add item">
<button type="button" class="dropdown-toggle sr-only">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="suggest dropdown-menu" role="menu" data-toggle="dropdown" data-flip="auto"></ul>
</li>
</ul>
</div>
</div>
<div id="myPillbox2Wrapper" style="width: 230px;"></div>
</div>
<div class="btn-panel">
<!--<button type="button" class="btn btn-default" id="btnPillboxEnable">enable</button>-->
31 changes: 30 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -271,6 +271,10 @@ define(function (require) {
PILLBOX
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

var pillbox = require('hbs!fuelux_templates/pillbox');
var $myPillbox1Wrapper = $('#myPillbox1Wrapper');
$myPillbox1Wrapper.html(pillbox({ id: 'myPillbox1' }));

// intitialize
$('#myPillbox1').pillbox({
edit: true,
@@ -390,6 +394,31 @@ define(function (require) {
});
}
});


var pillboxItems = [
{
value: "foo",
title: "Item 1"
},
{
title: "Item 2"
},
{
value: "three-value",
title: "Item 3"
},
{
title: "Item 4"
},
{
title: "Item 5"
}
];

var $myPillbox2Wrapper = $('#myPillbox2Wrapper');
$myPillbox2Wrapper.html(pillbox({ id: 'myPillbox2', items: pillboxItems }));

$('#myPillbox2').pillbox({
truncate: true
});
@@ -675,7 +704,7 @@ define(function (require) {
initRepeater();
});

$('#myRepeater').on('pageChanged.fu.repeater', function (e, data) {
$('#myRepeater').on('pageChanged.fu.repeater', function (e, data) {
console.log('pagechanged', e, data);
});

Loading