Skip to content

Commit 0361a33

Browse files
committed
Added form, lists, modal, popover, popup snippets
1 parent 6f56356 commit 0361a33

24 files changed

+451
-5
lines changed

css/form/ion-form.sublime-snippet

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<snippet>
2-
<content><![CDATA[
2+
<content><![CDATA[
33
<div class="list">
44
<label class="item item-input">
55
<input type="text" placeholder="${1:First Name}">
@@ -13,8 +13,8 @@
1313
1414
</div>
1515
]]></content>
16-
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
17-
<tabTrigger>ion-form</tabTrigger>
18-
<!-- Optional: Set a scope to limit where the snippet will trigger -->
19-
<!-- <scope>source.python</scope> -->
16+
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
17+
<tabTrigger>ion-form</tabTrigger>
18+
<!-- Optional: Set a scope to limit where the snippet will trigger -->
19+
<!-- <scope>source.python</scope> -->
2020
</snippet>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<snippet>
2+
<content><![CDATA[
3+
angular.module('${1:mySuperApp}', ['ionic'])
4+
.controller(function($scope, $ionicActionSheet, $timeout) {
5+
6+
${2:// Triggered on a button click, or some other target}
7+
$scope.show = function() {
8+
9+
${3:// Show the action sheet}
10+
var hideSheet = $ionicActionSheet.show({
11+
buttons: [
12+
{ text: '${4:<b>Share</b> This}' },
13+
{ text: '${5:Move}' }
14+
],
15+
destructiveText: '${6:Delete}',
16+
titleText: '${7:Modify your album}',
17+
cancelText: '${8:Cancel}',
18+
cancel: function() {
19+
${9:// add cancel code..}
20+
},
21+
buttonClicked: function(index) {
22+
return true;
23+
}
24+
});
25+
26+
${10:// For example's sake, hide the sheet after two seconds}
27+
$timeout(function() {
28+
hideSheet();
29+
}, 2000);
30+
31+
};
32+
});
33+
]]></content>
34+
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
35+
<tabTrigger>ion-js-$ionicActionSheet-ng</tabTrigger>
36+
<!-- Optional: Set a scope to limit where the snippet will trigger -->
37+
<!-- <scope>source.python</scope> -->
38+
</snippet>
39+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<snippet>
2+
<content><![CDATA[
3+
<body ng-controller="${1:My}Ctrl">
4+
<ion-slide-box>
5+
<ion-slide>
6+
<div class="box blue">
7+
<button ng-click="${2:nextSlide}()">${3:Next slide!}</button>
8+
</div>
9+
</ion-slide>
10+
<ion-slide>
11+
<div class="box red">
12+
${4:Slide 2!}
13+
</div>
14+
</ion-slide>
15+
</ion-slide-box>
16+
</body>
17+
]]></content>
18+
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
19+
<tabTrigger>ion-js-$ionicSlideBoxDelegate-html</tabTrigger>
20+
<!-- Optional: Set a scope to limit where the snippet will trigger -->
21+
<!-- <scope>source.python</scope> -->
22+
</snippet>
23+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<snippet>
2+
<content><![CDATA[
3+
function ${1:My}Ctrl($scope, $ionicSlideBoxDelegate) {
4+
$scope.${2:nextSlide} = function() {
5+
$ionicSlideBoxDelegate.next();
6+
}
7+
}
8+
]]></content>
9+
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
10+
<tabTrigger>ion-js-$ionicSlideBoxDelegate-ng</tabTrigger>
11+
<!-- Optional: Set a scope to limit where the snippet will trigger -->
12+
<!-- <scope>source.python</scope> -->
13+
</snippet>
14+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<snippet>
2+
<content><![CDATA[
3+
<ion-checkbox ng-model="${1:isChecked}">${2:Checkbox Label}</ion-checkbox>
4+
]]></content>
5+
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
6+
<tabTrigger>ion-js-form-checkbox</tabTrigger>
7+
<!-- Optional: Set a scope to limit where the snippet will trigger -->
8+
<!-- <scope>source.python</scope> -->
9+
</snippet>
10+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<snippet>
2+
<content><![CDATA[
3+
<ion-radio ng-model="${1:choice}" ng-value="'${2:A}'">${3:Choose} ${2:A}</ion-radio>
4+
<ion-radio ng-model="${1:choice}" ng-value="'${4:B}'">${5:Choose} ${4:B}</ion-radio>
5+
<ion-radio ng-model="${1:choice}" ng-value="'${6:A}'">${7:Choose} ${6:A}</ion-radio>
6+
]]></content>
7+
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
8+
<tabTrigger>ion-js-form-radio</tabTrigger>
9+
<!-- Optional: Set a scope to limit where the snippet will trigger -->
10+
<!-- <scope>source.python</scope> -->
11+
</snippet>
12+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<snippet>
2+
<content><![CDATA[
3+
<ion-toggle ng-model="${1:airplaneMode}" toggle-class="toggle-calm">${2:Airplane Mode}</ion-toggle>
4+
]]></content>
5+
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
6+
<tabTrigger>ion-js-form-toggle</tabTrigger>
7+
<!-- Optional: Set a scope to limit where the snippet will trigger -->
8+
<!-- <scope>source.python</scope> -->
9+
</snippet>
10+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<snippet>
2+
<content><![CDATA[
3+
<ion-slide-box on-slide-changed="${1:slideHasChanged}(\$${2:index})">
4+
<ion-slide>
5+
<div class="box blue"><h1>${3:BLUE}</h1></div>
6+
</ion-slide>
7+
<ion-slide>
8+
<div class="box yellow"><h1>${4:YELLOW}</h1></div>
9+
</ion-slide>
10+
<ion-slide>
11+
<div class="box pink"><h1>${5:PINK}</h1></div>
12+
</ion-slide>
13+
</ion-slide-box>
14+
]]></content>
15+
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
16+
<tabTrigger>ion-js-slide-box</tabTrigger>
17+
<!-- Optional: Set a scope to limit where the snippet will trigger -->
18+
<!-- <scope>source.python</scope> -->
19+
</snippet>
20+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<snippet>
2+
<content><![CDATA[
3+
<ion-content ng-controller="${1:My}Ctrl">
4+
<button class="button" ng-click="${2:showDeleteButtons}()"></button>
5+
<ion-list>
6+
<ion-item ng-repeat="${3:i} in ${4:items}">>
7+
${5:Hello,} {{${6:i}}}
8+
<ion-delete-button class="ion-minus-circled"></ion-delete-button>
9+
</ion-item>
10+
</ion-list>
11+
</ion-content>
12+
]]></content>
13+
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
14+
<tabTrigger>ion-js-list-$ionicListDelegate-html</tabTrigger>
15+
<!-- Optional: Set a scope to limit where the snippet will trigger -->
16+
<!-- <scope>source.python</scope> -->
17+
</snippet>
18+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<snippet>
2+
<content><![CDATA[
3+
function ${1:My}Ctrl($scope, $ionicListDelegate) {
4+
$scope.${3:showDeleteButtons} = function() {
5+
$ionicListDelegate.showDelete(true);
6+
};
7+
}
8+
]]></content>
9+
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
10+
<tabTrigger>ion-js-list-$ionicListDelegate-ng</tabTrigger>
11+
<!-- Optional: Set a scope to limit where the snippet will trigger -->
12+
<!-- <scope>source.python</scope> -->
13+
</snippet>
14+

0 commit comments

Comments
 (0)