Search Results

Search found 922 results on 37 pages for 'patrick pellegrino'.

Page 23/37 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • drupal: so many js and css files ?

    - by Patrick
    hi, I've realized I'm loading a lot of resources (24 css and 17 js files) using Drupal. I've several modules installed and they all come with a css and js file. For my website I'm only using 1 additional js plugin (all the other 16 come with Drupal modules). I've not installed useless modules. They are all necessary, and they require js such as swfobject, ajax_views, jquery.media, spamspan, lightbox (modal, video and default js files), etc Same thing with css files: ckeditor, filefield, lightbox, tagadelic, uploadfield, fieldgroup, vews, taxonomy_super_select, html-element, tabs, messages... etc For my website, I only use my theme css zen.css of course. So.. is this normal ? Or I should remove all this stuff? Are drupal websites normally heavy ? thanks

    Read the article

  • Rails: include index with fields_for form helper

    - by Patrick Oscity
    i'm trying to build two models from one form by using the fields_for method. my code looks like this: <% for scale in @event.scales %> <% f.fields_for "scale[]", scale do |scale_form| %> <p> Scale<br /> <%= scale_form.label :name %> <%= scale_form.text_field :name %> <%= scale_form.label :price %> <%= scale_form.text_field :price %> </p> <% end %> <% end %> but unfortunately the output html is missing the id's of the scales: <p> Scale<br /> <label for="event_scale__name">Name</label> <input id="event_scale__name" name="event[scale][][name]" size="30" type="text" /> <label for="event_scale__price">Price</label> <input id="event_scale__price" name="event[scale][][price]" size="30" type="text" /> </p> ... here's the corresponding controller and model: class EventsController < ApplicationController ... def new @event = Event.new @providers = Provider.find(:all, :order => :name) 3.times { @event.scales.build } respond_to do |format| format.html end end ... end class Event < ActiveRecord::Base has_many :scales ... end what am i doing wrong?

    Read the article

  • EclipsePDT: how to add a Drupal project ?

    - by Patrick
    hi, how can I add an Eclipse project to my Eclipse PDT ? I've a Drupal installation on my hard-disk (a subfolder of Eclipse workspace). I've tried create new PHP project from eclipse, but it seems not to work. I've successively tried to import the Drupal project but Eclipse only recognize the SimplyModern project from drupal themes folder, and not the main Drupal project. thanks

    Read the article

  • issue when outputting an http:// address in a sub-array with json and php

    - by Patrick
    Im trying to achieve an output like this {"status":"ok","0":{"id":"11","title":"digg","url":"http://www.digg.com"}} but instead i am getting this {"status":"ok","0":{"id":"11","title":"digg","url":"http:\/\/www.digg.com"}} this is the php code im using to generate the json $links = array('id'=>'11','title'=>'digg','url'=>"http://www.digg.com"); $msg = array('status'=>'ok',$links); echo json_encode($msg); any idea what is causing this?

    Read the article

  • Windows service Null ReferenceException

    - by Patrick
    I built a windows service on my local machine. when I install and run it locally it works perfectly fine. When I try to move it to my production machine I get a null reference exception error. I've created an installation package that also works perfectly fine on my machine, but when i run it on the production machine the service still fails. The service references a .dll that in turn has references to 3 other dlls. when i build the project it pulls all of the dlls into the debug folder for the project... I've even installed the service from that folder and it works localy on my machine. I know this has to have something to do with the references, but this is beyond me. Any tips/hints would be appreciated.

    Read the article

  • Redis - which PHP module to use?

    - by Patrick
    If i check redis php supported language (http://code.google.com/p/redis/wiki/SupportedLanguages), there's 4 PHP ones: Redis PHP Bindings,phpredis,Predis,Redisent. Question is, which is the best and good to use? Thanks!

    Read the article

  • HTML+CSS+Javascript: hi, I'm getting crazy with this

    - by Patrick
    hi, I'm getting crazy with some browsers fixes to do everytime I'm doing a new website. For example, lately I've built my own Flash Video Player and I lost hours to fix some problems such as aligning it in IE and Firefox and Safari. Would be so cool to have a intermediary layer, I could use to design my website, without taking care of all browsers fixes... I guess I'm a dreamer

    Read the article

  • very weird problem concerning date and time in silverlight + ria services

    - by Patrick LHM
    Hello Friends i'm facing a very weird problem in sliverlight 4 + RIA Services, or maybe it's not weird and i'm just a newbie anyway i hope someone here can help, the problem is the following i've created a function on the server side inside the domain service this function is very simple and has a line in it that adds the server current date and time to the database (it's an HR application and employees should sign in and out thrue it each from it's own pc ) Emp.TimeOut = system.DateTime.now (C# syntax) the weird part is that for some users it always adds 3 hours to the current time(exp if he signes out at 5 it shows 8) and for others it works perfectly. the server and all the stations in the company have exactly the same time settings and the same time zone, and anyway my fucntion is on the server side so it should no be realted to the users time. any ideas why this is happening ? i've bin trying to find out why for days now but with no luck

    Read the article

  • Serialize Dictionary with a string key and List[] value to JSON

    - by Patrick
    How can I serialize a python Dictionary to JSON and pass back to javascript, which contains a string key, while the value is a List (i.e. []) if request.is_ajax() and request.method == 'GET': groupSet = GroupSet.objects.get(id=int(request.GET["groupSetId"])) groups = groupSet.groups.all() group_items = [] #list groups_and_items = {} #dictionary for group in groups: group_items.extend([group_item for group_item in group.group_items.all()]) #use group as Key name and group_items (LIST) as the value groups_and_items[group] = group_items data = serializers.serialize("json", groups_and_items) return HttpResponse(data, mimetype="application/json") the result: [{"pk": 5, "model": "myApp.group", "fields": {"name": "\u6fb4\u9584", "group_items": [13]}}] while the group_items should have many group_item and each group_item should have "name", rather than only the Id, in this case the Id is 13. I need to serialize the group name, as well as the group_item's Id and name as JSON and pass back to javascript. I am new to Python and Django, please advice me if you have a better way to do this, appreciate. Thank you so much. :)

    Read the article

  • Drupal: how to apply plugins to modal lightbox content

    - by Patrick
    hi, I'm using a lightbox on a page of my website to display my nodes. I'm using some plugins such as an external simpletooltips plugin and the drupal plugin jQuery Media (to load flash video player for some video file-fields). All this stuff stop to work for the content of the lightbox, I guess because the content is not parsed... how can I solve this ? Should I trigger the plugins again ? Thanks

    Read the article

  • How can I call `update_attribute` for a list item in rails then actually update the html using jquery?

    - by Patrick Connor
    I want my users to be able to mark one or more items from an index view as "Active" or "Inactive" using a link. The text for the link should be state aware - so it might default to "Mark as Active" if the corresponding attribute was false or null, and "Mark as Inactive" if true. Once the user clicks the link and the attribute is updated in the controller, the link-text should update based on the new state. I am WAY off here, but this is a small sample of the code I have been trying... CONTROLLER ... respond_to :html, :js ... def update @item = Item.find(params[:id]) if @item.update_attributes(params[:item]) #Not sure of how to respond to .js here end end ... update.js.erb #how do I identify which element to update? $('#item[13456]').html("State aware text for link_to") VIEW - for item in @items = item.name = link_to "Mark as Active", item_path(item), :method => :put, :remote => true. :id => "item[#{item.id}]" I am happy to read any APIs, blogs, tutorials, etc. I just can't seem to get my hands/mind around this task. Any help or guidance is greatly appreciated!

    Read the article

  • Drupal: CCK ImageField, multi-line description

    - by Patrick
    hi, I'm using CCK Image field (multi-images) and for each image I have the "Description" field, where I can add the image description. I was wondering if I can have multi-line description, instead of only one line. (Even using some specific symbol to go next line) thanks

    Read the article

  • AppleScript Editor, write message to the "Result" window

    - by Patrick
    I am using the Mac OS X Apple Script Editor and (while debugging) instead of writing a lot of display dialog statements, I'd like to write the results of some calculation in the window below, called "Result" (I have the German UI here, so the translation is a guess). So is there a write/print statement that I can use for putting messages in the "standard out" window? I am not asking to put the messages in a logfile on the file system, it is purely temporary.

    Read the article

  • Convert a complicated string into an array in php

    - by Patrick Beardmore
    I have a php variable that comes from a form that needs tidying up. I hope you can help. The variable contains a list of items (possibly two or three word items with a space in between words). I want to convert it to a comma separated list with no superfluous white space. I want the divisions to fall only at commas, semi-colons or new-lines. Blank cannot be an item. Here's a comprehensive example (with a deliberately messy input): Variable In: "dog, cat ,car,tea pot,, ,,, ;;(++NEW LINE++)fly, cake" Variable Out "dog,cat,car,tea pot,fly,cake" Can anyone help?

    Read the article

  • Can someone explain this java interface to me please?

    - by Karl Patrick
    I realize that the method run must be declared because its declared in the runnable interface. But my question comes when this class runs how is the Thread object allowed if there is no import call to a particular package? how does runnable know anything about Thread or its methods? does the runnable interface extend the thread class? Obviously i dont understand interfaces very well. thanks in advance. class PrimeFinder implements Runnable{ public long target; public long prime; public boolean finished = false; public Thread runner; PrimeFinder(long inTarget){ target = inTarget; if(runner == null){ runner = new Thread(this); runner.start() } } public void run(){ } }

    Read the article

  • form_dropdown in codeigniter

    - by Patrick
    I'm getting a strange behaviour from form_dropdown - basically, when I reload the page after validation, the values are screwed up. this bit generates 3 drop downs with days, months and years: $days = array(0 => 'Day...'); for ($i = 1; $i <= 31; $i++) { $days[] = $i; } $months = array(0 => 'Month...', ); for ($i = 1; $i <= 12; $i++) { $months[] = $i; } $years = array(0 => 'Year...'); for ($i = 2010; $i <= 2012; $i++) { $years[$i] = $i; echo "<pre>"; print_r($years); echo "</pre>";//remove this } $selected_day = (isset($selected_day)) ? $selected_day : 0; $selected_month = (isset($selected_month)) ? $selected_month : 0; $selected_year = (isset($selected_year)) ? $selected_year : 0; echo "<p>"; echo form_label('Select date:', 'day', array('class' => 'left')); echo form_dropdown('day', $days, $selected_day, 'class="combosmall"'); echo form_dropdown('month', $months, $selected_month, 'class="combosmall"'); echo form_dropdown('year', $years, $selected_year, 'class="combosmall"'); echo "</p>"; ...and generates this: <p><label for="day" class="left">Select date:</label><select name="day" class="combosmall"> <option value="0" selected="selected">Day...</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select><select name="month" class="combosmall"> <option value="0" selected="selected">Month...</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> </select><select name="year" class="combosmall"> <option value="0" selected="selected">Year...</option> <option value="2010">2010</option> <option value="2011">2011</option> <option value="2012">2012</option> </select></p> however, when the form is reloaded after validation, the same code above generates this: <!-- days and months... --> <select name="year" class="combosmall"> <option value="0" selected="selected">Year...</option> <option value="1">2010</option> <option value="2">2011</option> <option value="3">2012</option> </select> So basically the value start from 1 instead of 2010. The same happens to days and months but obviously it doesn't make any difference in this particular case as the values would start from 1 anyway. How can I fix this - and why does it happen? edit: validation rules are: $this->load->library('form_validation'); //...rules for other fields.. $this->form_validation->set_rules('day', 'day', 'required|xss_clean'); $this->form_validation->set_rules('month', 'month', 'required|xss_clean'); $this->form_validation->set_rules('year', 'year', 'required|xss_clean'); $this->form_validation->set_error_delimiters('<p class="error">', '</p>'); //define other errors if($this->input->post('day') == 0 || $this->input->post('month') == 0 || $this->input->post('year') == 0) { $data['error'] = "Please check the date of your event."; }

    Read the article

  • How to create Hash object/array using jquery?

    - by Patrick
    Hi folks I know there is a Hash() object in the Javascript prototype framework, but is there anything in Jquery like this? As I would like to stick with one javascript framework, rather than mixing the Prototype Frame work and the JQuery framework and use at the same time, as I worry there will be conflict and create side-effects. So my question is: how to create Hash object/array using jquery? Here is my function: /* prototype framework, I want to change this to jQuery! */ var starSaves = new Hash(); function myHover(id, pos) { var starStrip = $('star_strip_' + id); if (starSaves.keys().indexOf(id) == -1) { var starSave = new Array(); var imgs = starStrip.select("img") alert(imgs); for (var i = 0; i < imgs.length; i++) { starSave[starSave.length] = imgs[i].src; if (i < pos) imgs[i].src = "/images/star_1.gif"; else imgs[i].src = "/images/star_0.gif"; } starSaves.set(id, starSave); } }

    Read the article

  • Drupal, Views, Exposed filter: custom default selected tags

    - by Patrick
    hi I'm using Drupal, Views with a exposed filter (using taxonomy). My customer wants to set from back-end the default selected tags (in order to pre-filter the views content). In the exposed filter settings, there is functionality. However, it doesn't work properly: when I click on "Select None" link (I'm using better_exposed_filter module) I expect none of the tags are selected, instead, the default configuration (default selected tags) are selected, so actually it doesn't work anymore. I hope it is clear. So, I was wondering if I can prepare a custom menu in which my user can check/uncheck the default selected tags in the view. thanks

    Read the article

  • php file_get_contents and &amp;

    - by Patrick
    Hello all, I'm trying to use php's file_get_content('a url'); The thing is if the url has '&' in it, for example file_get_contents('http://www.google.com/?var1=1&var2=2') it automatically make a requests to www.google.com/?var1=1&amp<no space here>;var2=2 How do I prevent that from happening?

    Read the article

  • Drupal, Lightbox: cannot edit the content inside

    - by Patrick
    hi, I'm using Drupal and Lightbox module to display the content of articles in this website: donatellabernardi.ch/drupal if you click on an article the lightbox is displayed. However I have 2 problems with it: 1) I cannot use the libraries such as the tooltip library qTip from it. (If you move the mouse over the balls, you'll see the tooltips) 2) I cannot invert the title with the balls (tags), because it seems that the template of the node in the lightbox is not controlled by my theme. I tried also to change the node template (in the drupal root folder), swapping title and meta data but it didn't work. thanks

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >