Skip to content

Instantly share code, notes, and snippets.

App.ApplicationController = Ember.Controller.extend({
hideHeader: false,
observePath: function() {
if (this.get('currentPath') !== 'index') {
this.set('hideHeader', true);
$('#header').slideUp();
} else {
this.set('hideHeader', false);
$('#header').slideDown();
}
<div id="alert">
<div id="flash">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<strong>Warning!</strong>
<span></span>
</div>
</div>
@alonextou
alonextou / alert.js
Created August 30, 2013 08:21
Ember.js Bootstrap 3 Alerts
App.AlertController = Ember.Controller.extend({
alert: false,
observeAlert: function() {
if(this.alert != false){
$('#flash').addClass('alert alert-' + this.alert[0] + ' alert-dismissable');
$('#flash span').text(this.alert[1]);
$('#flash').fadeIn();
} else {
$('#flash').hide();
}
  1. First ordered list item
  2. Another item ⋅⋅* Unordered sub-list.
  3. Actual numbers don't matter, just that it's a number ⋅⋅1. Ordered sub-list
  4. And another item.

⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅

site :opscode
cookbook 'apt'
cookbook 'build-essential'
cookbook 'git'
cookbook 'php'
cookbook 'apache2'
cookbook 'mysql'
cookbook 'database'
cookbook 'nodejs', git: 'git@github.com:mdxp/nodejs-cookbook.git'
{
"name": "app",
"version": "0.0.0",
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-watch": "~0.5.1",
"grunt-contrib-compass": "~0.3.0",
"grunt-contrib-jshint": "~0.4.1",
App.AuthController = Ember.Controller.extend({
// isGuest: true,
observeIsGuest: function() {
console.log('isGuest changed: ' + this.isGuest);
}.observes('isGuest'),
login: function() {
self.set('isGuest', false);
});
},
logout: function() {
public function store($updateNulls = false){
$this->uris = implode(',', $this->uris); // implode the var
return parent::store($updateNulls);
}
public function load($pk = null, $reset = true)
{
if (parent::load($pk, $reset))
{
$this->uris = explode(',', $this->uris); // explode cboxes_var array