Questions tagged [kolite]

Library with a set of helpers to aid in creating MVVM applications using JavaScript and Knockout.

KoLite contains a set of helpers to aid in creating MVVM applications using JavaScript and Knockout. Link on github: https://github.com/CodeSeven/KoLite

Featuers:

  • asyncCommand
  • command
  • activity
  • dirtyFlag

Current Version: 1.0.4

Also available on NuGet at https://nuget.org/packages/KoLite

demo: http://jsfiddle.net/johnpapa/gDZDS/

12 questions
3
votes
3 answers

Using a dirty flag or undo stack with Knockout.js and Knockout.mapping.js

I am trying to create or use an existing dirtyFlag. However all the examples I've seen don't talk about how to integrate them with knockout.mapping.js plugin. There are a lot of really great examples out there like Ryan Niemeyer's stuff and John…
Mr. Young
  • 2,364
  • 3
  • 25
  • 41
3
votes
1 answer

ko.DirtyFlag on ko.observableArray is always dirty

Inside my viewmodel I have following code: var self = this; self.Name = ko.observable(data.Name); var mapped = $.map(data.Addresses, function (item) { return new Address(item) }); self.AddressList = ko.observableArray(mapped); self.dirtyFlag = new…
2
votes
1 answer

React value changed

Lets say I have name = ko.observable('John') that is bind to the input as value. I need to show (hidden before) if name get changed. So if I edit name from John to Jack then save button should appear and if edit back to John it…
Sergey Metlov
  • 25,747
  • 28
  • 93
  • 153
1
vote
1 answer

Sample example or tutorial using knockout KoLite for change tracking

Is there any simple example on how to use knockout kolite to track the changes. I saw this link posted by john papa [Kolite][1]. I didnt understood how he is binding changes to the html element for tracking changes. Anyone have any simple example…
DevelopmentIsMyPassion
  • 3,541
  • 4
  • 34
  • 60
1
vote
4 answers

Field-level change tracking with ASP.NET MVC4 & Knockout

Wondering if anyone out there has experience with tracking field-level change tracking? We are trying to discern the easiest/best way to track any and all model modifications by end-users. I am using ASP.NET MVC4, Knockout, and Knockout Editables.…
DeeDub
  • 1,654
  • 1
  • 12
  • 18
0
votes
1 answer

Is it possible to get original object values from koLite?

I'm using knockoutJS and koLite. It appears that koLite is somehow storing the original values of my object. I say that because if I edit a value, the dirty flag returns true. BUT, if I change that value back to its original value, dirty flag…
RHarris
  • 10,641
  • 13
  • 59
  • 103
0
votes
1 answer

KoLite knockout.command has incorrect context with inherited class

When a subclass viewmodel is bound to a View, that overrides a method in a base class in inherits from, "knockout.command" seems to be calling the base method instead of the child overridden method. Here is a jsfiddle in javascript, although I'm…
user210757
  • 6,996
  • 17
  • 66
  • 115
0
votes
1 answer

How do you load KoLite using require.js?

How do you load KoLite using require.js? I've tried different things with requires (shim, export, init...) and can never get around these errors KO is not defined <- from inside the ko.DirtyFlag script can not call method DirtyFlag() on on…
Tyler
  • 1,019
  • 12
  • 27
0
votes
1 answer

KoLite asyncCommand accessing element data

So I'm displaying a observable array in my view, and I want to be able to remove an element from that list using asyncCommand. However, I'm not sure how I should be getting that element. Is there a way of accessing or passing the selected element…
mtleising
  • 171
  • 2
  • 14
0
votes
4 answers

How to load koLite with requirejs?

This is from knockout.dirtyFlag.js ;(function (ko) { ko.DirtyFlag = function (objectToTrack, isInitiallyDirty, hashFunction) { hashFunction = hashFunction || ko.toJSON; var _objectToTrack =…
O.O
  • 11,077
  • 18
  • 94
  • 182
0
votes
1 answer

KOLite Activity Indicator Configuration

I am using KOLite on a project, and have everything working properly. The activity indicator works perfectly inside a button or in a small area. My question is: Is there a way to configure the activity indicator per binding? For instance, it would…
Brian McCord
  • 4,943
  • 7
  • 32
  • 44
0
votes
2 answers

Knockoutjs track changes after ajax call

See JsFiddle here http://jsfiddle.net/WtgbV/2/ In words: I have some ajax call, and in the server's response I get some array of items (Items in knockout viewmodel) I need to know that property name was changed in element with id==2 etc to save…
Lari13
  • 1,850
  • 10
  • 28
  • 55