Search Results

Search found 340 results on 14 pages for 'sortable'.

Page 11/14 | < Previous Page | 7 8 9 10 11 12 13 14  | Next Page >

  • Performing AJAX calls on the "new" controller

    - by shmichael
    In my rails app, I want to have a sortable list as part of an object creation. The best practice suggested Railscast adds the acts_as_list plugin and then initiates AJAX calls to update item position. However, AJAX calls won't work on an unsaved model, which is the situation with new. One solution would be to save the model immediately on new and redirect to edit. This would have a nice side effect of persisting any change so the user could resume work should he be interrupted. However, this solution adds the unwanted complexity of saving an invalid model, compromising rails' validation processes. Is there any better way to allow AJAX + validations without going into too much work?

    Read the article

  • [Flex 4] Removing sort arrows from AdvancedDataGridColumn Header.

    - by zeroDivisible
    Hello, I am doing this simple project using Flex 4 SDK and I got stuck with this simple problem: I have turned sortable property for AdvancedDataGridColumn to false, but the column header is still rendered as: As You can see, my label for this header is "06", but the column header is divided and it keeps the place for sort arrow. How can I change this? I would like my column header to contain only my label. I know that most probably I need to do some magic with AdvancedDataGridHeaderRenderer but I just started learning Flex and would like to receive some help. Thank You for help. Best regards, Mike.

    Read the article

  • Showing a loading spinner only if the data has not been cached.

    - by Aaron Mc Adam
    Hi guys, Currently, my code shows a loading spinner gif, returns the data and caches it. However, once the data has been cached, there is a flicker of the loading gif for a split second before the data gets loaded in. It's distracting and I'd like to get rid of it. I think I'm using the wrong method in the beforeSend function here: $.ajax({ type : "GET", cache : false, url : "book_data.php", data : { keywords : keywords, page : page }, beforeSend : function() { $('.jPag-pages li:not(.cached)').each(function (i) { $('#searchResults').html('<p id="loader">Loading...<img src="../assets/images/ajax-loader.gif" alt="Loading..." /></p>'); }); }, success : function(data) { $('.jPag-current').parent().addClass('cached'); $('#searchResults').replaceWith($(data).find('#searchResults')).find('table.sortable tbody tr:odd').addClass('odd'); detailPage(); selectForm(); } });

    Read the article

  • rails 3.0.3 - ActiveRecord::Relation, undefined method error

    - by brg
    I am having this unexplained ActiveRecord::Relation, undefined method error . I don't know why, since my model association are well defined and the event table has the foreign keys for the user table. I tried using this fix but it failed: Rails 3 ActiveRecord::Relation random associations behavior event.rb class Event < ActiveRecord::Base belongs_to :user attr_accessible :event_name, :Starts_at, :finish, :tracks end user.rb class User < ActiveRecord::Base has_many :events, :dependent = :destroy attr_accessible :name, :event_attributes accepts_nested_attributes_for :events, :allow_destroy = true end schema.rb ActiveRecord::Schema.define(:version = 20101201180355) do create_table "events", :force = true do |t| t.string "event_name" t.string "tracks" t.datetime "starts_at" t.datetime "finish" t.datetime "created_at" t.datetime "updated_at" t.integer "user_id" end end error message NoMethodError in Users#index undefined method `events' for # Extracted source (around line #10): 7: <%= sortable "Tracks" % 8: 10: <% @users.events.each do |event| % 11: <% debugger % 12: 13: <%= event.starts_at % Trace of template inclusion: app/views/users/index.html.erb Rails.root: C:/rails_project1/events_manager Application Trace | Framework Trace | Full Trace app/views/users/_event_user.html.erb:10:in _app_views_users__event_user_html_erb__412443848_34308540_1390678' app/views/users/index.html.erb:7:in_app_views_users_index_html_erb___603337143_34316016_0'

    Read the article

  • jQuery draggable leaving cloned html behind

    - by Alex Crooks
    I am using jQuery UI; Draggable http://jqueryui.com/demos/draggable invoked like this: $(document).ready(function(){ $("#side_bar").sortable({ revert: true }); $(".draggable").draggable({ containment: 'parent', hascroll: true, handle: 'div.box_header', scrollSensitivity: 100, scrollSpeed: 100, axis: 'y', connectToSortable: '#side_bar', helper: 'clone', opacity: 0.35 }); }); You can see the html structure on http://www.sarsclan.co.uk (right side bar area). It seems to create a transparant clone as your dragging, but when you drop it puts the draggable div in the right place, but leaves the original div in it's place and just appends the dom with a clone of that original div in its new place.

    Read the article

  • C++/MFC: Handling multiple CListCtrl's headers HDN_ITEMCLICK events

    - by raph.amiard
    I'm coding an MFC application in which i have a dialog box with multiple CListCtrls in report view. I want one of them to be sortable. So i handled the HDM_ITEMCLICK event, and everything works just fine .. Except that if i click on the headers of another CListCtrl, it does sort the OTHER CListCtrl, which does look kind of dumb. This is apparently due to the fact that headers have an ID of 0, which make the entry in the message map look like this : ON_NOTIFY(HDN_ITEMCLICK, 0, &Ccreationprogramme::OnHdnItemclickList5) But since all the headers have an id of zero, apparently every header of my dialog sends the message. Is there an easy way around this problem ?

    Read the article

  • How do I use Eval() to reference values in a SortedDictionary in an asp Repeater?

    - by MatthewMartin
    I thought I was clever to switch from the memory intensive DataView to SortedDictionary as a memory efficient sortable data structure. Now I have no idea how get the key and value out of the datasource in the <%# or Eval() expressions. SortedDictionary<int, string> data = RetrieveNames(); rCurrentTeam.DataSource = data; rCurrentTeam.DataBind(); <asp:Repeater ID="rNames" runat="server"> <ItemTemplate> <asp:Label ID="lblName" runat="server" Text='<%# Eval("what?") %>' /> </ItemTemplate> </asp:Repeater> Any suggestions?

    Read the article

  • [jqueryui] Sorttable ul li get order

    - by Shishant
    Hello, My html is like this <ul> <li>...</li> <li> <ul> <li>...</li> </ul> </li> </ul> This is just a example, a ul can contain many li but the max depth is ul li ul like in example I am using JqueryUI Sortable to sort this li I want to get the sort order of the li to store it in database so that user dont have to sort each time. Thank You.

    Read the article

  • dropdown list box to display in the row..

    - by kumar
    Please can any body tell me is this right what I am doing here.. I need to display a dropdown list box in each row in the grid var lastsel2; $("#table1").jqGrid({ scroll: 1, sortable: true, url: '/friends/names/shiva', datatype: "json", mtype: 'GET', height: 200, autowidth: false, pager: '#page', colNames: [//columns names here ], colModel: [ { name: 'A', index: '', width: 90 }, { name: 'B', index: '', width: 100 }, { name: 'C', index: '', width: 70 }, { name: 'D', index: '', width: 65}, { name: 'E', index: '', width: 105}, { name: 'F', index: '', width: 105 }, { name: 'G', index: '', width: 100 }, { name: 'H', index: '', width: 70}, { name: 'I', index: '', width: 60}, { name: 'J', index: '', width: 60}, { name: 'K', index: '', width: 40 }, { name: 'L', index: '', width: 70}, { name: 'M', index: '', width: 60 }, { name: 'N', index: '', edittype: 'select',editype:true, width: 100, editoptions: { value: { 1: 'AA', 2: 'CC',3:'BD''}} } ], onSelectRow: function(Acct_Code) { if (A&& A !== lastsel2) { $('#table1').restoreRow(lastsel2); $('#table1').editRow(A, true); lastsel2 = A; } }, Here i am not able to see the dropdown box in row click? Thanks

    Read the article

  • Architecting a generic search result web control

    - by Bartek Tatkowski
    In a project I'm currently working for we've stumbled upon the need for several kinds of search results presentation controls. The search result are similar, but not identical. For example, in the "office search" result we might want to present the office name and location, while in the "document search" could contain document name, author and publishing date. These fields should be sortable. My current strategy is to employ the Factory pattern and do something like this: ISearchResult officeResults = SearchResultFactory.CreateOfficeSearchResults(data); ISearchResult documentResults = SearchResultFactory.CreateDocumentSearchResults(data); The problem is: I don't know how to implement the markup code. Should I just do Controls.Add(officeResults); in the containing page? Or is there some ASPX trickery to create generic web controls? Or maybe I'm overthinking this and just should create five classes? ;)

    Read the article

  • jQuery UI get the sorted position of LI element in UL

    - by PeterBZ
    I'm using jQuery UI's sortable for my UL list. Each time the user sorts the list, I want each li element to update it's "position" attribute to it's position in the list. <ul> <li position="1">a</li> <li position="2">b</li> <li position="3">c</li> </ul> So when a user swaps c with a, the position will also update. I tried to use .each but it seems that javascript doesn't follow the order of how the LI elements are displayed but the order of the element's creation.

    Read the article

  • query on display tag

    - by sarah
    Hi, I have the following code to display <display:table name="sessionScope.userList" id="userList" export="false" pagesize="1"> <display:column title="Select" style="width: 90px;"> <input type="checkbox" name="optionSelected" value=""/> </display:column> <display:column property="userName" sortable="false" title="UserName" paramId="userName" style="width: 150px; text-align:center" href="#"/> </display:table> On click of the checkbox i need to get the corresponding row value that is the username how would i get that?

    Read the article

  • jquery draggable accept: classpath

    - by heldopslippers
    Hi guys.. I have problems with the following bit of javascript/jquery code: this.droppable = function(){ $('.imageWindow .body .item').draggable(); $('.groupWindow .body .item').droppable({ accept: $(".imageWindow .body .item"), over: function(event, ui) { alert("this is valid!"); }, drop: function(){ alert('dropped'); } }); } As you maybe know it is not possible to pass the following in the accept option: $(".imageWindow .body .item") But what is possible ? I want to pass a "class path" as an accept option ! It is probably a simple answer but i can't figure it out. Of course i could do: accept: ".item" But because "groupWindow .body .item" is a sortable it would also accept himself! Thanxs if you can help me!

    Read the article

  • column data in tooltip overflows.

    - by xrx215
    I want to show the data in the tooltip when a columns has long sentences because of width constrints. for this i am using a renderer function as follows { header: xppo.st('SDE_INCIDENT_DESCRIPTION1'), width: 175, sortable: true, groupable: false, dataIndex: 'IncidentDescription', renderer: function(value, metaData, record, rowIndex, columnIndex, ds) { return '<div ext:qtip="' + value + '">' + value + '</div>'; } }, but when the data has no break space and when the word is really long the text will extend beyond the text area. how do i show the entire data within the div specified withot overflowing from it.

    Read the article

  • Assign weight to a integer column for Sphinx search

    - by Daniel
    Hello: I have a note table with columns: title :string content :text rating :integer and a thinking_sphinx configuration: define_index do indexes :title, :sortable => true indexes :content end Then I can search the notes and assign weights to title and content to define the order or the result: Note.search "abc", :match_mode => :extended, :field_weights => { :title => 10, :content => 3 } Now I want to assign a weight to the rating column The type of the rating column is integer. The range of the rating is [1, 2, 3, 4, 5]. Can I just add weight at the :field_weights :field_weights => { :title => 10, :content => 3, :rating => 5 } or I need to do something else to make the note which has higer rating display first?

    Read the article

  • jQuery UI: moving items from one list to another

    - by AnC
    While this should be relatively straightforward, I can't figure out how to move (rather than copy) LI elements between ULs. All I want is to drag any item from list foo to list bar (or vice versa) without duplicating the element. While connectToSortable does almost exactly what I want (though I'd prefer to avoid sortable), it clones the element - and manually removing the original element by reacting to the stop event turns out to be not so easy (e.g. ensuring that a valid drop actually happened). A simple "hello world" example would help me greatly.

    Read the article

  • undefined method `events' for #<ActiveRecord::Relation:0x4177518> -rails 3.0.3

    - by brg
    I am having this unexplained NoMethodError with undefined method `events' for #. I don't know why since my model association are well defined and the event table has the foreign keys for the user table. I tried using this fix but it failed: Rails 3 ActiveRecord::Relation random associations behavior event.rb class Event < ActiveRecord::Base belongs_to :user attr_accessible :event_name, :Starts_at, :finish, :tracks end user.rb class User < ActiveRecord::Base has_many :events, :dependent = :destroy attr_accessible :name, :event_attributes accepts_nested_attributes_for :events, :allow_destroy = true end schema.rb ActiveRecord::Schema.define(:version = 20101201180355) do create_table "events", :force = true do |t| t.string "event_name" t.string "tracks" t.datetime "starts_at" t.datetime "finish" t.datetime "created_at" t.datetime "updated_at" t.integer "user_id" end end error message NoMethodError in Users#index undefined method `events' for # Extracted source (around line #10): 7: <%= sortable "Tracks" % 8: 10: <% @users.events.each do |event| % 11: <% debugger % 12: 13: <%= event.starts_at % Trace of template inclusion: app/views/users/index.html.erb Rails.root: C:/rails_project1/events_manager Application Trace | Framework Trace | Full Trace app/views/users/_event_user.html.erb:10:in _app_views_users__event_user_html_erb__412443848_34308540_1390678' app/views/users/index.html.erb:7:in_app_views_users_index_html_erb___603337143_34316016_0'

    Read the article

  • JavaScript Drag and Drop Grid With Elements of Different Sizes.

    - by Paul67
    I need to be able to drag and drop boxes of differing dimensions on the same grid. JQuery UI seems to offer 80% of what I'm after particularly the sortable grid the have on their demo page. The only problem is that this grid only works with boxes of identical dimensions. My requirement is to be able to have the same functionality but with boxes that are sized as multiples of the base unit. For example - let's say the standard box size is 300x300px I would also like the opportunity to show on the same grid a 300x600px and a 600x600px box. There's no requirement to display boxes that are not multiples of the dimensions of the smallest box size.

    Read the article

  • jQuery UI draggable and text selection

    - by LeftyX
    I am using jQuery 1.8.3 and jQuery UI 1.9.2. My web application has got some draggable elements and I would like to allow the user to select some text in the contained elements. I've seen there are some other questions on this topic. Another path I am following is use the right-click of the mouse and use some text-selection plug-in I have found. Still I can't make it work. It seems that draggable/sortable elements don't allow text selection or can intercept mouse (clicks) events. Any ideas? Regards.

    Read the article

  • how to sort an existing table in greasemonkey ?

    - by user570512
    i'm writing a greasemonkey user.js for a page with a table in it. (table is 100 rows by 18 columns.) now what i want to do is to make it sortable on column. and also have it run in both chrome and firefox. all searches for answers sofar resulted in suggestions to use jquery/dojo or something alike. can i be done without any external code? after all it's just a matter of replacing the row's in a different order, right? or is that a silly thing to say? the thing is that i'm already using dojo for some query needs but since i want it to run in both firefox and chrome, i just copy paste the whole dojo thing in my script.. also, most of the solutions i found sofar seem to be more for use when building a table. not for altering an existing one. any help is appreciated.

    Read the article

  • How do I deal with drupal hook_views_tables?

    - by wamp
    For the title field,I want to return node.title,but what I tried is not working: return array('og' => array('name' => 'og', 'join' => array('left' => array('table' => 'node', 'field' => 'nid' ), 'right' => array('field' => 'nid' ), ), 'fields' => array( 'title' => array('name' => t('OG: Group: Group name'), 'table' => 'node', 'handler' => 'og_handler_field_title', 'help' => t('show group name.'), 'sortable' => true, 'sort_handler' => 'views_og_query_ogname', 'notafield' => false, ),

    Read the article

  • Jquery UI in IE10

    - by Coelho
    I have this code on my system, and it works very well in all "real browsers", but now I need put this working on IE10. Because this development is inside a CMS I can't do upgrade on Jquery or UI. The $ version is 1.3.2 an UI version is 1.7.3. In IE I don't receive any message of error. And the Items with a class = "container myDevelopment" aren't sortables. Some one know what it's doesn't work? $(".container.myDevelopment").sortable({ connectWith: ".container.myDevelopment", receive: function (event, ui) { var issuecode = ui.item.attr("id"); var issueStatus = this.getAttribute("data-status"); alert("it's works"); } }).disableSelection();

    Read the article

  • Check if an object is order-able in python?

    - by sortfiend
    How can I check if an object is orderable/sortable in Python? I'm trying to implement basic type checking for the __init__ method of my binary tree class, and I want to be able to check if the value of the node is orderable, and throw an error if it isn't. It's similar to checking for hashability in the implementation of a hashtable. I'm trying to accomplish something similar to Haskell's (Ord a) => etc. qualifiers. Is there a similar check in Python?

    Read the article

  • JDeveloper 11.1.2 : Command Link in Table Column Work Around

    - by Frank Nimphius
    Just figured that in Oracle JDeveloper 11.1.2, clicking on a command link in a table does not mark the table row as selected as it is the behavior in previous releases of Oracle JDeveloper. For the time being, the following work around can be used to achieve the "old" behavior: To mark the table row as selected, you need to build and queue the table selection event in the code executed by the command link action listener. To queue a selection event, you need to know about the rowKey of the row that the command link that you clicked on is located in. To get to this information, you add an f:attribute tag to the command link as shown below <af:column sortProperty="#{bindings.DepartmentsView1.hints.DepartmentId.name}" sortable="false"    headerText="#{bindings.DepartmentsView1.hints.DepartmentId.label}" id="c1">   <af:commandLink text="#{row.DepartmentId}" id="cl1" partialSubmit="true"       actionListener="#{BrowseBean.onCommandItemSelected}">     <f:attribute name="rowKey" value="#{row.rowKey}"/>   </af:commandLink>   ... </af:column> The f:attribute tag references #{row.rowKey} wich in ADF translates to JUCtrlHierNodeBinding.getRowKey(). This information can be used in the command link action listener to compose the RowKeySet you need to queue the selected row. For simplicitly reasons, I created a table "binding" reference to the managed bean that executes the command link action. The managed bean code that is referenced from the af:commandLink actionListener property is shown next: public void onCommandItemSelected(ActionEvent actionEvent) {   //get access to the clicked command link   RichCommandLink comp = (RichCommandLink)actionEvent.getComponent();   //read the added f:attribute value   Key rowKey = (Key) comp.getAttributes().get("rowKey");     //get the current selected RowKeySet from the table   RowKeySet oldSelection = table.getSelectedRowKeys();   //build an empty RowKeySet for the new selection   RowKeySetImpl newSelection = new RowKeySetImpl();     //RowKeySets contain List objects with key objects in them   ArrayList list = new ArrayList();   list.add(rowKey);   newSelection.add(list);     //create the selectionEvent and queue it   SelectionEvent selectionEvent = new SelectionEvent(oldSelection, newSelection, table);   selectionEvent.queue();     //refresh the table   AdfFacesContext.getCurrentInstance().addPartialTarget(table); }

    Read the article

  • How could i get selected value from dropdownlist in kendo ui grid in mvc

    - by Karthik Bammidi
    I am working on Kendo UI with asp.net mvc razor. I am trying to bind database table data with kendo grid that supports CRUD operations. Here i need to populate a dropdownlist for one of my table field. I have used the following code View: @model IEnumerable<MvcApplication1.PriceOption> @(Html.Kendo().Grid(Model) .Name("Grid") .Columns(columns => { //columns.Bound(p => p.ProductTitle).ClientTemplate("<input type='checkbox' disabled='disabled'name='Discontinued' <#= Discontinued? checked='checked' : '' #> />"); columns.Bound(p => p.ProductTitle).EditorTemplateName("OptionalEmail"); columns.Bound(p => p.OptionTitle); columns.Bound(p => p.Price); columns.Bound(p => p.Frequency); columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200); }) .ToolBar(toolbar => toolbar.Create()) .Editable(editable => editable.Mode(Kendo.Mvc.UI.GridEditMode.InLine)) .Pageable() .Sortable() .Scrollable() .DataSource(dataSource => dataSource .Ajax() .Events(events => events.Error("error_handler")) .Model(model => model.Id(p => p.ProductID)) .Create(create => create.Action("CreateOption", "ZiceAdmin")) .Read(read => read.Action("Read", "ZiceAdmin")) .Update(update => update.Action("UpdateOption", "ZiceAdmin")) .Destroy(update => update.Action("DeleteOption", "ZiceAdmin")) ) ) OptionalEmail.cshtml @model string @(Html.Kendo().DropDownList() .Name("ProductTitle") .Value(Model) .SelectedIndex(0) .BindTo(new SelectList(ViewBag.ProductTitle)) ) Here i need to store the selected item from the dropdownlist. But it always shows null. How could i get the selected value from dropdownlist.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14  | Next Page >