From 03819e7a98418240ef3b2b971d58356af3e2f318 Mon Sep 17 00:00:00 2001
From: Dean Sofer
Date: Thu, 12 Jul 2012 15:01:19 -0700
Subject: [PATCH 1/4] Refactored 3rd party dependencies into submodules for
consistency.
Addresses angular-ui/angular-ui#49
---
.gitmodules | 15 +++++++++++++++
angular-ui | 2 +-
index.html | 16 ++++++++--------
lib/bootstrap | 1 +
lib/maskedinput | 1 +
lib/qTip2 | 1 +
lib/select2 | 1 +
lib/tinymce | 1 +
8 files changed, 29 insertions(+), 9 deletions(-)
create mode 160000 lib/bootstrap
create mode 160000 lib/maskedinput
create mode 160000 lib/qTip2
create mode 160000 lib/select2
create mode 160000 lib/tinymce
diff --git a/.gitmodules b/.gitmodules
index 368a9cd..b2aba27 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,18 @@
[submodule "angular-ui"]
path = angular-ui
url = git://github.com/angular-ui/angular-ui.git
+[submodule "lib/select2"]
+ path = lib/select2
+ url = git://github.com/ivaynberg/select2.git
+[submodule "lib/qTip2"]
+ path = lib/qTip2
+ url = git://github.com/Craga89/qTip2.git
+[submodule "lib/maskedinput"]
+ path = lib/maskedinput
+ url = git://github.com/digitalBush/jquery.maskedinput.git
+[submodule "lib/bootstrap"]
+ path = lib/bootstrap
+ url = git://github.com/twitter/bootstrap.git
+[submodule "lib/tinymce"]
+ path = lib/tinymce
+ url = git://github.com/tinymce/tinymce.git
diff --git a/angular-ui b/angular-ui
index 8689154..05aacb9 160000
--- a/angular-ui
+++ b/angular-ui
@@ -1 +1 @@
-Subproject commit 8689154fbf56e42c6d1970435cf037f4b5f03635
+Subproject commit 05aacb9274cbe98a47b99a0dd7a8c509d789fc77
diff --git a/index.html b/index.html
index 4b893a7..79a1dc9 100644
--- a/index.html
+++ b/index.html
@@ -4,24 +4,24 @@
Angular.JS-UI
-
+
+
-
-
-
+
+
+
-
-
+
-
-
+
+
diff --git a/lib/bootstrap b/lib/bootstrap
new file mode 160000
index 0000000..857b8fb
--- /dev/null
+++ b/lib/bootstrap
@@ -0,0 +1 @@
+Subproject commit 857b8fb8be81178d14f59c126c1381b09aff7c0f
diff --git a/lib/maskedinput b/lib/maskedinput
new file mode 160000
index 0000000..0d86254
--- /dev/null
+++ b/lib/maskedinput
@@ -0,0 +1 @@
+Subproject commit 0d86254e991fce8bb740188b308227a896e0cc70
diff --git a/lib/qTip2 b/lib/qTip2
new file mode 160000
index 0000000..2c87c2e
--- /dev/null
+++ b/lib/qTip2
@@ -0,0 +1 @@
+Subproject commit 2c87c2e54d732e33e53d0667a5c0c5b08d7e2d79
diff --git a/lib/select2 b/lib/select2
new file mode 160000
index 0000000..482cc40
--- /dev/null
+++ b/lib/select2
@@ -0,0 +1 @@
+Subproject commit 482cc409ea27fc3cdf1028e9202c1ca7ada01e35
diff --git a/lib/tinymce b/lib/tinymce
new file mode 160000
index 0000000..a0df16e
--- /dev/null
+++ b/lib/tinymce
@@ -0,0 +1 @@
+Subproject commit a0df16e10d6974bddf4566a970b6a88c17937b94
From 39238c1e8e30748c7abb5ccd203dbee3559fdedb Mon Sep 17 00:00:00 2001
From: Dean Sofer
Date: Sun, 15 Jul 2012 03:24:43 -0700
Subject: [PATCH 2/4] Updating reference to angular-ui
---
angular-ui | 2 +-
index.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/angular-ui b/angular-ui
index 05aacb9..f560659 160000
--- a/angular-ui
+++ b/angular-ui
@@ -1 +1 @@
-Subproject commit 05aacb9274cbe98a47b99a0dd7a8c509d789fc77
+Subproject commit f5606598bdea50a576d82fbea1b0893c5b6e9a24
diff --git a/index.html b/index.html
index 79a1dc9..3ba2d80 100644
--- a/index.html
+++ b/index.html
@@ -245,7 +245,7 @@ Mask
What?
-
+
Why?
From c856ba01913c4e0f6110785dcdf25c4a94d4f2c8 Mon Sep 17 00:00:00 2001
From: Dean Sofer
Date: Sun, 15 Jul 2012 05:13:39 -0700
Subject: [PATCH 3/4] Added codemirror demo and tiny cleanup
---
.gitmodules | 3 +++
index.html | 62 +++++++++++++++++++++++++++++++++++--------------
js/app.js | 53 ++++++++++++++++++++++--------------------
lib/CodeMirror2 | 1 +
4 files changed, 77 insertions(+), 42 deletions(-)
create mode 160000 lib/CodeMirror2
diff --git a/.gitmodules b/.gitmodules
index b2aba27..4ee1af8 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -16,3 +16,6 @@
[submodule "lib/tinymce"]
path = lib/tinymce
url = git://github.com/tinymce/tinymce.git
+[submodule "lib/CodeMirror2"]
+ path = lib/CodeMirror2
+ url = https://github.com/marijnh/CodeMirror2
diff --git a/index.html b/index.html
index 3ba2d80..cc84644 100644
--- a/index.html
+++ b/index.html
@@ -12,17 +12,20 @@
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Why?
diff --git a/js/app.js b/js/app.js
index 2bec62e..685a0d1 100644
--- a/js/app.js
+++ b/js/app.js
@@ -3,16 +3,14 @@
* demoApp - 1.0.0rc2
*/
-var demoApp = angular.module('demoApp', ['ui'], function($routeProvider) {}).value('ui.config', {
+angular.module('demoApp', ['ui'], function($locationProvider) {
+ $locationProvider.hashPrefix('');
+ // Make code pretty
+ window.prettyPrint && prettyPrint();
+}).value('ui.config', {
currency: {
- symbol: 'USD$'
- }
- });
-
-demoApp.config(function($locationProvider) {
- $locationProvider.hashPrefix('');
- // Make code pretty
- window.prettyPrint && prettyPrint()
+ symbol: 'USD $'
+ }
});
/**
@@ -20,10 +18,10 @@ demoApp.config(function($locationProvider) {
*/
function TooltipCtrl($scope) {
- $scope.item = {
- title : 'Title',
- body : 'Tooltip Body...'
- };
+ $scope.item = {
+ title : 'Title',
+ body : 'Tooltip Body...'
+ };
};
function EventCtrl($scope) {
@@ -33,7 +31,11 @@ function EventCtrl($scope) {
};
function ModalCtrl($scope) {
- $scope.modalShown = false;
+ $scope.modalShown = false;
+}
+
+function ResetCtrl($scope) {
+ $scope.resetModel = 'Hover over me';
}
function LengthCtrl($scope) {
@@ -47,7 +49,8 @@ function LengthCtrl($scope) {
}
function KeypressCtrl($scope) {
- $scope.keypressCallback = function() {
+ $scope.keypressCallback = function($event) {
+ $event.preventDefault();
alert('Voila!');
};
}
@@ -58,21 +61,21 @@ function ScrollfixCtrl($scope) {
function UniqueCtrl($scope) {
$scope.items = [
- { firstName: 'Dean', lastName: 'Sofer', id: 1, gender: 'Male' },
- { firstName: 'Dean', lastName: 'Kuntz', id: 2, gender: 'Male' },
- { firstName: 'Peter', lastName: 'Piper', id: 3, gender: 'Female' },
- { firstName: 'Peter', lastName: 'Darwin', id: 4, gender: 'Male' },
- { firstName: 'Janet', lastName: 'Piper', id: 5, gender: 'Female' },
- { firstName: 'Dan', lastName: 'Doyon', id: 6, gender: 'Male' },
- { firstName: 'Andy', lastName: 'Joslin', id: 1, gender: 'Male' },
+ { firstName: 'Dean', lastName: 'Sofer', id: 1, gender: 'Male' },
+ { firstName: 'Dean', lastName: 'Kuntz', id: 2, gender: 'Male' },
+ { firstName: 'Peter', lastName: 'Piper', id: 3, gender: 'Female' },
+ { firstName: 'Peter', lastName: 'Darwin', id: 4, gender: 'Male' },
+ { firstName: 'Janet', lastName: 'Piper', id: 5, gender: 'Female' },
+ { firstName: 'Dan', lastName: 'Doyon', id: 6, gender: 'Male' },
+ { firstName: 'Andy', lastName: 'Joslin', id: 1, gender: 'Male' },
];
}
function CurrencyCtrl($scope) {
$scope.nums = {
- pos : 1000,
- neg : -12345,
- zero: 0
+ pos : 1000,
+ neg : -12345,
+ zero: 0
};
};
/* EOF */
\ No newline at end of file
diff --git a/lib/CodeMirror2 b/lib/CodeMirror2
new file mode 160000
index 0000000..e9ae8ac
--- /dev/null
+++ b/lib/CodeMirror2
@@ -0,0 +1 @@
+Subproject commit e9ae8ac85dc540508c27de6c48b6d77d0d724898
From 47ad13be2e631daf09e262810a41422772655d56 Mon Sep 17 00:00:00 2001
From: Dean Sofer
Date: Mon, 16 Jul 2012 02:36:42 -0700
Subject: [PATCH 4/4] Updated demos to coincide with latest angular-ui update
---
angular-ui | 2 +-
index.html | 13 +++++++------
js/app.js | 6 +++---
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/angular-ui b/angular-ui
index f560659..87c33b8 160000
--- a/angular-ui
+++ b/angular-ui
@@ -1 +1 @@
-Subproject commit f5606598bdea50a576d82fbea1b0893c5b6e9a24
+Subproject commit 87c33b8537c551a817d9565bc85fcd855f9f4391
diff --git a/index.html b/index.html
index cc84644..5d7e2d1 100644
--- a/index.html
+++ b/index.html
@@ -13,6 +13,7 @@
+
@@ -24,6 +25,7 @@
+
@@ -152,7 +154,7 @@ How?
-
+
@@ -160,12 +162,12 @@ CodeMirror
What?
IDE? In my textareas? Surely you're joking.
-
+
How?
-<textarea ui-codemirror ng-model="codeMirrorModel"></textarea>
+<textarea ui-codemirror="{theme:'monokai'}" ng-model="codeMirrorModel"></textarea>
@@ -248,11 +250,10 @@ How?
The directive takes a hash (object) with the key code as the key and the callback function to fire as the value. The callback function takes an 'event' param
Note that 13 represents the RETURN key code.
-<textarea ui-keypress="{ 13 : keypressCallback }"></textarea>
+<textarea ui-keypress="{ 13 : 'keypressCallback()' }"></textarea>
<script>
-$scope.keypressCallback = function(e) {
- e.preventDefault();
+$scope.keypressCallback = function() {
alert('Voila!');
};
</script>
diff --git a/js/app.js b/js/app.js
index 685a0d1..0ea7176 100644
--- a/js/app.js
+++ b/js/app.js
@@ -13,9 +13,9 @@ angular.module('demoApp', ['ui'], function($locationProvider) {
}
});
-/**
- * Tooltip Demo Controller
- */
+function CodeMirrorCtrl($scope) {
+ $scope.codeMirrorModel = "var helloWorld = 'Success!';";
+}
function TooltipCtrl($scope) {
$scope.item = {