Coder Social home page Coder Social logo

jovi-li / serenity.extra Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dfaruque/serenity.extra

0.0 0.0 0.0 21.25 MB

Name of the repo says that this is an EXTRA of http://serenity.is platform

CSS 6.52% C# 6.02% JavaScript 55.31% TypeScript 6.28% HTML 5.60% PLSQL 5.88% Batchfile 0.01% TSQL 12.88% Less 1.46% SCSS 0.04% ASP.NET 0.01%

serenity.extra's Introduction

Serenity.Extra

Name of the repo says that this is an EXTRA of my Beloved https://github.com/volkanceylan/Serenity platform

It is just some useful utilities and some extra functionalities like

  • Showing lookup text instead of id value in grid.
  • Automatic width adjustment of grid columns.
  • Adding export report button automatically in grid if a report service method in defined.
  • Added funtionality to make a detail grid editable (inline)
  • Added some useful function in q (Not Q).
  • Audit Log in a single Table and a nice viewer.
  • Replace Row (useful for deleting a record and replace the dependants records with another record)
  • Added some editors
    • Grid Item Picker Editor
    • AutoCompleteEditor
    • ColorEditor
    • DateTimePickerEditor
    • EmptyLookupEditor
    • StaticTextBlock

How to use (for .net old framework)

  1. Install NuGet Package Serenity.Extra
  2. If want to apply Serenity.Extra css then you could add line in Content\site\CssBundles.json "~/Modules/_Ext/ExtStyles.css"
  3. Change Base/Super classes of Dialog.ts and Grid.ts using following mappings
Serenity Default _Ext
Serenity.EntityGrid _Ext.GridBase
Serenity.EntityDialog _Ext.DialogBase
Common.GridEditorBase _Ext.GridEditorBase
Common.EditorDialogBase _Ext.EditorDialogBase
  1. Add [LookupScript("Administration.User")] on UserRow
  2. Add following line in ScriptInitialization.ts Q.Config.rootNamespaces.push('_Ext');

How to use (for .net core)

  1. Copy the Modules/_Ext folder from the SerExtraCore project and place it accordingly.
  2. Copy the wwwroot/Modules folder from the SerExtraCore project
  3. Add following line in ScriptInitialization.ts Q.Config.rootNamespaces.push('_Ext');
  4. If want to apply Serenity.Extra css then you could add line in wwwroot\Content\site\CssBundles.json "~/Modules/_Ext/ExtStyles.css"

Examples

To make a detail grid inline editable

add the following code to Grid.ts

protected getSlickOptions() {
  let opt = super.getSlickOptions();
  opt.editable = true;
  return opt;
}

To hide a field in a Dialog

use q.hideField(this.form.SomeField).

To disable a field in a Dialog

use Serenity.EditorUtils.setReadOnly(this.form.SomeField, true);

To disable a Dialog

call this.setReadOnly(true); anywhere in your dialog.

To access parent/master dialog from child/detail dialog

Initialize detail editor by using q.initDetailEditor(this, this.form.someDetailField) in dialog's constructor() OR onDialogOpen() overload

Then you should be able to access parent dialog like this.parentEditor.parentDialog

Make sure that you have declared form in parent/master dialog as public

Please explore the code to know more...

Online demo (by @edwardch) https://serenity-extra.azurewebsites.net

serenity.extra's People

Contributors

dfaruque avatar minhhungit avatar mijaved avatar mamunurroshid avatar wasimahmad avatar 4bitsteams avatar

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.