See ReactComponentView and BackboneModelWatchMixin, below.
The BackboneModelWatchView could use some additional methods to allow adding/removing watched models after the component is created.
| <script id="modal-view-template" type="text/html"> | |
| <div class="modal-dialog"> | |
| <div class="modal-content"> | |
| <div class="modal-header"> | |
| <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
| <h4 class="modal-title" id="myModalLabel">Modal title</h4> | |
| </div> | |
| <div class="modal-body"> | |
| ... | |
| </div> |
| // | |
| //Regions | |
| // | |
| var NoWrapRegion = Backbone.Marionette.Region.extend({ | |
| attachHtml: function (view) { | |
| this.el.innerHTML=""; | |
| var children = view.el.childNodes; | |
| while (children.length > 0) { | |
| this.el.appendChild(children[0]); |
| 'use strict'; | |
| import Backbone from 'backbone'; | |
| import Radio from 'backbone.radio'; | |
| import Marionette from 'marionette'; | |
| import MyselfModel from 'lib/common/models/myselfModel'; | |
| import UserAccountCollection from 'lib/common/models/userAccountCollection'; | |
| import AccountCollection from 'lib/common/models/accountCollection'; |
| var Col = require('react-bootstrap/lib/Col') | |
| var PageHeader = require('react-bootstrap/lib/PageHeader') | |
| var React = require('react') | |
| var Row = require('react-bootstrap/lib/Row') | |
| var {connect} = require('react-redux') | |
| var {reduxForm} = require('redux-form') | |
| var DateInput = require('./DateInput') | |
| var FormField = require('./FormField') | |
| var LoadingButton = require('./LoadingButton') |
| drupal chain --file=~/.console/chain/quick-start-mysql.yml | |
| var mongoose = require('mongoose'); | |
| var Schema = mongoose.Schema; | |
| var ObjectId = Schema.ObjectId; | |
| var commentSchema = new Schema({ | |
| comment: type:String, | |
| user_id:{ | |
| type:Schema.Types.ObjectId, ref:'User' | |
| }, | |
| is_active :1 |
This is a solution on how to theme/customize Ant Design (which is written in Less) with Sass and webpack. Ant itself offers two solutions and a related article on theming, but these are only applicable if you use Less, the antd-init boilerplate or dva-cli.
| import React from 'react'; | |
| import Route from 'react-router-dom/Route'; | |
| import Link from 'react-router-dom/Link'; | |
| import Switch from 'react-router-dom/Switch'; | |
| const App = ({ routes, initialData }) => { | |
| return routes | |
| ? <div> | |
| <Switch> | |
| {routes.map((route, index) => { |