-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2bff05f
commit f7521b7
Showing
23 changed files
with
12,277 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
node_modules/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
module.exports = function (grunt) { | ||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
concat: { | ||
options: { | ||
stripBanners: true, | ||
separator: ';', | ||
banner: '/*! \n<%= pkg.name %> - v<%= pkg.version %> - ' + | ||
'<%= grunt.template.today("yyyy-mm-dd") %> \n*/\n', | ||
separator: '\n/* ---------------------------- */\n' | ||
}, | ||
basic: { | ||
src: [ | ||
'lib/AXConfig.js', | ||
'lib/AXUtil.js', | ||
'lib/AXCore.js' | ||
], | ||
dest: 'lib/AXJ.js' | ||
}, | ||
tiny: { | ||
src: [ | ||
'lib/AXJ.js', | ||
'lib/AXInput.js', | ||
'lib/AXInputPro.js', | ||
'lib/AXSelect.js', | ||
'lib/AXMobileMenu.js', | ||
'lib/AXTopDownMenu.js' | ||
], | ||
dest: 'dist/<%= pkg.name %>.tiny.js' | ||
}, | ||
extras: { | ||
src: [ | ||
'lib/AXJ.js', | ||
'lib/AXDOMRange.js', | ||
'lib/AXDrag.js', | ||
'lib/AXEditor.js', | ||
'lib/AXExcelConvert.js', | ||
'lib/AXSplit.js', | ||
'lib/AXGrid.js', | ||
'lib/AXHtmlElement.js', | ||
'lib/AXInput.js', | ||
'lib/AXInputPro.js', | ||
'lib/AXMobileMenu.js', | ||
'lib/AXModal.js', | ||
'lib/AXModelControl.js', | ||
'lib/AXModelControlGrid.js', | ||
'lib/AXMultiSelector.js', | ||
'lib/AXProgress.js', | ||
//'lib/AXScheduleCalendar.js', | ||
'lib/AXSearch.js', | ||
'lib/AXSelect.js', | ||
//'lib/AXSlidePPT.js', | ||
'lib/AXSlideViewer.js', | ||
'lib/AXTab.js', | ||
'lib/AXToolBar.js', | ||
'lib/AXTopDownMenu.js', | ||
'lib/AXTree.js', | ||
'lib/AXUpload5.js', | ||
'lib/AXUserSelect.js', | ||
'lib/AXValidator.js', | ||
'lib/AXWaterfall.js' | ||
], | ||
dest: 'dist/<%= pkg.name %>.all.js' | ||
} | ||
}, | ||
uglify: { | ||
options: { | ||
mangle: false, | ||
preserveComments: false | ||
}, | ||
dist: { | ||
files: { | ||
'dist/AXBinder.min.js': ['plugins/mustache/mustache.js', 'src/AXBinder.js'] | ||
} | ||
} | ||
}, | ||
less: { | ||
development: { | ||
files: [{ | ||
expand: true, | ||
cwd: 'ui/arongi', | ||
src: ['*.less'], | ||
dest: 'ui/arongi', | ||
ext: '.css' | ||
}, { | ||
expand: true, | ||
cwd: 'ui/bulldog', | ||
src: ['*.less'], | ||
dest: 'ui/bulldog', | ||
ext: '.css' | ||
}, { | ||
expand: true, | ||
cwd: 'ui/cocker', | ||
src: ['*.less'], | ||
dest: 'ui/cocker', | ||
ext: '.css' | ||
}, { | ||
expand: true, | ||
cwd: 'ui/flybasket', | ||
src: ['*.less'], | ||
dest: 'ui/flybasket', | ||
ext: '.css' | ||
}, { | ||
expand: true, | ||
cwd: 'ui/kakao', | ||
src: ['*.less'], | ||
dest: 'ui/kakao', | ||
ext: '.css' | ||
}] | ||
} | ||
}, | ||
cssmin: { | ||
add_banner: { | ||
options: { | ||
banner: '/*! \n<%= pkg.name %> - v<%= pkg.version %> - ' + | ||
'<%= grunt.template.today("yyyy-mm-dd") %> \n*/\n' | ||
}, | ||
files: { | ||
'ui/arongi/AXJ.min.css': [ | ||
'ui/arongi/*.css', | ||
'!ui/arongi/dx-*.css', | ||
'!ui/arongi/tx-*.css', | ||
'!ui/arongi/mx-*.css', | ||
'!ui/arongi/font-*.css', | ||
'!ui/arongi/*.min.css', | ||
'!ui/arongi/page.css', | ||
'!ui/arongi/preset.css' | ||
], | ||
'ui/bulldog/AXJ.min.css': [ | ||
'ui/bulldog/*.css', | ||
'!ui/bulldog/dx-*.css', | ||
'!ui/bulldog/tx-*.css', | ||
'!ui/bulldog/mx-*.css', | ||
'!ui/bulldog/font-*.css', | ||
'!ui/bulldog/*.min.css', | ||
'!ui/bulldog/page.css', | ||
'!ui/bulldog/preset.css' | ||
], | ||
'ui/cocker/AXJ.min.css': [ | ||
'ui/cocker/*.css', | ||
'!ui/cocker/dx-*.css', | ||
'!ui/cocker/tx-*.css', | ||
'!ui/cocker/mx-*.css', | ||
'!ui/cocker/font-*.css', | ||
'!ui/cocker/*.min.css', | ||
'!ui/cocker/page.css', | ||
'!ui/cocker/preset.css' | ||
], | ||
'ui/flybasket/AXJ.min.css': [ | ||
'ui/flybasket/*.css', | ||
'!ui/flybasket/dx-*.css', | ||
'!ui/flybasket/tx-*.css', | ||
'!ui/flybasket/mx-*.css', | ||
'!ui/flybasket/font-*.css', | ||
'!ui/flybasket/*.min.css', | ||
'!ui/flybasket/page.css', | ||
'!ui/flybasket/preset.css' | ||
], | ||
'ui/kakao/AXJ.min.css': [ | ||
'ui/kakao/*.css', | ||
'!ui/kakao/dx-*.css', | ||
'!ui/kakao/tx-*.css', | ||
'!ui/kakao/mx-*.css', | ||
'!ui/kakao/font-*.css', | ||
'!ui/kakao/*.min.css', | ||
'!ui/kakao/page.css', | ||
'!ui/kakao/preset.css' | ||
] | ||
} | ||
} | ||
} | ||
}); | ||
|
||
//grunt.loadTasks('tasks'); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-contrib-less'); | ||
grunt.loadNpmTasks('grunt-contrib-cssmin'); | ||
|
||
grunt.registerTask('dist', ['uglify']); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# AXBinder | ||
Simple two way binding javascript, jQuery plugin | ||
|
||
[![axisj-contributed](https://img.shields.io/badge/AXISJ.com-OpensourceJavascriptUILibrary-green.svg)](https://github.com/axisj) ![](https://img.shields.io/badge/Seowoo-Mondo&Thomas-red.svg) | ||
|
||
|
||
```js | ||
var obj = { | ||
v1: "abcd", v2: "N", v3: "Y", v4: "o2", v5: "multiline\ndatas", v6: { | ||
c1: { | ||
cc1: "v6.c1.cc1's value", cc2: "v6.c1.cc2's value", cc3: "v6.c1.cc3's value" | ||
} | ||
} | ||
}; | ||
``` | ||
|
||
```html | ||
<div id="form-target"> | ||
|
||
v1 : <input type="text" name="input-text" data-ax-path="v1"/> | ||
|
||
<hr/> | ||
|
||
v6.c1.cc1 : <input type="text" name="input-text" data-ax-path="v6.c1.cc1"/> | ||
v6.c1.cc2 : <input type="text" name="input-text" data-ax-path="v6.c1.cc2"/> | ||
v6.c1.cc3 : <input type="text" name="input-text" data-ax-path="v6.c1.cc3"/> | ||
|
||
<hr/> | ||
|
||
v2 : | ||
<label> | ||
<input type="checkbox" name="checkbox" data-ax-path="v2" value="Y"/> | ||
Y | ||
</label> | ||
<label> | ||
<input type="checkbox" name="checkbox" data-ax-path="v2" value="N"/> | ||
N | ||
</label> | ||
|
||
<hr/> | ||
|
||
v3 : | ||
<label> | ||
<input type="radio" name="radio" data-ax-path="v3" value="Y"/> | ||
Y | ||
</label> | ||
<label> | ||
<input type="radio" name="radio" data-ax-path="v3" value="N"/> | ||
N | ||
</label> | ||
|
||
<hr/> | ||
|
||
v4 : | ||
<select name="select" data-ax-path="v4"> | ||
<option vlaue="o1">o1</option> | ||
<option vlaue="o2">o2</option> | ||
<option vlaue="o2">o2</option> | ||
</select> | ||
|
||
<hr/> | ||
|
||
v5 : | ||
<textarea name="textarea" data-ax-path="v5"></textarea> | ||
|
||
|
||
<div id="div-element"></div> | ||
|
||
</div> | ||
``` | ||
|
||
```js | ||
var myModel = AXBinder.set_model(obj, $("#form-target")); | ||
myModel.set("v6", {c1: {cc1: "-- new cc1", cc2: "-- new cc2", cc3: "-- new cc3"}}); | ||
myModel.set("v1", "new value"); | ||
console.log(myModel.getAll()); | ||
``` |
Oops, something went wrong.