Falcon Space. HOWTO General

How can I quickly transfer a solution (tables, forms, pages) to another database?

There are 2 ways to do this:

  1. Through the transfer package. Specify in the package which procedures, database tables,  forms, tables, pages are included in the package and generate a single SQL migration script.
  2. Single transfer - for tables, forms and pages (on the page editing page), click the generate SQL button and it gives the SQL to be executed on another database. 

How to quickly edit pages and component parameters

To quickly edit components, use the icons next to the name.

To quickly edit the page, there is an icon on the right in breadcrumbs.

However, keep in mind that on the table column Management page, this button works for the system table “table column”, and not for the entity that you are currently configuring.

How to make a specific action button

Use the forms in the modal window to do this (see the documentation for forms):

  • Place the button,
  • you attach a form to it with the output of some information for reading via GetItem.
  • when saveItem executes the operation.

Animation of elements. How to work with animation

To do this, in the GetLayout procedure, enable animation in SELECT 1:

1 EnableAnimation

Animation applies by default to the following elements:

  • Opening/closing modal Windows
  • Appearance of headlines
  • Messages about the results of operations.

You can also use your own animation. To do this, the element in the class must specify animated bounce.

bounce - this is the animation type and can be changed. All types of animations - https://daneden.github.io/animate.css/

Example:

<div class="animated zoomIn"></div>

How to animate icons

To do this, specify a special class on the icon: faa-[type] animated

Change the speed - faa-slow, faa-fast. 

For animation when hovering over the parent button - use classes  faa-parent and animated-hover

Example:

<a href="#" class="faa-parent animated-hover">
  <i class="fas fa-wrench faa-wrench"></i>
  &nbsp;faa-wrench
</a>

Documentation for all types of icon animation - https://l-lin.github.io/font-awesome-animation/

How to make hotkeys for events (pressing a button)

Fill in the section Hot keys (table as_hotkeys) key combination and specify jQuery selector the button that should be called with this key combination.

Note. By default, Ctrl+ Alt + [Num] acts as a call to the quick menu drop-down items (Fast Add Links).

Where can I edit the search procedure, the procedure for common Layout elements, the procedure for periodic launch, and so on?

In the System stored procedures section (/home/p/sysSP), you can edit the specified procedures.  

How do I show the user's balance at the top of my dashboard?

Specifying The system SQL (falcon_getLayoutInfo) elements BalanceSum, BalanceText, BalanceLink and BalanceIcon.

How to make lazy loading for images

Use the img tag instead of src data-src. When loading these images, the script (as.ark.imageLazyLoading) will run and load the src attribute.

How to change the message display duration:

In the as.ark.options settings, you need to set the parameters:

  • alertSuccessDelay: 10000,
  • alertWarningDelay: 120000,
  • alertDangerDelay: 240000

How can I add dynamic items (such as Projects) to the menu?

To do this, do union with the current content in the stored procedure pg_getMepuPages.

The added items will automatically be assigned as child items in the menu based on the parentID.

How to send an Email, SMS, or notification to a user

Use for this 2 SELECT in SaveItem in form. If you specify the correct parameters, you can immediately send a message using the specified parameters.

Where to get a user's photo

The user's photo can be requested at this address  /Controls/Resource/GetFile?code=userPhoto&user=demo1

How to create subdomains with different languages for a site

  1. All domains are directed to 1 application and specify a license for each in web.config.
  2. Specifying the GetLayout setting defaultLang depending on the @url variable.

How to manage the page “404 Page not found”

To do this, use the standard page code - notFound. Creating a page with this URL (notFound) and prepared document for it.

The page will issue a 404 http status.

Note. You may also need to set the Error Pages parameters in IIS: IIS / Site / Error Pages / Edit Feature Settings / put Redirect and Detailed Errors

How to create a new website design theme

The site theme is a separate css file for SB Admin Template.  

  • In Visual studio, changing the file \Content\sb-admin\scss\_variables.scss (color lines).
  • Executing the task sb-admin-css in the task Manager.
  • Create a folder with the theme code in /uploads and put the settings file in it _variables.scss and the generated css file (located at \Content\sb-admin\css\sb-admin-2.min.css).
  • In procedure GetlayoutInfo specify the code of the theme (the First SELECT option Theme).

Tracking all user actions in the system

You can capture all calls from the user. They will be saved in the trace table with the code action.

To do this, in the web.config of the project in the appSettings section, specify the parameter logUserAction=”1”.

Tracking changes to stored procedures and pages (logChanges)

Logging changes to stored procedures and some other fields are done in the table as_changeLog. You can disable this option in Configuration/logChanges

How to set up the Cabinet menu

The Cabinet menu consists of pages that have a check mark Display in the menu, as well as on the basis of access to the pages of the current user.

The parent element sets the nesting of the menu.

Order sets the order of menu items.

You can also set an icon for a menu item.

Maximum nesting level of the menu - 2.

Creating new components, custom development for the project.

If the project is deployed in Solution mode, you can create your own business logic managers (in the Web project in the BLL folder, for example DemoManager).

Such business logic will be available in the controller via the webMng property (the controller must inherit from BaseController).

How to create functionality:

  1. Creating an interface similar with IDemoManager
  2. Creating a class similar with DemoManager
  3. Creating a link with WebManager (editing the IWebmanager interface and the Webmanager class)
  4. Creating a controller in Area with the project name and inheriting from BaseController
  5. Create your own JS in the /js/falcon/ folder (it can be minified using the ready-made GULP command, the final JS file will be located in /JS/Falcon-min/)

How to set up a help chat for users

Using replain chats - https://replain.cc/

Get the key and specify it in the GetLayoutInfo procedure in the HelpChatKey parameter (you can simply insert it as a key, or as replain:{key}).

The chat icon will load in the lower right corner.

Messages will be sent to your Telegram (or Facebook messenger) associated with this replay chat.

Note. Check and delete the connection replain.cc in the settings in CommonScripts (previously, the connection was there).

How to withdraw money data

To do this, use the function dbo.as_num(str, digits) - this will allow you to output numbers divided by digits.

How to spice up the interface and make it more attractive

It is important that the user likes the interface. For this:

  1. Use the buttons styles:
  1. btn-outline-primary - contour buttons
  2. btn-gradient - buttons with a gradient (non-native Bootstrap class)
  3. icons in buttons
  1. Use cards
  2. Use the shape and gradient background styles bg-success, bg-gradient-warning
  3. Use the element shadow shadow-lg
  4. Use badge and pills (badge badge-pill badge-primary)
  5. Use the appearance animation. Classes animated bounceIn delay-3s. https://daneden.github.io/animate.css/

How to show an element enlarged when hovering (for example, a table cell)

To do this, specify the class as-zoom the element. When hovering, the element will increase by 1.5 times in place.

How to disable swipe to open the menu

You must set BodyClass = as-disableSlideoutMenu in GetLayout. In this case, the menu will open only by clicking the button (swipe will not work).

How can I allow some roles to enter html in forms?

By default, only roles can enter html admin, editor, siteManager 

in Web.Config / AppSettings specify disableAntiXSSRoles="user,admin,editor,siteManager"

What should I do if an open tab is reset when the page is reloaded? 

On the page in the js field, connect the script: 

$(document).ready(function(){
	$('a[data-toggle="tab"]').on('show.bs.tab', function(e) {
		localStorage.setItem('activeTab', $(e.target).attr('href'));
	});
	var activeTab = localStorage.getItem('activeTab');
	if(activeTab){
		$('#myTab a[href="' + activeTab + '"]').tab('show');
	}
});

The tab layout itself should look like this:

<ul class="nav nav-tabs nav-fill" id="myTab">
  <li class="nav-item">
    <a class="nav-link active" data-toggle="tab" href="#projects">Projects</a>
  </li>
  <li class="nav-item">
    <a class="nav-link" data-toggle="tab" href="#reviews">Reviews</a>
  </li>
  <li class="nav-item">
    <a class="nav-link" data-toggle="tab" href="#bids">Bets</a>
  </li>
</ul>
<div class="tab-content">
  <div class="tab-pane active mt-2" id="projects">
    <div class="as-table" data-code="modProjects"></div>
  </div>
  <div class="tab-pane mt-2 fade" id="reviews">
    <div class="as-table" data-code="modReviews"></div>
  </div>
  <div class="tab-pane mt-2 fade" id="bids">
    <div class="as-table" data-code="modBids"></div>
  </div>
</div>


Falcon Space is a functional web development platform on a narrow stack MS SQL/Bootstrap. Falcon Space Gettting started

Falcon Space Platform

This is a reduction in the cost of ownership

at the expense of fewer people to support

This is a quick change

while using the program

This is a modern interface

full adaptation for mobile devices

 
Note