-default:
+default:
../../../bin/nitc --semi-global converter.nit
HTTPD_PY := python $(NACL_SDK_ROOT)/tools/httpd.py
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
-# limitations under the License.
+# limitations under the License.
-->
<!DOCTYPE html>
<html>
<div class="form-group">
<label for="inputConvert" class="col-sm-2 control-label">Convert</label>
<div class="col-sm-9">
- <div class="row">
+ <div class="row">
<div id="pre-input" class="col-xs-2">
<input id="input" type="text" class="form-control" placeholder="ex: 300" required>
</div>
<div class="col-xs-3">
<select id="from" class="form-control" required>
- <option selected="selected" disabled="disabled">Currency</option>
+ <option selected="selected" disabled="disabled">Currency</option>
<option>EUR</option>
<option>CAD</option>
<option>USD</option>
<div class="form-group">
<label for="inputTo" class="col-sm-2 control-label">to</label>
<div class="col-sm-9">
- <div class="row">
+ <div class="row">
<div class="col-xs-2">
<input id="rez" type="text" class="form-control" placeholder=".col-xs-2" disabled="disabled" style="visibility: hidden">
</div>
<div class="col-xs-3">
<select id="to" class="form-control" required>
- <option selected="selected" disabled="disabled">Currency</option>
- <option>EUR</option>
- <option>CAD</option>
- <option>USD</option>
- </select>
+ <option selected="selected" disabled="disabled">Currency</option>
+ <option>EUR</option>
+ <option>CAD</option>
+ <option>USD</option>
+ </select>
</div>
</div>
</div>
// Checks that the text in the input is numeric and not null
// and then if two currencies where chosen sends a dictionary to Nit.
$( "#button" ).click(function() {
- $("#pre-input").removeClass("has-error");
- if (($('#input').val() == "")||($.isNumeric($('#input').val()) == false)) {
- $("#pre-input").addClass("has-error");
- }
- else
- {
- if (($('#from').val() != null) && ($('#to').val() != null)) {
- var dictionary = {
- value: parseFloat($('#input').val()).toFixed(2),
- from: $('#from').val(),
- to: $('#to').val(),
+ $("#pre-input").removeClass("has-error");
+ if (($('#input').val() == "")||($.isNumeric($('#input').val()) == false)) {
+ $("#pre-input").addClass("has-error");
+ }
+ else
+ {
+ if (($('#from').val() != null) && ($('#to').val() != null)) {
+ var dictionary = {
+ value: parseFloat($('#input').val()).toFixed(2),
+ from: $('#from').val(),
+ to: $('#to').val(),
+ }
+ converterModule.postMessage(dictionary);
}
- converterModule.postMessage(dictionary);
}
- }
});
}
static PP_Bool Instance_HandleDocumentLoad(PP_Instance pp_instance, PP_Resource pp_url_loader) {
- // TODO
+ // TODO
return PP_FALSE;
}
var native_value = native_get(native_key)
return native_value.to_nit
end
-
- # Set function using PepperVars.
+
+ # Set function using PepperVars.
#
# Sets the value associated with the specified key.
# 'key' must be a String typed PepperVar.
fun native_delete(key: PepperVar) `{
g_varDictionaryInterface->Delete(*self, *key);
`}
-
+
# Deletes the specified key and its associated value, if the key exists.
#
# Takes a String.
- fun delete(key: String)
+ fun delete(key: String)
do
var native_key = key.to_pepper
native_delete native_key