diff --git a/compile.pl b/compile.pl
index 39c0180..9f74e93 100644
--- a/compile.pl
+++ b/compile.pl
@@ -8,6 +8,9 @@
# Get the template file
my $template = read_file("templates/index.tpl");
+# Remove mocks
+$template =~ s/(.|\n)*//s;
+
# Find and replace
my @replaced;
for my $to_replace ( split("\n", $template) ){
@@ -20,9 +23,8 @@
my $url = $element->attr("href");
print "found '$url'\n";
push @replaced, "\n";
- }elsif( $to_replace =~ m{link.*(static|src).*html} ){
- my $element = HTML::TreeBuilder->new_from_content( $to_replace )->look_down( _tag => "link", href => qr/(static|src)/ );
- my $url = $element->attr("href");
+ }elsif( $to_replace =~ m/\@\@include\('(.*html)/ ){
+ my $url = $1;
print "found '$url'\n";
push @replaced, "\n" . read_file("$url") . "\n";
}else{
diff --git a/index.html b/index.html
index 627d2cf..ec0c6b0 100644
--- a/index.html
+++ b/index.html
@@ -129,13 +129,36 @@
font-weight: normal;
}
+
+
-
+
-
+
+
+
@@ -11234,12 +11293,17 @@ Connection screen help
// Get a list of possible options
if( this.type.options ){
- this.options = this.definition.find(".options .option").get().map(function(option){ return {value: $(option).attr('value'), description:$(option).text()}; });
+ this.options = this.definition.find(".options .option").get().map(function(option){ return {value: $(option).attr('value'), description:$(option).text(), active: ( $(option).attr('value') == line.value ? true : false )}; });
}
// Display this screen
this.display('raw_configuration_option_screen');
+ // If adequate, add fancy switches
+ if( this.type.options ){
+ $(".edit_options input").bootstrapSwitch();
+ }
+
// If adequate, add a spinner
if( this.type.number || this.type.speed ){
var input = $(".edit_box input");
@@ -11268,15 +11332,31 @@ Connection screen help
},
display_pin_info: function( pin_number ){
+
+ // Separate the pin number into it's components
+ var name, options;
+ var found = pin_number.match(/(\d+\.\d+)([\^ov\!\@]+)/);
+ if( found !== null ){
+ name = found[1]; options = found[2];
+ }else{
+ name = pin_number;
+ }
+
// Find the pin in the definitions
- var pin = $("#pin_definitions div[pin='" + pin_number + "']");
+ var pin = $("#pin_definitions div[pin='" + name + "']");
$("#pin_information").html( this.pin_template({
pin: pin,
number: pin.attr('pin'),
description: pin.html(),
found: pin.length,
+ pullup: ( /\^/.test(options) ? true : false ),
+ pulldown: ( /v/.test(options) ? true : false ),
+ opendrain: ( /o/.test(options) ? true : false ),
+ invert: ( /\!/.test(options) ? true : false ),
+ repeater: ( /\@/.test(options) ? true : false )
}));
+ $(".pin-options input").bootstrapSwitch();
}
@@ -11287,32 +11367,7 @@ Connection screen help
-
-
-
-
-
+