Search Results

Search found 466 results on 19 pages for 'clickable'.

Page 7/19 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How to get acts on taggable working

    - by Schipperius
    I am new to ruby on rails (and programming) and this is probably a really stupid question. I am using Rails 3.2 and trying to use acts_as_taggable_on to generate tags on articles and to have those tags show on article index and show pages as a clickable links. I have tags clickable on both the article show and index pages, but the links just go back to the index page and don't sort according to the tag name. I have scoured the Internet and pieced together the code below from various sources, but I am clearly missing something. Any help is greatly appreciated, as I have exhausted my seemingly limited knowledge! Thanks. Here is what I have: class ArticlesController < ApplicationController def tagged @articles = Article.all(:order => 'created_at DESC') @tags = Article.tag_counts_on(:tags) @tagged_articles = Article.tagged_with(params[:tags]) respond_to do |format| format.html # index.html.erb format.json { render :json => @articles } end end def index @article = Article.new @articles = Article.paginate :page => params[:page], :per_page => 3 @tags = Article.tag_counts_on(:tags) respond_to do |format| format.html # index.html.erb format.json { render json: @articles } end end module ArticlesHelper include ActsAsTaggableOn::TagsHelper end class Article < ActiveRecord::Base acts_as_ordered_taggable acts_as_ordered_taggable_on :tags, :location, :about attr_accessible :tag_list scope :by_join_date, order("created_at DESC") end article/index.html.erb <% tag_cloud(@tags, %w(tag1 tag2 tag3 tag4)) do |tag| %> <%= link_to tag.name, articles_path(:id => tag.name) %> <% end %> article/show.html.erb <%= raw @article.tags.map { |tag| link_to tag.name, articles_path(:tag_id => tag) }.join(" | ") %>

    Read the article

  • OnClickListener onClick=true and selector

    - by azerto00
    I have not found any answer for my problem, so I need your help ... I have an LinearLayout which I want to be clickable in order to lunch another activity. So I implement an onClickListener to it. I created an selector for this LinearLayout in order that what someone click on it, the background change. I just don't understand that : If my LinearLayout doesn't have android:clickable="true" in the xml, I'm able to click on it and get what I want but the selector doesn't work. If I remove this line, it is the opposite .. the selector work but not the onClick event. So, can anyone can explain me why ? Just in case, here is my the content of my selector file : <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/btn_restaurants_background_state_pressed" android:state_pressed="true"></item> <item android:drawable="@drawable/btn_restaurants_background_state_pressed" android:state_focused="true"></item> <item android:drawable="@drawable/btn_restaurants_background_state_pressed" android:state_selected="true"></item> <item android:drawable="@drawable/btn_restaurants_background_state_normal"></item> </selector> Thanks you in advance

    Read the article

  • How to pass javascript/jQuery settings from page to page in rails?

    - by aronchick
    When doing javascript manipulation of what's visible, how does one pass that from page to page (ideally in Rails)? For example, let's say I have the following simple jQuery code: <% link_to "Next Page", report_path %> <div class="clickable-div" style="background-color:#FFFFFF;"></div> <script> $('.clickable-div').click(function () { var color = $(this).css("background-color", "#000000"); }); </script> If it's not clear, the code is just supposed to change the color of the div based on whether or not it has been clicked. Regardless, there's also a link on the page that allows someone to go to the reporting page. What's a way to pass the state of the div to the action call? EDIT It seems unnecessary to do it in a session - am I wrong? This is just something from one page to the next, I couldn't care less anywhere else on the site. EDIT 2 To confirm, Rails needs to have access to the action that occurred in Javascript on the previous page.

    Read the article

  • Retrieving an element by array index in jQuery vs the each() function.

    - by Alex Ciminian
    I was writing a "pluginable" function when I noticed the following behavior (tested in FF 3.5.9 with Firebug 1.5.3). $.fn.computerMove = function () { var board = $(this); var emptySquares = board.find('div.clickable'); var randPosition = Math.floor(Math.random() * emptySquares.length); emptySquares.each(function (index) { if (index === randPosition) { // logs a jQuery object console.log($(this)); } }); target = emptySquares[randPosition]; // logs a non-jQuery object console.log(target); // throws error: attr() not a function for target board.placeMark({'position' : target.attr('id')}); } I noticed the problem when the script threw an error at target.attr('id') (attr not a function). When I checked the log, I noticed that the output (in Firebug) for target was: <div style="width: 97px; height: 97px;" class="square clickable" id="8"></div> If I output $(target), or $(this) from the each() function, I get a nice jQuery object: [ div#8.square ] Now here comes my question: why does this happen, considering that find() seems to return an array of jQuery objects? Why do I have to do $() to target all over again? [div#0.square, div#1.square, div#2.square, div#3.square, div#4.square, div#5.square, div#6.square, div#7.square, div#8.square] Just a curiosity :).

    Read the article

  • Not able to install java in ubuntu 9.10

    - by piemesons
    Error i am getting:-- E: I wasn't able to locate a file for the sun-java6-bin package. This might mean you need to manually fix this package. (due to missing arch) then a blue dialog box appears with OK (Which is not clickable and pressing enter is not workin.) EDIT sudo dpkg --configure -a sudo aptitude clean sudo aptitude update sudo aptitude dist-upgrade sudo aptitude install sun-java6-jre sun-java6-plugin sun-java6-fonts Tried this but still not working... same problem.

    Read the article

  • Automatic hyperlink in Excel

    - by developer
    Hi All, Is it possible to hyperlink a url in excel automatically. I mean when the cell starts with something like http or www can I hyperlink that. Currently, I have to hit enter in the cell value in the formula bar to make the link as clickable. Also if I change the value in the cell, the link doesnt get refreshed until I hit enter. Is there a way in excel where it will automatically detect and apply a hyperlink.

    Read the article

  • Linux: grab audio from a video clip

    - by liori
    Hello, I'd like to take audio track from a video clip in FLV container and save it to something playable by portable music players. Are there any easy to use tools for that? I know how to do that using console tools (mplayer+lame/oggenc), but I'd like to get something clickable, preferably for GNOME. Thanks!

    Read the article

  • Firefox on-screen buttons disappearing

    - by GRUFFLE CHUMP
    Firefox 8.0.1 ALL the on-sceen buttons on ALL sites have disappeared. I'm not talking about the toolbar buttons, I'm talking about buttons like NEXT and BACK and CONTINUE and PAY and GO TO BASKET and CONTACT US that should appear in varous parts of the screenh. Sometimes they are still visable (and clickable) as text, but in other cases they have disappeared entirely, although a click symbol still appears if you can guess where they are and mouse over them.

    Read the article

  • Outlook2010 : Sending hyperlinks containing a space, <> is not working

    - by Biff MaGriff
    Previously I used Outlook 2003 and I was able to send a hyperlink with a space by typing < before entering the hyperlink and a > after typing the hyperlink and the whole thing would become a valid clickable link. Like so <\\network share with spaces\folder We upgraded to Outlook 2010 and currently this happens <\\network share with spaces\folder or if I do nothing \\network share with spaces\folder Is there a setting in one of these ribbons somewhere to control this?

    Read the article

  • Android programming - How to acces [to draw on] XML view in main.xml layout, using code

    - by user556248
    Ok I'm a newbie at Android programming, have a hard time with the graphics part. Understand the beauty of creating layout in XML file, but lost how to access various elements, especially a View element to draw on it. See example of my layout main.xml here; <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/Title" android:text="App title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textColor="#000000" android:background="#A0A0FF"/> </LinearLayout> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/PaperLayout" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1" android:orientation="horizontal" android:focusable="true"> <View android:id="@+id/Paper" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </LinearLayout> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:id="@+id/File" android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="34dp" android:layout_alignParentTop="true" android:layout_centerInParent="true" android:clickable="true" android:textSize="10sp" android:text="File" /> <Button android:id="@+id/Edit" android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="34dp" android:clickable="true" android:textSize="10sp" android:text="Edit" /> </LinearLayout> </LinearLayout> As you can see I have a custom app title bar, then a View filling middle, and finally two buttons in bottom. Catching button events and responding to, for example changing title bar text and changing View background color works fine, but how the heck do I access and more importantly draw on the view defined in main.xml UPDATE: That for your suggestion, however besides that I need a View, not ImageView and you are missing a parameter on canvas.drawText and an ending bracket, it does not work. Now this is most likely because you missed the fact that I am a newbie and assuming I can fill in any blanks. Now first of all I do NOT understand why in my main.xml layout file I can create a View or even a SurfaceView element, which is what I need, but according to your solution I don't even specify the View like Anyways I edited my main.xml according to your solution, and slimmed it down a bit for simplicity; <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/Title" android:text="App title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textColor="#000000" android:background="#A0A0FF"/> </LinearLayout> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/PaperLayout" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1" android:orientation="horizontal" android:focusable="true"> <com.example.MyApp.CustomView android:id="@+id/Paper" android:layout_width="fill_parent" android:layout_height="fill_parent" /> <com.example.colorbook.CustomView/> </LinearLayout> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:id="@+id/File" android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="34dp" android:layout_alignParentTop="true" android:layout_centerInParent="true" android:clickable="true" android:textSize="10sp" android:text="File" /> </LinearLayout> </LinearLayout> In my main java file, MyApp.java, I added this after OnCreate; public class CustomView extends ImageView { @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); canvas.drawText("Your Text", 1, 1, null); } } But I get error on the "CustomView" part; "Implicit super constructor ImageView() is undefined for default constructor.Must define an explicit constructor" Eclipse suggests 3 quick fixes about adding constructor, but none helps, well it removes error but gives error on app when running. I hope somebody can break this down for me and provide a solution, and perhaps explain why I can't just create a View element in my main.xml layotu file and draw on it in code.

    Read the article

  • How to fix Monogame WP8 Touch Position bug?

    - by Moses Aprico
    Normally below code will result in X:Infinity, Y:Infinity TouchCollection touchState = TouchPanel.GetState(); foreach (TouchLocation t in touchState) { if (t.State == TouchLocationState.Pressed) { vb.ButtonTouched((int)t.Position.X, (int)t.Position.Y); } } Then, I followed this https://github.com/mono/MonoGame/issues/1046 and added below code at the first line in update method. (I still don't know how it's worked, but it fixed the problem) if (_firstUpdate) { typeof(Microsoft.Xna.Framework.Input.Touch.TouchPanel).GetField("_touchScale",System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static).SetValue(null, Vector2.One); _firstUpdate = false; } And then, when I randomly testing something, there are several area that won't read the user touch. The tile with the purple dude is the area which won't receive user input (It don't even detect "Pressed", the TouchCollection.Count = 0) Any idea how to fix this? UPDATE 1 : The second attempt in recompiling The difference is weird. Dunno why the consistent clickable area is just 2/3 area to the left UPDATE 2 : After trying to rotate to landscape and back to portrait to randomly testing, then the outcome become :

    Read the article

  • labels as tabs and subtabs in google blogger

    - by John Demetriou
    I run a blog in google blogger. I have many labels and I am searching for a way to make labels as tabs (where the pages gadget/widget is) and subtabs. Let me be more specific. I have a label called Games and four labels called PC Games, XBOX 360 Games, PS3 Games and Wii Games. What I want is not only each of the labels to be put in the pages gadget/widget is ( I found some information on that matter here) but also a way to make the four specialized labels that I mentioned in my example to be put in a droplist under the label/tab games (i want the droplist to appear when the mouse hovers above the tab games and also that tab to be clickable and show all the posts I have labeled Games

    Read the article

  • JavaOne and Oracle Open World Community Run - Monday, Oct 1, 6:17am PT

    - by arungupta
    Following the tradition from last year, inviting all JavaOne and Oracle Open World attendees to run with me in one of the 10 best cities to run in the US. The running route will start at Ferry Plaza on Embarcadero, go through Fisherman's Wharf, straight up Hyde St, couple of loops around Crooked Street and then back the same route to end at Ferry Plaza. Here is the complete clickable map: The Hyde Street (~300ft in 0.75 miles) and Lombard (~200 ft in 0.15 mile) are challenging elevations and you may cover them once only. Alternatively you may take a simpler route out-and-back by running further up to Marina and Crissy Field. When ? Monday, Oct 1, 2012 I plan to leave at 6:17am PT from the starting point and certainly hope you can join me. Oracle is doing several things to keep Oracle Open World and JavaOne sustainable and reduce the conference footprint. Lets do our share to keep the conference green! Of course, don't forget the Geek Bike Ride is tomorrow.

    Read the article

  • about permssion

    - by Gitesh
    I am really new to ubuntu (12.04) to automount my drive I added this line to fstab /dev/sda4 /media/FF15-ED92 vfat defaults 0 0 But now when I want to delete a directory or a file it doesn't delete like using del key of keyboard so right clicked on that directories and files but there was no option to delete and move to trash was also not clickable. So how can I give myself permissions to do this. Also I can't do this on my pen drive also. I tried this but nothing happened sudo chmod 777 /media/44gb if I change from chmod to chown then it gives that changing ownership of `/media/44gb': Operation not permitted

    Read the article

  • How are buttons made to be clicked?

    - by Johnny
    I just want to ask a general question. According to that answer, Ill continue thinking. You know in games there are lots of clickable items. Play button, exit, comboboxes maybe etc. My question is are those buttons drawn in same canvas with background and all other things, or for every different thing there is another canvas object? My question is about for general. Im not asking about a specific game, im asking how they are made generally. Im planning to start a game on Android, and Im confused actually how to design buttons, and other object. Probably Im going to use View/SurfaceView for now. I don't have much experience with OpenGL yet. Thanks in advance.

    Read the article

  • How to reset settings when Unity won't finish booting?

    - by Emre
    I have a new 12.04 installation and I messed things up after trying to move /home to an NTFS partition, which I later learned was a bad idea. I removed references to the NTFS partition on fstab and created new users on the ext4 / partition. Now I can't get Unity to start up properly for any user. I get the GUI with only three Launch icons (none of which are clickable) and no bar at the top. The keyboard seems to the nonfunctional after I enter my credentials. The interesting thing is that I can boot when I go through recovery mode and select resume. I wonder whether I am creating the new users properly. What is the correct protocol for doing so in order to ensure that they can run Unity?

    Read the article

  • Source Browsing in FireFox

    - by lavanyadeepak
    Source Browsing in FireFox Just casually observed this a few minutes back with my Mozilla Firefox 3.6.3. When you do a view source of any  page in Internet Explorer it just renders as editable inoperative HTML. However in Firefox the hyperlinks are shown clickable and active. When you click on any hyperlink the most obvious and expected output would be that the target page would appear in one of the new tab in the parent browser. However the View Source window refreshed with the HTML source of the new page. I believe this gesture of Firefox would help us to take a journey back into Lynx Text Browsing in a way.

    Read the article

  • Creating a interactive grid for puzzle game

    - by Noupoi
    I am trying to make a slitherlink game, and am not too sure how to approach creating the game, more specifically the grid structure on which the puzzle will be played on. This is what a empty and completed slitherlink grid would look like. The numbers in the squares are sort of clues and the areas between the dots need to be clickable. http://i.stack.imgur.com/U1kXn.gif http://i.stack.imgur.com/RMwiv.gif I would like to create the game in VB .NET. What data structures should I try to use, and would it be beneficial using any frameworks such as XNA?

    Read the article

  • Partition table nonresponsive during instal

    - by SunGold
    I started a Ubuntu install, but the impetuous teenager (IT) at the controls "did stuff" that resulted in an install failure. We had arrived at the partition table. Now, there are no clickable actions in the partition part of the installation. "Install Now" returns the message, "No root file defined." How can I use Ubuntu from CD to make a root file or bootable partition? I've been struggling with the previous screwups by IT for 3-4 days, so I am becoming desperate.

    Read the article

  • Automatic hyperlink in Excel [closed]

    - by developer
    Hi All, Is it possible to hyperlink a url in excel automatically. I mean when the cell starts with something like http or www can I hyperlink that. Currently, I have to hit enter in the cell value in the formula bar to make the link as clickable. Also if I change the value in the cell, the link doesnt get refreshed until I hit enter. Is there a way in excel where it will automatically detect and apply a hyperlink.

    Read the article

  • iPhone - move above buttons

    - by Mike
    I have a video at 320x240 on the middle of the screen area. Around this video, several buttons that will call different actions. When the MPMoviePlayerController is fired and the movie starts playing the buttons are behind the video and I cannot click them. I see them but they are not clickable. I think the video window is covering the whole area. How can I solve that?

    Read the article

  • iPhone - move above buttons

    - by Mike
    I have a video at 320x240 on the middle of the screen area. Around this video, several buttons that will call different actions. When the MPMoviePlayerController is fired and the movie starts playing the buttons are behind the video and I cannot click them. I see them but they are not clickable. I think the video window is covering the whole area. How can I solve that?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >