Posts

javascript - jQuery get link id -

i'm trying id-attribute of dynamic generated table. if click on first link want "editemploee-4". <table id="example" class="table span12 table-bordered table-hover"> <thead> <tr> <th>firstname</th> <th>lastname</th> <th>edit</th> </tr> </thead> <tbody> <tr> <td>person 1</td> <td>name person 1</td> <td><a href="#" class = "editdialog" id="editemployee-4"><img src="img/edit.png" height="20" /></a></td> </tr> <tr> <td>person 2</td> <td>name person 2</td> <td><a href="#" class = "editdialog" id="editemployee-5"><img src="img/edit.png" height="20" />...

asp.net mvc - Include script in orchard cms partiall view? -

i have partial view in orchard cms have include, problem when include using script page not loading? here partilla view called list-projectionwidget.cshtml @using orchard.mvc.html; @using orchard.ui.resources; @using (script.head()) { <style type="text/css"> .featureslider li { height:@(model.group.groupheight)px; width:@(model.group.groupwidth)px; background-color:@(backgroundcolor); } .featureslider li h2, .featureslider li h3, .featureslider li h2 a, .featureslider l1 p.slidenumbers { color:@(foregroundcolor) !important; } .featureslider li span { width:@(model.group.imagewidth)px; height:@(model.group.imageheight)px; } .featureslider li span img, .featureslider li span img { width:@(model.group.imagewidth)px; height:@(model.group.imageheight)px; } div#slidenav a.activeslide { background-color: @(foregroundcolor); } .featureslider li p { position: relative; top:@(model.group.groupheight - 25)px; } ...

NHibernate Save Is Trying to Clear Child KeyColumn Id On Update -

i trying create parent object has multiple children in 1 many relationship. not referencing parent object on child object, instead mapping keycolumn field. when try save object first time, works expected without issues (cascading id's , children). when try object database, update properties on , re-save again, fails. actual error message getting "could not delete collection". the error above due fact trying set "parentid" field on child objects null (which violates fk constraint have in db). if remove constraint db, end result want; however, not want perform update (setting parent id null) @ , i'm not sure why is. can tell in sql code generating , sending db, else appears correct , work if wasnt last update statement. obviously, must have wrong mapping cannot figure out what. tried adding not.keyupdate() made not generate key @ all. have ideas doing wrong?? thanks in advance, appreciate it!!! please see below mapping: public class parent ...

algorithm - What is your favorite phrase, saying, or quote expressed as code? -

do not explicitly state saying, in comments or otherwise. code should express itself! for example: for (person person : people) { if (!housetypeenum.glass_house.equals(person.getresidence().gethousetype())){ throw new stonesexception(); } } this simple expression compact know... 2b || !2b or regex /(bb|[^b]{2})/

javascript - CKEditor Stylesheet in document -

we offering our customers html editor adjust email templates. email templates have custom stylesheet @ top. something linke this: <style type="text/css"> div, p, a, li, td { -webkit-text-size-adjust:none; text-decoration:none;} @font-face {font-family: 'elegible_nova_rgbold_italic';src: url('http://sub.example.com/mailing/defaultfiles/elegiblenova-boldit-webfont.eot');src: url('http://sub.example.com/mailing/defaultfiles/elegiblenova-boldit-webfont.eot?#iefix') format('embedded-opentype'),url('http://sub.example.com/mailing/defaultfiles/elegiblenova-boldit-webfont.woff') format('woff'),url('http://sub.example.com/mailing/defaultfiles/elegiblenova-boldit-webfont.ttf') format('truetype');font-weight: normal;font-style: normal;} </style> however, when loaded ckeditor css isn't in source of document. how can make sure css in "text area" , outputted well? i'm using creditor 3...

visual studio - DSFML building error (VisualD) -

Image
and @ first, sorry bad english. first project in d. , first project sfml (dsfml of course). i use dub making visual studio project (i use vs2010). open , set project settings: general compiler linker autocomplete works correctly: when try build project, here error: error 42: symbol undefined _d5dsfml8graphics12__moduleinfoz how can resolve it? this particular error saying can't find actual d code library. mean dub isn't grabbing/linking source somewhere, i've never used dub ide can't sure. my suggestion figure out going wrong , fix issue bug maintainer (who me, actually) on github opening issue lack of tutorials ide's available d right now. if want started dsfml right now, however, can sort of follow along command line tutorial , use basis of figuring out libraries need linked in, set import search paths, etc.

javascript - Filling a form in an Angular.js app using PhantomJS -

i want test angularjs application using phantomjs. first step fill login form username field (let's assume there no other fields). (in real browser) field controlled angular (it has ng-model attribute) , whole form has ng-submit attribute. so in phantomjs script do input username page.evaluate(function () { document.getelementsbyname('username')[0].value = 'tester'; }); take screenshot , see 'tester' present in input page.render('myfile.jpg'); click on submit button: page.evaluate(function () { document.getelementbyid('go').click(); }); take screenshot. what see happens button gets clicked, message displayed says value of username empty. guess model not updated. tried set these values using jquery - same result. how correctly input values fields controlled angular? phantomjs provides sendevent function can used implement rudimentary sendkeys , need focus on element first: function sendkeys(page...