Permalink
Browse files

Dont compile sample code. Added link_x element to support title attri…

…bute.
  • Loading branch information...
1 parent 4fefd20 commit 371a623094ff2db850a309a7049e6135c08de354 @kaos kaos committed Jun 1, 2009
View
6 Emakefile
@@ -1,8 +1,4 @@
-{'src/*', [
+{'src/*/*', [
{i, "include"},
{outdir, 'ebin'}
]}.
-{'src/element_tabs/*.erl', [
- {i, 'include'},
- {outdir, 'ebin'}
- ]}.
View
3 include/nitrogen_elements.hrl
@@ -5,8 +5,11 @@
-record(force_reload_on_back_button, {?ELEMENT_BASE(element_force_reload_on_back_button)}).
-record(image_x, {?ELEMENT_BASE(element_image_x), image, alt, width, height, usemap}).
-record(textarea_x, {?ELEMENT_BASE(element_textarea_x), text="", html_encode=true, rows=2, columns=20}).
+-record(link_x, {?ELEMENT_BASE(element_link_x), text="", title="", body="", html_encode=true, url="javascript:", postback}).
-record(tabs, {?ELEMENT_BASE(element_tabs), tabs=[], options=[], tag}).
-record(tab, {id=wf:temp_id(), title="No Title", body=[], tag, url}).
+-record(menu, {?ELEMENT_BASE(element_menu), text="", body=[]}).
+-record(lightbox_transparent, {?ELEMENT_BASE(element_lightbox_transparent), body="" }).
%% Actions
-record(tab_destroy, {?ACTION_BASE(action_tabs_methods)}).
View
3 src/element_tabs/element_tabs.erl
@@ -74,4 +74,5 @@ html_id(Id) ->
tab_link(#tab{ url=undefined, id=Id, title=Title }) ->
#link{ url="#" ++ html_id(Id), body=Title };
tab_link(#tab{ url=Url, id=Id, title=Title }) ->
- #link{ url=Url, title=html_id(Id), body=Title }.
+ %% only needed until nitrogens #link supports the title attribute
+ #link_x{ url=Url, title=html_id(Id), body=Title }.
View
5 src/element_tabs/web_samples_tabs.erl
@@ -1,4 +1,6 @@
-module (web_samples_tabs).
+-ifdef(samples).
+
-include ("wf.inc").
-compile(export_all).
@@ -26,3 +28,6 @@ event(_) -> ok.
tabs_event(_Evt, _TabsTag, _TabTag, _Index) ->
ok.
+
+-endif.
+
View
11 src/nitrogen_extended/element_lightbox_transparent.erl
@@ -1,12 +1,15 @@
-module (element_lightbox_transparent).
--include_lib("eunit/include/eunit.hrl").
--include("dinamo_wf.hrl").
--include("dinamo.hrl").
+-include_lib("nitrogen/include/wf.inc").
+-include("nitrogen_elements.hrl").
+
+%-include_lib("eunit/include/eunit.hrl").
+%-include("dinamo_wf.hrl").
+%-include("dinamo.hrl").
-compile(export_all).
--record(lightbox_transparent, {?ELEMENT_BASE(element_lightbox_transparent), body="" }).
+%-record(lightbox_transparent, {?ELEMENT_BASE(element_lightbox_transparent), body="" }).
% desc: the same as basic lightbox, but with transparent background
View
5 src/nitrogen_extended/element_menu.erl
@@ -1,8 +1,9 @@
-module (element_menu).
-compile(export_all).
--include_lib("lib/nitrogen/include/wf.inc").
--record(menu, {?ELEMENT_BASE(element_menu), text="", body=[]}).
+-include_lib("nitrogen/include/wf.inc").
+-include("nitrogen_elements.hrl").
+%-record(menu, {?ELEMENT_BASE(element_menu), text="", body=[]}).
% desc: Provides a collapsable menu. The menu options are specified
% as listitem elements in the body.

0 comments on commit 371a623

Please sign in to comment.