Posts

javascript - sharepoint content query webpart: hide empty column with jquery -

i want hide list column in editform.aspx </script> <script language="javascript"> $(document).ready(function() { $('nobr:contains("columnname")').closest('tr').hide() }); </script> it works. want hide it, if there no value. how this? $(document).ready(function() { if ($('nobr:contains("columnname")').val() == "") { $('nobr:contains("columnname")').closest('tr').hide() } });

How to get a route value in the view (Asp.net Mvc) -

is there alternative route value in view page instead of read querystring ? @html.actionlink("language resources", "index", "languageresource", new { languagecode = request.querystring["languagecode"] , "") don't rule out keeping simple: public actionresult action(int id) { return view( id); } indicate type of model we're dealing with @model int and refer value in typed way via: @model

c# - Transform Web.config Hibernate configuration VS 2012 -

i have web.config: <?xml version="1.0"?> <configuration> <configsections> <section name="hibernate-configuration" type="nhibernate.cfg.configurationsectionhandler, nhibernate" requirepermission="false"/> </configsections> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory> <property name="connection.driver_class">nhibernate.driver.oracleclientdriver</property> <property name="connection.connection_string">{old_connection}</property> <property name="dialect">nhibernate.dialect.oracle10gdialect</property> <property name="proxyfactory.factory_class">nhibernate.bytecode.defaultproxyfactoryfactory, nhibernate</property> <property name="show_sql">false</property> <property name="query.substitutions...

jquery - how parameter inside function works? -

html <p>this <b>bold</b> paragraph.</p> <button>add</button> jquery $("button").click(function(){ $("p").text(function(i,origtext){ return "old text: " + origtext + " new text: hello world! (index: " + + ")"; }); }); i know origtext not called outside function returning value. how? demo as docs says function(index, text) a function returning text content set. receives index position of element in set , old text value arguments. and how jquery’s .text() work, internally?

version control - New SDK drop... how to instruct git that certain files are moved? -

i've been working on sdk i've received new code drop for. when starting on project created import branch on committed sdk , merged master branch first commit. but there's new version of sdk , noticed lot has changed in directory structure. quite lot files have been moved subdirectories improve structuring of codebase guess. so want have new commit on import branch merging master easier don't know how instruct git files have been moved. git mv file_a dir_a/file_a ...doesn't work because target file exists. tried: git mv -f file_a dir_a/file_a isn't want either since target location overwritten content of old version. i tried gitmoving first resemble new directory structure , copying over. git still sees remove of old file , addition of new file. so way proceed here? tips/pointers welcome! git not track moves can't directly. git tries identify moved files on fly looking see if file added lot file deleted. git rm old files ,...

extjs - extjs4 CheckboxModel select all -

Image
i want checkboxmodel appear checked when grid rendered: this code: sm = ext.create('ext.selection.checkboxmodel', { listeners: { selectionchange: function (sm, selections) { // must refresh view after every selection sm.view.refresh(); } } }) the grid: { xtype: 'gridpanel', title: 'gridtitle', selmodel: sm, store: my_store, columns: { items:[ .. ] } } you use afterrender listeners of grid select rows : listeners:{ afterrender:function( thisobj, eopts ){ var sm=thisobj.getselectionmodel(); sm.selectall(true); } },

sql server 2008 - SQL query select row when match is made, select other row when match is not made -

i have 2 tables: attribuut attribuutvalue they have one-to-many relationship. attribuut can have multiple attribuutvalues. these attribuutvalues contain states. now want query gives me latest attribuutvalue attribuut, has: state 3 or state 6 . then hit problem: when attribuut contains attribuutvalue state 4 , latest attribuutvalue state 3 should shown. select distinct * attribuut att left join attribuutvalue value on (value.attribuuthead = att.displayid) value.status = 3 or (value.status = 6 , not exists (select * attribuutvalue value2 value2.valueid = value.valueid , value2.status = 4)) order valueid desc however gives me not resultset want. there still attribuutvalues state 4 shown. , doesnt give me last record in list... first problem have in not exists sub-query. should have joined on attribuuthead , not valueid (which presume unique key on table) second missing mechanism filter 1 value per attribuuthead . row_number() can achieve t...