Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
[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
[submodule "lib/CodeMirror2"]
path = lib/CodeMirror2
url = https://github.com/marijnh/CodeMirror2
2 changes: 1 addition & 1 deletion angular-ui
Submodule angular-ui updated from 868915 to 87c33b
81 changes: 55 additions & 26 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,30 @@
<title>Angular.JS-UI</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<script src="http://twitter.github.com/bootstrap/assets/js/bootstrap.min.js"></script>

<script src="lib/bootstrap/docs/assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="http://code.angularjs.org/1.0.1/angular-1.0.1.min.js"></script>
<script type="text/javascript" src="angular-ui/build/angular-ui.js"></script>
<script type="text/javascript" src="js/prettify.js"></script>
<script type="text/javascript" src="https://raw.github.com/petebacondarwin/angular-contrib/master/js/lib/jquery.maskedinput-1.3.js"></script>
<script type="text/javascript" src="http://ivaynberg.github.com/select2/select2-master/select2.js"></script>
<script type="text/javascript" src="http://craigsworks.com/projects/qtip_new/packages/nightly/jquery.qtip.js"></script>
<script type="text/javascript" src="lib/maskedinput/src/jquery.maskedinput.js"></script>
<script type="text/javascript" src="lib/select2/select2.js"></script>
<script type="text/javascript" src="lib/qTip2/dist/jquery.qtip.min.js"></script>
<script type="text/javascript" src="lib/CodeMirror2/lib/codemirror.js"></script>
<script type="text/javascript" src="lib/CodeMirror2/mode/javascript/javascript.js"></script>
<script type="text/javascript" src="http://fiddle.tinymce.com/tinymce/3.5.4.1/jquery.tinymce.js"></script>
<script type="text/javascript" src="http://fiddle.tinymce.com/tinymce/3.5.4.1/tiny_mce_jquery_src.js"></script>
<script type="text/javascript" src="http://twitter.github.com/bootstrap/assets/js/bootstrap-modal.js"></script>
<script type="text/javascript" src="js/app.js"></script>

<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="angular-ui/build/angular-ui.css" />
<link rel="stylesheet" type="text/css" href="css/prettify.css" />
<link rel="stylesheet" type="text/css" href="http://ivaynberg.github.com/select2/select2-master/select2.css" />
<link rel="stylesheet" type="text/css" href="http://craigsworks.com/projects/qtip_new/packages/nightly/jquery.qtip.css" />
<link rel="stylesheet" type="text/css" href="css/app.css" />
<link rel="stylesheet" type="text/css" href="lib/bootstrap/docs/assets/css/bootstrap.css" >
<link rel="stylesheet" type="text/css" href="angular-ui/build/angular-ui.css" >
<link rel="stylesheet" type="text/css" href="css/prettify.css" >
<link rel="stylesheet" type="text/css" href="lib/select2/select2.css" >
<link rel="stylesheet" type="text/css" href="lib/qTip2/dist/jquery.qtip.css" >
<link rel="stylesheet" type="text/css" href="lib/CodeMirror2/lib/codemirror.css" >
<link rel="stylesheet" type="text/css" href="lib/CodeMirror2/theme/monokai.css" >

<link rel="stylesheet" type="text/css" href="css/app.css" >
</head>
<body data-spy="scroll">
<header class="navbar navbar-fixed-top">
Expand Down Expand Up @@ -149,6 +154,25 @@ <h3>How?</h3>
</pre>
</section>

<section id="directives-codemirror" ng-controller="CodeMirrorCtrl">
<div class="page-header">
<h1>CodeMirror</h1>
</div>
<div class="row">
<div class="span6">
<h3>What?</h3>
<p>IDE? In <em>my</em> textareas? Surely you're joking.</p>
<p><textarea ui-codemirror="{theme:'monokai'}" ng-model="codeMirrorModel"></textarea></p>
</div>
<div class="span6">
<h3>How?</h3>
<pre class="prettyprint" ng-non-bindable>
&lt;textarea ui-codemirror=&quot;{theme:&#x27;monokai&#x27;}&quot; ng-model=&quot;codeMirrorModel&quot;&gt;&lt;/textarea&gt;
</pre>
</div>
</div>
</section>

<section id="directives-event" ng-controller="EventCtrl">
<div class="page-header">
<h1>Event Binder</h1>
Expand Down Expand Up @@ -187,9 +211,9 @@ <h3>What?</h3>
<p>Calendar picker with ng-model integration</p>
<div class="well">
<p><input value="Click Here for Datepicker" ng-model="date" ui-date></p>
<p>Selected Date: {{date}}</p>
<p>Formatted Date: {{ date.toLocaleDateString()}}</p>
<p>Selected Month: {{date.getMonth()}}</p>
<p>Selected Date: {{ date }}</p>
<p>Formatted Date: {{ date.toLocaleDateString() }}</p>
<p>Selected Month: {{ date.getMonth() }}</p>
<div ng-model="date" ui-date></div>
</div>
</div>
Expand All @@ -200,9 +224,9 @@ <h3>Why?</h3>
<h3>How?</h3>
<pre class="prettyprint linenums" ng-non-bindable>
&lt;input ng-model="date" ui-date&gt;
Selected Date: {{date}}
Formatted Date: {{ date.toLocaleDateString()}}
Selected Month: {{date.getMonth()}}
Selected Date: {{ date }}
Formatted Date: {{ date.toLocaleDateString() }}
Selected Month: {{ date.getMonth() }}
&lt;div ng-model="date" ui-date&gt;&lt;/div&gt;
</pre>
</div>
Expand All @@ -217,7 +241,7 @@ <h1>Keypress</h1>
<div class="span6">
<h3>What?</h3>
<p>Bind an event to a particular keypress</p>
<p><textarea ui-keypress="{13:keypressCallback}">Type something in and hit [Enter]. Remember that this normally adds a new line in textareas</textarea></p>
<p><textarea ui-keypress="{13:'keypressCallback($event)'}">Type something in and hit [Enter]. Remember that this normally adds a new line in textareas</textarea></p>
<h3>Why?</h3>
<p>Cuz you feel like it? Maybe I should stop doing the 'Why' sections, running out of explanations...</p>
</div>
Expand All @@ -226,11 +250,10 @@ <h3>How?</h3>
<p>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</p>
<p class="alert alert-info">Note that <strong>13</strong> represents the <code>RETURN</code> key code.</p>
<pre class="prettyprint" ng-non-bindable>
&lt;textarea ui-keypress=&quot;{ 13 : keypressCallback }&quot;&gt;&lt;/textarea&gt;
&lt;textarea ui-keypress=&quot;{ 13 : 'keypressCallback()' }&quot;&gt;&lt;/textarea&gt;

&lt;script&gt;
$scope.keypressCallback = function(e) {
e.preventDefault();
$scope.keypressCallback = function() {
alert('Voila!');
};
&lt;/script&gt;
Expand All @@ -245,7 +268,7 @@ <h1>Mask</h1>
</div>
<h3>What?</h3>
<p></p>
<p><input ng-model="maskDemo" ui-mask="'99-99-9999'"></p>
<p><input ng-model="maskDemo" ui-mask="'99-99-9999'" placeholder="__-__-____"></p>

<h3>Why?</h3>
<p></p>
Expand Down Expand Up @@ -310,22 +333,28 @@ <h3>How?</h3>
</div>
</section>

<section id="directives-reset">
<section id="directives-reset" ng-controller="ResetCtrl">
<div class="page-header">
<h1>Reset</h1>
</div>
<div class="row">
<div class="span6">
<h3>What?</h3>
<p>Adds an icon or link that empties the input element</p>
<p><input value="Hover over me" ui-reset></p>
<p><input ng-model="resetModel" ui-reset></p>
</div>
<div class="span6">
<h3>Why?</h3>
<p>Convenience?</p>

<h3>How?</h3>
<pre class="prettyprint" ng-non-bindable>&lt;input value=&quot;Hover over me&quot; ui-reset&gt;</pre>
<pre class="prettyprint" ng-non-bindable>
&lt;input ng-model="resetModel" ui-reset&gt;

&lt;script&gt;
$scope.resetModal = &#x27;Hover over me&#x27;;
&lt;/script&gt;
</pre>
</div>
</div>
</section>
Expand All @@ -349,7 +378,7 @@ <h3>What?</h3>
<a class="btn" ng-click="modalShown=false">Close ng-model way</a>
</div>
</div>
<a class="btn" ng-click="modalShown=true">Open Modal with ng-model</a><br />
<a class="btn" ng-click="modalShown=true">Open Modal with ng-model</a><br>
<a class="btn" data-toggle="modal" data-target="#myModal">Open Modal with data-toggle="modal"</a>
</p>
<h3>Why?</h3>
Expand Down
59 changes: 31 additions & 28 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,25 @@
* 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 $'
}
});

/**
* Tooltip Demo Controller
*/
function CodeMirrorCtrl($scope) {
$scope.codeMirrorModel = "var helloWorld = 'Success!';";
}

function TooltipCtrl($scope) {
$scope.item = {
title : 'Title',
body : 'Tooltip Body...'
};
$scope.item = {
title : 'Title',
body : 'Tooltip Body...'
};
};

function EventCtrl($scope) {
Expand All @@ -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) {
Expand All @@ -47,7 +49,8 @@ function LengthCtrl($scope) {
}

function KeypressCtrl($scope) {
$scope.keypressCallback = function() {
$scope.keypressCallback = function($event) {
$event.preventDefault();
alert('Voila!');
};
}
Expand All @@ -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 */
1 change: 1 addition & 0 deletions lib/CodeMirror2
Submodule CodeMirror2 added at e9ae8a
1 change: 1 addition & 0 deletions lib/bootstrap
Submodule bootstrap added at 857b8f
1 change: 1 addition & 0 deletions lib/maskedinput
Submodule maskedinput added at 0d8625
1 change: 1 addition & 0 deletions lib/qTip2
Submodule qTip2 added at 2c87c2
1 change: 1 addition & 0 deletions lib/select2
Submodule select2 added at 482cc4
1 change: 1 addition & 0 deletions lib/tinymce
Submodule tinymce added at a0df16