Giter Site home page Giter Site logo

keystonejs / keystone-classic Goto Github PK

View Code? Open in Web Editor NEW
14.7K 485.0 2.2K 148.36 MB

Node.js CMS and web app framework

Home Page: http://v4.keystonejs.com

License: MIT License

JavaScript 94.08% CSS 1.35% HTML 0.29% Shell 0.02% Less 3.20% Pug 1.06%
keystonejs javascript nodejs cms

keystone-classic's People

Contributors

andrewlinfoot avatar bladey avatar creynders avatar dominikwilkowski avatar ericelliott avatar export-mike avatar fredbeaudet avatar geloescht avatar greenkeeperio-bot avatar jedwatson avatar joerter avatar jossmac avatar jstockwin avatar kyleamathews avatar lennyboyatzis avatar mjmaix avatar molomby avatar morenoh149 avatar mxstbr avatar noviny avatar rclark72 avatar sebmck avatar snowkeeper avatar stennie avatar suryagh avatar w01fgang avatar webteckie avatar weekwood avatar wmertens avatar wuhaixing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keystone-classic's Issues

Multisite

Hi, what do you think about a multisite feature? For example a middleware that gets hosts from header used to mapping the sites, i'm using it in a little cms project that i've started months ago:

// Middleware to get the host for multisite
app.use(function (req, res, next) {
    // Get the request host and map it to right database into redis 
    var domain = req.headers.host.split(':')[0];
    // Set the parameters mapping
    res.locals.mapping = parameters.vhost[domain];

    // Check if site exists, otherwise send error
    if(res.locals.mapping) {
        // Set the view directory
        res.locals.view_dir = __dirname + '/sites/' + res.locals.mapping + '/views';
        // Set favicon if is enabled in configuration parameters
        if (misc_params[res.locals.mapping].favicon) {
            app.use(express.favicon(__dirname + '/sites/' + res.locals.mapping + misc_params[res.locals.mapping].favicon));
        }
        next();

    } else {
        utils.applog('error', "Requested and invalid site from: " + req.connection.remoteAddress);
        res.send(parameters.server_error);
    }
}); 

Best regards.

Images enhancements

  • Make popup caption reflect the image URL and dimensions
  • If no file reader support, add some kind of generic image that goes behind the upload icon (currently white with border).
  • Animate in upload/remove/delete icons with opacity animation of image.

Support hidden fields

path: { type: String, hidden: true }

Hidden fields should be left out of the UI on the item details screen, but submitted values would still be processed by the item updateHandler.

This would allow for custom UIs to be built against fields you don't want to be generally displayed in the UI (e.g. for usability reasons) but don't need to protect with noedit.

Strip invalid characters from key field input

Key fields currently behave like string fields and don't validate / strip input from keys.

They should remove any invalid characters from themselves, possibly using the utils.slug logic.

Might be a good idea to support a customisable pattern for parsing input (actually this may be a good idea for string fields in general?)

List Filtering

Item lists should be able to be filtered by any field.

Ideally the UI would be portable to relationship lists as well.

Fixed toolbar is jumpy in Webkit

The technique used to fix the position of the toolbar at the bottom of the screen for forms that exceed the size of the viewport is jumpy in webkit.

Generic handler for item udpates

A generic handler to process item updates based on the logic in the item:update UI that can be used in projects to handle form submission with consolidated logic for validation, uploading, etc.

Available as a method on schemas as item.getUpdateHandler(req)

Options include:

  • fields - whitelist of fields to update (defaults to all defined fields)
  • flashErrors - boolean (defaults to false), when true errors are added to req.flash('error', ...)

Example:

var updater = req.customer.getUpdateHandler(req);

updater.process(req.body, {
    fields: 'name, email, phone, address, notes',
    flashErrors: true
}, next);

Relationship UI Enhancements

Allow item

  • creation
  • deletion
  • linking
  • unlinking
    ... from lists of related items on the item details screen.

Also

  • handle paginating lists of related items

Multilanguage

Hi, what do you think to add multilanguage? Maybe with i18next for "static text" and the possibility to set the language for "dynamic content" like posts.

Thanks for your time.
Best regards.

New field type: multiselect

Similar to the select field, but allows the selection of multiple values (stores values as an array of Numbers or Strings).

UI configurable as either a list / grid of checkboxes, or a tags-style list (similar to many relationships).

Client-side field validation

Fields are currently only submitted server-side; Keystone could also provide client-side validation (or at least hilight invalid input in certain fields like dates, numbers, mismatched passwords, etc)

Allow list fields to be grouped with headings

Like this:

User.add({
    name: { type: Types.Name, required: true, index: true },
    email: { type: Types.Email, initial: true, required: true, index: true },
    phone: { type: String, width: 'short' },
    password: { type: Types.Password, initial: true, required: true }
}, 'Permissions', {
    isAdmin: { type: Boolean, label: 'Can access Keystone' }
};

Any strings passed as arguments to the List.add method should indicate a heading.

Geolocation features for location fields

Implement integration with Google Maps APIs for address autocomplete and geolocation functionality, as well as misc. field enhancements, including:

  • Address cleaning
  • Distance underscore methods
  • lat/lng geocoding (stored as 2dsphere)
  • Map display
  • Hide number / name fields unless in use

Support user model in standard meta

The standard meta pattern should understand whether a user model has been defined, and if so, store created / changed user as well as timestamps.

Better integration with Mongoose's validation

Keystone currently implements independent validation for required fields, as well as limited support for Mongoose's built in validation.

It may be possible to better integrate the two, or have Keystone's implementation be simpler in favour of Mongoose's features.

Client-side updating of relationship filters

Relationship fields with filters that depend on other values become unavailable in the UI when (a) no value is set, or (b) the value is changed, until the item is saved because the filter values are resolved server-side based on the saved item data.

Client-side submission of the current value of the dependencies will make the workflow faster.

This should potentially include consolidation of the select2 implementation for relationship fields.

New field type: array

Add an array field type that stores a simple list of String, Number or Date values.

Autocreate items w/o initial fields

If a list doesn't have any initial fields, the create button / action should immediately create a new item and navigate to it.

The assumption is that any list without initial fields defined would auto-populate some data set to identify itself (e.g. timestamp / increment counter) - this case should be supported.

Fix the localisation of the address field

The address field is currently pretty specific to Australian addresses, it should be fixed up to better support different international address formats.

Might be good to allow customisation at the model level for enabling and labelling the different subpaths supported by the location field.

Should also possibly tie in to a localisation setting for Keystone itself (shared by date formats, language, etc.)

Add a natural parser for text input on Date fields

It would be really nice if you could type a descriptive string for a date (e.g. "next tuesday", "7th Nov 1998") into a date field and have it parse it for you, in addition to having the date picker.

Improve UI Navigation

The main UI nav should allow for groups of lists to be specified, for cases where there are more lists than horizontal room.

The homepage should render groups when specified.

Autokeys need to support complex field types

Autokeys where from is set to a complex field type (e.g. name) break.

They should detect a field matching the from path and use the field to

  • check isModified
  • retrieve the format value rather than item.get(path)

name cloudinaryimage and location fields will need to extend isModified

Enhancements to client-side cloudinary uploading

Some polish to be added to the new client-side image uploading:

  • Warn before saving / navigating away if file uploads are in progress
  • If an upload is cancelled, can we remove it from cloudinary? (might need to wait until the upload has finished first...)
  • The cloudinary signature is only valid for an hour, so if the user attempts an upload and the page has been open for more than an hour, prompt them to refresh (or we could generate a new one via api)

New field type: color

Add a color field type:

  • Would validate the value is a css color property or a valid hex / rgb / rgba color
  • The ui field would have a preview of the selected color next to it.

As noted in #66 could also have a color picker for the field in the Admin UI.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.