Loading src/main/bundles/max-dev/max-dev.xqm +16 −2 Original line number Diff line number Diff line Loading @@ -78,11 +78,11 @@ function max-dev:index() as element(){ type="checkbox" checked="checked" title="désactiver le bundle" onclick="fetch('/setbundle?enabled=' + this.checked + '&bundle={$name}').then(() => window.location.reload(true));"/></li> onclick="fetch('/bundles/max-dev/setbundle?enabled=' + this.checked + '&bundle={$name}').then(() => window.location.reload(true));"/></li> else <li>{$name} <input type="checkbox" title="activer le bundle" onclick="fetch('/setbundle?enabled=' + this.checked + '&bundle={$name}').then(() => window.location.reload(true));"/></li> onclick="fetch('/bundles/max-dev/setbundle?enabled=' + this.checked + '&bundle={$name}').then(() => window.location.reload(true));"/></li> } </ul> </section> Loading Loading @@ -161,3 +161,17 @@ declare %private function max-dev:route-list() as element(){ return $maxRoutes }; declare %rest:path("/bundles/max-dev/setbundle") %rest:query-param("bundle","{$bundle}") %rest:query-param("enabled","{$enabled}") function max-dev:set-bundle-enabled($bundle as xs:string, $enabled as xs:boolean) as empty-sequence(){ let $ignorePath := utils:get-bundles-path() || $bundle || '/.ignore' return if($enabled) then file:delete($ignorePath) else file:write($ignorePath, '') }; No newline at end of file src/main/core/routes.xqm +0 −15 Original line number Diff line number Diff line Loading @@ -149,21 +149,6 @@ function routes:sources-export($indent as xs:string) as item()+{ }; declare %rest:path("/setbundle") %rest:query-param("bundle","{$bundle}") %rest:query-param("enabled","{$enabled}") function routes:set-bundle-enabled($bundle as xs:string, $enabled as xs:boolean) as empty-sequence(){ let $ignorePath := utils:get-bundles-path() || $bundle || '/.ignore' return if($enabled) then file:delete($ignorePath) else file:write($ignorePath, '') }; (:~ : Returns a static file. : @param $filepath file or unknown path Loading Loading
src/main/bundles/max-dev/max-dev.xqm +16 −2 Original line number Diff line number Diff line Loading @@ -78,11 +78,11 @@ function max-dev:index() as element(){ type="checkbox" checked="checked" title="désactiver le bundle" onclick="fetch('/setbundle?enabled=' + this.checked + '&bundle={$name}').then(() => window.location.reload(true));"/></li> onclick="fetch('/bundles/max-dev/setbundle?enabled=' + this.checked + '&bundle={$name}').then(() => window.location.reload(true));"/></li> else <li>{$name} <input type="checkbox" title="activer le bundle" onclick="fetch('/setbundle?enabled=' + this.checked + '&bundle={$name}').then(() => window.location.reload(true));"/></li> onclick="fetch('/bundles/max-dev/setbundle?enabled=' + this.checked + '&bundle={$name}').then(() => window.location.reload(true));"/></li> } </ul> </section> Loading Loading @@ -161,3 +161,17 @@ declare %private function max-dev:route-list() as element(){ return $maxRoutes }; declare %rest:path("/bundles/max-dev/setbundle") %rest:query-param("bundle","{$bundle}") %rest:query-param("enabled","{$enabled}") function max-dev:set-bundle-enabled($bundle as xs:string, $enabled as xs:boolean) as empty-sequence(){ let $ignorePath := utils:get-bundles-path() || $bundle || '/.ignore' return if($enabled) then file:delete($ignorePath) else file:write($ignorePath, '') }; No newline at end of file
src/main/core/routes.xqm +0 −15 Original line number Diff line number Diff line Loading @@ -149,21 +149,6 @@ function routes:sources-export($indent as xs:string) as item()+{ }; declare %rest:path("/setbundle") %rest:query-param("bundle","{$bundle}") %rest:query-param("enabled","{$enabled}") function routes:set-bundle-enabled($bundle as xs:string, $enabled as xs:boolean) as empty-sequence(){ let $ignorePath := utils:get-bundles-path() || $bundle || '/.ignore' return if($enabled) then file:delete($ignorePath) else file:write($ignorePath, '') }; (:~ : Returns a static file. : @param $filepath file or unknown path Loading