This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Written by Gabor Somogyi 2015 | |
'External declarations | |
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long | |
Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long | |
Private Declare Sub Sleep Lib "kernel32" (ByVal lngMilliSeconds As Long) | |
'Declare the custom variable for GetCursorPos | |
Private Type POINTAPI | |
X As Long |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function agDropDownEditor(params, optionsName, optionsList) { | |
_.set(params.$scope, optionsName+'.optionsList', optionsList); | |
var html = '<span style="width:100%; display:inline-block" ng-show="!'+optionsName+'.editing" ng-click="'+optionsName+'.startEditing()">{{data.'+params.colDef.field+'}}</span> ' + | |
'<select style="width:100%" ng-blur="'+optionsName+'.editing=false" ng-change="'+optionsName+'.editing=false" ng-show="'+optionsName+'.editing" ng-options="item for item in '+optionsName+'.optionsList" ng-model="data.'+params.colDef.field+'">'; | |
// we could return the html as a string, however we want to add a 'onfocus' listener, which is not possible in AngularJS | |
var domElement = document.createElement("span"); | |
domElement.innerHTML = html; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- based on http://blog.falafel.com/t-sql-drop-all-objects-in-a-sql-server-database/ | |
declare @stmt nvarchar(max) | |
-- procedures | |
select @stmt = isnull( @stmt + '', '') + 'drop procedure '+ quotename(schema_name(schema_id)) + '.'+ quotename(name) from sys.procedures | |
-- check constraints | |
select @stmt = isnull( @stmt + '', '') + 'alter table '+ quotename(schema_name(schema_id)) + '.' + quotename(object_name( parent_object_id )) | |
+ ' drop constraint '+ quotename(name) from sys.check_constraints |