From 1f0562150921ea2f05149b64ef0440937491def9 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Fri, 2 Jul 2010 15:39:47 -0700 Subject: change all attributes from ng- to ng: prefix --- example/memoryLeak.html | 4 ++-- example/tweeter/tweeter_addressbook.html | 30 +++++++++++++++--------------- example/tweeter/tweeter_demo.html | 10 +++++----- 3 files changed, 22 insertions(+), 22 deletions(-) (limited to 'example') diff --git a/example/memoryLeak.html b/example/memoryLeak.html index 9e5f512d..19b0d45d 100644 --- a/example/memoryLeak.html +++ b/example/memoryLeak.html @@ -48,8 +48,8 @@ - - + +
diff --git a/example/tweeter/tweeter_addressbook.html b/example/tweeter/tweeter_addressbook.html index 4844c035..ba915cb1 100644 --- a/example/tweeter/tweeter_addressbook.html +++ b/example/tweeter/tweeter_addressbook.html @@ -8,25 +8,25 @@ - +

Address Book

[ Filter: ]
-
+
@@ -37,7 +37,7 @@ - +

@@ -58,16 +58,16 @@ tweets={{tweets}}

Tweets: {{$anchor.user}}

[ Filter: - | << All + | << All ]
Loading...
    -
  • +
  • - [ {{user.nickname || user.name || user.screen_name }} - | + + [ {{user.nickname || user.name || user.screen_name }} + | + ]: {{tweet.text | linky}} {{tweet.created_at}} diff --git a/example/tweeter/tweeter_demo.html b/example/tweeter/tweeter_demo.html index 138d4e2b..a5ba95ba 100644 --- a/example/tweeter/tweeter_demo.html +++ b/example/tweeter/tweeter_demo.html @@ -8,19 +8,19 @@ - + (TODO: I should fetch current tweets)

    Tweets: {{$anchor.user}}

    [ Filter: (TODO: this should act as search box) - | << All + | << All ]
    Loading...
      -
    • +
    • - [ {{tweet.user.nickname || tweet.user.name || tweet.user.screen_name }} + [ {{tweet.user.nickname || tweet.user.name || tweet.user.screen_name }} ]: {{tweet.text}} (TODO: I want urls as links) {{tweet.created_at}} -- cgit v1.2.3 From 7e96af0fdd9af8c479992363f68578305df0337e Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Mon, 19 Jul 2010 12:29:24 -0700 Subject: added equals method to angular.equals and $equals --- example/temp.html | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'example') diff --git a/example/temp.html b/example/temp.html index d07a6948..838a463d 100644 --- a/example/temp.html +++ b/example/temp.html @@ -1,13 +1,20 @@ - - + + - + + - {{$location.hashSearch.order}}
      - A
      - B
      - C
      - {{$location.hashSearch.order}}
      + Hello {{'World'}}! -- cgit v1.2.3 From bebfbeac0a3f25b3d0df00ada5c919adef9dd701 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Tue, 20 Jul 2010 16:55:32 -0700 Subject: fixed xhtml compatibility, fix console in chrome --- example/temp.html | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'example') diff --git a/example/temp.html b/example/temp.html index 838a463d..337f7fba 100644 --- a/example/temp.html +++ b/example/temp.html @@ -2,19 +2,9 @@ - + src="../src/angular-bootstrap.js#autobind"> - + Hello {{'World'}}! -- cgit v1.2.3 From 849a05b5a578f19ddc3d24dc9fbd304e0e07612a Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 22 Jul 2010 11:18:32 -0700 Subject: added jsonp to resources --- example/buzz/buzz.css | 0 example/buzz/buzz.html | 30 ++++++++++++++++++++++++++++++ example/buzz/buzz.js | 19 +++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 example/buzz/buzz.css create mode 100644 example/buzz/buzz.html create mode 100644 example/buzz/buzz.js (limited to 'example') diff --git a/example/buzz/buzz.css b/example/buzz/buzz.css new file mode 100644 index 00000000..e69de29b diff --git a/example/buzz/buzz.html b/example/buzz/buzz.html new file mode 100644 index 00000000..ee2b2bb9 --- /dev/null +++ b/example/buzz/buzz.html @@ -0,0 +1,30 @@ + + + + + + + + + +
      + + +
      + + + diff --git a/example/buzz/buzz.js b/example/buzz/buzz.js new file mode 100644 index 00000000..871982d7 --- /dev/null +++ b/example/buzz/buzz.js @@ -0,0 +1,19 @@ +angular.service('myApplication', function($resource){ + this.Activity = $resource( + 'https://www.googleapis.com/buzz/v1/activities/:userId/:visibility/:activityId/:comments', + {alt:'json', callback:'JSON_CALLBACK'}, + { + get: {method:'JSON', params:{visibility:'@self'}}, + replies: {method:'JSON', params:{visibility:'@self', comments:'@comments'}} + }); +}, {inject:['$resource']}); + +function BuzzController(){ + this.$watch('$location.hashPath', this.userChange); +} +BuzzController.prototype = { + userChange: function(){ + this.userId = this.$location.hashPath; + this.activities = this.Activity.get({userId:this.userId}); + } +}; -- cgit v1.2.3 From 2987f7f705baffad8081fc4a3a95eab79b0d9695 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 22 Jul 2010 15:32:57 -0700 Subject: fix howers which were accidently broken --- example/buzz/buzz.css | 45 +++++++++++++++++++++++++++++++++++++++++++++ example/buzz/buzz.html | 36 ++++++++++++++++++++++-------------- example/buzz/buzz.js | 27 +++++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 14 deletions(-) (limited to 'example') diff --git a/example/buzz/buzz.css b/example/buzz/buzz.css index e69de29b..e77c3bac 100644 --- a/example/buzz/buzz.css +++ b/example/buzz/buzz.css @@ -0,0 +1,45 @@ +body { + background: -webkit-gradient(linear, left top, left 400, from(#1C4070), to(#fff)); + background-repeat: no-repeat; + margin: 0px; +} + +.bar { + border-top: 1px solid white; + border-bottom: 1px solid black; + text-align: right; + background: -webkit-gradient(linear, left top, left bottom, from(#CCC), to(#888)); + -webkit-background-origin: padding; -webkit-background-clip: content; +} +.bar button { + margin: 5px; +} + +.bar span { + float: left; + font-family: monospace; + font-size: 1.5em; + color: black; +} + +ul.buzz { + list-style: none; + padding: 5px; + margin: 0; +} + +ul.buzz > li { + border: 1px solid yellow; + margin: 5px; + padding: 0; +} + +ul.buzz > li > h1 { + border: 1px solid yellow; + margin: 0; +} + +ul.buzz > li > div { + border: 1px solid yellow; + margin: 0; +} diff --git a/example/buzz/buzz.html b/example/buzz/buzz.html index ee2b2bb9..f1916f54 100644 --- a/example/buzz/buzz.html +++ b/example/buzz/buzz.html @@ -2,28 +2,36 @@ + - +
      - + <angular/> Buzz +
      -
        + diff --git a/example/buzz/buzz.js b/example/buzz/buzz.js index 871982d7..40813d16 100644 --- a/example/buzz/buzz.js +++ b/example/buzz/buzz.js @@ -15,5 +15,32 @@ BuzzController.prototype = { userChange: function(){ this.userId = this.$location.hashPath; this.activities = this.Activity.get({userId:this.userId}); + }, + + expandReplies: function(activity) { + var self = this; + if (activity.replies) { + activity.replies.show = !activity.replies.show; + } else { + activity.replies = this.Activity.replies({userId:this.userId, activityId:activity.id}, function(){ + activity.replies.show = true; + }); + } } }; + +angular.widget('my:expand', function(element){ + element.css('display', 'block'); + this.descend(true); + return function(element) { + element.hide(); + var watch = element.attr('expand'); + this.$watch(watch, function(value){ + if (value) { + element.delay(0).slideDown('slow'); + } else { + element.slideUp('slow'); + } + }); + }; +}); -- cgit v1.2.3 From 8015e09e383bcd3ebf85d44cd68c67dd85db5771 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Fri, 23 Jul 2010 10:48:18 -0700 Subject: added buzz demo, fix undefined() -> undefined --- example/buzz/buzz.css | 72 ++++++++++++++++++++++++++++++++++++++++---------- example/buzz/buzz.html | 30 ++++++++++++++------- 2 files changed, 79 insertions(+), 23 deletions(-) (limited to 'example') diff --git a/example/buzz/buzz.css b/example/buzz/buzz.css index e77c3bac..5fd5763d 100644 --- a/example/buzz/buzz.css +++ b/example/buzz/buzz.css @@ -1,45 +1,89 @@ body { - background: -webkit-gradient(linear, left top, left 400, from(#1C4070), to(#fff)); + background: -webkit-gradient(linear, left top, left 100, from(#bbb), to(#fff)); background-repeat: no-repeat; margin: 0px; + font-family: sans-serif; + font-size: 12px; } -.bar { +body > div { border-top: 1px solid white; border-bottom: 1px solid black; - text-align: right; + text-align: center; background: -webkit-gradient(linear, left top, left bottom, from(#CCC), to(#888)); -webkit-background-origin: padding; -webkit-background-clip: content; } -.bar button { +body > div button { margin: 5px; } -.bar span { +body > div span:FIRST-CHILD { float: left; font-family: monospace; font-size: 1.5em; color: black; + padding: 2px 5px; } -ul.buzz { +body > div span:last-child { + float: right; +} + +ul { list-style: none; - padding: 5px; + padding: 10px; margin: 0; } -ul.buzz > li { - border: 1px solid yellow; - margin: 5px; +body > ul > li { + border: 1px solid black; + margin: 15px 5px; padding: 0; + -webkit-box-shadow: 5px 5px 5px #888; +} + +body > ul > li > h1 { + margin: 0; + background: -webkit-gradient(linear, left top, left bottom, from(#ddd), to(#999)); + font-size: 13px; + border-bottom: 1px solid black; +} + +h1 > img, +li > img { + max-height: 30px; + max-width: 30px; + vertical-align: middle; + padding: 3px; } -ul.buzz > li > h1 { - border: 1px solid yellow; +a > img { + margin-right: 5px; + margin-top: 5px; +} + +body > ul > li > h1 > a:last-child { + float: right; + margin: 10px; +} + +body > ul > li > div { + background-color: white; + background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ddd)); margin: 0; + padding: 10px; } -ul.buzz > li > div { - border: 1px solid yellow; +body > ul > li ul { margin: 0; + padding: 0; + margin-left: 5px; + border-left: 5px solid lightgray; } + +body > ul > li ul > li { + margin: 0; + padding: 10px; + background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ddd)); +} + diff --git a/example/buzz/buzz.html b/example/buzz/buzz.html index f1916f54..a6777ff8 100644 --- a/example/buzz/buzz.html +++ b/example/buzz/buzz.html @@ -2,32 +2,44 @@ - - + + -
        +
        <angular/> Buzz - - + + filter: + + + + user: + + +
        -