Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop pages #132

Open
wants to merge 105 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
1081845
Fix cancel click, add new slot classes
zackbloom Jan 25, 2013
107bb94
Readd pages files
zackbloom Jan 25, 2013
7b7144a
Merge branch 'master' into gh-pages
zackbloom Jan 26, 2013
28819e1
Move to executr v2.0
zackbloom Jan 28, 2013
3554c3e
Update help message for executr 2.0
zackbloom Jan 28, 2013
4243c86
Adding messenger theme style sheets to the gh-pages example
adamschwartz Jan 28, 2013
8eb7904
Merge branch 'master' into gh-pages
adamschwartz Jan 28, 2013
61e9685
Merge branch 'master' of github.com:HubSpot/messenger into gh-pages
zackbloom Jan 28, 2013
c71dcfb
Merge branch 'gh-pages' of github.com:HubSpot/messenger into gh-pages
zackbloom Jan 28, 2013
2eff7cc
Update docs
zackbloom Jan 28, 2013
41a8c56
Merge branch 'master' into gh-pages
zackbloom Jan 28, 2013
316193e
Update docs to add themes
zackbloom Jan 28, 2013
91ad794
Merge branch 'master' into gh-pages
zackbloom Jan 28, 2013
77f0b68
Move data-action to fix phrases
zackbloom Jan 28, 2013
01868ee
Merge branch 'master' into gh-pages
zackbloom Jan 28, 2013
d6d7a68
Merge branch 'master' into gh-pages
zackbloom Jan 28, 2013
6ec2ee1
Get rid of wrong example
zackbloom Jan 29, 2013
45845bc
Merge branch 'master' into gh-pages
zackbloom Jan 29, 2013
947e147
Fix max messages
zackbloom Jan 29, 2013
26b983c
Merge branch 'master' into gh-pages
zackbloom Jan 29, 2013
22cafee
Add max messages documentation
zackbloom Jan 29, 2013
6eb0685
Fix message ids
zackbloom Jan 29, 2013
1aeb4c0
Merge branch 'master' into gh-pages
zackbloom Jan 29, 2013
45f9f00
Merge branch 'master' into gh-pages
adamschwartz Feb 1, 2013
a5a858d
Fix messenger-on-left for all messenger themes
adamschwartz Feb 3, 2013
04a4b5f
Fix messenger theme block
adamschwartz Feb 3, 2013
e3e0bdc
Merge branch 'master' of github.com:HubSpot/messenger into gh-pages
zackbloom Feb 3, 2013
608b949
Merge branch 'gh-pages' of github.com:HubSpot/messenger into gh-pages
zackbloom Feb 3, 2013
b1f8dd2
Merge branch 'master' into gh-pages
zackbloom Feb 5, 2013
35513a9
Add 500 example
zackbloom Feb 5, 2013
0ba2894
Add id/singleton/messengerInstance examples closes #2.
zackbloom Feb 5, 2013
43a5224
Make id apply to all messages
zackbloom Feb 5, 2013
80c243a
Merge branch 'master' into gh-pages
zackbloom Feb 5, 2013
b1deef5
Remove non-working example closes #3
zackbloom Feb 5, 2013
0824755
Improve 500 example
zackbloom Feb 5, 2013
92f9aa6
Remove log lines
zackbloom Feb 5, 2013
467904e
Clean extraneous html out of documentation
zackbloom Feb 5, 2013
2668aa4
Add theme and position chooser
zackbloom Feb 14, 2013
d9757d1
Capitalize themes
zackbloom Feb 14, 2013
fbf91e6
Kill border on selector, center header
zackbloom Feb 14, 2013
0196b57
Add air theme to the demo
adamschwartz Feb 20, 2013
a0f8cf8
Merge remote-tracking branch 'refs/remotes/origin/master' into gh-pages
adamschwartz Feb 20, 2013
e9be362
Use "Raleway" google font for "Air" theme
adamschwartz Feb 20, 2013
0a88fdb
Merge branch 'master' into gh-pages
zackbloom Feb 26, 2013
93be470
Add config output
zackbloom Feb 26, 2013
e6b05b8
Merge branch 'gh-pages' of github.com:HubSpot/messenger into gh-pages
zackbloom Feb 26, 2013
57e3889
Add social buttons
zackbloom Feb 26, 2013
32469f1
Fix twitter url
zackbloom Feb 26, 2013
dd2832a
Update executr to fix ff rendering bug in docs
zackbloom Feb 26, 2013
faf4577
Add HS analytics code
zackbloom Feb 26, 2013
248f586
Merge branch 'message-defaults' into gh-pages
zackbloom Feb 26, 2013
e863b57
Merge branch 'master' into gh-pages
zackbloom Feb 26, 2013
aad594f
Add messageDefaults to docs
zackbloom Feb 26, 2013
01c9e32
Merge branch 'master' into gh-pages
zackbloom Feb 26, 2013
5ba6c31
Add link to HubSpot jobs page
zackbloom Feb 27, 2013
235f948
Merge branch 'master' into gh-pages
bosgood Feb 27, 2013
f500e93
Added preview image
bosgood Feb 27, 2013
7f61749
Fix passing messenger options through to ActionMessenger. Fixes maxM…
zackbloom Feb 27, 2013
fcf96f2
demo js cleanup
adamschwartz Feb 27, 2013
e9deac1
Adding theme "ice" to the theme selector options
adamschwartz Feb 27, 2013
859a790
Adding ice theme css to the demo index
adamschwartz Feb 27, 2013
7624a95
Make the demo page background white (for a more plain backdrop to the…
adamschwartz Feb 27, 2013
e3bf887
New theme "Ice"
adamschwartz Feb 27, 2013
48edcb9
Removing spinner import from theme ice since it doesn't use a spinner
adamschwartz Feb 27, 2013
d96aaa6
Merge branch 'master' of github.com:HubSpot/messenger into gh-pages
zackbloom Feb 27, 2013
c9a5746
Merge branch 'gh-pages' of github.com:HubSpot/messenger into gh-pages
zackbloom Feb 27, 2013
ddd225a
Typo
zackbloom Feb 27, 2013
c427edd
add js/cs conversion buttons
marcneuwirth Mar 2, 2013
381dfbc
update executr pointer
marcneuwirth Mar 2, 2013
3abd871
Merge branch 'master' into gh-pages
zackbloom Mar 4, 2013
a01ed7c
Add grunt build details
zackbloom Mar 4, 2013
612e8d8
add language selector
marcneuwirth Mar 4, 2013
cbc6224
Merge branch 'master' into gh-pages
zackbloom Mar 4, 2013
28a8eeb
Merge branch 'gh-pages' of github.com:HubSpot/messenger into gh-pages
zackbloom Mar 4, 2013
28340ee
Merge branch 'master' into gh-pages
zackbloom Mar 4, 2013
3508e3b
Add test instructions
zackbloom Mar 4, 2013
4634e2e
Add message about issues
zackbloom Mar 12, 2013
e2ffeb3
Merge branch 'gh-pages' into develop-pages
zackbloom Mar 13, 2013
eccec6f
Merge branch 'develop' into develop-pages
zackbloom Mar 13, 2013
8cd836a
Merge branch 'develop' into develop-pages
zackbloom Mar 13, 2013
36f542e
Fix theme inclusion
zackbloom Mar 13, 2013
c913d7b
Add future theme to index
zackbloom Mar 13, 2013
53ad48d
Move to 1.2.0 references
zackbloom Mar 13, 2013
66f377e
Merge branch 'master' into gh-pages
zackbloom Mar 13, 2013
553d0af
Merge branch 'develop' into develop-pages
zackbloom Mar 15, 2013
1bd5f1f
Merge branch 'develop-pages' into gh-pages
zackbloom Mar 15, 2013
aa75afe
Merge branch 'master' into gh-pages
zackbloom Mar 15, 2013
a5b3685
Build
zackbloom Mar 15, 2013
a4de6ab
Remove backbone dependency
zackbloom Mar 16, 2013
1bf5922
Switch to minified messenger
zackbloom Mar 16, 2013
ba9c0fa
Merge branch 'develop' into develop-pages
zackbloom Mar 19, 2013
da6130d
Add compatibility to index
zackbloom Mar 19, 2013
51fa0cf
Merge branch 'master' into gh-pages
zackbloom Mar 21, 2013
a24f850
Add a link to the rails gem
zackbloom Apr 4, 2013
3a509b9
Updating messenger_preview.png
adamschwartz Apr 9, 2013
9e5c7cf
Update to 1.3.1
zackbloom May 14, 2013
15562f6
Merge branch 'gh-pages' of github.com:HubSpot/messenger into gh-pages
zackbloom May 14, 2013
b4d9ccd
Merge branch 'master' into gh-pages
zackbloom May 20, 2013
3688f72
Merge branch 'master' into gh-pages
zackbloom Jun 4, 2013
0dbc2c1
Add cdnjs link
zackbloom Jun 6, 2013
2a0873b
Merge branch 'master' into gh-pages
zackbloom Jul 3, 2013
c9374f8
Fix retry bug
zackbloom Jul 3, 2013
db2d1eb
Merge branch 'master' into gh-pages
zackbloom Jul 8, 2013
dda910a
Merge branch 'gh-pages' into develop-pages
zackbloom Sep 10, 2013
8680ec0
Remove doc for promise attr passing
zackbloom Sep 10, 2013
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
1 change: 1 addition & 0 deletions build/js/messenger.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ window.Messenger.Events = (function() {
} else {
this.$message.removeClass('messenger-will-hide-on-navigate');
}
this.trigger('update', this);
return this.trigger('update', this);
};

Expand Down
2 changes: 1 addition & 1 deletion build/js/messenger.min.js

Large diffs are not rendered by default.

Binary file added images/bg_hr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/blacktocat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon_download.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/messenger_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/sprite_download.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,6 @@ <h4>Change Language</h4>
# Need to hide all messages?
Messenger().hideAll()
</code><code executable>
# If your action responds with a promise-like thing, its
# methods will be copied onto the message:

Messenger().run({}, {url: 'a'}).fail(-> alert "Uh oh")
</code><code executable>
# Do you use Backbone? Hook all backbone calls:
Messenger().hookBackboneAjax()

Expand Down
41 changes: 41 additions & 0 deletions javascripts/demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
$(function(){
Messenger().post("Thanks for checking out Messenger!");

var loc = ['bottom', 'right'];
var style = 'future';

var $output = $('.controls output');
var $lsel = $('.location-selector');
var $tsel = $('.theme-selector');

var update = function(){
var classes = 'messenger-fixed';

for (var i=0; i < loc.length; i++)
classes += ' messenger-on-' + loc[i];

$.globalMessenger({ extraClasses: classes, theme: style });
Messenger.options = { extraClasses: classes, theme: style };

$output.text("Messenger.options = {\n\textraClasses: '" + classes + "',\n\ttheme: '" + style + "'\n}");
};

update();

$lsel.locationSelector()
.on('update', function(pos){
loc = pos;

update();
})
;

$tsel.themeSelector({
themes: ['future', 'block', 'air', 'ice']
}).on('update', function(theme){
style = theme;

update();
});

});
19 changes: 19 additions & 0 deletions javascripts/execute.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
$.fn.executr = (opts) ->
defaults =
codeSelector: 'code[executable]'

opts = $.extend {}, defaults, opts

this.on 'click', opts.codeSelector, (e) ->
$target = $ e.target
$code = $target.parents(opts.codeSelector)

ctx = window
if opts.setUp?
CoffeeScript.run opts.setUp, ctx

CoffeeScript.run $code.text(), ctx

if opts.tearDown?
CoffeeScript.run opts.tearDown, ctx

41 changes: 41 additions & 0 deletions javascripts/location-sel.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
class LocationSelector extends Backbone.View
className: 'location-selector'

events:
'click .bit': 'handleClick'

render: ->
@$el.html ''

do @draw

draw: ->
@_addBit 'top left'
@_addBit 'top right'
@_addBit 'top'

@_addBit 'bottom left'
@_addBit 'bottom right'
@_addBit 'bottom'

_addBit: (classes) ->
bit = $ '<div>'
bit.addClass "bit #{ classes }"
bit.attr 'data-position', classes
@$el.append bit

bit

handleClick: (e) ->
$bit = $ e.target

@trigger 'update', $bit.attr('data-position').split(' ')

$.fn.locationSelector = (opts) ->
loc = new LocationSelector $.extend {}, opts,
el: this

$(this).addClass loc.className
loc.render()

loc
63 changes: 63 additions & 0 deletions javascripts/location-sel.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions javascripts/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('This would be the main JS file.');
30 changes: 30 additions & 0 deletions javascripts/theme-sel.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
class ThemeSelector extends Backbone.View
tagName: 'ul'
className: 'theme-selector'

events:
'click li': 'handleClick'

render: ->
@$el.html ''

for theme in @options.themes
$li = $ '<li>'
$li.attr 'data-id', theme
$li.text theme

@$el.append $li

handleClick: (e) ->
$li = $ e.target

@trigger 'update', $li.attr('data-id')

$.fn.themeSelector = (opts) ->
sel = new ThemeSelector $.extend {}, opts,
el: this

$(this).addClass sel.className
sel.render()

sel
57 changes: 57 additions & 0 deletions javascripts/theme-sel.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/executr
Submodule executr added at b893d1
1 change: 1 addition & 0 deletions spec/MessengerSpec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ describe 'do ajax', ->
# - formatTime
# - findById
# - message ids / singleton
# - specifying defaults
# - show / hide message events (+ re wasShown)
# - show calling message.render if not already rendered
# - message.update with string argument
Expand Down
2 changes: 2 additions & 0 deletions src/coffee/messenger.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ class _Message extends BaseView

@trigger 'update', @

@trigger 'update', @

scrollTo: ->
return unless @options.scroll

Expand Down
9 changes: 9 additions & 0 deletions stylesheets/bootstrap/bootstrap.min.css

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions stylesheets/demo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.social {
position: absolute;
top: 10px;
}

h2 .subtitle {
font-size: 14px;
}

.highlight .c1 {
font-size: 12px;
}

.controls {
margin-bottom: 20px;
}

.controls > div {
margin: 0 40px;
float: left;
}

.controls h4 {
text-align: center;
}

.clear {
clear: both;
height: 0;
margin: 0;
margin-bottom: 15px;
border-width: 0;
}
28 changes: 28 additions & 0 deletions stylesheets/location-sel.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.location-selector {
width: 140px;
height: 100px;
background-color: #eeeeee;
position: relative; }
.location-selector .bit {
background-color: #dddddd;
cursor: pointer;
position: absolute; }
.location-selector .bit:hover {
background-color: #cccccc; }
.location-selector .bit.top, .location-selector .bit.bottom {
height: 25%;
width: 40%;
margin: 0 30%; }
.location-selector .bit.top {
top: 0; }
.location-selector .bit.bottom {
bottom: 0; }
.location-selector .bit.right, .location-selector .bit.left {
height: 20%;
width: 20%;
margin-left: 0;
margin-right: 0; }
.location-selector .bit.right {
right: 0; }
.location-selector .bit.left {
left: 0; }
Loading