mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
fix
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");?>
|
||||
<?
|
||||
if(\Bitrix\Main\Loader::includeModule('wt.core')) {
|
||||
app()->service()->assets()->setPlugins([
|
||||
'kit:config',
|
||||
'kit:flex-kit',
|
||||
'kit:core',
|
||||
'kit:bsCore',
|
||||
'kit:collapse',
|
||||
'kit:site',
|
||||
'kit:toolkit',
|
||||
'kit:theme',
|
||||
])->render();
|
||||
}
|
||||
$APPLICATION->ShowHead();
|
||||
|
||||
?>
|
||||
<script>
|
||||
kit.ready(['UserActionManager'], function () {
|
||||
var m1 = new kit.UserActionManager();
|
||||
m1.setAction('popover');
|
||||
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div class="kit-wrapper">
|
||||
|
||||
|
||||
<div id="object1" style="width: 300px; height: 50px; background-color: #eaeaea; border: 1px solid;">1</div>
|
||||
|
||||
<div id="object2" style="width: 300px; height: 50px; background-color: #3860ff; border: 1px solid; display: none" class="hide">2</div>
|
||||
|
||||
<div id="object3" style="width: 300px; height: 50px; background-color: #ff1d34; border: 1px solid; display: none" class="hide">3</div>
|
||||
|
||||
</div>
|
||||
<?
|
||||
?>
|
||||
@@ -6,5 +6,6 @@
|
||||
<a href="cheatsheet.php">cheatsheet</a>
|
||||
<a href="card/block.php">card/block</a>
|
||||
<a href="kit.Collection.php">kit.Collection</a>
|
||||
<a href="UserActionManager.php">UserActionManager</a>
|
||||
|
||||
</div>
|
||||
@@ -107,6 +107,26 @@ kit.ready(['collection'], function () {
|
||||
}), undefined, 'first');
|
||||
|
||||
assertSame(collection.keys().count(), 3, 'keys');
|
||||
|
||||
|
||||
x = new kit.Collection({1: 1, 100: 100});
|
||||
x.push(200);
|
||||
assertSame(x.last(), 200, 'object push last');
|
||||
x.push(0);
|
||||
assertSame(x.last(), 0, 'object push last');
|
||||
x.push(undefined);
|
||||
assertSame(x.last(), undefined, 'object push last');
|
||||
x.push('window');
|
||||
assertSame(x.last(), 'window', 'object push last');
|
||||
assertSame(x.get(x.lastKey()), 'window', 'get lastKey');
|
||||
|
||||
x = new kit.Collection([1, 100]);
|
||||
x.push(200);
|
||||
assertSame(x.last(), 200, 'array push last');
|
||||
x.push(0);
|
||||
assertSame(x.last(), 0, 'array push last');
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user