Example #1
0
Upload.register(function(app, auth, database) {

    //We enable routing. By default the Package Object is passed to the routes
    Upload.routes(app, auth, database);

    Upload.aggregateAsset('js', '../lib/danialfarid-angular-file-upload/dist/angular-file-upload-shim.min.js', {
        absolute: false
    });
    Upload.aggregateAsset('js', '../lib/danialfarid-angular-file-upload/dist/angular-file-upload.min.js', {
        absolute: false
    });

    Upload.aggregateAsset('css', '../css/meanUpload.css', {
        absolute: false
    });

    Upload.angularDependencies(['angularFileUpload']);

    app.use('/files/public', express.static(config.root + '/files/public'));

    /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    MeanUpload.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    MeanUpload.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    MeanUpload.settings(function(err, settings) {
        //you now have the settings object
    });
    */

    return Upload;
});
Example #2
0
Articles.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Articles.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
  // Articles.menus.add({
  //   'roles': ['authenticated'],
  //   'title': 'Articles',
  //   'link': 'all articles'
  // });
  // Articles.menus.add({
  //   'roles': ['authenticated'],
  //   'title': 'Create New Article',
  //   'link': 'create article'
  // });

  //Articles.aggregateAsset('js','/packages/system/public/services/menus.js', {group:'footer', absolute:true, weight:-9999});
  //Articles.aggregateAsset('js', 'test.js', {group: 'footer', weight: -1});

  /*
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Articles.settings({'someSetting':'some value'},function (err, settings) {
      //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Articles.settings({'anotherSettings':'some value'});

    // Get settings. Retrieves latest saved settings
    Articles.settings(function (err, settings) {
      //you now have the settings object
    });
    */
  Articles.aggregateAsset('css', 'articles.css');

  return Articles;
});
Example #3
0
/*
 * All MEAN packages require registration
 * Dependency injection is used to define required modules
 */

Circles.register(function(app, auth, database) {

//   Circles.routes(app, auth, database);

  Circles.aggregateAsset('css', 'circles.css');

//   Circles.menus.add({
//     title: 'Circles',
//     link: 'manage circles',
//     roles: ['authenticated', 'admin'],
//     menu: 'main'
//   });
// 
//   Circles.models = {};

//   ensureCirclesExist();

  return Circles;
});


function ensureCirclesExist() {

  var requiredCircles = ['anonymous', 'authenticated', 'can create content', 'can edit content', 'can delete content', 'admin'];
  var Circle = require('mongoose').model('Circle');
Example #4
0
File: app.js Project: hsmyy/meanwap
  express = require('express');

var System = new Module('system');

/*
 * All MEAN packages require registration
 * Dependency injection is used to define required modules
 */
System.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  System.routes(app, auth, database);

  System.aggregateAsset('css', 'common.css');

  // The middleware in config/express will run before this code


  // Set views path, template engine and default layout
  app.set('views', __dirname + '/server/views');

  // Setting the favicon and static folder
  app.use(favicon(__dirname + '/public/assets/img/favicon.ico'));

  // Adding robots and humans txt
  app.use(express.static(__dirname + '/public/assets/static'));


  return System;
});
Example #5
0
Articles.register(function(app, auth, database, circles, swagger) {

  //We enable routing. By default the Package Object is passed to the routes
  Articles.routes(app, auth, database);

  Articles.aggregateAsset('css', 'articles.css');

  
  //We are adding a link to the main menu for all authenticated users
  /*Articles.menus.add({
    'roles': ['authenticated'],
    'title': 'Articles',
    'link': 'all articles'
  });
  Articles.menus.add({
    'roles': ['authenticated'],
    'title': 'Create New Article',
    'link': 'create article'
  });*/

  Articles.events.defaultData({
    type: 'post',
    subtype: 'article'
  });


  /*
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Articles.settings({'someSetting':'some value'},function (err, settings) {
      //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Articles.settings({'anotherSettings':'some value'});

    // Get settings. Retrieves latest saved settings
    Articles.settings(function (err, settings) {
      //you now have the settings object
    });
    */

  // Only use swagger.add if /docs and the corresponding files exists
  swagger.add(__dirname);
	
  return Articles;
});
Example #6
0
MeanUser.register(function(app, auth, passport, database) {

    //We enable routing. By default the Package Object is passed to the routes
    MeanUser.routes(app, auth, database, passport);

    var menu_items = [ ['Home', 'home'], ['Battle', 'battle'], ['Creature', 'creature'] ];
    var meanmenu = MeanUser.menus;
    menu_items.forEach(function(item){
      meanmenu.add({ title: item[0], link: item[1], roles: ['authenticated'], menu: 'main' });
      });

    //We are adding a link to the main menu for all authenticated users
     //MeanUser.menus.add({
         //title: 'meanUser example page',
         //link: 'meanUser example page',
         //roles: ['authenticated'],
         //menu: 'main'
     //});

    MeanUser.aggregateAsset('js', 'meanUser.js');
    MeanUser.aggregateAsset('js', 'slider.js');
    MeanUser.aggregateAsset('css', 'slider.css');


    /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    MeanUser.settings({
    'someSetting': 'some value'
    }, function(err, settings) {
    //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    MeanUser.settings({
    'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    MeanUser.settings(function(err, settings) {
    //you now have the settings object
    });
    */

    return MeanUser;
});
Example #7
0
General.register(function(app, auth, database, passport) {

  //We enable routing. By default the Package Object is passed to the routes
  General.routes(app, auth, database, passport);

  //We are adding a link to the main menu for all authenticated users
  General.menus.add({
    title: 'general example page',
    link: 'general example page',
    roles: ['authenticated'],
    menu: 'main'
  });
  
  General.aggregateAsset('css', 'general.css');

  /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    General.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    General.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    General.settings(function(err, settings) {
        //you now have the settings object
    });
    */

	//class someClass {
	//	constructor(name, age) {
	//		this.name = name;
	//		this.age = age;
	//	}
	//
	//	sayName() {
	//		console.log('some class ' + this.name);
	//	}
	//}
	//
	//class Child extends someClass {
	//	constructor(name, age) {
	//		super(name, age);
	//	}
	//
	//	// Override the someClass method above
	//	sayName() {
	//		// This will call someClass.sayName() triggering the old alert
	//		// Which will just display our name
	//		super();
	//
	//		// This will trigger the new alert which has labels and our age
	//		console.log('Name:' + this.name + ' Age:' + this.age);
	//	}
	//}
	//
	//var myChild = new Child('dwayne', 27);
	//myChild.sayName();

  return General;
});
Example #8
0
File: app.js Project: ssmlee04/demo
'use strict';

/*
 * Defining the Package
 */
var Module = require('meanio').Module;

var Reviews = new Module('reviews');

/*
 * All MEAN packages require registration
 * Dependency injection is used to define required modules
 */
Reviews.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Reviews.routes(app, auth, database);
  
  return Reviews;
});
Example #9
0
UsersExtended.register(function(app, auth, database, users) {

  //We enable routing. By default the Package Object is passed to the routes
  UsersExtended.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
/*  UsersExtended.menus.add({
    title: 'usersExtended example page',
    link: 'usersExtended example page',
    roles: ['authenticated'],
    menu: 'main'
  });*/
  
  UsersExtended.aggregateAsset('css', 'usersExtended.css');

  UsersExtended.angularDependencies(['mean.users']);

  /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    UsersExtended.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    UsersExtended.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    UsersExtended.settings(function(err, settings) {
        //you now have the settings object
    });
    */

  return UsersExtended;
});
Example #10
0
'use strict';

/*
 * Defining the Package
 */
var Module = require('meanio').Module;

var Chat = new Module('Chat');

/*
 * All MEAN packages require registration
 * Dependency injection is used to define required modules
 */
Chat.register(function(app, auth, database) {

    //We enable routing. By default the Package Object is passed to the routes
    Chat.routes(app, auth, database);

    //We are adding a link to the main menu for all authenticated users

    return Chat;
});
Example #11
0
Valet.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Valet.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
  Valet.menus.add({
    title: 'Valet Transactions',
    link: 'all valet transactions',
    roles: ['authenticated'],
    menu: 'main'
  });
  
  Valet.aggregateAsset('css', 'valet.css');

  /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Valet.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Valet.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    Valet.settings(function(err, settings) {
        //you now have the settings object
    });
    */

  return Valet;
});
Example #12
0
'use strict';

/*
 * Defining the Package
 */
var Module = require('meanio').Module;

var Users = new Module('users');

/*
 * All MEAN packages require registration
 * Dependency injection is used to define required modules
 */
Users.register(function (app, auth, database) {
    //We enable routing. By default the Package Object is passed to the routes
    Users.routes(app, auth, database);
    Users.menus.add({
        title: 'Users',
        link: 'all users',
        roles: ['authenticated']
    });
    Users.angularDependencies(['angular-loading-bar']);
    return Users;
});
Example #13
0
Articles.register(function(app, auth, database) {

    //We enable routing. By default the Package Object is passed to the routes
    Articles.routes(app, auth, database);

    //We are adding a link to the main menu for all authenticated users
    Articles.menus.add({
        'roles': ['authenticated'],
        'title': '工资条',
        'link': 'salary'
    });
    Articles.menus.add({
        'roles': ['authenticated'],
        'title': '更新',
        'link': 'all articles'
    });
    Articles.menus.add({
        'roles': ['admin'],
        'title': '添加',
        'link': 'create article'
    });

    /*
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Articles.settings({'someSetting':'some value'},function (err, settings) {
      //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Articles.settings({'anotherSettings':'some value'});

    // Get settings. Retrieves latest saved settigns
    Articles.settings(function (err, settings) {
      //you now have the settings object
    });
    */
    Articles.aggregateAsset('css', 'articles.css');

    return Articles;
});
Example #14
0
Dtree.register(function(system, app, auth, database, articles) {

  //We enable routing. By default the Package Object is passed to the routes`
  Dtree.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
  Dtree.menus.add({
    title: 'Decide',
    link: 'decisionHome',
    roles: ['anonymous','all'],
    menu: 'main'
  });
  
 // Dtree.aggregateAsset('css', 'style.css');
 //   Dtree.aggregateAsset('css', 'font.css');

 //   Dtree.aggregateAsset('css', 'ml-social-buttons.css');


 //   Dtree.aggregateAsset('fonts', 'socialglyphs-webfont.eot');

  //  Dtree.aggregateAsset('js', 'script.js');

    Dtree.angularDependencies(['textAngular']);

    /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Dtree.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Dtree.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    Dtree.settings(function(err, settings) {
        //you now have the settings object
    });
    */


  return Dtree;
});
Example #15
0
'use strict';

/*
 * Defining the Package
 */
var Module = require('meanio').Module;

var MeanUser = new Module('users');

MeanUser.register(function(app, auth, passport, database) {

  //We enable routing. By default the Package Object is passed to the routes
  MeanUser.routes(app, auth, database, passport);

  MeanUser.aggregateAsset('js', 'meanUser.js');

  return MeanUser;
});
Example #16
0
Meancommerce.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Meancommerce.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
  Meancommerce.menus.add({
    title: 'Categories',
    link: 'all categories',
    roles: ['admin'],
    menu: 'main'
  });
  Meancommerce.menus.add({
    title: 'Orders',
    link: 'all orders',
    roles: ['admin'],
    menu: 'main'
  });
  Meancommerce.menus.add({
    title: 'Products',
    link: 'all products',
    roles: ['admin'],
    menu: 'main'
  });
  Meancommerce.menus.add({
    title: 'Browse Categories',
    link: 'default category',
    menu: 'main'
  });

  Meancommerce.aggregateAsset('css', 'meancommerce.css');

  /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Meancommerce.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Meancommerce.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    Meancommerce.settings(function(err, settings) {
        //you now have the settings object
    });
    */

  return Meancommerce;
});
Example #17
0
Things.register(function(app, auth, database) {

    //We enable routing. By default the Package Object is passed to the routes
    Things.routes(app, auth, database);

    //We are adding a link to the main menu for all authenticated users
    Things.menus.add({
        'roles': ['authenticated'],
        'title': 'Things',
        'link': 'all things'
    });
    Things.menus.add({
        'roles': ['authenticated'],
        'title': 'What are they doing',
        'link': 'all events'
    });
    Things.menus.add({
        'roles': ['authenticated'],
        'title': 'Where are they',
        'link': 'all locations'
    });


    /*
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Things.settings({'someSetting':'some value'},function (err, settings) {
      //you now have the settings object
    });


    // Another save settings example this time with no callback
    // This writes over the last settings.
    Things.settings({'anotherSettings':'some value'});

    // Get settings. Retrieves latest saved settigns
    Things.settings(function (err, settings) {
      //you now have the settings object
    });
    */
    Things.angularDependencies(['google-maps']);
    Things.aggregateAsset('css', 'things.css');


    return Things;
});
Example #18
0
File: app.js Project: rconnelly/app
Settings.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Settings.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
  Settings.menus.add({
    title: 'Settings',
    link: 'settings.subscriptions',
    section: 'settings',
    roles: ['authenticated'],
    menu: 'top',
    iconClass: 'fa fa-gears',
    priority: 10
  });

  /**
   //Uncomment to use. Requires meanio@0.3.7 or above
   // Save settings with callback
   // Use this for saving data from administration pages
   Settings.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

   // Another save settings example this time with no callback
   // This writes over the last settings.
   Settings.settings({
        'anotherSettings': 'some value'
    });

   // Get settings. Retrieves latest saved settigns
   Settings.settings(function(err, settings) {
        //you now have the settings object
    });
   */

  return Settings;
});
Example #19
0
'use strict';

/*
 * Defining the Package
 */
var Module = require('meanio').Module;

var Render = new Module('render');

/*
 * All MEAN packages require registration
 * Dependency injection is used to define required modules
 */
Render.register(function(app, auth, database) {

    //We enable routing. By default the Package Object is passed to the routes
    Render.routes(app, auth, database);

    //We are adding a link to the main menu for all authenticated users
    Render.menus.add({
        title: 'Render',
        link: 'render',
        roles: ['authenticated'],
        menu: 'main'
    });

    return Render;
});
Example #20
0
Admin.register(function(app, auth, database, circles) {

    var icons = 'admin/assets/img/icons/';

    Admin.menus.add({
        title: 'admin settings',
        link: 'admin settings',
        roles: ['admin'],
        menu: 'main'
    });

    Admin.menus.add({
        roles: ['admin'],
        title: 'MODULES',
        link: 'modules',
        icon: icons + 'modules.png',
        menu: 'admin'
    });
    Admin.menus.add({
        roles: ['admin'],
        title: 'THEMES',
        link: 'themes',
        icon: icons + 'themes.png',
        menu: 'admin'
    });
    Admin.menus.add({
        roles: ['admin'],
        title: 'SETTINGS',
        link: 'settings',
        icon: icons + 'settings.png',
        menu: 'admin'
    });
    Admin.menus.add({
        roles: ['admin'],
        title: 'USERS',
        link: 'users',
        icon: icons + 'users.png',
        menu: 'admin'
    });

    Admin.aggregateAsset('css', 'admin.css');
    Admin.aggregateAsset('js', '../lib/ng-clip/src/ngClip.js', {
        absolute: false,
        global: true
    });

    Admin.aggregateAsset('js', '../lib/zeroclipboard/dist/ZeroClipboard.js', {
        absolute: false,
        global: true
    });

    Admin.angularDependencies(['ngClipboard']);

    // We enable routing. By default the Package Object is passed to the routes
    Admin.routes(app, auth, database);
    return Admin;
});
Example #21
0
Theme.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Theme.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
//  Theme.menus.add({
//    title: 'theme example page',
//    link: 'theme example page',
//    roles: ['authenticated'],
//    menu: 'main'
//  });

  //Theme.aggregateAsset('css', 'loginForms.css');
  Theme.aggregateAsset('css', 'theme.css');

  /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Theme.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Theme.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settings
    Theme.settings(function(err, settings) {
        //you now have the settings object
    });
    */

  return Theme;
});
Example #22
0
MeanSocket.register(function(app, auth, database) {

    //We enable routing. By default the Package Object is passed to the routes
    MeanSocket.routes(app, auth, database);

    //We are adding a link to the main menu for all authenticated users
    MeanSocket.menus.add({
        title: 'Mean socket help page',
        link: 'Mean socket help page',
        roles: ['authenticated'],
        menu: 'main'
    });


    // //Uncomment to use. Requires meanio@0.3.7 or above
    // // Save settings with callback
    // // Use this for saving data from administration pages
    // MeanSocket.settings({
    //     'someSetting': 'some value'
    // }, function(err, settings) {
    //     //you now have the settings object
    // });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    MeanSocket.settings({
        'funcPage': '../controllers/sockets',
        'getMessageFunc': 'createFromSocket',
        'getAllMessagesFunc': 'getAllForSocket',
        'removeOldMessagesFunc': 'removeOldSocketMessages',
        'getAllChannelsFunc': 'getListOfChannels'
    });

    // // Get settings. Retrieves latest saved settigns
    // MeanSocket.settings(function(err, settings) {
    //     //you now have the settings object
    // });


    return MeanSocket;
});
Example #23
0
'use strict';

/*
 * Defining the Package
 */
var Module = require('meanio').Module;
var Admin = new Module('mean-admin');

/*
 * All MEAN packages require registration
 * Dependency injection is used to define required modules
 */

Admin.register(function(app, auth, database) {

    Admin.aggregateAsset('js', 'modernizr.js', {global:true});
    Admin.aggregateAsset('js', 'webforms2.js', {global:true});
    Admin.aggregateAsset('css', 'webforms2.css', {global:true});
    Admin.aggregateAsset('css', 'admin.css');
    Admin.aggregateAsset('css', 'themes.css');
    Admin.aggregateAsset('js', 'users.js');
    Admin.aggregateAsset('js', 'themes.js');
    Admin.aggregateAsset('js', 'modules.js');

    // We enable routing. By default the Package Object is passed to the routes
    Admin.routes(app, auth, database);
    return Admin;
});
Example #24
0
Members.register(function(app, auth, database, circles) {

    //We enable routing. By default the Package Object is passed to the routes
    Members.routes(app, auth, database);

    Members.aggregateAsset('css', 'members.css');

    //We are adding a link to the main menu for all authenticated users
    Members.menus.add({
        'roles': ['all'],
        'title': 'Team',
        'link': 'all members'
    });

    Members.events.defaultData({
        type: 'post',
        subtype: 'member'
    });

    /**
      //Uncomment to use. Requires meanio@0.3.7 or above
      // Save settings with callback
      // Use this for saving data from administration pages
      Members.settings({
          'someSetting': 'some value'
      }, function(err, settings) {
          //you now have the settings object
      });

      // Another save settings example this time with no callback
      // This writes over the last settings.
      Members.settings({
          'anotherSettings': 'some value'
      });

      // Get settings. Retrieves latest saved settigns
      Members.settings(function(err, settings) {
          //you now have the settings object
      });
      */

    return Members;
});
Example #25
0
FudgeA.register(function(app, auth, database, system) {

  //We enable routing. By default the Package Object is passed to the routes
  FudgeA.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
  FudgeA.menus.add({
    title: 'fudgeA example page',
    link: 'fudgeA example page',
    roles: ['authenticated','anonymous']
    /*,   hide it for
    menu: 'mymain'*/
  });
  FudgeA.menus.add({
    title: 'menu 1',
    link: 'menu1',
    roles: ['authenticated','anonymous'],
    menu: 'mymain'
  });

  app.set('views', __dirname + '/server/views');
  
  FudgeA.aggregateAsset('css', 'fudgeA.css');

  FudgeA.angularDependencies(['mean.system']);    

  /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    FudgeA.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    FudgeA.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    FudgeA.settings(function(err, settings) {
        //you now have the settings object
    });
    */

  return FudgeA;
});
Example #26
0
/*
 * Defining the Package
 */
var Module = require('meanio').Module;

var MeanUpload = new Module('mean-upload');

/*
 * All MEAN packages require registration
 * Dependency injection is used to define required modules
 */
MeanUpload.register(function(app, auth, database) {

    //We enable routing. By default the Package Object is passed to the routes
    MeanUpload.routes(app, auth, database);
    MeanUpload.aggregateAsset('js', '/packages/mean-upload/public/assets/lib/danialfarid-angular-file-upload/dist/angular-file-upload-shim.min.js', {
        absolute: true
    });
    MeanUpload.aggregateAsset('js', '/packages/mean-upload/public/assets/lib/danialfarid-angular-file-upload/dist/angular-file-upload.min.js', {
        absolute: true
    });
    MeanUpload.aggregateAsset('js', '/packages/mean-upload/public/assets/lib/danialfarid-angular-file-upload/dist/angular-file-upload.min.js', {
        absolute: true
    });
    MeanUpload.aggregateAsset('css', '/packages/mean-upload/public/assets/css/meanUpload.css', {
        absolute: true
    });
    MeanUpload.angularDependencies(['angularFileUpload']);

    return MeanUpload;
});
Example #27
0
Players.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Players.routes(app, auth, database);

  Players.menus.add({
    title: 'Players',
    link: 'players page',
    menu: 'main'
  });
  
  Players.aggregateAsset('css', 'players.css');

  /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Players.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Players.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    Players.settings(function(err, settings) {
        //you now have the settings object
    });
    */

  return Players;
});
Example #28
0
File: app.js Project: rconnelly/app
Core.register(function(app, auth, database) {

    //We enable routing. By default the Package Object is passed to the routes
    Core.routes(app, auth, database);

    /*Core.aggregateAsset('css', 'http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic,800,800italic', {weight: 12});
    Core.aggregateAsset('css', 'http://fonts.googleapis.com/css?family=Oswald:400,300,700', {weight: 11});
    Core.aggregateAsset('css', 'mvpready-admin-slate.css', {weight: 10});
     */

    /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Core.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Core.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    Core.settings(function(err, settings) {
        //you now have the settings object
    });
    */

    return Core;
});
Example #29
0
Dashboard.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Dashboard.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
  Dashboard.menus.add({
    title: 'dashboard',
    link: 'dashboard',
    menu: 'main'
  });

  /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Dashboard.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Dashboard.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    Dashboard.settings(function(err, settings) {
        //you now have the settings object
    });
    */

  return Dashboard;
});
Example #30
0
File: app.js Project: jithu21/acme
Analytics.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Analytics.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
  Analytics.menus.add({
    title: 'Analytics',
    link: 'Analytics',
    roles: ['authenticated'],
    menu: 'main'
  });
  Analytics.menus.add({
    title: 'Online',
    link: 'Online',
    roles: ['authenticated']
  });
  Analytics.menus.add({
    title: 'Trending Product',
    link: 'Trending Product',
    roles: ['authenticated']
  });
  Analytics.menus.add({
    title: 'Same Product',
    link: 'Same Product',
    roles: ['authenticated']
  });
  Analytics.menus.add({
    title: 'Active Cart',
    link: 'Active Cart',
    roles: ['authenticated']
  });
  
  Analytics.aggregateAsset('css', 'analytics.css');
  Analytics.aggregateAsset('css', 'AdminLTE.css');
  Analytics.aggregateAsset('css', 'pivot.css');

  /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Analytics.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Analytics.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    Analytics.settings(function(err, settings) {
        //you now have the settings object
    });
    */

  return Analytics;
});