Skip to content

Instantly share code, notes, and snippets.

View Vadorequest's full-sized avatar

Vadorequest Vadorequest

View GitHub Profile
///<reference path='./../def/defLoader.d.ts'/>
/**
* @name MessageLang
* @description Language message content class.
* @author Vadorequest
* TODO Add interface IMarkdownMessage, implement it. Also use new fields to know if the MessageLang was translated and "markdowned".
*/
export class MessageLang{
///<reference path='./../../lib/def/defLoader.d.ts'/>
import model = require('./Model');
export module Models {
/**
* Model used to manage users.
* The model is primary static, but, to make it easy to use, some things are also stored for each instance.
* That allows the code to use both Model or instance of Model such as:
* Model.schema
///<reference path='./../../../lib/def/defLoader.d.ts'/>
/**
* Package that contains all Models used to interact with the database.
*/
export module Models {
/**
* Interface for all Models, except the parent class.
*/
export interface CoreIModel{
@import 'v3/import_min';
// Import vendor loaders.
@import 'v3/vendor_font-awesome';
/*
Steps helper to display beautifully the steps in forms.
*/
body {
.steps {
/**
* Schema ued to create a user.
* @see http://mongoosejs.com/docs/2.7.x/docs/schematypes.html
*/
var userSchema = {
/**
* User Login, used as id to connect between all our platforms.
*/
login: {
type: String,
var datatable_default_options = {
// "paginationType": "bootstrap",
"pagingType": "simple"
// "sPaginationType": "bootstrap"
};
$(function(){
/**
* Add the attribute rel="noinit" to not initialize by default a table.
*/
/**
* JQuery.Datatable initialization.
* Based on the gem https://github.com/rweng/jquery-datatables-rails.
* Automatically intitialize all .datatable that don't explicitly forbid to be auto initialized.
*
* TODO I guess we need to write a class that will provide helpers to
*/
/**
* Add all languages that could be used in the application.
class EmailsController < ApplicationController
include EmailsHelper
before_filter :_before
# TODO "index" method was renamed into "new" method, some stuff is maybe broken somewhere else.
def new
@email = current_user.emails.build(add_login_link: true)
@email.user = current_user
@email.recipients.build
class EmailsController < ApplicationController
include EmailsHelper
before_filter :_before
# TODO "index" method was renamed into "new" method, some stuff is maybe broken somewhere else.
def new
@email = current_user.emails.build(add_login_link: true)
@email.user = current_user
@email.recipients.build
class EmailsController < ApplicationController
include EmailsHelper
before_filter :_before
# TODO "index" method was renamed into "new" method, some stuff is maybe broken somewhere else.
def new
@email = current_user.emails.build(add_login_link: true)
@email.user = current_user
@email.recipients.build