This file contains hidden or 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
app.filter('orderMe', function ($filter){ | |
return function(items, sorter){ | |
if(sorter === 'price') | |
{ | |
return $filter('orderBy')(items, 'price'); | |
} | |
if(sorter === 'theme') | |
{ | |
return _.filter(items, 'theme'); | |
} |
This file contains hidden or 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
//loads the javascripts that groupsdocs viewer needs | |
<head>@Html.CreateViewerScriptLoadBlock().LoadJquery().LoadJqueryUi()</head> | |
<div id="documentContainer"></div> | |
@(Html.ViewerClientCode() | |
.TargetElementSelector("#documentContainer") | |
.Stream(SomeDotNetStream) // fetch document from a stream | |
//.Url("SomeUrl") fetch from a url | |
//.FilePath("SomeFile") fetch from filepath |
This file contains hidden or 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
<add name="ViewDocumentHandler" verb="GET,POST" path="document-viewer/ViewDocumentHandler" type="Groupdocs.Web.UI.Handlers.ViewDocumentHandler, Groupdocs.Viewer, Culture=neutral" /> | |
<add name="GetDocumentPageImageHandler" verb="GET,POST" path="document-viewer/GetDocumentPageImageHandler" type="Groupdocs.Web.UI.Handlers.GetDocumentPageImageHandler, Groupdocs.Viewer, Culture=neutral" /> | |
<add name="LoadFileBrowserTreeDataHandler" verb="GET,POST" path="document-viewer/LoadFileBrowserTreeDataHandler" type="Groupdocs.Web.UI.Handlers.LoadFileBrowserTreeDataHandler, Groupdocs.Viewer, Culture=neutral" /> | |
<add name="GetImageUrlsHandler" verb="GET,POST" path="document-viewer/GetImageUrlsHandler" type="Groupdocs.Web.UI.Handlers.GetImageUrlsHandler, Groupdocs.Viewer, Culture=neutral" /> | |
<add name="GetCssHandler" verb="GET" path="document-viewer/CSS/GetCssHandler" type="Groupdocs.Web.UI.Handlers.CssHandler, Groupdocs.Viewer, Culture=neutral" /> | |
<add name="images" verb="GET" path="document-viewer/images/*" type="Groupdocs.W |
This file contains hidden or 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
Viewer.InitRoutes(); | |
Viewer.SetRootStoragePath(Server.MapPath("SomePath")); // Documents will also be cached here | |
Viewer.SetLicensePath(Server.MapPath("SomePathToYourLisenceFile")); |
This file contains hidden or 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
class Array | |
def randomize | |
sort_by { rand } | |
end | |
def randomize! | |
self.replace randomize | |
end | |
end | |
class Persons |