Skip to content

Commit

Permalink
Merge pull request #48 from mksmanish79/#43-function-undefined-error
Browse files Browse the repository at this point in the history
checked function exist
  • Loading branch information
nikhilmandeeps authored Sep 4, 2020
2 parents 8754b0c + d4f4aab commit 6e6d98a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,7 @@ private static void ProcessFileUpload(dynamic _UIElement, Dictionary<string, str
UIEngineInfo["InitScript"] += Environment.NewLine + "$scope." + _UIElement.Name.Value + "Click_GetFiles = function (fid) { if (fid != undefined) {setTimeout(function () {$('#folders' + fid).closest('li').children('span.glyphicon-triangle-right').click();}, 100);$('[identifier=\"" + UIEngineInfo["identifier"] + "\"]').find('[data-name=\"" + _UIElement.Name.Value + "\"]').find('.folders').css('font-weight', ''); $('[identifier=\"" + UIEngineInfo["identifier"] + "\"]').find('[data-name=\"" + _UIElement.Name.Value + "\"]').find('#folders' + fid).css('font-weight', 'bold');if($scope." + _UIElement.Name.Value + "TableState!=undefined){$scope." + _UIElement.Name.Value + "TableState.pagination.start=0;}; $scope.Pipe_" + _UIElement.Name.Value + "Pagging($scope." + _UIElement.Name.Value + "TableState); } };";
UIEngineInfo["InitScript"] += Environment.NewLine + "$scope." + _UIElement.Name.Value + "Click_SelectFile = function (event,fileid) {$('[identifier=\"" + UIEngineInfo["identifier"] + "\"]').find('[data-name=\"" + _UIElement.Name.Value + "\"]').find('td.r_file ').css({\"background-color\": \"initial\", \"font-weight\": \"initial\"}); $(event.target).parent('td').css({\"background-color\": \"#eee\", \"font-weight\": \"bold\"}); common.webApi.get('Upload/GetFile', 'identifier=\"" + UIEngineInfo["identifier"] + "\"&fileid=' + fileid).success(function (data) { if (data != undefined && data != null) { $scope." + _UIElement.Name.Value + ".queue = []; $scope." + _UIElement.Name.Value + ".selectqueue = []; $scope." + _UIElement.Name.Value + ".selectqueue.push({ filename: data.Name, fileid: data.FileId, fileurl: data.FileUrl }); $scope." + _UIElement.Name.Value + "Click_FileUpoad();} }) };";
}
UIEngineInfo["InitScript"] += Environment.NewLine + "$scope." + _UIElement.Name.Value + "Click_GetSubFolders = function (event, folder) { var $this = $(event.currentTarget); if ($this.hasClass(\"fa-caret-right\") && $this.parent().find('> .rootfolder li').length <= 0) { common.webApi.get('Upload/GetSubFolders', 'identifier=" + UIEngineInfo["identifier"] + "&folderid='+ folder.Value).success(function (data) { if (data != undefined && data != null) { folder.children = data; setTimeout(function () { $this.toggleClass(\'fa-caret-right fa-caret-down\'); if ($this.hasClass(\'fa-caret-down\')) $this.parent().find(\'> .rootfolder\').addClass(\'show\'); else $this.parent().find(\'> .rootfolder\').removeClass(\'show\'); $scope.BindFolderEvents(folder.Value);}, 2) } }); } else { if ($this.parent().find(\'> .rootfolder li\').length <= 0) return; $this.toggleClass(\'fa-caret-right fa-caret-down\'); if ($this.hasClass(\'fa-caret-down\')) $this.parent().find(\'> .rootfolder\').addClass(\'show\'); else $this.parent().find(\'> .rootfolder\').removeClass(\'show\'); } };";
UIEngineInfo["InitScript"] += Environment.NewLine + "$scope." + _UIElement.Name.Value + "Click_GetSubFolders = function (event, folder) { var $this = $(event.currentTarget); if ($this.hasClass(\"fa-caret-right\") && $this.parent().find('> .rootfolder li').length <= 0) { common.webApi.get('Upload/GetSubFolders', 'identifier=" + UIEngineInfo["identifier"] + "&folderid='+ folder.Value).success(function (data) { if (data != undefined && data != null) { folder.children = data; setTimeout(function () { $this.toggleClass(\'fa-caret-right fa-caret-down\'); if ($this.hasClass(\'fa-caret-down\')) $this.parent().find(\'> .rootfolder\').addClass(\'show\'); else $this.parent().find(\'> .rootfolder\').removeClass(\'show\'); if(typeof $scope.BindFolderEvents != 'undefined'){$scope.BindFolderEvents(folder.Value);}}, 2) } }); } else { if ($this.parent().find(\'> .rootfolder li\').length <= 0) return; $this.toggleClass(\'fa-caret-right fa-caret-down\'); if ($this.hasClass(\'fa-caret-down\')) $this.parent().find(\'> .rootfolder\').addClass(\'show\'); else $this.parent().find(\'> .rootfolder\').removeClass(\'show\'); } };";
if (_UIElement.autopaging == true)
{
UIEngineInfo["PreInitScript"] += Environment.NewLine + "$scope.Pipe_" + _UIElement.Name.Value + "Pagging = function (tableState) { if($('[type=\"search\"]').val().length==0 && tableState!=undefined) tableState.search=[]; var uid = null; if ($scope.ui.data.Uid != undefined && $scope.ui.data.Uid.Value != undefined) uid = $scope.ui.data.Uid.Value; $scope." + _UIElement.Name.Value + "TableState = tableState; tableState.pagination.numberOfPages = 0; var keyword = \"\"; if (tableState.search.predicateObject != undefined && tableState.search.predicateObject.$ != undefined) keyword = tableState.search.predicateObject.$; var folderid = $scope.ui.data.Folders.Value; if($('[identifier=\"" + UIEngineInfo["identifier"] + "\"]').find('[data-name=\"" + _UIElement.Name.Value + "\"]').find('.folders[style=\"font-weight: bold;\"]').attr('id')!=undefined) folderid = $('[identifier=\"" + UIEngineInfo["identifier"] + "\"]').find('[data-name=\"" + _UIElement.Name.Value + "\"]').find('.folders[style=\"font-weight: bold;\"]').attr('id').replace('folders', ''); common.webApi.get('Upload/GetFiles', 'identifier=" + UIEngineInfo["identifier"] + "&folderid=' + folderid + '&uid=' + uid + '&skip=' + tableState.pagination.start + '&pagesize=' + tableState.pagination.number + '&keyword=' + keyword).success(function (data) { if (data != null) { tableState.pagination.numberOfPages = data.Pages; $('.chkfidall').removeAttr('checked'); $('.chkfid').removeAttr('checked'); $scope." + _UIElement.Name.Value + "Files = []; $.each(data.Files, function (key, Value) { $scope." + _UIElement.Name.Value + "Files.push(Value); }) } }) };";
Expand Down

0 comments on commit 6e6d98a

Please sign in to comment.