Giter VIP home page Giter VIP logo

ng-admin's Issues

Sortable results by column

It would be cool to have a way to realtime sort the results by a selected column in both asc/desc way

Typo in readme.md

In Configuration section, where it says "will allows you" it should be "will allow you".

Also, in same section, it would be nice to break this long line of code, which causes a horizontal scrollbar in code block:

app.config(function(NgAdminConfigurationProvider, Application, Entity, Field, Reference, ReferencedList, ReferenceMany) {

Last bit: is the term edition, used in body text and in code, intended? Or could that be something like:

  • Edit form in body text
  • Editable in code

(Side note: we choose not to do a PR for this, hope that's ok.)

Automated Field label should remove underscores

Currently, when I define a field like new Field('book'), it automatically takes the label "Book", which is good. But, when I define a field like new Field('book_author'), it automatically takes the label "Book_author", which is bad. It forces me to override the label each time I use an underscore name. I'd prefer "Book Author".

Ability to override directive templates on a per-entity base

Here is my use case : for one of the entities, I'd like to update the HTML of the datagrid, to add bootstrap classes.

I would like to be able to do this in a fine-grained way:

commentEntity.addView(new ListView('comment-list')
  .templates({
    'datagrid.html': "<table><table-header></table-header></table>"
  })

I would also like to do it for the entire application, so we need some sort of cascading capability:

for each view, for each directive, use the template

  • defined in the view, or
  • defined in the application, or
  • defined in the default directive

This also implies that the templates of ng-admin's directives should be much slower, calling subdirectives that can be, in turn , easily overridden (think Twig blocks).

Scroll

  • Fix the double scroll (page & famous grid)
  • Slow down the famous scroll
  • Fix infinite pagination (does not work anymore with the real famous grid)
  • Fix the loader on infinite scroll
  • Bug when we scroll up to fast (?!)

Improve usage documentation

Hi.

I must say that the README is not clear enough regarding how to use this backend... A magic tool that allows anyone to build a backend interface in a couple of seconds should deserve an extensive documentation for newcomers, especially since the blog post does not match the current code base (obviously).

I suggest to add the HTML code in the README (my first attempt failed because of a missing Angular directive).

William

Allow to override deletion message

When deleting some documents, I got "Delete documents 3?". It would be better to get name of document in this message, something like "Delete document 'Why ng-admin rocks...'?". Passing an extra parameter accepting a callback would be better.

See related source.

And what about replacing this h2 by the form title?

Moreover, it should be at singular form by default (document, not documents).

Is it possible to nest collection list results?

Is there a way to allow for the collection returned by a collection request to be nested under a "results" property? Something akin to this:

{
  "results": []
}

Rather than just

[]

For the response?

Thanks for your help!

Posting new entities does not send payload

I have a fresh project with the included config-dist.js and when I save a new entity there is no data in the request payload that goes to the server. I thought it might have just been me, but I tried on the demo at http://ng-admin.marmelab.com/ and saw the same thing, post data does not appear to get sent with the POST request when saving a new entity.

pagination start number?

Hi team,

This is what saw on the demo page. The start pagination number is 0, maybe it's better to change to 1? otherwise 0-10 means 11 entries in current page.
Maybe _start: (page - 1) * maxPerPage + 1 instead of _start: (page - 1) * maxPerPage, ?

snip20140928_2

Thanks

Edit view in row list (with collapse bootstrap)

I was working on this spec for my project, but since last update it's break. Submit button doesn't work.
Have you done some changes on routes ? I need to call another state in listView ?

How to install with "yo angular"

I've scaffolded a project with yo angular, but I'm seeing some problems maybe other have already solved.:

  1. On bower install, I have to chose different versions - maybe the module's bower.json isn't up to date?
  2. It seems the js and css files aren't injected into index.html as other plugins does (see the index.html)
  3. It's un clear if for <div ui-view>, I need to bower install ui-router?

My goal is to integrate ng-admin with Drupal's RESTful module

Remove References Field on Dashboard

Like we can disable on Dashboard a normal Field, using .dashboard(false), there is a method to disable Reference, ReferencedList and ReferenceMany Fields on Dashboard?

Question: How do I...

I have ng-admin up and running using json-server running a copy of my data extracted to json. I'm trying to determine how to make this work with two lookup tables that are linked. That is, I have a, for example, DocumentType table that's a simple ID and Description table. I also have a DocumentSubType table that, as well as having the ID and Description fields, links back to the DocumentType table via a field named, appropriately, docTypeId. What I would like to see when looking at the list of DocumentSubTypes is the Id, Description, and DocumentType_Description. Also, when editing a DocumentSubType, I would like to see the docTypeId handled as a dropdown that displays the DocumentType Descriptions. I've tried using the Reference field type in my config, but I'm not getting the expected results. How would I go about getting this to work like I would like it to?

As a separate, but related question: In order to create new records in a table, does ng-admin only work if the ID field of a table is named 'Id" Or can the Id field be named something like 'DocSubTypeId'?

Field type file?

Hi! This project will be very useful for me, really thank you!

I Would like to know if is in your to-do list allow user to upload some kind of file in server or s3 etc etc...

I think this could be very useful :)

Thanks

Error handling

How do I handle errors from server? How do I notify ng-admin that a validation error ocurred on the server, after trying to save the model, for example? Maybe a validation that can only occur in the server.
Can I use another validation lib, other than the builtin?

Refactor Fields to make them portable

Currently, a call to view.addField(field) internally calls field.setView(view). Not only is this bidirectional relationship a not-so-good practice, it also prevents the reuse of fields.

We need to refactor the way fields interact with view to avoid the dependency of field to view, and meake them portable.

How can I make ng-admin work?

Hello all
we must be missing something obvius, I guess. We've been through GitHub readme as well as launch post, but still it's not totally clear to us how to use ng-admin.

If we follow the launch post, it speaks about:

  1. retrieve ng-admin by cloning GitHub repo: is any destination directory ok?
  2. edit lib/config.js file: where is that/should that file be located?
  3. run grunt: from any working directory?

If we go along readme, it speaks about:

  1. retrieve ng-admin with bower: from which directory should we run that command? Is the root directory of a custom web application ok?
  2. concatenate and minify the app with grunt: from which directory? We tried, probably from wrong directory, and we got errors about missing module at ng-admin/src/javascripts/bower_components/almond/almond.js

Side note: we did run npm install from ng-admin cloned repo root directory.

Could you please give us some hint on this? Thanks for your time

Add Custom Element

Can we possible to add custom element on ListView, like a select for maxperpage ?
I have seen that it's possible to addField() to ListView but this function add it on all rows logicaly.
Maybe an addElement() function could be cool, to customize as we like your API instead of insert it in ng-admin.js

cssClass field attribute is static and restricted to form fields

the cssClass() field attribute could be improved in two directions:

  • make it available to column fields (currently, only input fields use it)
  • pass it to ngClass instead of class to allow dynamic class according to elements in the entry.

That would allow to highlight abnormal values in a datagrid simply using CSS...

Empty dashboard view.

Before, when no dasboard view was specified for a given entity, no list appeared on the dashboard for that entity. This allowed to have concise dashboard with only the more interesting entity.
Now we get empty list :
capture du 2014-11-20 11 13 45

Be able to change baseApiUrl for Entity

In some cases we need to use different base api url for different entities.
Live example ( Parse.com ):

api.parse.com/1/users
api.parse.com/1/classes/CustomClass

Do we have this possibility in ng-admin?

How to ignore Hateoas

My RESTful response is wrapped inside a data array.

local_d7_dev_api_v1_articles_-2

Is there a way to configure ng-admin to look into that array, thus skip Hateoas related properties?

Problem with Edit form (0.3.3)

When i submit edit form, i have this error :
TypeError: Cannot use 'in' operator to search for 'here_the_first_field_of_the_form' in undefined
But entity is updated anyway, submit just block with this error.

Have you got an idea ?
thanks

Non-number reference fields

Hello,
I am trying to use this to build a quick back-end, but my IDs are alphanumeric strings, not just integers. Is this possible to use these on reference fields?

Thanks in advance!

Allow to filter query for ReferencedList

Actually, ReferencedList, retrieve all referenced entity, and filter them client side.
It would be nice to be able to add a dynamic filter on the request to retrieve only the needed referenced entity.

API auto-discovery ?

Hi there, very good idea to share the missing AngularJS administration !

Did you think about API auto discovery ?
There's a lot of initiatives to make APIs hypermedia, such as:

That could be even more easy than describing the API in a JS file :)

Strip tags when displaying wysiwyg content in list

In a previous PR (#122), I fixed the problem of wysiwyg fields being displayed as HTML the wrong way: by displaying the unescaped HTML. This prevents truncation, and exposes the admin user to XSS attacks.

The right way to do it is to display a version of the wysiwyg stripped of HTML tags, equivalent to the result of PHP's trip_tags() function.

bower install fails to resolve dependencies

$ bower install
... (behold the matrix) ...
Unable to find a suitable version for angular, please choose one:
    1) angular#1.2.15 which resolved to 1.2.15 and is required by angular-mocks#1.2.15, angular-scenario#1.2.15
    2) angular#1.2.24 which resolved to 1.2.24 and is required by angular-cookies#1.2.24, angular-resource#1.2.24, angular-route#1.2.24, angular-sanitize#1.2.24
    3) angular#>= 1.0.8 which resolved to 1.2.24 and is required by angular-ui-router#0.2.11
    4) angular#>=1 which resolved to 1.2.24 and is required by angular-bootstrap#0.11.0
    5) angular#~1.2.16 which resolved to 1.2.24 and is required by angular-admin
    6) angular#* which resolved to 1.2.24 and is required by restangular#1.4.0

Prefix the choice with ! to persist it to bower.json

Support for complex entity nesting

It would be nice/cool if you could deep-nest entities in ng-admin when performing a save operation. As an example, with the demo data if I could embed a full tag object inside of the tags[] when I post, rather than just a collection of the ids for the included objects.

create field for object key

hello,
the db model i'm using has a 'details' object where specific user details are stored. I couldn't create a field for its items.

creating a field using 'details' as a name would show the json string of it. i tried to create a field with 'details.key', but it didn't work. Any idea?

Allow to override the sidebar icon for each entity

The ideal would be to allow something like a menuTemplate() call in the DashboardView:

new DashboardView('book-dashboard')
  .menuTemplate('<a ng-click="sidebarController.displayList(entity, $event)"><span class="glyphicon glyphicon-pencil"></span> Books</a>')

Or does it make sense to introduce yet another view for the menu?

ng-admin 0.3.2 : label is undefined

I downloaded the app (ver. 0.3.2) yesterday & Configured it but it bugged!

var user = new Entity('users');
 app.addEntity(user); 
user
    .label('Recent Users')   // does not work

angular throws this:

Uncaught Error: [$injector:modulerr] Failed to instantiate module adminApp due to:
TypeError: undefined is not a function
    at http://localhost:3000/config.js:41:8   --> points to where label(..) is defined

If I remove label(..) call, it shows the dashboard correctly.
But when I click the items on left (to list the users), angular again throws:

TypeError: undefined is not a function
    at new a (http://localhost:3000/ng-admin-app/bower_components/ng-admin/build/ng-admin.min.js:9:11646)

In the page, I see this: {{ listController.title }}

Inspecting the above ng-admin.min.js the error points to section: this.entityLabel=this.view.label()

How to get rid of it?

Paginator does not reflect filtered results

If you use the filter in the top right the paginator does not reflect the filtered results. It seems like this probably should? Screenshot of current behavior is attached.

screen shot 2014-09-16 at 4 17 41 pm

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.