Skip to content

Commit 0b0c25c

Browse files
author
0xAX
committed
Merge pull request #7 from solcates/master
PR to add support for {{variables}} in dropdown-group
2 parents d26eed1 + 32cb73a commit 0b0c25c

File tree

11 files changed

+390
-122
lines changed

11 files changed

+390
-122
lines changed

Changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
0.0.2 [WiP]
22
=============================
3+
* Added Wizard directive
4+
* fixes to dropdown to update model, and allow for {{variables}} as title
5+
* code clean up and grunt task optimization
36

47
0.0.1 [Released]
58
=============================

Contributors.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ Contributors:
55
* [Nikita K.](https://github.com/Mendor)
66
* [StudioThree10](https://github.com/studiothree10)
77
* [cgroner](https://github.com/cgroner)
8+
* [solcates](https://github.com/solcates)

Gruntfile.js

Lines changed: 56 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,63 @@
1+
'use strict';
12
module.exports = function(grunt) {
2-
3-
grunt.loadNpmTasks('grunt-contrib-watch');
4-
grunt.loadNpmTasks('grunt-contrib-concat');
5-
grunt.loadNpmTasks('grunt-contrib-copy');
6-
grunt.loadNpmTasks('grunt-contrib-jshint');
7-
grunt.loadNpmTasks('grunt-contrib-uglify');
8-
grunt.loadNpmTasks('grunt-html2js');
9-
grunt.loadNpmTasks('grunt-karma');
10-
grunt.loadNpmTasks('grunt-conventional-changelog');
11-
grunt.loadNpmTasks('grunt-ngdocs');
123

13-
grunt.initConfig({
14-
dist: 'dist',
15-
filename: 'angular-semantic-ui',
16-
pkg: grunt.file.readJSON('package.json'),
17-
concat: {
18-
js:{
19-
src: ['src/angularify.semantic.js', 'src/accordion/accordion.js',
20-
'src/checkbox/checkbox.js', 'src/dimmer/dimmer.js',
21-
'src/dropdown/dropdown.js', 'src/modal/modal.js',
22-
'src/popup/popup.js',
23-
'src/sidebar/sidebar.js', 'src/rating/rating.js'
24-
],
25-
dest: '<%= dist %>/<%= filename %>-<%= pkg.version %>.js'
26-
}
27-
},
28-
uglify: {
29-
dist:{
30-
src:['<%= dist %>/<%= filename %>-<%= pkg.version %>.js'],
31-
dest: '<%= dist %>/<%= filename %>-<%= pkg.version %>.js'
32-
}
33-
},
34-
karma: {
35-
options: {
36-
configFile: 'karma.conf.js'
4+
grunt.loadNpmTasks('grunt-contrib-watch');
5+
grunt.loadNpmTasks('grunt-contrib-concat');
6+
grunt.loadNpmTasks('grunt-contrib-copy');
7+
grunt.loadNpmTasks('grunt-contrib-jshint');
8+
grunt.loadNpmTasks('grunt-contrib-uglify');
9+
grunt.loadNpmTasks('grunt-html2js');
10+
grunt.loadNpmTasks('grunt-karma');
11+
grunt.loadNpmTasks('grunt-conventional-changelog');
12+
grunt.loadNpmTasks('grunt-ngdocs');
13+
14+
grunt.initConfig({
15+
dist: 'dist',
16+
filename: 'angular-semantic-ui',
17+
pkg: grunt.file.readJSON('package.json'),
18+
concat: {
19+
js: {
20+
src: ['src/angularify.semantic.js',
21+
'src/accordion/accordion.js',
22+
'src/checkbox/checkbox.js',
23+
'src/dimmer/dimmer.js',
24+
'src/dropdown/dropdown.js',
25+
'src/modal/modal.js',
26+
'src/popup/popup.js',
27+
'src/sidebar/sidebar.js',
28+
'src/rating/rating.js',
29+
'src/wizard/wizard.js',
30+
],
31+
dest: '<%= dist %>/<%= filename %>.js'
32+
}
3733
},
38-
watch: {
39-
background: true
34+
uglify: {
35+
dist: {
36+
src: ['<%= dist %>/<%= filename %>.js'],
37+
dest: '<%= dist %>/<%= filename %>.min.js'
38+
}
4039
},
41-
continuous: {
42-
singleRun: true
40+
karma: {
41+
options: {
42+
configFile: 'karma.conf.js'
43+
},
44+
watch: {
45+
background: true
46+
},
47+
continuous: {
48+
singleRun: true
49+
},
4350
},
44-
}
45-
});
51+
watch: {
52+
javascript: {
53+
files: ['src/**/*.js'],
54+
tasks: ['concat:js', 'uglify']
55+
}
4656

47-
grunt.registerTask('build', ['concat:js', 'uglify']);
48-
grunt.registerTask('test', ['karma']);
57+
}
58+
});
4959

50-
grunt.registerTask('angular-semantic-ui-version', 'Prints version of angular-semantic-ui.', function() {
51-
console.log('angular-semantic-ui-0.0.1');
52-
});
53-
}
60+
grunt.registerTask('build', ['concat:js', 'uglify']);
61+
grunt.registerTask('test', ['karma']);
62+
grunt.registerTask('default', ['concat:js', 'uglify', 'watch:javascript']);
63+
};

bower.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@
66
"angular",
77
"ui"
88
],
9-
"homepage": "http://0xAX.github.io/angular-semantic-ui",
10-
"bugs": "https://github.com/angularify/angular-semantic-ui",
9+
"homepage": "http://solcates.github.io/angular-semantic-ui",
10+
"bugs": "https://github.com/solcates/angular-semantic-ui",
1111
"author": {
1212
"name": "Alex Kuleshov",
1313
"url": "https://github.com/0xAX"
1414
},
1515
"repository": {
1616
"type": "git",
17-
"url": "https://github.com/angularify/angular-semantic-ui.git"
17+
"url": "https://github.com/solcates/angular-semantic-ui.git"
1818
},
1919
"licenses": [
2020
{
2121
"type": "MIT",
22-
"url": "https://github.com/angularify/angular-semantic-ui/blob/master/LICENSE.md"
22+
"url": "https://github.com/solcates/angular-semantic-ui/blob/master/LICENSE.md"
2323
}
2424
],
2525
"main": [
26-
"dist/angular-semantic-ui.min.js",
27-
"dist/angular-semantic-ui.tpl.min.js"
26+
"dist/angular-semantic-ui.js",
27+
"dist/angular-semantic-ui.min.js"
2828
],
2929
"ignore": [
3030
"docs",

dist/angular-semantic-ui-0.0.1.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/accordion/accordion.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ angular.module('angularify.semantic.accordion', [])
88
this.add_accordion = function(scope) {
99
$scope.accordions.push(scope);
1010

11+
1112
scope.$on('$destroy', function (event) {
1213
this.remove_accordion(scope);
1314
});

src/angularify.semantic.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ angular.module('angularify.semantic', ['angularify.semantic.accordion',
55
'angularify.semantic.modal',
66
'angularify.semantic.popup',
77
'angularify.semantic.rating',
8-
'angularify.semantic.sidebar']);
8+
'angularify.semantic.sidebar',
9+
'angularify.semantic.wizard']);

src/dropdown/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,24 @@ Usage
1515
</dropdown>
1616
```
1717

18+
or
19+
20+
```html
21+
<dropdown title="my dropdown" ng-model="category_model">
22+
<dropdown-group title="c" ng-repeat="c in catetories">{{c}}</dropdown-group>
23+
</dropdown>
24+
```
25+
1826
`dropdown` - can have following attributes:
1927

2028
* `title` - title of the dropdown;
2129
* `ng-model` - angular model;
2230
* `open` - `true` || `false`. is current dropdown opened.
2331

32+
`dropdown-group` - can have following attributes:
33+
34+
* `title` - optional setting to set the name and value of the entry. Helpful for those {{variables}} that don't.
35+
2436
Contribution
2537
-------------------------------
2638

0 commit comments

Comments
 (0)