GithubHelp home page GithubHelp logo

tympanix / angular-table-resize Goto Github PK

View Code? Open in Web Editor NEW
37.0 37.0 20.0 148 KB

An AngularJS module for resizing table columns!

Home Page: https://tympanix.github.io/angular-table-resize/

License: MIT License

CSS 1.88% JavaScript 98.12%

angular-table-resize's People

Contributors

jiaming10 avatar ms1111 avatar rockydd avatar tympanix 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

angular-table-resize's Issues

wrong jquery BOWER dependency id

Hi,

(something easy to fix)

usually all bower components have ID that follows the naming convention, that is lowercase and without spaces.

Unfortunately an the angular-table-resize declares
"jQuery": "^3.0.0"

could you please change it to lower case:

"jquery": "~3.1.0",

it creates problems with automated builds due to inconsistent directory creation.

Thanks

Problem with turn off debug information mode

You have a problem when application try to use $compileProvider.debugInfoEnabled(false);
We always disable this in production for a significant performance boost.

For example function saveColumnSizes() use angular.element(column).scope() which dont work when we set to false debugInfoEnabled.

Missing index.js

I did bower install and can see that angular-table-resize folder in download location.

The package.json mentions index.js as the value of main, but i could not find it in the folder hierarchy.

Finally, i am not able to inject the 'ngTableResize' module into my application.

Has anybody found this issue?

Thanks!

Strange style error in Chrome on macOS

imgur
Like that. When I resize column, the border style is bad.
The strange that it will be occur in the Chrome on macOS (Macbook Pro 13" Retina screen). It doesn't appear with external monitor. and doesn't appear on iMac Retina screen. It is appear on Macbook Pro 13" build-in monitor only....

If you have the device you can have a try with the following link.

jsfiddle

Usage with table generated using ng-repeat

Nice library very useful - thanks!

However it would be great if handled changes to the table. I have a table that uses ng-repeat to generate its columns so they will change on updates to my model and I want to the table resizer to update when this happens accordingly.

It could maybe do this by observing changes to number of headers in resizeable directive?

function watchTableChanges(table, attr, scope) {
        scope.$watch(
            function () { return $(table).find('th').length; },
            function () {
                cleanUpAll(table);
                initialiseAll(table, attr, scope);
            });
  }

Was this your thinking behind "bind" scope attribute. I don't think this is doing anything at present.

directive not recognised

I cannot get my controller to recognise the module: rzTable, whether I reference resize-table-directive in my view html with a script tag: <script src="angular-table-resize.js"></script> or writing the module name in square brackets in the controller: angular.module('myApplication', ['rzTable'])
I get the angular error page of import module not recognised

I've downloaded the folder angular-table-resize and it is in the node_modules folder of my angularJS app.
Should I move it to another folder in my app ?

I've tried to follow the instructions : #### Example:

<table rz-table id="myTable">
  <thead>
    <th ng-repeat="col in columns" rz-col="col"></th>
  </thead>
  ...
</table>

but the rz-table tag is not recognised.

Do I need an @import statement somewhere ?

please change the dependency of jQuery to jquery (Lowercase)

Most of the libraries's set the dependency of jQuery with lowercase: (jquery). But in this project, it use jQuery. That cause a problem, that when I run bower install, it will think jQuery is different with jquery, so it just install it, and unfortunately, in OSX, the folder name is incase-sensitive. So the jquery is overwritten by jQuery.

Then when you run bower list, it will complain jquery is not installed. If you run npm install again, the jquery will install jQuery, then jQuery will be displayed as not install. That will be a dead loop.

So, please change it to lower case. It will help me out. Thanks.

Usage with npm and node_modules folder

There is nothing out there on Google to properly explain how to use this from the node_modules folder in an angularJS app

I've tried var tableResize = require('./node_modules/angular-table-resize/scripts/resize-table-directive');

Says angular cant' be found.
I've tried (function (){
angular.module('myApp').controller('plannedController', plannedController), ['rzTable'];
in my controller.js file.

support API for controlling the table resizing

Once a table is resized its hard to control some aspects of it.
It would be very nice to:

  • Have detection of methods when resizing starts and ends. So callbacks like: onResizeStarted, onResizeInProgress, onResizeEnded
  • Ability to remove the storage information
  • Ability to explicitly do not save storage information at all. (even if all id's are present)
  • Ability to reset the table size to original

As inspiration, one can look at the angular-seletize component. (https://github.com/opsolve/angular-selectize). In that component they pass an object with the desired options and callbacks.

The callbacks of selectize looks like this:
https://github.com/brianreavis/selectize.js/blob/master/docs/usage.md

As inspiration for events one could look at https://github.com/Reklino/angular-resizable
it applies to containers, not tables, but its interesting to see the type of information that they show in case of an event. I find the selectize API nicer.

The resizer undefined was not found

I'm not sure, but this looks wrong:

    function getResizer(scope, attr) {
        try {
            var mode = attr.mode ? scope.mode : 'BasicResizer';
            var Resizer = $injector.get(mode)
            return Resizer;
        } catch (e) {
            console.error("The resizer " + scope.mode + " was not found");
            return null;
        }
    }

Shouldn't it be:

    function getResizer(scope, attr) {
        try {
            var mode = attr.mode ? attr.mode : 'BasicResizer';
            var Resizer = $injector.get(mode)
            return Resizer;
        } catch (e) {
            console.error("The resizer " + attr.mode + " was not found");
            return null;
        }
    }

directive not found in view.html

My working directory: ...node_modules/angular-table-resize
I used npm install angular-table-resize, but your instructions do not apply or fit in with the existing architecture of my app.

This is part of my table:

At the very top of this file:



<title>Enplan 2 - Planned</title>

How do I get it to work?

{{vm.selectedDepartmentName}} {{d.weekNo}}
{{d.dt | date: 'EEE, dd-MMM-yy'}}

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.