Skip to content

Commit 2b12e77

Browse files
committed
demo package html update and no compiled about dialog
1 parent f7f15f4 commit 2b12e77

File tree

16 files changed

+73
-256
lines changed

16 files changed

+73
-256
lines changed

CREDITS.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,8 @@ http://youmightnotneedjquery.com/
167167

168168
## Bootstrap
169169

170-
https://getbootstrap.com/
171-
https://getbootstrap.com/components/#dropdowns
172-
https://getbootstrap.com/docs/3.3/examples/navbar-fixed-top/
173-
174-
http://bootswatch.com/
175-
http://www.tutorialrepublic.com/twitter-bootstrap-tutorial/bootstrap-dropdowns.php
176-
https://stackoverflow.com/questions/9051200/twitter-bootstrap-dropdown-menu
170+
https://getbootstrap.com/docs/4.0/components/buttons/
171+
https://bootswatch.com/
177172

178173
## Markdown
179174

doc/CONSTANTS.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,3 @@ A typical ``{PEB_executable_directory}`` looks like this:
4747

4848
If this file is found during application startup, it is used as the icon of the application and all dialog boxes.
4949
If this file is not found, the default icon embedded in the resources of the browser binary is used.
50-
51-
## About URL
52-
53-
* **About dialog:** ``about.function``

doc/INTERACTIVE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ PEB interactive Perl scripts are able to receive user input multiple times after
88
Each PEB interactive Perl script must have its own event loop waiting constantly for new data on STDIN or in a temporary file for a bidirectional connection with PEB. ``AnyEvent`` is a popular Perl framework for building different types of event loops.
99

1010
* **No Buffering**
11-
PEB interactive scripts should run with no output buffering, which preventing output before the script has ended.
12-
Output buffering could be disabled using the following code:
11+
PEB interactive scripts must run without output buffering, which may prevent output before the script has ended.
12+
Output buffering can be disabled using the following code:
1313

1414
```perl
1515
use English;
@@ -18,8 +18,8 @@ PEB interactive Perl scripts are able to receive user input multiple times after
1818
```
1919

2020
* **Failsafe Print**
21-
Failsafe print is necessary to shut down PEB Perl scripts when PEB unexpectedly crashes.
22-
Failsafe print could be implemented using the following code:
21+
Failsafe print is necessary to shut down PEB Perl scripts if PEB unexpectedly crashes.
22+
Failsafe print can be implemented using the following code:
2323

2424
```perl
2525
print "output string" or shutdown_procedure();
@@ -72,8 +72,8 @@ The following code shows how to start a PEB interactive Perl script right after
7272

7373
The [index.htm of the demo package](https://github.com/ddmitov/perl-executing-browser/blob/master/resources/app/index.html) demonstrates how to start automatically one Perl interactive script based on STDIN input in two instances.
7474

75-
The [interactive.pl script of the demo package](https://github.com/ddmitov/perl-executing-browser/blob/master/resources/app/perl/interactive.pl) is an example of a Perl interactive script based on STDIN input.
75+
The [interactive.pl script of the demo package](https://github.com/ddmitov/perl-executing-browser/blob/master/resources/app/perl-scripts/interactive.pl) is an example of a Perl interactive script based on STDIN input.
7676

7777
The [index-windows.htm of the demo package](https://github.com/ddmitov/perl-executing-browser/blob/master/resources/app/index-windows.html) demonstrates how to start automatically one Perl interactive script based on temporary files in two instances.
7878

79-
The [interactive-windows.pl script of the demo package](https://github.com/ddmitov/perl-executing-browser/blob/master/resources/app/perl/interactive-windows.pl) is an example of a Perl interactive script based on temporary files.
79+
The [interactive-windows.pl script of the demo package](https://github.com/ddmitov/perl-executing-browser/blob/master/resources/app/perl-scripts/interactive-windows.pl) is an example of a Perl interactive script based on temporary files.

doc/SETTINGS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The executable binary file of the browser, ``peb``, ``peb.app``, ``peb.dmg`` or
66

77
## Global Settings API
88

9-
All global PEB settings are stored in a single JavaScript object named ``pebSettings``. This name is mandatory and hard-coded in C++ code. If ``pebSettings`` JavaScript object is not found, no Perl scripts are started automatically, default labels are used for all context menus and JavaScript pop-up boxes, no warning is displayed for unsaved data in local HTML forms and no graceful shutdown of Perl scripts is possible.
9+
All global PEB settings are stored in a single JavaScript object named ``pebSettings``. This name is mandatory and hard-coded in C++ code. If ``pebSettings`` JavaScript object is not found, no Perl scripts are started automatically, default labels are used for all context menus and JavaScript pop-up boxes, no warning is displayed for unsaved data in local HTML forms and no graceful shutdown of interactive Perl scripts is possible.
1010

1111
```javascript
1212
var pebSettings = {};
@@ -66,7 +66,7 @@ Every Perl script run by PEB has a JavaScript settings object with an arbitrary
6666

6767
There are two methods to start a local Perl script:
6868

69-
* **Clicking a link to a pseudo link:**
69+
* **Clicking a pseudo link:**
7070

7171
```html
7272
<a href="test.script">Start Perl script</a>

doc/screenshot.png

10.6 KB
Loading

resources/app/bootstrap/js/bootstrap-dropdown.js

Lines changed: 0 additions & 55 deletions
This file was deleted.

resources/app/index-windows.html

Lines changed: 15 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@
107107

108108
<script src="jquery/jquery-1.12.4.min.js"></script>
109109
<script src="bootstrap/js/bootstrap.js"></script>
110-
<script src="bootstrap/js/bootstrap-dropdown.js"></script>
111110
<script src="peb-demo.js"></script>
112111

113112
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.css" media="all">
@@ -116,55 +115,25 @@
116115
</head>
117116

118117
<body>
119-
<nav class="navbar navbar-default navbar-fixed-top">
120-
<div class="container">
121-
<div class="navbar-header">
122-
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
123-
data-target="#navbar" aria-expanded="false" aria-controls="navbar">
124-
<span class="sr-only">Menu</span>
125-
<span class="icon-bar"></span>
126-
<span class="icon-bar"></span>
127-
<span class="icon-bar"></span>
128-
</button>
129-
</div>
130-
131-
<div id="navbar" class="navbar-collapse collapse">
132-
<ul class="nav navbar-nav">
133-
<li class="dropdown">
134-
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
135-
role="button" aria-haspopup="true" aria-expanded="false">Tests
136-
<span class="caret"></span>
137-
</a>
138-
139-
<ul class="dropdown-menu">
140-
<li><a href="select_file.dialog">Open Existing File</a></li>
141-
142-
<li><a href="new_file_name.dialog">Enter New File Name</a></li>
143-
144-
<li><a href="select_files.dialog">Open Multiple Files</a></li>
145-
146-
<li><a href="select_directory.dialog">Open Directory</a></li>
147-
148-
<li><a href="perl_info.script">Perl Basic Information</a></li>
149-
150-
<li><a href="sqlite.script">SQLite Test</a></li>
151-
152-
<li><a href="javascript:clearTestData();">Clear Test Data</a></li>
153-
154-
<li><a href="javascript:location.reload();">Reload</a></li>
118+
<div class="container">
155119

156-
<li><a href="https://www.google.com/">Google</a></li>
157-
</ul>
158-
</li>
120+
<div class="row">
121+
<a class="btn btn-primary" href="select_file.dialog" role="button">Open File</a>
122+
<a class="btn btn-primary" href="new_file_name.dialog" role="button">New File</a>
123+
<a class="btn btn-primary" href="select_files.dialog">Open Multiple Files</a>
124+
<a class="btn btn-primary" href="select_directory.dialog">Open Directory</a>
125+
</div>
159126

160-
<li><a href="about.function">About</a></li>
161-
</ul>
162-
</div>
127+
<div class="row">
128+
<a class="btn btn-primary" href="perl_info.script">Perl Basic Information</a>
129+
<a class="btn btn-primary" href="sqlite.script">SQLite Test</a>
130+
<a class="btn btn-primary" href="javascript:clearTestData();">Clear Test Data</a>
131+
<a class="btn btn-primary" href="javascript:location.reload();">Reload</a>
132+
<a class="btn btn-primary" href="https://www.google.com/">Google</a>
133+
<a class="btn btn-primary" href="javascript:about();" role="button">About</a>
163134
</div>
164-
</nav>
165135

166-
<div class="container">
167-
<div id="tests"></div>
136+
<div id="tests" class="tests"></div>
168137

169138
<h2>Perl Executing Browser</h2>
170139

resources/app/index.html

Lines changed: 15 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787

8888
<script src="jquery/jquery-1.12.4.min.js"></script>
8989
<script src="bootstrap/js/bootstrap.js"></script>
90-
<script src="bootstrap/js/bootstrap-dropdown.js"></script>
9190
<script src="peb-demo.js"></script>
9291

9392
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.css" media="all">
@@ -96,55 +95,25 @@
9695
</head>
9796

9897
<body>
99-
<nav class="navbar navbar-default navbar-fixed-top">
100-
<div class="container">
101-
<div class="navbar-header">
102-
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
103-
data-target="#navbar" aria-expanded="false" aria-controls="navbar">
104-
<span class="sr-only">Menu</span>
105-
<span class="icon-bar"></span>
106-
<span class="icon-bar"></span>
107-
<span class="icon-bar"></span>
108-
</button>
109-
</div>
110-
111-
<div id="navbar" class="navbar-collapse collapse">
112-
<ul class="nav navbar-nav">
113-
<li class="dropdown">
114-
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
115-
role="button" aria-haspopup="true" aria-expanded="false">Tests
116-
<span class="caret"></span>
117-
</a>
118-
119-
<ul class="dropdown-menu">
120-
<li><a href="select_file.dialog">Open Existing File</a></li>
121-
122-
<li><a href="new_file_name.dialog">Enter New File Name</a></li>
123-
124-
<li><a href="select_files.dialog">Open Multiple Files</a></li>
125-
126-
<li><a href="select_directory.dialog">Open Directory</a></li>
127-
128-
<li><a href="perl_info.script">Perl Basic Information</a></li>
129-
130-
<li><a href="sqlite.script">SQLite Test</a></li>
131-
132-
<li><a href="javascript:clearTestData();">Clear Test Data</a></li>
133-
134-
<li><a href="javascript:location.reload();">Reload</a></li>
98+
<div class="container">
13599

136-
<li><a href="https://www.google.com/">Google</a></li>
137-
</ul>
138-
</li>
100+
<div class="row">
101+
<a class="btn btn-primary" href="select_file.dialog" role="button">Open File</a>
102+
<a class="btn btn-primary" href="new_file_name.dialog" role="button">New File</a>
103+
<a class="btn btn-primary" href="select_files.dialog">Open Multiple Files</a>
104+
<a class="btn btn-primary" href="select_directory.dialog">Open Directory</a>
105+
</div>
139106

140-
<li><a href="about.function">About</a></li>
141-
</ul>
142-
</div>
107+
<div class="row">
108+
<a class="btn btn-primary" href="perl_info.script">Perl Basic Information</a>
109+
<a class="btn btn-primary" href="sqlite.script">SQLite Test</a>
110+
<a class="btn btn-primary" href="javascript:clearTestData();">Clear Test Data</a>
111+
<a class="btn btn-primary" href="javascript:location.reload();">Reload</a>
112+
<a class="btn btn-primary" href="https://www.google.com/">Google</a>
113+
<a class="btn btn-primary" href="javascript:about();" role="button">About</a>
143114
</div>
144-
</nav>
145115

146-
<div class="container">
147-
<div id="tests"></div>
116+
<div id="tests" class="tests"></div>
148117

149118
<h2>Perl Executing Browser</h2>
150119

resources/app/peb-demo.css

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
body {
2-
padding-top: 65px;
3-
}
41

52
pre {
63
margin: 4px;
@@ -9,20 +6,12 @@ pre {
96
font-family: sans-serif;
107
}
118

12-
.navbar .navbar-header {
13-
text-align: center;
14-
vertical-align: middle;
15-
}
16-
17-
.navbar .navbar-nav {
18-
display: inline-block;
19-
float: center;
9+
.btn {
10+
margin-top: 20px;
2011
}
2112

22-
.navbar-toggle {
23-
float: center;
24-
margin: 10px;
25-
vertical-align: middle;
13+
.tests {
14+
margin-top: 20px;
2615
}
2716

2817
.introduction {

resources/app/peb-demo.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,28 @@ function displayTestResult(id, stdout) {
9696
existingElement.innerHTML = existingElement.innerHTML + stdout;
9797
}
9898
}
99+
100+
// About dialog:
101+
function about() {
102+
alert(
103+
"Browser version 1.0.0\n"+
104+
"Qt version 5.5.1\n\n"+
105+
106+
"This program is free software;\n"+
107+
"you can redistribute it and/or modify it under\n"+
108+
"the terms of the GNU Lesser General Public License,\n"+
109+
"as published by the Free Software Foundation;\n"+
110+
"either version 3 of the License,\n"+
111+
"or (at your option) any later version.\n\n"+
112+
113+
"This program is distributed\n"+
114+
"in the hope that it will be useful,\n"+
115+
"but WITHOUT ANY WARRANTY;\n"+
116+
"without even the implied warranty of\n"+
117+
"MERCHANTABILITY or\n"+
118+
"FITNESS FOR A PARTICULAR PURPOSE.\n\n"+
119+
120+
"Dimitar D. Mitov, 2013 - 2019\n"+
121+
"Valcho Nedelchev, 2014 - 2016"
122+
);
123+
}

0 commit comments

Comments
 (0)