jquery/commit
We cannot use the cpack name as an internal alias name.
author | Jan Wielemaker |
---|---|
Fri Jun 22 11:55:11 2012 +0200 | |
committer | Jan Wielemaker |
Fri Jun 22 11:55:11 2012 +0200 | |
commit | 8e2a411a2c900d7b5e1fabf8c3ed665b4694de2b |
tree | 9d7c34824c267a13f50d0f3d0c22d9203b8435bd |
parent | 64ecfbabfb82224229a2df625a979695cb46921a |
Diff style: patch stat
diff --git a/lib/jquery.pl b/lib/jquery.pl index 14539c7..bb571c1 100644 --- a/lib/jquery.pl +++ b/lib/jquery.pl @@ -1,3 +1,32 @@ +/* Part of ClioPatria SeRQL and SPARQL server + + Author: Jan Wielemaker + E-mail: J.Wielemaker@vu.nl + WWW: http://www.swi-prolog.org + Copyright (C): 2012 VU University Amsterdam + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + As a special exception, if you link this library with other files, + compiled with a Free Software compiler, to produce an executable, this + library does not by itself cause the resulting executable to be covered + by the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + :- module(jquery, [ jquery_depends/2, % +File, -DependsOn use_jquery//1 % +Component @@ -10,13 +39,12 @@ /** <module> JQuery declarations and utilities */ -user:file_search_path(web, web). -user:file_search_path(jquery, js('jquery-ui')). -http:location(jquery, js('jquery-ui'), []). +user:file_search_path(jquery_js, js('jquery-ui')). +http:location(jquery_js, js('jquery-ui'), []). :- html_resource(jquery, [ virtual(true), - requires(jquery('jquery-1.7.2.js')) + requires(jquery_js('jquery-1.7.2.js')) ]). %% use_jquery(+Component)// @@ -26,7 +54,7 @@ http:location(jquery, js('jquery-ui'), []). use_jquery(Component) --> { declare_dependencies(Component) }, - html_requires(jquery(Component)). + html_requires(jquery_js(Component)). :- dynamic @@ -35,17 +63,17 @@ use_jquery(Component) --> declare_dependencies(Component) :- dep_declared(Component), !. declare_dependencies(Component) :- - jquery_depends(jquery(Component), Files), + jquery_depends(jquery_js(Component), Files), maplist(wrap_jq, Files, Deps), ( Deps == [] - -> html_resource(jquery(Component), [requires(jquery)]), + -> html_resource(jquery_js(Component), [requires(jquery)]), assertz(dep_declared(Component)) - ; html_resource(jquery(Component), [requires(Deps)]), + ; html_resource(jquery_js(Component), [requires(Deps)]), assertz(dep_declared(Component)), maplist(declare_dependencies, Files) ). -wrap_jq(File, jquery(File)). +wrap_jq(File, jquery_js(File)). %% jquery_depends(+File, -Files) is det. @@ -59,7 +87,7 @@ jquery_depends(File, Files) :- jquery_component(Path, File, Component) :- absolute_file_name(File, AbsFile, [relative_to(Path)]), - absolute_file_name(jquery(.), JQueryDir), + absolute_file_name(jquery_js(.), JQueryDir), directory_file_path(JQueryDir, Component, AbsFile). jq_depends(Files) -->