javascript-framework

Comparing YUI and Ext JS [closed]

蓝咒 提交于 2019-12-04 22:09:06
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I've been using Ext JS as my rich-widget toolkit for a while, but I'm thinking of moving to YUI, partly because of the less

How do hosted services like UserVoice embed their content on other web sites?

浪子不回头ぞ 提交于 2019-12-04 20:37:07
How do hosted services like UserVoice embed their content on other web sites? I see that it is via including a JavaScript file from the service provider on your own page, however, what I'm interested in are the building blocks for creating a service like that. For example, do they use a library like jQuery, mooTools, or prototypejs and how do they avoid namespace clashes? Also wondered if there were any books, articles, blog posts that go over this specific use of JavaScript (not looking for general resources on JavaScript). Regards and thanks in advance, Eliot Here is a great tutorial I found

How exactly works the services hierarchy in this Angular 2 application?

心已入冬 提交于 2019-12-04 19:17:08
I am very new in Angular 2 and I have the following question about services . Into the main view (the one related to the app.component.ts class) I have this situation: <div class="container"> <div class="row"> <div class="col-xs-12 col-md-8 col-md-offset-2"> <app-new-account (accountAdded)="onAccountAdded($event)"></app-new-account> <hr> <app-account *ngFor="let acc of accounts; let i = index" [account]="acc" [id]="i" (statusChanged)="onStatusChanged($event)"></app-account> </div> </div> </div> So into this view I have 2 sub component ( app-new-account and app-account ). Into the main

Tell ember.js to use different key for its model's “id”

我与影子孤独终老i 提交于 2019-12-04 12:31:44
问题 I am stuck in a situation where I shouldn't return id field in the API endpoint. I need to tell ember to use slug field for / instead of id . I tried DS.RESTAdapter.map('App.Post', id: {key: 'slug'}) . While this works perfectly fine for App.Post.find("a-slug-name") , It messes up for App.Post.find() resulting in adding a new model every time it is called. And also assigning id to null. So how should I do this. 回答1: You need to specify the attribute that should be used as the primaryKey in

Angular JS views not updating properly

大憨熊 提交于 2019-12-04 10:09:11
问题 I have the following action ng-click in my view -> which inturn calls a jQuery ajax function that displays jQuery Qtip -> In the Qtip popup I have an ng-click on an element -> which performs a $http post and has some callbacks to update $scope values . So all these things are happening properly. But the updates are not getting reflected in the view as per the changes made in the callback in the final stage. I have a function for "ng-mousemove" in my view. So whenever I move my mouse, the

Help learning from pivotaltracker's javascript, looking for a high level breakdown

吃可爱长大的小学妹 提交于 2019-12-04 09:29:38
问题 My javascript skills are fairly basic, I can work with jquery etc. but when it comes to building a site like pivotaltracker I wouldn't know where to begin! Was hoping someone could help break down their javascript architecture and explain at a high level how they went about designing their js frameowork to make a gmail like design where it is purely javascript driven (at least I think it is). Things like: layout wise, is there a single div container that loads the different panels? Does it

Backbone model.destroy() invoking error callback function even when it works fine?

会有一股神秘感。 提交于 2019-12-04 08:48:28
问题 I have a Backbone.js model that I'm trying to destroy when the user clicks a link in the model's view. The view is something like this (pseudocode because it's implemented in CoffeeScript which can be found at the bottom of the question). var window.ListingSaveView = Backbone.View.extend({ events: { 'click a.delete': 'onDestroy' }, onDestroy: function(event){ event.preventDefault(); this.model.destroy({ success: function(model, response){ console.log "Success"; }, error: function(model,

What architectural pattern(s) should I use for my RIA? [closed]

喜你入骨 提交于 2019-12-04 08:40:41
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm building a web application that interacts heavily with the DOM and need direction in making my code scalable and maintainable. The

AngularJS filter only on certain objects

混江龙づ霸主 提交于 2019-12-04 08:35:27
问题 I have the user object defined as below. $scope.user = [{id: 1, friends: [ {name: 'John', age: 21, sex: 'M'}, {name: 'Brad', age: 32, sex: 'M'} ] }] I have the following code: <input type="text" ng-model="searchText"> <div ng-repeat="friend in user.friends | filter:searchText"> {{friend.name}} {{friend.age}} </div> Here whenever I search, I get results for name, age as well as sex. But I want to search only for name and age and I don't want sex to be searchable. Can anyone help me with how I

Which JavaScript-framework can search CSS stylesheet rules and edit their properties?

别说谁变了你拦得住时间么 提交于 2019-12-04 08:07:08
问题 The Question Which JavaScript framework (prototype, script.aculo.us, Mootools, MochiKit...) has decent CSS rule editing support? This is about changing a style rule. I want to have dynamic CSS classes which change. Example: <style> #answer, .reveal { display: none; color: blue; } #answer { /* additional stuff */ } </style> Now, via JavaScript, I want to change the rule that has the “display: none” in it. – I’m convinced that sometimes this is the right way to go; I’m not looking for