Search Results

Search found 6420 results on 257 pages for 'mathieu parent'.

Page 31/257 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • rewrite all requests from one folder to a parent folder htaccess

    - by Neo
    This one has me stumped, I need to re-write all requests to the javascript folder (js) to a special library handler system. e.g. rewrite http://localhost/admin/js/bar.js --> http://localhost/_lib/=admin/js/bar.js Any ideas? I have tried the following which creates an error RewriteCond %{REQUEST_URI} ^(.*)$ RewriteRule ^(.*)$ /%1/_lib/$1 [NC] (36)File name to long: cannot map GET /admin/js/bar.js to file

    Read the article

  • Forwarding activity result to parent, with singleTop launch mode

    - by Joe
    I have two activities: a MainListActivity, and a DetailViewActivity. DetailViewActivity is set with android:launchMode="singleTop". When clicking an item in the "main list" activity, it launches the "detail view" activity via: startActivityForResult(detailIntent, REQUEST_CODE_DETAIL); If I then call setResult(RESULT_OK, resultData); and finish(); from within the Detail activity, that resultData is received by the "main list" activity's onActivityResult(..) method correctly. However, if I implement a "see previous"/"see next" type of navigation within the Detail activity, and implement it using singleTop, that result no longer gets sent back to the initial activity: Intent nextItemIntent = this.createIntent(nextId); nextItemIntent.setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT); startActivity(nextItemIntent); // at this point, my DetailActivity's onNewIntent() method is called, and the new data is loaded properly But from here, when I call setResult(..) and finish(), my MainList activity never receives the new/updated result. Anyone know what I'm doing wrong?

    Read the article

  • Select from parent table return ID = 0 column values for child objects

    - by SaD
    Entities: public class Person { public Person(){} public virtual long ID { get; set; } } public class Employee : Person { public Employee(){} public virtual long ID { get; set; } public virtual string Appointment { get; set; } } Mappings: public class PersonMap : ClassMap<Person> { public PersonMap() { Id(x => x.ID) .GeneratedBy.Identity(); } } public class EmployeeMap : SubclassMap<Employee> { public EmployeeMap() { KeyColumn("ID"); Map(x => x.Appointment) .Not.Nullable() .Length(50); } } 2 items in Person table 1 item in Employee table (1 in base class, 1 in child class) Query:var list = Session.CreateQuery("from Person").List<Person>(); Return: 0 | ID = 1 1 | ID = 0, Appointment = "SomeAppointment"

    Read the article

  • Floating inner div in parent

    - by Ockonal
    Hello, I have two divs: <div id="modalBox" style="position: absolute; border: 1px solid #bababa; width: 400px; height: 180px; background-color: #e3e6ca; text-align: center; -moz-border-radius: 6px; -webkit-border-radius: 6px; display: none;"> <div style="background-color: #98002f; background-image: url(*/images/tab_background.gif); color: white; width: 400px; height: 25px; -moz-border-radius-topright: 6px; -moz-border-radius-topleft: 6px; -webkit-border-top-right-radius: 6px; -webkit-border-top-left-radius: 6px;"> <h3>Please, fill the form to confirm your identity:</h3> </div> ... </div> What I get: How can I make inner div floating top?

    Read the article

  • passing the parent form on the onclick event to javascript function

    - by user1051505
    Hi I am trying to pass variables on the onclick event to a javascript function. I am trying the following way, I can't get the input value in the javascript function.(I am expecting an alert of 1.) Is it the right way of doing this? Please help. <head> <script> function submit_value(form) { alert(form.ip.value); } </script> </head> <table> <tr> <form> <td> <input id="ip" type="text" value="1"> </td> <td> <a href="javascript:;" onClick="submit_value(this)">Button</a> </td> </form> </tr> </table>

    Read the article

  • WPF binding comboboxes to parent- child model

    - by PaulB
    I've got a model with a few tiers in it - something along the lines of ... Company Employees Phone numbers So I've got a ListBox showing all the companys in the model. Each ListBoxItem then contains two comboboxes ... one for employees, one for phone numbers. I can successfully get the employee combo to bind correctly and show the right people, but I'd like the phone combo to show the numbers for the selected employee. I'm just setting the DataContext of the ListBox to the model above and using the following data template for each item <DataTemplate x:Key="CompanyBody"> <StackPanel Orientation="Horizontal"> <Label Content="{Binding Path=CompanyName}"></Label> <ComboBox Name="EmployeesCombo" ItemsSource="{Binding Path=Company.Employees}"></ComboBox> <!-- What goes here --> <ComboBox DataContext="???" ItemsSource="??" ></ComboBox> </StackPanel> </DataTemplate> I've tried (naively) <ComboBox ItemsSource="{Binding Path=Company.Employees.PhoneNumbers}" ></ComboBox> and <ComboBox DataContext="EmployeesCombo.SelectedValue" ItemsSource="{Binding Path=PhoneNumbers}" ></ComboBox> and all other manner of combinations ...

    Read the article

  • form_for [@parent,@son],:remote=>true not asking for JS

    - by Cibernox
    Hi. I have a plain old form. That form is used to create new objects of a nested model. #restaurant.rb has_many :courses #courses.rb belongs_to :restaurant #routes.rb resources :restaurants do resources :courses end In my views(in haml), i have that code: %li.course{'data-random'=>random} = form_for([restaurant,course], :remote=>true) do |f| .name= f.text_field :name, :placeholder=>'Name here' .cat= f.hidden_field :category .price= f.text_field :price,:placeholder=>'Price here' .save = hidden_field_tag :random,random = f.submit "Save" I espected that form to be answered by action create of courses_controller with JS (create.js.erb), but it is submited like a normal form, and is answered with html. What am I doing wrong? This problem is similar to this but the only answer don't make sense to me. Thanks Inside

    Read the article

  • Get parent function

    - by Morgoth
    Is there a way to find what function called the current function? So for example: def first(): second() def second(): # print out here what function called this one Any ideas?

    Read the article

  • JQuery addclass to another div (but not parent) if no data is found

    - by Danny
    I have this to add a class to the main table that the report is in if there is no data returned. $('#report-area table td:contains("Sorry, your search did not return any data")').parents('#reportArea').addClass('no-report-data') However, I have another div area "#report-footer" but it's not inside #report-area. I'd like to also add the .no-report-data class to "#report-footer" as well but in this case I don't think the .parents selector will work. Is there another selector I can use to do this?

    Read the article

  • Div appearing outside its parent, bizarre sizing problems...

    - by SLC
    I have a list, which is going to be a menu. I want to position it absolutely at the very top of the page. My code looks like this: <div id="sitenavmenu"> <div id="sitenavmenu-content"> <ul id="sitenavmenu-content-menu"> <li>Register</li> <li><%: Html.ActionLink("About", "About", "Home")%></li> <li>Contact Us</li> </ul> </div> </div> My CSS looks like this: #sitenavmenu { position:absolute; margin-left:300px; top:2px; width:500px; } #sitenavmenu-content-menu li { list-style-type:none; display:inline; padding-right:5px; font-size:small; } The problem I have is, if I don't position it absolutely, it looks fine. As soon as I position it absolutely (as it is shown above), the sitenavmenu div changes size, and although it shifts to the top, the sitenavmenu-content div appears below it. There is no other CSS as I have only just started, and I have checked padding etc. and everything is zero. I just can't figure out why it's not working, and I don't want to hack it. Edit: It's something to do with the height of #sitenavmenu. If I leave it, then the sitenav-content ends up horizontally centered in it, although #sitenavmenu is much taller. If I make them both the same size, so they should sit on top of each other, then the #sitenavmenu-content sits below.

    Read the article

  • Change class of parent div if radio input checked

    - by xxstevenxo
    I've been searching and searching google for answers to my question but have been unsuccessful so far. I'm hoping one of you guys could give me some assistance. I have 10 divs with the class name "dividend" holding a table with the classname/id of "container" then two smaller tables inside that. Within the container table at the bottom is a hidden radio button with the name "page1". I wrote an onClcick for the container table so the user can select the whole table instead of the radio button, but not I'm trying to change the style of the selected container so the users know they have selected it. I have tried a few different methods and I'm able to change the style to the new class by just writing document.getElementById('container').className = 'selected'; But because all 10 divs share the same name it will only change the style of the first element it finds. So I tried writing this loop to check if there are any selected radios in the document then to change the else name the style as the default. I'm sure its something stupid but I'm pretty stumped atm.. Any help would be appreciated. Thanks. selected = function () { var divs = document.getElementByTagName('DIV'), div, tbl, rad, stat, i; for (i = 0; i < divs.length; i++) { div = divs.id; if (div == 'dividend') { tbl = div.getElementById('container'); rad = tbl.getElementByTagName('INPUT'); if (rad.checked = true) { tbl.className = 'selected'; } } } };

    Read the article

  • Passing null child object from parent object to a partial view

    - by Mike
    I have an object which contains models for my ASP.NET MVC web app. The Model that is being passed into the view has sub models for "gadgets" on that particular view. Each of these sub models gets passed to a partial view (gadget). The problem is when I have a null model in the view model. See example below. View Model: public class FooBarHolder() { public FooBar1 FooBar1 { get; set; } public FooBar2 FooBar2 { get; set; } } We pass FooBarHolder into the view and inside the view we make calls such as <% Html.RenderPartial("Foo", Model.FooBar1); %> <% Html.RenderPartial("Foo2", Model.FooBar2); %> Now say for instance that Model.FooBar2 was null. What I am experiencing from the strongly typed partial view is an error that says "This view expected a model of type FooBar2 but got a model of type FooBarHolder." Why is this happening instead of just passing in a null?

    Read the article

  • before_filter not inheriting from parent controller correctly?

    - by Scott
    Sorry if this may be a stupid question but I'm unable get my filters to inherit the way the Rails 3 documentation is saying it should. Specifically I have an Admin controller that was generated via: rails generate controller admin I added only a single action to the admin controller, the before filter & the private filter method class AdminController < ApplicationController before_filter require_admin_creds def index end private def require_admin_creds unless current_user && current_user.admin? flash[:error] = ... redirect_to .... end end end I next then created my nested resources under the admin section with: rails generate scaffold admin/model While my admin index is indeed getting the filter, the admin/model index (or any other actions) are not. What is happening under the hood here that I must have excluded? Thanks in advance.

    Read the article

  • 2 Minute question - HTML / CSS If div within div expands expand parent div

    - by Ozaki
    I have a setup lets say like follows: <div id="nav"> <div id="innernav"> //With dynamic content here. </div> </div> I am running a script that sizes #nav to the size of the browser window in height. But sometimes my dynamic content is now getting bigger than the height of the window.. Is there a way I can enforce that when #innernav exceeds #nav that #nav will increase in size?

    Read the article

  • OpenERP model tracking external resource, hooking into parent's copy() or copy_data()

    - by CB.
    I have added a new model (call it crm_lead_external) that is linked via a new one2many on crm_lead. Thus, my module has two models defined: an updated crm_lead (with _name=crm_lead) and a new crm_lead_external. This external model tracks a file and as such has a 'filename' field. I also created a unique SQL index on this filename field. This is part of my module: def copy(self, cr, uid, id, default=None, context=None): if not default: default = {} default.update({ 'state': 'new', 'filename': '', }) ret = super(crm_lead_external, self).copy(cr, uid, id, default, context=context) #do file copy return ret The intent here is to allow an external entity to be duplicated, but to retarget the file path. Now, if I click duplicate on the Lead, I get an IntegrityError on my unique constraint. Is there a particular reason why copy() isn't being called? Should I add this logic to copy_data()? Myst I really override copy() for the lead? Thanks in advance.

    Read the article

  • Child elements changing opacity with parent Image

    - by mitch
    I have a <div> element which has a background image. On top of that I have some text that is hidden but when the user hovers over the <div> element that text will show and the <div> opacity will lower. My problem is when you hover over the div all elements inside that change opacity as well. I have looked through stackoverflow to see if anyone has the same problem but all i found were answers that had RGBA using background colors (not images). Here is my css: .pic{ background-image:url(http://www.granitesportsinstitute.com/wp-content/uploads/2014/06/Green-Sea-Turtle-150x150.jpg); -webkit-transition: all .3s ease-in-out; -moz-transition: all .3s ease-in-out; -o-transition: all .3s ease-in-out; transition: all .3s ease-in-out; } .textstuff{ visibility:hidden; } .pic:hover .textstuff{ visibility:visible; color:black; } .pic:hover{ filter: alpha(opacity=30); -moz-opacity: 0.3; -khtml-opacity: 0.3; opacity: 0.3; } HTML HERE: <div class="pic" style="height:150px;width:150px;"> <div class="textstuff">this is text</div> </div>

    Read the article

  • Calling from a parent file in python

    - by Teifion
    I have a file called main.py and a file called classes.py main.py contains the application and what's happening while class.py contains some classes. main.py has the following code main.py import classes def addItem(text): print text myClass = classes.ExampleClass() And then we have classes.py classes.py class ExampleClass (object): def __init__(self): addItem('bob') Surprisingly enough that's not the actual code I am using because I've stripped out anything that'd get in the way of you seeing what I want to do. I want to be able to call a method that's defined in main.py from a class within classes.py. How do I do this? Thanks in advance

    Read the article

  • jQuery ajax.load div, then have parent container access property

    - by Brett
    So I have a tabbed ui "form", each tab is quiet complicated so it is loaded via the .load('item.html'); command. All good, when the user clicks to a different tab, I want to read a property, maybe execute a function from within the ajax loaded div. What is the best way to get to these properties and methods from outsite the ajax loaded div?

    Read the article

  • how does an object knows about its parent in javascript

    - by alter
    Lets suppose I made a class called Person. var Person = function(fname){this.fname = fname;}; pObj is the object I made from this class. var pObj = new Person('top'); now I add one property to Person class, say lname. Person.prototype.lname = "Thomsom"; now pObj.lname gets me "Thomson". My question is that, when pObj didn't find the property lname in it, how does it know where to look for.

    Read the article

  • How to inherit methods from a parent class in C++

    - by Pat
    When inheriting classes in C++ I understand members are inherited. But how does one inherit the methods as well? For example, in the below code, I'd like the method "getValues" to be accessible not through just CPoly, but also by any class that inherits it. So one can call "getValues" on CRect directly. class CPoly { private: int width, height; public: void getValues (int* a, int* b) { *a=width; *b=height;} }; class CRect: public CPoly { public: int area () { return (width * height); } }; In other words, is there any way to inherit methods for simple generic methods like getters and setters?

    Read the article

  • Prevent event from parent element to child element in jquery

    - by sonam
    I have binded event as below: $(document).delegate('.budget', 'click', function(e){ if ($(this).hasClass('collapsed')) { $(this).removeClass('collapsed'); $(this).addClass('expanded'); } else if ($(this).hasClass('expanded')) { $(this).removeClass('expanded'); $(this).addClass('collapsed'); } }); Basically this toggles between expand and collapse. I have another event binded as below: $('[id^="tree"]').delegate('.collapsed', 'click', function(e){ var elementId = $(this).attr('id'); hideChildElement(elementId); }); The elements binded by the second event binding are parents of elements binded by first event binding. What happens is that on clicking on the element from the first binding event method also triggers the event binded by second event binding. I want to prevent any events from binding from second event binding to 1st event binding method. If element A is binded to click event from first event binding and B is binded to second event binding (A is inside B or A is child of B), I dont want any event of B to propagate to A. Note I tried e.stopImmediatePropagation(); but did not worked

    Read the article

  • Why does my ConfirmButtonExtender cause full postbacks after I've toggled its parent usercontrol's v

    - by zk812
    Hello all, I have a series of usercontrols on a page that are displayed based on a selection. Each usercontrol contains a Delete button with a ConfirmButton/ModalPopupExtender combo attached to it. This works great when first loading any of the usercontrols--clicking delete shows my Confirm Modal popup and hitting yes or no causes an async postback to perform the operation. But if I move away from the usercontrol and come back to it, the Confirm Modal Popup appears but clicking yes or no now causes a full postback (the operation does still take place). Why does changing the visible property cause this?

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >